Closed
Bug 1380751
Opened 7 years ago
Closed 7 years ago
Use mozIntl in minimonth.xml
Categories
(Calendar :: General, enhancement, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
5.7
People
(Reporter: jorgk-bmo, Assigned: jorgk-bmo)
References
Details
Attachments
(1 file)
3.45 KB,
patch
|
MakeMyDay
:
review+
Fallen
:
approval-calendar-beta+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #1350679 +++
See bug 1350679 comment #23:
there exist further places where a date formatting still doesn't use mozIntl yet:
https://dxr.mozilla.org/comm-central/search?q=path%3Aminimonth.xml+tolocale&redirect=false
(the two last hits in minimonth.xml)
Assignee | ||
Comment 1•7 years ago
|
||
If someone could give me some steps to find the aria-label, I'd be happy to submit a patch.
938 day.setAttribute("aria-label", date.toLocaleDateString(undefined, labelDateOptions));
1089 label = this.mValue.toLocaleDateString(undefined, labelDateOptions);
Flags: needinfo?(Mozilla)
Comment 2•7 years ago
|
||
As mentioned in the other bug, use the dom inspector (inspect the TB main window, use its find node functionality and click on a day in minimonth, so you get displayed the relavant section of nodes). The current month's days have only a numeric day in the aria label, but days of previous or subsequent months have day and month in it - you can see that when inspecting the node list. Also, the minimonth box has a full date in the aria-label.
Flags: needinfo?(Mozilla)
Assignee | ||
Comment 3•7 years ago
|
||
(In reply to [:MakeMyDay] from comment #2)
> The current month's days
> have only a numeric day in the aria label, but days of previous or
> subsequent months have day and month in it - you can see that when
> inspecting the node list.
Found it. I use "Element Inspector", which let's you Shift+Right-Click onto the element you want to inspect.
> Also, the minimonth box has a full date in the aria-label.
I found that too now, id=today-Minimonth.
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•7 years ago
|
||
This should do it. Note that mozIntl can't do "5 Aug", so if month or year don't match, I'm doing the full date.
I hope that doesn't break any tests, since some (unfortunately) actually look at aria-labels
https://dxr.mozilla.org/comm-central/rev/130d043e685055c682059c92dc582acb2a65afd2/calendar/test/mozmill/testBasicFunctionality.js#46
but I guess not the ones which have more than the day.
There's been discussion in changing those tests, but that turned out (too) hard (bug 472448 comment #75).
Attachment #8886775 -
Flags: review?(makemyday)
Comment 5•7 years ago
|
||
Comment on attachment 8886775 [details] [diff] [review]
1380751-minimonth.patch (v1).
Review of attachment 8886775 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks. r+ with the below nit fixed. The mozmill test shouldn't fail as it referrs to the 1st day of the current month, which representation isn't changed by this patch, but please kick off a try run before landing to be sure we get a green mozmill test.
::: calendar/base/content/widgets/minimonth.xml
@@ +931,5 @@
> }
>
> + if (aDate.getMonth() == date.getMonth() &&
> + aDate.getFullYear() == date.getFullYear()) {
> + day.setAttribute("aria-label", date.toLocaleDateString(undefined, { day: 'numeric' }));
Can you please switch to double quotes here (I kown it have been single quotes already before).
Attachment #8886775 -
Flags: review?(makemyday) → review+
Assignee | ||
Comment 6•7 years ago
|
||
https://hg.mozilla.org/comm-central/rev/c581127bdaff3f5f3cfbee6af84f5e7290a79773
Landed with the quotes fixed.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Version: Lightning 5.7 → Lightning 5.8
Assignee | ||
Updated•7 years ago
|
Target Milestone: --- → 5.8
Version: Lightning 5.8 → Lightning 5.7
Assignee | ||
Comment 7•7 years ago
|
||
Comment on attachment 8886775 [details] [diff] [review]
1380751-minimonth.patch (v1).
Last piece of implementing mozIntl in calendar (still one chat bug to go before it's 100% done).
Attachment #8886775 -
Flags: approval-calendar-beta?(philipp)
Updated•7 years ago
|
Attachment #8886775 -
Flags: approval-calendar-beta?(philipp) → approval-calendar-beta+
Assignee | ||
Comment 8•7 years ago
|
||
Calendar 5.7: https://hg.mozilla.org/releases/comm-beta/rev/72d7059579e0275a3755fed8f85b1baeb671e1a0
Target Milestone: 5.8 → 5.7
You need to log in
before you can comment on or make changes to this bug.
Description
•