Closed
Bug 1464592
Opened 7 years ago
Closed 7 years ago
LC_TIME ignored for html5 input fields (type=time,date)
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
RESOLVED
INVALID
People
(Reporter: mozbugs, Unassigned)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180518073241
Steps to reproduce:
Using Firefox 60.0.1 on archlinux amd64.
Using these locale settings:
LANG=en_US.UTF-8
LC_TIME=de_DE.UTF-8
Using this html file:
<html>
<title>html5 input test</title>
<form>
date <input type="date"><br>
time <input type="time">
</form>
</html>
Actual results:
The date field is shown as mm/dd/yyyy and the time field as 12h (as per the $LANG setting).
Expected results:
The date field should show something like TT.MM.JJJJ (German for dd.mm.yyyy) and the time fields should be in 24h format, as per the $LC_TIME setting; because locale(7) defines that all LC_* settings should override $LANG.
To confirm it isn't a missing language pack issue -- using these locale settings:
LANG=de_DE.utf8
LC_TIME=de_DE.UTF-8
The fields are shown as they should (TT.MM.JJJJ and 24h)
Setting component as HTML: Form Submission. Please change if this incorrect. I don't have ArchLinux available so I cannot test this at present.
Component: Untriaged → HTML: Form Submission
Product: Firefox → Core
Comment 2•7 years ago
|
||
Bug 1370859 comment 1 seems to indicate bug 1366134 is related; you might want to chime in there. Thanks.
Blocks: datetime-bugs
Priority: -- → P3
Comment 3•7 years ago
|
||
can you copy&paste the last section in about:support? It contains information about locales and internationalization.
Flags: needinfo?(mozbugs)
Internationalization & Localization
-----------------------------------
Application Settings
Requested Locales: ["en-US"]
Available Locales: ["de","en-US"]
App Locales: ["en-US","und"]
Regional Preferences: ["en-US","und"]
Default Locale: "und"
Operating System
System Locales: ["en-US"]
Regional Preferences: ["de-DE"]
For reference, the corresponding environment variables are:
~$ locale
LANG=en_US.utf8
LANGUAGE=
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME=de_DE.utf8
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER=de_DE.utf8
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT=de_DE.utf8
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
Flags: needinfo?(mozbugs)
Comment 5•7 years ago
|
||
Ok, thanks!
The reason you see this behavior is because we do not match your regional preferences locale to your app locale because languages differ.
In short, Firefox will use your LC_TIME only if the language portion of the locale matches your current app locales. This means that if you use en-US Firefox and you'll set your LC_TIME to en-GB, we'll use the GB because `en` match.
In your case, you have Firefox in en-US but you want German regional preferences. That would introduce a localization inconsistency with cases such as "Today is Dienstag". We avoid that by not matching those by default.
If you want to override this behavior, go to about:config and switch `intl.regional_prefs.use_os_locales` to true.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Assignee | ||
Updated•6 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•