#10869 closed New feature (wontfix)
./manage.py makemessages should let users specify input directories
Reported by: | filipnoetzel | Owned by: | |
---|---|---|---|
Component: | Internationalization | Version: | 1.0 |
Severity: | Normal | Keywords: | makemessages i18n |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When building an multilingual webapp using django reusable apps, one needs to translate them as well (and include the translation strings in the .po file) ..
Unfortunately ./manage.py makemessages only searches the current directory for translatable strings. Suppose, your directory setup is like
bin/ bin/activate lib/ lib/python2.6/ lib/python2.6/site-packages/ lib/python2.6/site-packages/contact_form/ lib/python2.6/site-packages/registration/ source/ source/manage.py source/settings.py source/locale/
There is no way including the needed translations for django-contact-form and django-registration in your .po-files using ./manage.py makemessages
The attached patch takes care of that by adding a "-D" flag (modeled after xgettext's -D flag - http://linux.die.net/man/1/xgettext ) that takes the input directories as parameters. If none is specified the default behaviour (searching in the current directory) is unchanged.
Attachments (1)
Change History (6)
by , 16 years ago
Attachment: | 0001-.-manage.py-makemessages-add-D-switch-for-specifyi.patch added |
---|
comment:1 by , 16 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:2 by , 15 years ago
Owner: | removed |
---|
comment:3 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:4 by , 14 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
While we talked about how translations should be discovered before 1.3, Ramiro and me decided to deprecate project level translations and promote app level translations and the LOCALE_PATHS setting in the future. Closing as wontfix since those options allow dynamic input directories, too.
comment:5 by , 13 years ago
Easy pickings: | unset |
---|---|
UI/UX: | unset |
Question: what if I want to override a translation from an external app for a particular project ? Do I have to fork the app ?
This is potentially a fairly dangerous idea, since it will pull in no end of potentially duplicated strings. Translating on a per-application basis is to be encouraged (and then contributed back to the application), rather than on a "project" level, since it avoid precisely this problem.
I believe this is a semi-duplicate of another ticket in the internationalization component, because I know Marc Garcia and I have discussed this before.