Hi, On Thu, 9 Jul 2015, Axel Braun wrote:
docb@T520:~/tryton/tryton-3.6.1/b/share/locale/nl_NL/LC_MESSAGES> msgfmt -v -c tryton.po 278 übersetzte Meldungen, 61 ungenaue Übersetzungen, 63 unübersetzte Meldungen.
I use the .mo file generated by msgfmt, but still the error remains: [ 19s] + /usr/lib/rpm/find-lang.sh /home/abuild/rpmbuild/BUILDROOT/tryton-3.6.1-0.i386 tryton --without-C [ 19s] removing translation /usr/share/locale/nl_NL/LC_MESSAGES/tryton.mo: 278 translated messages.
There is no error in the above. The "removing translation" are informative.
Exactly! But my latest comment does not refer to the original message!
Hmm? You have an error message on files generated by pythons msgfmt replacement. Then you have used msgfmt itself on the files and found no error messages. Why do you still think it's not pythons variant that is buggy?
I removed all languages in error from the tarball, just left one language in, and edited this with poedit, and generated an mo file with msgfmt. And the output of msgfmt -v -c tryton.po returned no errors
That's the point. It's the .mo files generated by pythons msgfmt that contain errors, not the original .po files. So you generating the .mo files with proper msgfmt (not pythons variant) "fixes" the problem.
The error is this from your original log: "<stdin>:81: 'msgid' and 'msgstr' entries do not both end with '\n'" and that means that "msgunfmt $file | msgfmt --statistics -o /dev/null" is breaking, and that means that $file was incorrectly generated when the initial build didn't already complain.
docb@T520:~/tryton/tryton-3.6.1/share/locale/nl_NL/LC_MESSAGES> msgunfmt tryton.mo | msgfmt --statistics -o /dev/nul msgfmt: Eingabedatei fehlt »msgfmt --help« gibt weitere Informationen.
Yeah, well, obviously that's not the correct command to use, I abbreviated, you have to apply a little thinking. the actual command line would be: % msgunfmt tryton.mo | msgfmt --statistics -o /dev/null - (Use the .mo file generated from the python msgfmt, _not_ the one you generated yourself with msgfmt)
So yes, it's the python implementation of msgfmt that's broken.
Probably not. But bottom line is that msgfmt does not issue an error, while %find_lang removed the .mo file....
The .mo files aren't removed because of the error but because they are for non-supported languages. Supported languages are all those that have an entry under /usr/share/locale/ in the 'filesystem' package; all others are not supported. 'nl_NL' is one of those non-supported languages. Ciao, Michael.