[apparmor] [patch] Ignore untranslated texts in check_po.pl
Christian Boltz
apparmor at cboltz.de
Tue Oct 31 11:07:21 UTC 2017
Hello,
check_po.pl lists lots of false positives saying that
msgstr ""
does not have the (h)otkey translated.
This patch whitelists those untranslated strings.
I also tested (by manually "breaking" a translation) that missing
hotkeys still get noticed.
This bug probably exists since forever, therefore I propose this patch
for 2.9..trunk. (OTOH, nobody noticed it, so maybe trunk is enough ;-)
Note: I still get a few false positives for ru.po (no idea why, similar
texts in the other languages don't cause this) - ideas and fixes welcome.
I also wonder if check_po.pl is still needed - a quick check shows that
test-translations.py catches missing hotkeys while checking for hotkey
conflicts. However, this also means it checks only the translations that
are checked for hotkey conflicts.
[ 06-check_po-untranslated.diff ]
=== modified file 'utils/check_po.pl'
--- utils/check_po.pl 2007-08-15 19:24:49 +0000
+++ utils/check_po.pl 2017-10-31 10:46:25 +0000
@@ -38,7 +38,7 @@
$msgid = $_;
}
if ( /^.*msgstr*/ && $looking_for_msgstr ) {
- unless (/^.*msgstr.*\(\w{1}?\)*/) {
+ unless (/^.*msgstr.*\(\w{1}?\)*/ or /^msgstr ""$/) {
$errors->{$filename}{$line} = {
"msgid" => $msgid,
"msgstr" => $_,
Regards,
Christian Boltz
--
Ich habe es satt, gegen die YaSTs [Linuxconfs, ...] dieser Welt zu
kämpfen, die schlauer sein wollen als ich. Ich will keine
"Bootgrafiken", die die bösen, hässlichen Startmeldungen verdecken.
Und ich will keinen Installer, der mir Partitionierungs"vorschläge"
macht ("Nackenschläge" wäre zutreffender). [Ratti in suse-linux]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20171031/55e2a411/attachment-0001.sig>
More information about the AppArmor
mailing list