if (strstr(argv[i], ".strings"))
po = _cupsMessageLoad(argv[i], _CUPS_MESSAGE_STRINGS);
else
- po = _cupsMessageLoad(argv[i], _CUPS_MESSAGE_PO);
+ po = _cupsMessageLoad(argv[i], _CUPS_MESSAGE_PO | _CUPS_MESSAGE_EMPTY);
if (!po)
{
abbreviate(msg->msg, idbuf, sizeof(idbuf)));
}
-
if (!msg->str || !msg->str[0])
{
untranslated ++;
if (pass)
{
- if ((untranslated * 10) >= cupsArrayCount(po) &&
- strcmp(argv[i], "cups.pot"))
+ if (untranslated >= (cupsArrayCount(po) / 10) && strcmp(argv[i], "cups.pot"))
{
/*
* Only allow 10% of messages to be untranslated before we fail...
pass = 0;
puts("FAIL");
- printf(" Too many untranslated messages (%d of %d)\n",
- untranslated, cupsArrayCount(po));
+ printf(" Too many untranslated messages (%d of %d or %.1f%%)\n", untranslated, cupsArrayCount(po), 100.0 * untranslated / cupsArrayCount(po));
}
else if (untranslated > 0)
- printf("PASS (%d of %d untranslated)\n", untranslated,
- cupsArrayCount(po));
+ printf("PASS (%d of %d untranslated or %.1f%%)\n", untranslated, cupsArrayCount(po), 100.0 * untranslated / cupsArrayCount(po));
else
puts("PASS");
}