Skip to content

Conversation

muffinresearch
Copy link
Contributor

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling cf28524 on muffinresearch:locale-via-url into 0241897 on mozilla:master.

<IndexRoute component={DiscoPane} />
<Route
path="/:locale/firefox/discovery/pane/:version/:platform/:compatibilityMode"
path="/:lang/firefox/discovery/pane/:version/:platform/:compatibilityMode"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is technically a locale since we accept en-US and pt-BR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throughout all the i18n scripts a lang is formatted consistently as en-US and a locale is en_US.

The lang format is what is used for the lang attribute. The locale format is used for translations and the directories of translations. All the utils provide can convert from lang to locale.

Since the url input is hyphenated it's called a lang in this case.

@mstriemer
Copy link
Contributor

Looks good, r+wc

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 56c827b on muffinresearch:locale-via-url into 41bc721 on mozilla:master.

@muffinresearch muffinresearch merged commit eb34ee8 into mozilla:master Jun 1, 2016
@muffinresearch muffinresearch deleted the locale-via-url branch June 1, 2016 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get the current lang from the URL into the i18n middleware
3 participants