FYI, msgfmt can detect such problems:

$ cd transmission-2.82/

$ msgfmt -o /dev/null -c po/hr.po 2>&1 | grep plural
po/hr.po:767: number of format specifications in 'msgid_plural' and 'msgstr[0]' 
does not match
po/hr.po:775: number of format specifications in 'msgid_plural' and 'msgstr[0]' 
does not match

$ grep -B2 -A3 'e %d torrents' po/hr.po
#, c-format
msgid "Remove torrent?"
msgid_plural "Remove %d torrents?"
msgstr[0] "Ukloniti torrent?"
msgstr[1] "Ukloniti %d torrenta?"
msgstr[2] "Ukloniti %d torrenata?"
--
#, c-format
msgid "Delete this torrent's downloaded files?"
msgid_plural "Delete these %d torrents' downloaded files?"
msgstr[0] "Obrisati preuzete datoteke ovog torrenta?"
msgstr[1] "Obrisati preuzete datoteke ova %d torrenta?"
msgstr[2] "Obrisati preuzete datoteke ovih %d torrenata?"

$ msgfmt -o /dev/null -c po/hr.po 2>&1 | grep plural
po/hr.po:767: number of format specifications in 'msgid_plural' and 'msgstr[0]' 
does not match
po/hr.po:775: number of format specifications in 'msgid_plural' and 'msgstr[0]' 
does not match


And i18nspector 0.16, which I've just released, checks for this, too:

$ i18nspector po/hr.po | grep plural
E: po/hr.po: c-format-string-missing-arguments msgid 'Remove torrent?': 0 
(msgstr[0]) < 1 (msgid_plural)
E: po/hr.po: c-format-string-missing-arguments msgid "Delete this torrent's downloaded 
files?": 0 (msgstr[0]) < 1 (msgid_plural)


For the time being, i18nspector understands only the C format, but I plan to add support for other formats later. In the future, it would be also interesting to check messages that don't involve any numerals. For example, I believe that this Russian translation is wrong:

#: apt-private/private-install.cc:519
msgid "Use 'apt-get autoremove' to remove it."
msgid_plural "Use 'apt-get autoremove' to remove them."
msgstr[0] "Для eгo yдaлeния иcпoльзyйтe «apt-get autoremove»."
msgstr[1] "Для иx yдaлeния иcпoльзyйтe «apt-get autoremove»."
msgstr[2] "Для иx yдaлeния иcпoльзyйтe «apt-get autoremove»."

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to