Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Refactor KNOWN_LANGUAGES into {DEV,PROD}_LANGUAGES #36

Merged
merged 1 commit into from
Jun 2, 2011
Merged

Refactor KNOWN_LANGUAGES into {DEV,PROD}_LANGUAGES #36

merged 1 commit into from
Jun 2, 2011

Conversation

stasm
Copy link
Contributor

@stasm stasm commented May 25, 2011

Remove KNOWN_LANGUAGES in favor of DEV_LANGUAGES and PROD_LANGUAGES
which are lazily used in LANGUAGES_URL_MAP and LANGUAGES depending on
the value of DEV.

DEV_LANGUAGES are autogenerated from the contents of the locale/
directory in the root of the project.

PROD_LANGUAGES should be maintained manually.

In addition, the commit removes the RTL_LANGUAGES setting which wasn't
used anywhere. Django's default value for LANGUAGES_BIDI is sufficient
and used by django.utils.translation.get_language_bidi.

Remove KNOWN_LANGUAGES in favor of DEV_LANGUAGES and PROD_LANGUAGES
which are lazily used in LANGUAGES_URL_MAP and LANGUAGES depending on
the value of DEV.

DEV_LANGUAGES are autogenerated from the contents of the locale/
directory in the root of the project.

PROD_LANGUAGES should be maintained manually.

In addition, the commit removes the RTL_LANGUAGES setting which wasn't
used anywhere.  Django's default value for LANGUAGES_BIDI is sufficient
and used by django.utils.translation.get_language_bidi.
@jbalogh
Copy link

jbalogh commented May 25, 2011

I don't know the story behind this, but it doesn't sound like a good idea. Having a significant difference like this between dev and prod is going to cause problems because people will see everything working fine in dev.

@stasm
Copy link
Contributor Author

stasm commented May 26, 2011

The thinking behind this is that we'd like to allow the localizers to test their translations early on on dev. OTOH, we don't want all locales to be switched on on prod; localizers need to sign off on the translation once they feel good about it, and only when they do is their locale added to PROD_LANGUAGES.

@fwenzel
Copy link
Member

fwenzel commented Jun 2, 2011

@jbalogh: This is true, but with the three instances of an app (dev, stage, prod), the stage instance will mimic what prod is going to have with the next push. So If all is well on stage, it will be on prod.

fwenzel added a commit that referenced this pull request Jun 2, 2011
Refactor KNOWN_LANGUAGES into {DEV,PROD}_LANGUAGES
@fwenzel fwenzel merged commit 5f6be22 into mozilla:base Jun 2, 2011
willkg added a commit that referenced this pull request Aug 13, 2013
91561d9 Update to Django 1.4.6  r=r1cky
198b178 Merge pull request #42 from dpoirier/update-tower
e8e6095 Update tower
77d2cc7 Merge pull request #36 from jsocol/arecibo
54be25a Merge pull request #40 from peterbe/upgrade-django-session-csrf
963f25c upgrade django-session-csrf for safer keys
d5db036 Drop django-arecibo.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants