Closed
Bug 869385
Opened 11 years ago
Closed 4 years ago
Don't use prefs to store chrome package overwrites for locales
Categories
(Core :: Internationalization: Localization, defect)
Core
Internationalization: Localization
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: Pike, Unassigned)
References
Details
In bug 848297, we added infrastructure to overwrite the selected locale of one package with that of another. For that it uses prefs that are set at build time. But those are build settings rather than prefs, we should use a better storage system, if/when we have one.
Comment 1•11 years ago
|
||
To be precise: bug 848297 didn't change the *actual* behavior of the chrome registry when selecting locales. It only changed what the chrome registry reports to the outside world via .getSelectedLocale(package). What people actually want is an API that answers "what is the application locale". I think that instead of misusing .getSelectedLocale("global") for that question, we should just implement an API .getApplicationLocale() and convert clients to that API. Then we can store somewhere that "browser" is the application package for Firefox and so forth, and make the correct .getSelectedLocale(applicationPackage) internally.
Reporter | ||
Comment 2•11 years ago
|
||
That's just part of it. There's also the problem that we're using getSelectedLocale('foo') to determine if the document should fire https://developer.mozilla.org/en-US/docs/CSS/:-moz-locale-dir%28ltr%29 and it's reverse. See http://mxr.mozilla.org/mozilla-central/source/content/xul/document/src/XULDocument.cpp#4658 and etc. This is the code path that made me give up on working around just the 'global' package.
Comment 3•11 years ago
|
||
Why is that a problem? Presumably if you have a document in chrome://somepackage, the locale for that package is going to be correct...
Reporter | ||
Comment 4•11 years ago
|
||
This is what the patch actually does: chrome://global/content/netError.xhml includes chrome://global/locale/netError.dtd, which is overriden by chrome://my-app/locale/netError.dtd. Only at the step of my-app, we're leaving en-US. So to get the locale right for global, we added the override so that if you're asking for global, you get the locale for my-app.
Updated•4 years ago
|
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•