The Wayback Machine - https://web.archive.org/web/20171127202056/https://github.com/mozilla/pdf.js/pull/5692
Skip to content

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[l10n] Treat language as case-insensitive #5692

Merged
merged 1 commit into from Mar 10, 2015

Conversation

Projects
None yet
3 participants
Member

Rob--W commented Feb 2, 2015

RFC 4646 specifies that language tags should be treated case-insensitively, so the previous work-around to #4335 is insufficient: The patch should not be added to compatibility.js, but become a part of the l10n library.

See "Case-insensitive language comparisons per RFC 4646" @ fabi1cazenave/webL10n#51

(I've created this patch because I've noticed that navigator.language is lowercase in Chrome 40: https://code.google.com/p/chromium/issues/detail?id=454331)

[l10n] Treat language as case-insensitive
See "Case-insensitive language comparisons per RFC 4646"
fabi1cazenave/webL10n#51

Removed the "patch" in compatibility.js and fixed the bug in webL10n,
because the logic belongs to webL10n instead of PDF.js.
The immediate motivation for this patch is that Chrome 40 converts
navigator.language to lower case: https://crbug.com/454331
Contributor

timvandermeij commented Feb 27, 2015

@yurydelendik This patch has been merged upstream in the meantime. Could you review this so we can merge it here too?

yurydelendik added a commit that referenced this pull request Mar 10, 2015

Merge pull request #5692 from Rob--W/webl10n-fix
[l10n] Treat language as case-insensitive

@yurydelendik yurydelendik merged commit da258f8 into mozilla:master Mar 10, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Contributor

yurydelendik commented Mar 10, 2015

Thank you for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can't perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.