Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#10867 closed (fixed)

The command makemessages should avoid files inside the locale dir when --all option is specified

Reported by: diegobz Owned by: nobody
Component: Internationalization Version: 1.0
Severity: Keywords: makemessages
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


This patch makes the makemessages management command *see only directories* under the locale path when --all is specified.

Right now Django does not allow to have anything else than directories for languages at that directory. Otherwise it is very important
to have an option to put files there, because some projects might want to have a LINGUAS file.

The LINGUAS file is very useful because that's a way how translators tell the maintainers that a specific language is ready to be used.
Usually the LINGUAS file is updated by the translators themselves and it means that file should be at the same directory where they have
access to commit their translations. Usually 'locale/*'.

Attachments (1)

django-makemessages.patch (688 bytes) - added by diegobz 5 years ago.
makemessages, see only directories, please! (now there we go)

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by diegobz

makemessages, see only directories, please! (now there we go)

comment:1 Changed 5 years ago by jezdez

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

The LINGUAS file seems like a worthwhile convention used by many open source projects, (

comment:3 Changed 5 years ago by mtredinnick

  • milestone set to 1.1
  • Triage Stage changed from Design decision needed to Accepted

The patch is fine for general reasons. LINGUAS is duplicated information in Django's core, given how we operate (we commit only usable translations). For external applications, we don't need to have an opinion -- they can use it or not, we don't care, but shouldn't get in the way. So I'm definitely going to commit this patch, but I'd rather not see any huge discussion about LINGUAS spring up, since it adds no value to this ticket or Django's core.

It's a bug that we don't only process directories right now.

comment:4 Changed 5 years ago by jacob

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

(In [10833]) Fixed #10867: make the makemessages command ignore files and only process directories. Thanks, diegobz.

comment:5 Changed 5 years ago by jacob

(In [10834]) [1.0.X] Fixed #10867: make the makemessages command ignore files and only process directories. Thanks, diegobz. Backport of [10833] from trunk.

comment:6 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.