Wrong "weekDay" text on hebrew local in yearView
Bug #1428036 reported by
avim
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Calendar App |
Fix Released
|
Undecided
|
Gary.Wang |
Bug Description
when i am used the calendar app with Hebrew local , it gave a wrong text for the 'weekDay' on 'yearView'.
The problem was caused by those lines:
on file MonthComponent.
property var day :Qt.locale(
text: isYearView ? day.charAt(0) : day;
in english the text is 's' from 'sunday' and 'm' from 'monday'.
in hebrew it 'י' from "יום א'" and 'י' from "יום ב'" . that means that for all the days (except saturday) it will be 'י' .
[ day.charAt(0)== 'י' day.charAt(4)== 'א']
it is look like י,י,י,י,י,י,ש
insead א,ב,ג,ד,ה,ו,ש
i hope that the problem is understood.
description: | updated |
Changed in ubuntu-calendar-app: | |
assignee: | nobody → Gary.Wang (gary-wzl77) |
Changed in ubuntu-calendar-app: | |
status: | New → Fix Released |
To post a comment you must log in.
same case for Qt.Locale("zh_CN").
Currently we only take Locale("en") in account. After day.charAt(0) , The header looks like in different locale
en [Sun, Mon, Tue, Wed, Thu, Fri, Sat] ----> [S, M, T, W, T, F, S] correct
hebrew [א,ב,ג,ד,ה,ו,] <--- [יום א׳, יום ב׳, יום ג׳, יום ד׳, יום ה׳, יום ו׳, שבת ] wrong ----> should be [י,י,י,י,י,י,ש]
zh_CN [周一,周二,周三,周四,周五, 周六, 周日] ---> [周,周,周,周,周, 周,周] wrong ---> should be [一,二,三,四,五, 六, 日]
wrong (Qt.LayoutDirection for hebrew is RTL) day.length- 1) : day;
If I understood @avim correctly,
--- text: isYearView ? day.charAt(0) : day;
+++ text: isYearView ? day.charAt(
But it will be broken for in en locale display.So considering the different locale and different layoutDirection. The easy fix is to only show the day in Shortformat in YearView.