Opened 15 years ago

Closed 13 years ago

Last modified 12 years ago

#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)

0001-.-manage.py-makemessages-add-D-switch-for-specifyi.patch (3.7 KB ) - added by filipnoetzel 15 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by Malcolm Tredinnick, 15 years ago

Triage Stage: UnreviewedDesign decision needed

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.

comment:2 by Jannis Leidel, 14 years ago

Owner: Jannis Leidel removed

comment:3 by Chris Beaven, 13 years ago

Severity: Normal
Type: New feature

comment:4 by Jannis Leidel, 13 years ago

Resolution: wontfix
Status: newclosed

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 James Pic, 12 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 ?

Note: See TracTickets for help on using tickets.
Back to Top