Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#35181 closed Cleanup/optimization (needsinfo)

behaviour of makemessage dont follow documentation

Reported by: Pierre Owned by: nobody
Component: Documentation Version: 4.2
Severity: Normal Keywords: translation, makemessage
Cc: Pierre Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Regarding how the makemessage command choose its locale dirs, the truth that is described here https://stackoverflow.com/a/76261223/11378446
doesn't stick with the documentation. LOCALE_PATHS is not taken into account.

So I suggest to adapt the documentation.

Thank you

Change History (2)

comment:1 by Mariusz Felisiak, 3 months ago

Resolution: needsinfo
Status: newclosed

I'm not sure what exactly do you want to report. As far as I'm aware, LOCALE_PATHS works as documented. Can you be more precise? and state what behavior doesn't match the documentation.

comment:2 by Pierre, 3 months ago

As I understand it, LOCALE_PATHS is only used to find the .mo files but not to tell were are going the .po files, which go in the locale folder of the app if it exists, or in the locale folder of the project if it exists.
On [this page](https://docs.djangoproject.com/fr/4.2/topics/i18n/translation/) it is written
"The script runs over your project source tree or your application source tree and pulls out all strings marked for translation (see How Django discovers translations and be sure LOCALE_PATHS is configured correctly)"
Actually at this stage (creation of the .po files), the LOCALE_PATHS didn't work for me, but maybe it is related to my OS (windows 10).

It is also written:
"A string extracted from a file of an app without any locale directory will either go in a message file under the directory listed first in LOCALE_PATHS or will generate an error if LOCALE_PATHS is empty."
If I have a locale folder in my project folder, the .po files can go there, even without LOCALE_PATHS defined.

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