On Mon, 2011-06-06, Bert Huijben wrote: > Julian Foad wrote: > > Bert Huijben wrote: > > > There are also a lot of translations where the number of '%' characters in > > > the English and translated message doesn't match. (Most in the safe way, > > > but not all of them) > > > > Do you know a way to automate detecting that? It would be good if we > > could add it to the script. > > I have a C# script in the SharpSvn build that converts th .po files > to .Net resources for library users. > For this script these problems are just a warning: I ignore resources > that don't match.
It turns out that these mismatching translations are all marked as 'fuzzy', and the 'msgfmt' program that our Makefile calls on Unix-like systems ignores 'fuzzy' translations by default. It does detect and report any such errors for the translations that it is using. If I ask 'msgfmt' to include fuzzy translations it reports what you saw: $ msgfmt --check --use-fuzzy -o subversion/po/de.mo subversion/po/de.po subversion/po/de.po:1518: number of format specifications in 'msgid' and 'msgstr' does not match subversion/po/de.po:1946: number of format specifications in 'msgid' and 'msgstr' does not match [...] - Julian [...] > de.po(1518): Warning: Percent mismatch in token: Source and > destination URLs appear not to all point to the same repository. vs > Quelle und Ziel scheinen sich nicht im selben Projektarchiv zu > befinden (Quelle: »%s«; Ziel: »%s«) > de.po(1946): Warning: Percent mismatch in token: Cannot merge into > mixed-revision working copy [%lu:%lu]; try updating first vs Kann > nicht zurück in eine Arbeitskopie mit verschiedenen Revisionen > integrieren, versuchen Sie erst zu aktualisieren [...]