]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Show number of translated messages, not number of untranslated ones...
authorMichael R Sweet <michael.r.sweet@gmail.com>
Thu, 24 Jan 2019 17:22:44 +0000 (12:22 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Thu, 24 Jan 2019 17:22:44 +0000 (12:22 -0500)
locale/checkpo.c

index 00217af35143793e487c3bd6177c2472c9979646..7a644f548c93f2538f04d3f0a391814001b14413 100644 (file)
@@ -256,7 +256,9 @@ main(int  argc,                             /* I - Number of command-line args */
 
     if (pass)
     {
-      if (untranslated >= (cupsArrayCount(po) / 10) && strcmp(argv[i], "cups.pot"))
+      int count = cupsArrayCount(po);  /* Total number of messages */
+
+      if (untranslated >= (count / 10) && strcmp(argv[i], "cups.pot"))
       {
        /*
         * Only allow 10% of messages to be untranslated before we fail...
@@ -264,10 +266,10 @@ main(int  argc,                           /* I - Number of command-line args */
 
         pass = 0;
         puts("FAIL");
-       printf("    Too many untranslated messages (%d of %d or %.1f%%)\n", untranslated, cupsArrayCount(po), 100.0 * untranslated / cupsArrayCount(po));
+       printf("    Too many untranslated messages (%d of %d or %.1f%% are translated)\n", count - untranslated, count, 100.0 - 100.0 * untranslated / count);
       }
       else if (untranslated > 0)
-        printf("PASS (%d of %d untranslated or %.1f%%)\n", untranslated, cupsArrayCount(po), 100.0 * untranslated / cupsArrayCount(po));
+        printf("PASS (%d of %d or %.1f%% are translated)\n", count - untranslated, count, 100.0 - 100.0 * untranslated / count);
       else
         puts("PASS");
     }