Problem with translations when the settings module is a folder
|Reported by:||vbmendes||Owned by:||nobody|
|Severity:||Keywords:||translation settings project path|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
My settings module is a folder with some kind of organization, to make things more clean and mantainable. The fact is that django allways gets the project path by the settings module path, so my project path is always wrong: real_project_path/settings.
When I try to create my own translations in my project, django don't recognize it, becouse it looks in real_project_path/settings/locale instead of real_project_path/locale.
I make a very simple patch that fixes this problem, but the better way is to create a simple constant to store the project path. Maybe settings.PROJECT_ROOT_PATH, or something like this. I already have this constant in all my projects, and know of many people with this same practice.
Change History (5)
Changed 7 years ago by vbmendes
comment:1 Changed 7 years ago by anonymous
- Component changed from Uncategorized to Internationalization
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:3 Changed 7 years ago by mtredinnick
- Has patch unset
- Triage Stage changed from Unreviewed to Design decision needed