-
Notifications
You must be signed in to change notification settings - Fork 329
Conversation
johngian
commented
Dec 1, 2016
- Exclude /api and /admin URLs from L10N middleware.
- Fix LANGUAGES definition format.
- Use regex for URLs that are not to be localized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+
'^/oidc/authenticate/', | ||
'^/oidc/callback/', | ||
'^/api/v2/', | ||
'^/admin/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add /api/v1
here too.
We should also fix LANGUAGES references that handle languages as dict. |
@@ -118,11 +120,11 @@ def get_langs(): | |||
def lazy_langs(): | |||
from product_details import product_details | |||
|
|||
return dict([(lang.lower(), product_details.languages[lang]['native']) | |||
for lang in get_langs() if lang in product_details.languages]) | |||
return [(lang.lower(), product_details.languages[lang]['native']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, what's the reason for this change? If this is not something relevant to this PR, please revert the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are changing this because of the way Puente
works. It tries to get closer to how django internal l10n support works.
https://docs.djangoproject.com/en/1.10/ref/settings/#languages
* Exclude /api and /admin URLs from L10N middleware. * Fix LANGUAGES definition format. * Use regex for URLs that are not to be localized.