Closed Bug 1114712 Opened 5 years ago Closed 5 years ago
l10n module doesn't get any language on Linux
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0 Build ID: 20141127111021 Steps to reproduce: While running tests with jpm on my linux system, I noticed that it warned about not having any plural rules for the language "null". I dug into code and quickly found out, that the default value of the pref indicating the locales used for web content is localized under linux. However the l10n/locale module does not account for that and ends up not finding any locale.
Comment on attachment 8540291 [details] [review] Pull Request looks good thanks! this needs a test however.
Attachment #8540291 - Flags: review? → feedback+
Comment on attachment 8540291 [details] [review] Pull Request I've added a test, which checks the functionality of the method when the pref for content locales is localized and not just a string.
Attachment #8540291 - Flags: feedback+ → review?(evold)
Comment on attachment 8540291 [details] [review] Pull Request Looks good! just mentioned a minor thing about using `.trim()` instead of `.replace(...`.
Comment on attachment 8540291 [details] [review] Pull Request Addressed the changes suggested by evold.
Attachment #8540291 - Flags: review- → review?(evold)
Commits pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/504e53cf5cd4c658f9931e79ef2d02fdab2a2228 Bug 1114712 Add tests https://github.com/mozilla/addon-sdk/commit/ee7083842ce810a67e2d84254a7e42bfdff14e74 Merge pull request #1762 from freaktechnik/fix-locale-detection Bug 1114712 - l10n module doesn't get any language on Linux r=erikvold
Attachment #8540291 - Flags: review?(evold) → review+
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.