Opened 3 years ago

Closed 3 years ago

Last modified 3 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 Changed 3 years ago by Claude Paroz

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:2 Changed 3 years ago by Claude Paroz

Component: UncategorizedInternationalization

comment:3 Changed 3 years ago by Claude Paroz

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 Changed 3 years ago by Romain Beylerian

The compilemessages command seems to have the same problem.

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

comment:5 Changed 3 years ago by Simon Charette

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 Changed 3 years ago by Ramiro Morales

Has patch: set

comment:8 Changed 3 years ago by Claude Paroz

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

comment:9 Changed 3 years ago by Ramiro Morales <cramm0@…>

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 Changed 3 years ago by Ramiro Morales <cramm0@…>

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