** Changed in: intltool Status: Unknown => Invalid ** Changed in: intltool (Ubuntu) Status: New => Confirmed
-- You received this bug notification because you are a member of Desktop Packages, which is subscribed to intltool in Ubuntu. https://bugs.launchpad.net/bugs/182606 Title: intltool: Would check_po.pl be useful? Status in Internationalization Tool Collection: Invalid Status in “intltool” package in Ubuntu: Confirmed Bug description: Binary package hint: intltool Pidgin has a script named check_po.pl. I'm submitting it here in case it'd be useful as part of the intltool suite. I'll upload it as an attachment once this bug is created. One of our translators said: I think "msgfmt -c" only finds hard errors in .po files. In most cases, the "msgfmt -c" errors prevent the compilation, if they are not fixed: An example: #: ../src/ft.c:442 #, c-format msgid "%s is not a valid filename.\n" msgstr "%s ist kein gültiger Dateiname." Because of the missing line ending ("\n") the file can not be compiled. $ msgfmt -c de.po de.po:2121: `msgid' and `msgstr' entries do not both end with '\n' msgfmt: found 1 fatal error $ make file=`echo de | sed 's,.*/,,'`.gmo && rm -f $file && /usr/bin/msgfmt -o $file de.po de.po:2121: `msgid' and `msgstr' entries do not both end with '\n' /usr/bin/msgfmt: found 1 fatal error *** Error code 1 check_po.pl is more a "lint" tool for gettext. It finds very much possible problems in .po files (from check_po.pl): # Various checks on po file translations: # - printf-style format strings; # - differences in trailing newlines; # - empty (non-fuzzy) msgid; # - likely whitespace errors on joining multi-line entries # Ignores all fuzzy entries. # # Options: # -x Don't do standard checks above (eg, just check one of below). # -n Check newlines within strings; ie, that have equal numbers # of newlines in msgstr and msgid. (Optional because this may # happen legitimately.) # -w Check leading whitespace. Sometimes whitespace is simply # spacing (eg, for widget labels etc), or punctuation differences, # so this may be ok. # -W Check trailing whitespace. See -w above. # -p Check trailing punctuation. # -c Check capitalization of first non-whitespace character # (only if [a-zA-Z]). # -e Check on empty (c.q. new) msgstr I use both tools with the following options: msgfmt: $ LANG=C msgfmt --check --check-accelerators=_ -c de.po This does the standard checks (-c|--check) and also checks presence of keyboard accelerators for menu items. check_po.pl: ./check_po.pl -xnwWpce de.po This does not do the standard checks (because I don't want to see all the "*** Possible non-whitespace line-join problem in msgstr" warnings - I think this are false-positives). But it checks for other problems like different trailung punctuations. See above for the meanings of the other switches. To manage notifications about this bug go to: https://bugs.launchpad.net/intltool/+bug/182606/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp