#2044 install/po test generates errors
Closed: Fixed None Opened 12 years ago by jdennis.

make -C install/po test_lang
make[2]: Entering directory `/tmp/buildd/freeipa-2.1.3/install/po'
rm -rf test.po test_locale
/usr/bin/msginit --no-translator -i ipa.pot -l en_US -o test.po
Created test.po.
/bin/sed -i -r -e 's/Language: en_US/Language: xh_ZA/' test.po
/bin/sed -i -r -e 's/^msgstr[ \t]+"(..*)"[ \t]*$/msgstr "\xe2\x86\x92\1\xe2\x86\x90"/' test.po
/bin/sed -i -r -e 's/^msgstr[ \t]+"(.*)(\\n)(.)"[ \t]*$/msgstr "\1\xe2\x86\x90\2"/' test.po
/bin/mkdir -p test_locale/xh_ZA/LC_MESSAGES
/usr/bin/msgfmt -o test_locale/xh_ZA/LC_MESSAGES/ipa.mo test.po
test.po:3036: `msgid' and `msgstr' entries do not both end with '\n'
test.po:9549: `msgid' and `msgstr' entries do not both end with '\n'
test.po:9554: `msgid' and `msgstr' entries do not both end with '\n'
test.po:9559: `msgid' and `msgstr' entries do not both end with '\n'
test.po:9564: `msgid' and `msgstr' entries do not both end with '\n'
test.po:9570: `msgid' and `msgstr' entries do not both end with '\n'

There are a couple of problems with how the test is constructed. The sed script used to insert unicode characters at the beginning and end of the msgstr is too dumb to deal with continuation lines (e.g. adjacent lines starting and ending with a quote are folded together). Also msgfmt seems to be validating newlines, that also runs afoul of our appending a unicode char at the end of a line.

We need to modify the test. Issue one can be addressed by using polib to read the file in and modify the strings rather than using sed, polib knows how to read/write po files and deal with all the syntax of po files.

The second issue is best addressed by constructing the test differently, probably by not using the ipa.pot file as input, rather just a simple po file with just one known test string. This would also eliminate the first problem.

Short story, the test should have been constructed differently.


Moving to next month iteration.

Moving to next month iteration.

Patch submitted

[PATCH 66] Replace broken i18n shell test with Python test

master: 5fe931be69e327455e93c67f63ffe85254d91f4d

ipa-2-2: 4ef3d29

Metadata Update from @jdennis:
- Issue assigned to jdennis
- Issue set to the milestone: FreeIPA 2.2 Core Effort - 2012/03

7 years ago

Login to comment on this ticket.

Metadata