Open
Bug 602887
Opened 16 years ago
Updated 4 years ago
Firefox localizations make use of OS locale occasionally, leading to inconsistencies
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
NEW
People
(Reporter: beltzner, Unassigned)
Details
Hi.
So, over in bug 579547 there was a big ol' debate about using the OS locale to pull a localized date for inclusion in our UI. The consensus was that since Firefox doesn't always match the OS locale, we couldn't use an OS localization in our UI. Seemed to make sense.
Then I discover over in bug 597852 that we have *always* used the OS locale in order to pull the appropriate decimal format when displaying numbers in our UI.
As the french might say: q'est-ce-que quoi?
If the argument is that someone using a fr or de version of Firefox on their en-US operating system would be shaken to their core to see decimal points instead of virgules, or a Thursday instead of a Donnerstag, then we should apply that argument consistently across our UI and build our own library for providing locale specific decimal notations, dates, plurals (hey! wait!), etc.
If not, then we should all relax and let the occasional OS localized element slip through.
Whatever the case, we can't have it both ways.
Comment 1•16 years ago
|
||
As stated in comment 0, the system locale has no relevance over our UI locale, therefore, nothing should be pulled from the OS locale.
Comment 2•16 years ago
|
||
Well, there are some things for which we would want to query the OS. For example, we query the OS to determine if the user is running under an RTL system locale, in which case we'll enable our bidi UI, which makes sense, as if the user is running a Hebrew version of Windows, for example, they'd probably find the bidi UI useful.
But for things like decimal separators, day/month names, etc., it makes no sense for us to use the system locale information.
Comment 3•16 years ago
|
||
I think the system- vs. build-locale debate is a red herring. We don't have build-locale date formatting code, and it isn't something that's easy to write, so it isn't really a feasible option in the short term.
The main issue in bug 579547, as I see it, wasn't really system vs. build locale, but rather that the system-locale formatting code returns wildly inconsistent date formats across different operating systems, given the same input. That is either a problem with our code that calls into the system APIs (which would be fixable), or a limitation of those APIs (which wouldn't be!).
If we could reliable and somewhat consistent results from the system-locale date formatting code, using it everywhere would be fine. It would certainly be no worse than what we have now.
| Reporter | ||
Comment 4•16 years ago
|
||
(In reply to comment #3)
> I think the system- vs. build-locale debate is a red herring. We don't have
> build-locale date formatting code, and it isn't something that's easy to write,
> so it isn't really a feasible option in the short term.
This bug isn't targetted at the short term, it's on picking the right thing to do and then enabling that. We don't need to constrain ourselves artificially based on a time constraint.
> If we could reliable and somewhat consistent results from the system-locale
> date formatting code, using it everywhere would be fine. It would certainly be
> no worse than what we have now.
That's great to hear, but sounds like a totally separate bug (which I encourage you to file!) This bug is about the policy decision: should we allow OS localized elements when there is a possiblity that those will be different from the application locale. Ehsan (a localizer!) says "no." I have not weighed in with an opinion, but believe that it's likely to be a very edge case sort of thing, and don't think that we should limit ourselves to app-localized things only. Ultimately it's for our l10n module owner to decide.
Comment 5•16 years ago
|
||
Gavin, the issue is much deeper than different systems returning different things. For example, with the issue of dates, people use different calendaring *systems* around the globe, so for example October 8th, 2010 might not make any sense no matter how you format it.
And it's true that writing locale-specific formatters etc. is hard, but the good thing is that it's likely that we won't have to, we may be able to pull in a library to do that for us. But anyways, as Beltzner pointed out, this bug is not about a short term solution.
Comment 6•16 years ago
|
||
(In reply to comment #5)
> Gavin, the issue is much deeper than different systems returning different
> things. For example, with the issue of dates, people use different calendaring
> *systems* around the globe, so for example October 8th, 2010 might not make any
> sense no matter how you format it.
I know that different calendaring systems exist (and I would have thought you'd know that given that we've discussed them in person before!). My point was that there isn't "the issue", there are multiple issues, and I was just pointing out that I think the most immediately actionable and useful to resolve in the short term is nsIScriptableDateFormat formatting inconsistency across platforms (e.g. returning "October 8, 2010" on Mac and "10-10-08" on Linux for the same format flags...). If it wasn't for that issue, I think the date changes in bug 579547 would have been fine to stay while the broader "build vs. system"-locale debate was had.
Comment 7•16 years ago
|
||
Sure, but these two suggestions seem independent on each other. We need date formatting code which is consistent across platforms, and we need better support for presenting locale specific information (such as dates in native calendaring systems), and these issues both need to be addressed. However, the way that I understand this bug, it's more about issues such as the latter than the former, unless I'm missing something.
Updated•4 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•