Merge lp:~gary-wzl77/ubuntu-calendar-app/fix-1428036 into lp:ubuntu-calendar-app

Proposed by Gary.Wang
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 661
Merged at revision: 667
Proposed branch: lp:~gary-wzl77/ubuntu-calendar-app/fix-1428036
Merge into: lp:ubuntu-calendar-app
Diff against target: 27 lines (+3/-3)
2 files modified
MonthComponent.qml (+2/-2)
po/com.ubuntu.calendar.pot (+1/-1)
To merge this branch: bzr merge lp:~gary-wzl77/ubuntu-calendar-app/fix-1428036
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Review via email: mp+260804@code.launchpad.net

Commit message

Fix 1428036

To post a comment you must log in.
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

In en_GB this is pretty tight on a low resolution display like the bq e4.5.

Here's the current calendar app:-
http://people.canonical.com/~alan/screenshots/device-2015-06-02-120425.png

This is what it looks like with your change:-
http://people.canonical.com/~alan/screenshots/device-2015-06-02-120540.png

Could be even more tight in other languages.

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

> In en_GB this is pretty tight on a low resolution display like the bq e4.5.
>
> Here's the current calendar app:-
> http://people.canonical.com/~alan/screenshots/device-2015-06-02-120425.png
>
> This is what it looks like with your change:-
> http://people.canonical.com/~alan/screenshots/device-2015-06-02-120540.png
>
> Could be even more tight in other languages.

Quick review on zh_CN on bq e4.5
Yeah, same case for zh_CN, pretty tight.Almost no space for each items on the header.
hmm.......
I think it gonna be quite bad to check on this according to different locale.
However current implementation was broken in several locale.
Any ideas?

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Can we use Locale.NarrowFormat?

http://doc.qt.io/qt-5/qml-qtqml-locale.html#formattype

"Locale.NarrowFormat A special version of day and month names for use when space is limited; for example, returning "J" as a month name. Note that the narrow format might contain the same text for different months and days or it can even be an empty string if the locale doesn't support narrow names, so you should avoid using it for date formatting. Also, for the system locale this format is the same as ShortFormat."

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

Looks good after using Locale.NarrowFormat.
Thanks for your good reminder.
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

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Looks great! Thanks Gary!

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

This broke the autopilot test by removing the label from the field it seems.

"AttributeError: Class 'Label' has no attribute 'day'."

review: Needs Fixing
661. By Gary.Wang

Add day property to avoid autopilot test broken

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Yup, that fixed it. Thanks.

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MonthComponent.qml'
2--- MonthComponent.qml 2015-03-05 21:59:16 +0000
3+++ MonthComponent.qml 2015-06-09 10:46:15 +0000
4@@ -233,8 +233,8 @@
5 id: weekDay
6 objectName: "weekDay" + index
7 width: parent.dayWidth
8- property var day :Qt.locale().standaloneDayName(( Qt.locale().firstDayOfWeek + index), Locale.ShortFormat)
9- text: isYearView ? day.charAt(0) : day;
10+ property var day : Qt.locale(Qt.locale().name).standaloneDayName(( Qt.locale().firstDayOfWeek + index), Locale.ShortFormat);
11+ text: isYearView ? Qt.locale(Qt.locale().name).standaloneDayName(( Qt.locale().firstDayOfWeek + index), Locale.NarrowFormat) : day
12 horizontalAlignment: Text.AlignHCenter
13 font.pixelSize: intern.dayFontSize
14 font.bold: true
15
16=== modified file 'po/com.ubuntu.calendar.pot'
17--- po/com.ubuntu.calendar.pot 2015-06-01 08:54:59 +0000
18+++ po/com.ubuntu.calendar.pot 2015-06-09 10:46:15 +0000
19@@ -8,7 +8,7 @@
20 msgstr ""
21 "Project-Id-Version: \n"
22 "Report-Msgid-Bugs-To: \n"
23-"POT-Creation-Date: 2015-06-01 16:53+0800\n"
24+"POT-Creation-Date: 2015-06-09 18:44+0800\n"
25 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
26 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
27 "Language-Team: LANGUAGE <LL@li.org>\n"

Subscribers

People subscribed via source and target branches

to status/vote changes: