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

Fix bug 1188047: Add accept_lang support to subscribe. #143

Merged

Conversation

pmclanahan
Copy link

Also updates get_best_language to also search for 2 letter
languages in our supported list.

@pmclanahan
Copy link
Author

@jgmize r? when you get a chance.

Also updates get_best_language to also search for 2 letter
languages in our supported list.
@@ -485,8 +498,11 @@ def get_best_language(languages):
if not languages:
return None

# try again with 2 letter languages
languages_2l = [lang[:2] for lang in languages]
Copy link

Choose a reason for hiding this comment

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

Would you mind confirming that we don't need to worry about 3 letter language codes here? I'm guessing not, just double checking.

Copy link
Author

Choose a reason for hiding this comment

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

Confirmed. So far we only deal with a small list of languages, and none are 3 letter.

@jgmize
Copy link

jgmize commented Aug 10, 2015

r+, nice work.

My question about language codes wouldn't be a blocker for merge even if it were needed, as that could be easily added later.

I like the simplicity of including the accept_lang in the POST data instead of the header.

pmclanahan pushed a commit that referenced this pull request Aug 10, 2015
…8047

Fix bug 1188047: Add accept_lang support to subscribe.
@pmclanahan pmclanahan merged commit 2634d4c into mozilla:master Aug 10, 2015
@pmclanahan pmclanahan deleted the add-accept-lang-subscribe-1188047 branch August 10, 2015 14:04
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.

None yet

3 participants