#7314 closed defect (invalid)
Building egg from trunk misses locale files
Reported by: | Owned by: | Robert Corsaro | |
---|---|---|---|
Priority: | normal | Component: | AnnouncerPlugin |
Severity: | normal | Keywords: | i18n locale compile_catalog |
Cc: | Trac Release: | 0.12 |
Description
I checked the trunk out of SVN and issued:
python setup.py bdist_egg
and copied the egg to my development server. When the system tries to send an announcement, I get an error KeyError: announcer\locale
. The egg is missing the locale
subdirectory. I fixed it by making a small change in setup.py
at line 72:
'locale/*.*', 'locale/de/LC_MESS AGES/*.po',
(Note: added a space in LC_MESS AGES
to fool the spam filter.)
Attachments (0)
Change History (5)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Keywords: | i18n locale compile_catalog added |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Thanks for !testing and taking care of new localization capabilities in the first place.
Regarding your report this is not a bug, this is the feature.
Think twice, please: PO files are verbatim translations for development, but MO are what gettext will use in the end. If you get an error complaining about missing locale dir, this is only for the fact, that you missed to actually compile any catalog with
python ./setup.py compile_catalog
before you make the egg or do system-wide install. With a PO in your egg you'd never see any translated text. So the error is correct, your complaint and proposed solution is invalid. Did you try with your modification? Certainly not. But you are not alone, this is similar to #7220.
I would have happily accepted a documentation bug against the wiki page, because I did give no pointer for novice in the field of i18n/l10n. Look at wiki documentation, please, that is improved right now. And sorry for the inconvenience. I hope you'll not be distracted by now and continue on testing.
comment:3 Changed 14 years ago by
Whoops! Thanks for correcting me. Since my locale is US English, I'm not used to dealing with locale files. And yes, we will continue testing against the trunk. Thanks.
comment:4 Changed 13 years ago by
Sorry, recent history shows, that I stand corrected instead.
This will be fixed more reliably now by adding a placeholder file to the locale
folder.
comment:5 Changed 13 years ago by
(In [10920]) AnnouncerPlugin: Refactor i18n in a more compatible way, refs #7314, #7666, #7380, #8062 and #9192.
Lessons learned meanwhile with other plugins, so the code applied here has actually been tested and proven to work. This reverts [8409] effectively, but let's keep proper Babel and Trac versions for i18n explicitly as an extra.
After these changes the plugin finally loads cleanly in Trac 0.11 again.
Full traceback on the error message: