Closed Bug 1880108 Opened 1 year ago Closed 8 months ago

Placeholders on the datetime widget ignore spoof English

Categories

(Toolkit :: UI Widgets, defect)

defect

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: pierov, Assigned: pierov)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Steps to reproduce:

  • set Firefox in a language different than en-US and enable RFP + spoof English
  • open a page with a datetime widget (e.g., https://arkenfox.github.io/TZP/tests/applang.html)
  • notice that the placeholder is using the en-US format, but the localized placeholders (e.g., mm / gg / aaaa instead of mm / dd / yyyy)

The datetime input is inconsistent with other inputs when using spoof
English: its placeholder is not translated, unlike the default values
and texts of all the other inputs.

Severity: -- → S4
Pushed by tgiles@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fab1526875d3 Pass the locale list when constructing l10n in datetimebox. r=reusable-components-reviewers,tgiles

I can't reproduce these failures locally (but I'm on Linux, setting up a Firefox dev environment on a macOS machine would take me a while).
So, I tried to run another try build, but it doesn't contain the errors from the logs.

https://treeherder.mozilla.org/logviewer?job_id=448999171&repo=autoland&lineNumber=4504

This is a "Test timed out -", could it be due to something else?

https://treeherder.mozilla.org/logviewer?job_id=448996825&repo=autoland&lineNumber=13133

The root cause seems a missing datetimebox.ftl: https://treeherder.mozilla.org/logviewer?job_id=448999171&repo=autoland&lineNumber=4433
It says locale en, whereas I expected something like en-US instead.
I've tried to play a little bit with getWebExposedLocales(), but I always get en-US appended at the end (when using another language) or instead of a regional variant (e.g., in en-GB).
I don't think I know of to explain this failure.
Who could I redirect this NI to for some help?

Flags: needinfo?(pierov)

Is there anyway I could get this merged again?
I think the failed tests were false positives.

Flags: needinfo?(mstriemer)
Pushed by tritter@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6d6b80ebc023 Pass the locale list when constructing l10n in datetimebox. r=reusable-components-reviewers,tgiles

Backed out for causing multiple failures on OS X 10.15 WebRender. (Please check the: push with failures link)

Flags: needinfo?(pierov)
Attachment #9379969 - Attachment description: Bug 1880108 - Pass the locale list when constructing l10n in datetimebox. r?mstriemer → Bug 1880108 - Pass the locale list when constructing l10n in datetimebox. r=#reusable-components-reviewers,tgiles

Okay, it seems the macOS test uses en as a locale (I don't know why).
In the new revision I'm forcing en-US to be there as a fallback, in case the webExposedLocales do not include any locale with the proper translation.
Also, I gated the patch on RFP.

Flags: needinfo?(pierov)
Flags: needinfo?(mstriemer)

Hi, I sent some changes because the tests found some problems with my previous patch (basically, en-US wasn't automatically appended as fallback language).
Could you please review the patch again? Thanks in advance!

Flags: needinfo?(tgiles)

Went ahead and reviewed the patch, changes look good to me. Queued up the patch in Lando as well. Hopefully it'll stick this time!

Flags: needinfo?(tgiles)
Pushed by tgiles@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a414b7e839e5 Pass the locale list when constructing l10n in datetimebox. r=reusable-components-reviewers,tgiles

FYI: test is at https://arkenfox.github.io/TZP/tests/elementforms.html, no visuals - you should get the same hash (or in this specific case, the details measurements) on your machine (because it can vary across machines) in any app language with spoof_english

I think we should add a test - RFP + en-US detail width == RFP + ga-IE detail width

for example: the first measurement is width

en-US for me = "details": [66.75, 21.566665649414062, -3.6666717529296875, -1.1833343505859375],
ga-IE for me = "details": [98.73333740234375, 21.566665649414062, -5.4166717529296875, -1.1833343505859375],
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: