[cvslog] Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Sun Oct 14 18:33:01 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2001-10-14 23:32:11 UTC
Commited by: Federico Mennite <ite at techmonkeys.org>

Modified files:
     src/mod/compress.mod/compress.c

Log message:

Finished gettextification in compress.mod, plurals excepted.

---------------------- diff included ----------------------
Index: eggdrop1.7/src/mod/compress.mod/compress.c
diff -u eggdrop1.7/src/mod/compress.mod/compress.c:1.14 eggdrop1.7/src/mod/compress.mod/compress.c:1.15
--- eggdrop1.7/src/mod/compress.mod/compress.c:1.14	Wed Oct 10 05:44:06 2001
+++ eggdrop1.7/src/mod/compress.mod/compress.c	Sun Oct 14 18:32:01 2001
@@ -6,7 +6,7 @@
  * Written by Fabian Knittel <fknittel at gmx.de>. Based on zlib examples
  * by Jean-loup Gailly and Miguel Albrecht.
  *
- * $Id: compress.c,v 1.14 2001/10/10 10:44:06 tothwolf Exp $
+ * $Id: compress.c,v 1.15 2001/10/14 23:32:01 ite Exp $
  */
 /*
  * Copyright (C) 2000, 2001 Eggheads Development Team
@@ -126,20 +126,20 @@
   FILE *fin, *fout;
 
   if (!is_file(f_src)) {
-    putlog(LOG_MISC, "*", "Failed to uncompress file `%s': not a file.",
+    putlog(LOG_MISC, "*", _("Failed to uncompress file `%s': not a file."),
 	   f_src);
     return COMPF_ERROR;
   }
   fin = gzopen(f_src, "rb");
   if (!fin) {
-    putlog(LOG_MISC, "*", "Failed to uncompress file `%s': gzopen failed.",
+    putlog(LOG_MISC, "*", _("Failed to uncompress file `%s': gzopen failed."),
 	   f_src);
     return COMPF_ERROR;
   }
 
   fout = fopen(f_target, "wb");
   if (!fout) {
-    putlog(LOG_MISC, "*", "Failed to uncompress file `%s': open failed: %s.",
+    putlog(LOG_MISC, "*", _("Failed to uncompress file `%1$s': open failed: %2$s."),
 	   f_src, strerror(errno));
     return COMPF_ERROR;
   }
@@ -147,25 +147,25 @@
   while (1) {
     len = gzread(fin, buf, sizeof(buf));
     if (len < 0) {
-      putlog(LOG_MISC, "*", "Failed to uncompress file `%s': gzread failed.",
+      putlog(LOG_MISC, "*", _("Failed to uncompress file `%s': gzread failed."),
 	     f_src);
       return COMPF_ERROR;
     }
     if (!len)
       break;
     if ((int) fwrite(buf, 1, (unsigned int) len, fout) != len) {
-      putlog(LOG_MISC, "*", "Failed to uncompress file `%s': fwrite failed: %s.",
+      putlog(LOG_MISC, "*", _("Failed to uncompress file `%1$s': fwrite failed: %2$s."),
 	     f_src, strerror(errno));
       return COMPF_ERROR;
     }
   }
   if (fclose(fout)) {
-    putlog(LOG_MISC, "*", "Failed to uncompress file `%s': fclose failed: %s.",
+    putlog(LOG_MISC, "*", _("Failed to uncompress file `%1$s': fclose failed: %2$s."),
 	   f_src, strerror(errno));
     return COMPF_ERROR;
   }
   if (gzclose(fin) != Z_OK) {
-    putlog(LOG_MISC, "*", "Failed to uncompress file `%s': gzclose failed.",
+    putlog(LOG_MISC, "*", _("Failed to uncompress file `%s': gzclose failed."),
 	   f_src);
     return COMPF_ERROR;
   }
@@ -228,20 +228,20 @@
   egg_snprintf(mode, sizeof mode, "wb%d", mode_num);
 
   if (!is_file(f_src)) {
-    putlog(LOG_MISC, "*", "Failed to compress file `%s': not a file.",
+    putlog(LOG_MISC, "*", _("Failed to compress file `%s': not a file."),
 	   f_src);
     return COMPF_ERROR;
   }
   fin = fopen(f_src, "rb");
   if (!fin) {
-    putlog(LOG_MISC, "*", "Failed to compress file `%s': open failed: %s.",
+    putlog(LOG_MISC, "*", _("Failed to compress file `%1$s': open failed: %2$s."),
 	   f_src, strerror(errno));
     return COMPF_ERROR;
   }
 
   fout = gzopen(f_target, mode);
   if (!fout) {
-    putlog(LOG_MISC, "*", "Failed to compress file `%s': gzopen failed.",
+    putlog(LOG_MISC, "*", _("Failed to compress file `%s': gzopen failed."),
 	   f_src);
     return COMPF_ERROR;
   }
@@ -262,21 +262,21 @@
   while (1) {
     len = fread(buf, 1, sizeof(buf), fin);
     if (ferror(fin)) {
-      putlog(LOG_MISC, "*", "Failed to compress file `%s': fread failed: %s",
+      putlog(LOG_MISC, "*", _("Failed to compress file `%1$s': fread failed: %2$s"),
 	     f_src, strerror(errno));
       return COMPF_ERROR;
     }
     if (!len)
       break;
     if (gzwrite(fout, buf, (unsigned int) len) != len) {
-      putlog(LOG_MISC, "*", "Failed to compress file `%s': gzwrite failed.",
+      putlog(LOG_MISC, "*", _("Failed to compress file `%s': gzwrite failed."),
 	     f_src);
       return COMPF_ERROR;
     }
   }
   fclose(fin);
   if (gzclose(fout) != Z_OK) {
-    putlog(LOG_MISC, "*", "Failed to compress file `%s': gzclose failed.",
+    putlog(LOG_MISC, "*", _("Failed to compress file `%s': gzclose failed."),
 	   f_src);
     return COMPF_ERROR;
   }
@@ -378,6 +378,7 @@
 
 static int compress_report(int idx, int details)
 {
+  /* FIXME PLURAL: do it in the proper way. */
   if (details)
     dprintf(idx, "    Compressed %u file(s), uncompressed %u file(s).\n",
 	    compressed_files, uncompressed_files);
@@ -424,12 +425,12 @@
   module_register(MODULE_NAME, compress_table, 1, 1);
   if (!module_depend(MODULE_NAME, "eggdrop", 107, 0)) {
     module_undepend(MODULE_NAME);
-    return "This module needs eggdrop1.7.0 or later";
+    return _("This module needs eggdrop1.7.0 or later");
   }
   share_funcs = module_depend(MODULE_NAME, "share", 2, 3);
   if (!share_funcs) {
     module_undepend(MODULE_NAME);
-    return "You need share module version 2.3 to use the compress module.";
+    return _("You need share module version 2.3 to use the compress module.");
   }
 
   uff_addtable(compress_uff_table);
----------------------- End of diff -----------------------



More information about the Changes mailing list