Wrong "weekDay" text on hebrew local in yearView

Bug #1428036 reported by avim
10
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.qml#L234

property var day :Qt.locale().standaloneDayName(( Qt.locale().firstDayOfWeek + index), Locale.ShortFormat)
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.

Tags: hebrew
Revision history for this message
avim (avisoftware123) wrote :
avim (avisoftware123)
description: updated
Revision history for this message
Gary.Wang (gary-wzl77) wrote :

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)
If I understood @avim correctly,
--- text: isYearView ? day.charAt(0) : day;
+++ text: isYearView ? day.charAt(day.length-1) : day;

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.

Gary.Wang (gary-wzl77)
Changed in ubuntu-calendar-app:
assignee: nobody → Gary.Wang (gary-wzl77)
Revision history for this message
avim (avisoftware123) wrote :

@Gray.Wang this not solve the problem:
text: isYearView ? day.charAt(day.length-1) : day;
output of this is [',',',',',',ת]
and this:
text: isYearView ? day.charAt(day.length-2) : day;
[א,ב,ג,ד,ה,ו,ב]
the corect one should look like
[א,ב,ג,ד,ה,ו,ת]

of course i don't think that should be script for every language. i think it is bug of the QT side....

Revision history for this message
Gary.Wang (gary-wzl77) wrote :

We plan to use Locale.NarrowFormat for month names display in YearView
Pls check the screenshots as following for three different locale.

en_UK : https://drive.google.com/open?id=0B2H9ECPSSfqIcFYybldnakdLNEE&authuser=1
zh_CN : https://drive.google.com/open?id=0B2H9ECPSSfqIdnJUYUFXQjVOc28&authuser=1
he_IL : https://drive.google.com/open?id=0B2H9ECPSSfqIODJzMEtmZFAwTEk&authuser=1

Compared with http://www.lavia.org/english/archivo/grafica/3EN.jpg
I think it also works on hebrew.

Revision history for this message
avim (avisoftware123) wrote :

In your images it is look good. (at least on he_IL and en_uk, because i don't understand Chinese....)

I also played with Locale.NarrowFormat . And I could not get to that result ...
i hope to see it in your code.

thank you

Changed in ubuntu-calendar-app:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.