mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-05-09 13:54:44 +00:00
Inside the home view when the setting ENABLE_REFLANG is enabled and the reference language is different from the default rosseta didn't change it. This only happend in Windows due to the pattern '/locale/[a-z]{2}/' and the replacement string '/locale/%s/' % ref_lang. Windows file paths do not use '/' and therefore the re.sub never returned the path of the file we tried to generate.
Poposed solution: We create two new variables pattern and replacement that depend on the OS. These two new variables are used in re.sub.
|
||
|---|---|---|
| .. | ||
| conf | ||
| locale | ||
| static/admin/img | ||
| templates/rosetta | ||
| templatetags | ||
| tests | ||
| __init__.py | ||
| access.py | ||
| apps.py | ||
| models.py | ||
| poutil.py | ||
| signals.py | ||
| storage.py | ||
| urls.py | ||
| views.py | ||