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)
comment:1 Changed 7 years ago by
|Component:||Uncategorized → Internationalization|
|Patch needs improvement:||unset|