Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1182 closed enhancement (wontfix)

[patch] make-messages.py duplicates strings already translated in sub-directories

Reported by: Antti Kaihola Owned by: hugo
Component: Internationalization Version:
Severity: trivial Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Apps with app-specific translations must reside outside the project tree so make-messages.py won't traverse them when constructing the project gettext catalog.

The attached patch removes the need for this trick by not traversing ./apps by default. A "-p" option is included for the old behavior. The usage message is also improved.

Attachments (2)

make-messages-exclude-apps.diff (1.6 KB ) - added by Antti Kaihola 18 years ago.
make-messages-exclude-existing.diff (820 bytes ) - added by Antti Kaihola 18 years ago.
re-thought implementation looks for .po files and excludes directories based on that

Download all attachments as: .zip

Change History (7)

by Antti Kaihola, 18 years ago

comment:1 by hugo, 18 years ago

Resolution: wontfix
Status: newclosed

Hmm. I don't think that is really needed. Apps that reside within a project should be translated with the project - and apps that should have their own translation should be stored outside the project. I think that's simple enough. Most definitely I won't like the default of make-messages.py to be to skip a folder just because it is named "apps" - that's some implicit rule that isn't obvious to users.

comment:2 by Antti Kaihola, 18 years ago

Resolution: wontfix
Status: closedreopened
Summary: [patch] make-messages.py needs tricks to exclude apps[patch] make-messages.py duplicates strings already translated in sub-directories

The reason I wanted this functionality is that I really like to separate translations of different parts in my project into their own files. It also makes things much easier if I want to copy an app to another project or to a shared location.

I re-thought the implementation and my patch to make-messages.py now automatically excludes any directories which contain the locale/<langcode>/LC_MESSAGES/<domain>.po file. I think it makes sense to not duplicate strings which are already found.

I'm sorry if I'm insisting too much...

by Antti Kaihola, 18 years ago

re-thought implementation looks for .po files and excludes directories based on that

comment:3 by Adrian Holovaty, 18 years ago

Component: ToolsInternationalization
Owner: changed from Adrian Holovaty to hugo
Status: reopenednew

Hugo, what do you think of this?

comment:4 by hugo, 18 years ago

I still think that applications within the project directory should be translated with the project, while separately translated applications should be outside - looking at project directory layout to decide what parts of the directory to traverse sounds a bit hackish to me.

comment:5 by Adrian Holovaty, 18 years ago

Resolution: wontfix
Status: newclosed

I defer to Hugo's judgment on this one, so I'm closing as wontfix. See his comment above.

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