]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
New option --use-untranslated.
authorBruno Haible <bruno@clisp.org>
Mon, 1 Aug 2005 11:38:14 +0000 (11:38 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:43 +0000 (12:12 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/msgfmt.c

index e880104e43e72465c8c1090e4ed7fffbb3e81ccd..e66fb8ca28f8fcf6b5b9b29cc63c55e6fd5a2259 100644 (file)
@@ -1,3 +1,13 @@
+2005-05-21  Bruno Haible  <bruno@clisp.org>
+
+       New undocumented option, used by glocale PO files.
+       * msgfmt.c (include_fuzzies): Renamed from include_all.
+       (include_untranslated): New variable.
+       (long_options): Add --use-untranslated.
+       (main): Handle --use-untranslated.
+       (msgfmt_frob_new_message): Test include_untranslated.
+       (msgfmt_comment_special): Update.
+
 2005-07-26  Bruno Haible  <bruno@clisp.org>
 
        * user-email.sh.in (datarootdir): New variable.
index 64910422d7eb0cbd37259a74a5e76dd19f6de081..96dc09732a5a94bdcce1c0e7fea504a24ba63bac 100644 (file)
 static int exit_status;
 
 /* If true include even fuzzy translations in output file.  */
-static bool include_all = false;
+static bool include_fuzzies = false;
+
+/* If true include even untranslated messages in output file.  */
+static bool include_untranslated = false;
 
 /* Specifies name of the output file.  */
 static const char *output_file_name;
@@ -189,6 +192,7 @@ static const struct option long_options[] =
   { "stringtable-input", no_argument, NULL, CHAR_MAX + 8 },
   { "tcl", no_argument, NULL, CHAR_MAX + 7 },
   { "use-fuzzy", no_argument, NULL, 'f' },
+  { "use-untranslated", no_argument, NULL, CHAR_MAX + 12 },
   { "verbose", no_argument, NULL, 'v' },
   { "version", no_argument, NULL, 'V' },
   { NULL, 0, NULL, 0 }
@@ -272,7 +276,7 @@ main (int argc, char *argv[])
        dir_list_append (optarg);
        break;
       case 'f':
-       include_all = true;
+       include_fuzzies = true;
        break;
       case 'h':
        do_help = true;
@@ -348,6 +352,9 @@ main (int argc, char *argv[])
       case CHAR_MAX + 11: /* --csharp-resources */
        csharp_resources_mode = true;
        break;
+      case CHAR_MAX + 12: /* --use-untranslated (undocumented) */
+       include_untranslated = true;
+       break;
       default:
        usage (EXIT_FAILURE);
        break;
@@ -1533,8 +1540,8 @@ msgfmt_frob_new_message (default_po_reader_ty *that, message_ty *mp,
       /* Don't emit untranslated entries.
         Also don't emit fuzzy entries, unless --use-fuzzy was specified.
         But ignore fuzziness of the header entry.  */
-      if (mp->msgstr[0] == '\0'
-         || (!include_all && mp->is_fuzzy && mp->msgid[0] != '\0'))
+      if ((!include_untranslated && mp->msgstr[0] == '\0')
+         || (!include_fuzzies && mp->is_fuzzy && mp->msgid[0] != '\0'))
        {
          if (check_compatibility)
            {
@@ -1597,7 +1604,7 @@ msgfmt_comment_special (abstract_po_reader_ty *that, const char *s)
     {
       static bool warned = false;
 
-      if (!include_all && check_compatibility && !warned)
+      if (!include_fuzzies && check_compatibility && !warned)
        {
          warned = true;
          error (0, 0, _("\