Closed Bug 1114712 Opened 5 years ago Closed 5 years ago

l10n module doesn't get any language on Linux

Categories

(Add-on SDK Graveyard :: General, defect)

All
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: freaktechnik, Assigned: freaktechnik)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
evold
: review+
evold
: feedback+
Details | Review
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.
Attached file Pull Request
Attachment #8540291 - Flags: review?
OS: All → Linux
Blocks: sdk/l10n
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(...`.
Attachment #8540291 - Flags: review?(evold)
Attachment #8540291 - Flags: review-
Attachment #8540291 - Flags: feedback+
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+
Duplicate of this bug: 1106563
Blocks: 1114752
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Assignee: nobody → martin
You need to log in before you can comment on or make changes to this bug.