Opened 13 years ago

Last modified 13 years ago

#2913 new defect

./setup build failing to generate locale files due to duplicate string definitions in .po files

Reported by: garycmartin Owned by: RafaelOrtiz
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: localization Version: Unspecified
Severity: Blocker Keywords:
Cc: cjl Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

Trying to get a new bugfix release out for Moon, for the 11.2.0 olpc, build but I can't build the locale files for it as running ./setup build seems to fail on every .po file due to duplicate strings. It fails on the case that activity/activity.info and moon.py both have the string "Moon" in them. Manually deleting one of the strings in the .po resolves the error but after manually editing/testing the first 10 .po corrections I've given up for now on the other 92 .po files I'd need to edit.

./setup build
po/si.po:53: duplicate message definition...
po/si.po:50: ...this is the location of the first definition
msgfmt: found 1 fatal error
ERROR - msgfmt failsd with return code 1.

Change History (5)

comment:1 Changed 13 years ago by garycmartin

FWIW, having just checked the .po files from my previous Moon-11 release, they have only one definition for this string. Looks like it only included the first one it finds from activity/activity.info:2 moon.py:72 and then ignores the subsequent duplicate in moon.py.

comment:2 follow-up: Changed 13 years ago by walter

What should happen is that ./setup.py genpot (which the pootle server will run for you) will find both occurrences and add a comment referencing each in the POT file. Sounds like the si.po file itself is somehow broken and has two entries for the same string.

comment:3 in reply to: ↑ 2 Changed 13 years ago by garycmartin

Replying to walter:

What should happen is that ./setup.py genpot (which the pootle server will run for you) will find both occurrences and add a comment referencing each in the POT file. Sounds like the si.po file itself is somehow broken and has two entries for the same string.

Thanks, interestingly the Moon.pot in git correctly only shows the first single occurrence of the string "Moon", it's all the 100 odd .po files that have the duplicates in.

comment:4 Changed 13 years ago by garycmartin

Wow I discoverd today how much I dislike writing multi line sed scripts ;) Here's the quick fix to get a release out today that removes one of the duplicate "Moon" strings from each .po file:

for f in *.po; do sed '/^\#\: \.\.\/moon\.py\:71/{ N;N;N;d;}' $f > temp; cp temp $f; done; rm temp

So ./steup.py build is happier now, though I still need to manually fixup some of the .po files as they have multiple strings that don't match the /n line endings:

[garycmartin@localhost Moon.activity]$ ./setup.py build
/home/garycmartin/Activities/Moon.activity/po/ps.po:68: `msgid' and `msgstr' entries do not both end with '\n'
/home/garycmartin/Activities/Moon.activity/po/ps.po:76: `msgid' and `msgstr' entries do not both end with '\n'
/home/garycmartin/Activities/Moon.activity/po/ps.po:84: `msgid' and `msgstr' entries do not both end with '\n'
/home/garycmartin/Activities/Moon.activity/po/ps.po:92: `msgid' and `msgstr' entries do not both end with '\n'
/home/garycmartin/Activities/Moon.activity/po/ps.po:100: `msgid' and `msgstr' entries do not both end with '\n'
/home/garycmartin/Activities/Moon.activity/po/ps.po:108: `msgid' and `msgstr' entries do not both end with '\n'
/home/garycmartin/Activities/Moon.activity/po/ps.po:127: `msgid' and `msgstr' entries do not both end with '\n'
/home/garycmartin/Activities/Moon.activity/po/ps.po:135: `msgid' and `msgstr' entries do not both end with '\n'
/home/garycmartin/Activities/Moon.activity/po/ps.po:143: `msgid' and `msgstr' entries do not both end with '\n'
/home/garycmartin/Activities/Moon.activity/po/ps.po:151: `msgid' and `msgstr' entries do not both end with '\n'
msgfmt: found 10 fatal errors
ERROR - msgfmt failed with return code 1.
/home/garycmartin/Activities/Moon.activity/po/bg.po:70: `msgid' and `msgstr' entries do not both end with '\n'
msgfmt: found 1 fatal error
ERROR - msgfmt failed with return code 1.
/home/garycmartin/Activities/Moon.activity/po/te.po:92: `msgid' and `msgstr' entries do not both end with '\n'
msgfmt: found 1 fatal error
ERROR - msgfmt failed with return code 1.
/home/garycmartin/Activities/Moon.activity/po/sw.po:76: `msgid' and `msgstr' entries do not both end with '\n'
/home/garycmartin/Activities/Moon.activity/po/sw.po:144: `msgid' and `msgstr' entries do not both end with '\n'
/home/garycmartin/Activities/Moon.activity/po/sw.po:173: `msgid' and `msgstr' entries do not both end with '\n'
msgfmt: found 3 fatal errors
ERROR - msgfmt failed with return code 1.

comment:5 Changed 13 years ago by cjl

  • Cc cjl added
Note: See TracTickets for help on using tickets.