Opened 15 months ago

Closed 15 months ago

Last modified 15 months 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 15 months ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Severity changed from Normal to Release blocker
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 15 months ago by claudep

  • Component changed from Uncategorized to Internationalization

comment:3 Changed 15 months ago by claudep

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 15 months ago by Diskun

The compilemessages command seems to have the same problem.

Last edited 15 months ago by Diskun (previous) (diff)

comment:5 Changed 15 months ago by charettes

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 15 months ago by ramiro

  • Has patch set

comment:8 Changed 15 months ago by claudep

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

comment:9 Changed 15 months ago by Ramiro Morales <cramm0@…>

  • Resolution set to fixed
  • Status changed from new to closed

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 15 months 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