Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21488 closed Bug (fixed)

django-admin.py makemessages with commas separeted multiple locales doesn't work

Reported by: Romain Beylerian Owned by: nobody
Component: Internationalization Version: 1.6
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hello everyone,

The Django 1.6 documentation says that we can use the command django-admin.py makemessages with commas separated locales to specify multiple locales.

With the command django-admin.py makemessages -l en,fr, I expected Django to create two folders (en and fr) in my locale directory, howerver only one folder is created with the name en,fr.

If I repeat several times the -l option, it works. Here is an example:

$ django-admin.py makemessages -l en,fr
processing locale en,fr

$ django-admin.py makemessages -l en -l fr
processing locale en
processing locale fr

Change History (10)

comment:1 by Claude Paroz, 11 years ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:2 by Claude Paroz, 11 years ago

Component: UncategorizedInternationalization

comment:3 by Claude Paroz, 11 years ago

See commit [6158c79dbef832bc85301]. Tests in that commit are using call_command, which is not always the best way to mimic command line behaviour.

comment:4 by Romain Beylerian, 11 years ago

The compilemessages command seems to have the same problem.

Last edited 11 years ago by Romain Beylerian (previous) (diff)

comment:5 by Simon Charette, 11 years ago

Changing locale='pt,de,ch' to locale=['pt,de', 'ch'] at this line should trigger the regression for makemessages.

compilemessages test should be added to this case.

comment:7 by Ramiro Morales, 11 years ago

Has patch: set

comment:8 by Claude Paroz, 11 years ago

Considering we already support that syntax for -e, I'd vote for keeping it for -l (not a strong opinion, though).

comment:9 by Ramiro Morales <cramm0@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 8750296918072c97a51f6809d19828ce3f1b8d40:

[1.6.x] Fixed #21488 -- Multiple locales treatment in i18n commands.

Removed multiple locales separated by commas variation (that wasn't
working as documented) in favor of simply allowing use of the
--locale/-l options more than once for makemessages and
compilemessages.

Thanks Romain Beylerian for the report and Claude, Simon for their help.

comment:10 by Ramiro Morales <cramm0@…>, 11 years ago

In 62b393c5ae774c9d5d85bf6eda620354d21e61b1:

Fixed #21488 -- Multiple locales treatment in i18n commands.

Removed multiple locales separated by commas variation (that wasn't
working as documented) in favor of simply allowing use of the
--locale/-l options more than once for makemessages and
compilemessages.

Thanks Romain Beylerian for the report and Claude, Simon for their help.

8750296918072c97a51f6809d19828ce3f1b8d40 from stable/1.6.x.

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