Merge lp:~mihirsoni/ubuntu-calendar-app/1280598 into lp:ubuntu-calendar-app

Proposed by Mihir Soni
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 272
Merged at revision: 270
Proposed branch: lp:~mihirsoni/ubuntu-calendar-app/1280598
Merge into: lp:ubuntu-calendar-app
Diff against target: 44 lines (+12/-3)
2 files modified
EventBubble.qml (+1/-1)
EventDetails.qml (+11/-2)
To merge this branch: bzr merge lp:~mihirsoni/ubuntu-calendar-app/1280598
Reviewer Review Type Date Requested Status
Victor Thompson (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Kunal Parmar Needs Fixing
Review via email: mp+218272@code.launchpad.net

Commit message

Display event date in event details view.

Description of the change

Display event date in event details view.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

This is only an opinion, but I think it would be better to leave the hh:mm start and end times, but add a date field above it (date string should be per the user's locale):

Date 05/14/2014
Start 12:30
End 13:30

In addition to the locale date format, it might be nice to add the day of the week.

263. By Mihir Soni

Added date as separate field

Revision history for this message
Victor Thompson (vthompson) wrote :

This looks good to me, BUT I'm not sure 'dd-MMM-yyyy' is always the appropriate date string to use. I would assume that there's a way to default to the user's locale default. If there is not a way to do this, then I do think the format used here is fairly universal.

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

we also need to consider the case when start date and end date is different.

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

 + eventDate.value = e.startDateTime.toLocaleString(Qt.locale(),'dd-MMM-yyyy');

Format 'dd-MMM-yyyy' needs to be localized too like being done for time string.

        var timeFormat = i18n.tr("hh:mm");
        var startTime = e.startDateTime.toLocaleTimeString(Qt.locale(), timeFormat);

review: Needs Fixing
264. By Mihir Soni

Date formate localized

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

Mihir,

I think we need something like the following before the translation of the date string:

        // TRANSLATORS: this is a time formatting string,
        // see http://qt-project.org/doc/qt-5.0/qtqml/qml-qtquick2-date.html#details for valid expressions

review: Needs Fixing
Revision history for this message
Mihir Soni (mihirsoni) wrote :

> Mihir,
>
> I think we need something like the following before the translation of the
> date string:
>
> // TRANSLATORS: this is a time formatting string,
> // see http://qt-project.org/doc/qt-5.0/qtqml/qml-
> qtquick2-date.html#details for valid expressions

Hi Victor.

I have already followed that for expressions, the link which is there is dead , so here is new link for your reference :-
http://qt-project.org/doc/qt-5/qml-qtqml-date.html#toLocaleDateString-method

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

> > Mihir,
> >
> > I think we need something like the following before the translation of the
> > date string:
> >
> > // TRANSLATORS: this is a time formatting string,
> > // see http://qt-project.org/doc/qt-5.0/qtqml/qml-
> > qtquick2-date.html#details for valid expressions
>
> Hi Victor.
>
> I have already followed that for expressions, the link which is there is dead
> , so here is new link for your reference :-
> http://qt-project.org/doc/qt-5/qml-qtqml-date.html#toLocaleDateString-method

Victor is asking you to put below comment

 // TRANSLATORS: this is a time formatting string,
 // see http://qt-project.org/doc/qt-5.0/qtqml/qml-qtquick2-date.html#details for valid expressions

before following statements

8 +
9 + var dateFormat = i18n.tr("dd-MMM-yyyy")
10 + eventDate.value = e.startDateTime.toLocaleString(Qt.locale(),dateFormat);

to help translators, where for look for format.

Revision history for this message
Victor Thompson (vthompson) wrote :

But certainly the link *is* broken. It would be nice to use a generic URL that is not tied to a revision of Qt. This could be fixed in this branch or at a later time. If Mihir used the currently broken URL, someone could fix it shortly so translators have a better description.

265. By Mihir Soni

Added date & time formatting string reference

266. By Mihir Soni

merge with trunk

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

I'm not sure, but I assume the commentary needs to be on top of each instance of i18n.tr() in order for it to be picked up in the translation strings. You could build the .pot file under the 'po' directory to be certain.

Revision history for this message
Victor Thompson (vthompson) wrote :

I've verified my above comment. You do need the commentary above each instance.

Also, you've jumbled the comment a bit and should add " see " to the second line.

267. By Mihir Soni

Added comment for translators

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

Could you also update EventBubble.qml L38/39 with the same commentary and then update the translations per README.translations? Currently the instructions for "hh:mm" get added twice in the pot file because the commentary differs.

review: Needs Fixing
268. By Mihir Soni

Added translators

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

Mihir, thanks! This looks great to me!

review: Approve
Revision history for this message
Victor Thompson (vthompson) wrote :

One small thing that should be fixed is the following. 1) there are two "sees" in EventBubble, and 2) the intent is to make it match the commentary for the other "hh:ss" instance so the instructions are only output once in the pot file:

=== modified file 'EventBubble.qml'
--- EventBubble.qml 2014-05-09 06:23:01 +0000
+++ EventBubble.qml 2014-05-10 16:58:48 +0000
@@ -35,8 +35,8 @@
             return;
         }

- // TRANSLATORS: this is a time formatting string,
- // see see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details f
or valid expressions
+ // TRANSLATORS: this is a time & Date formatting string,
+ //see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details

review: Needs Fixing
269. By Mihir Soni

Merge from commit

270. By Mihir Soni

Merge from trunk

271. By Mihir Soni

remove typo

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
272. By Mihir Soni

match translator comments

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

lgtm! Thanks for revising this!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'EventBubble.qml'
2--- EventBubble.qml 2014-05-09 07:52:41 +0000
3+++ EventBubble.qml 2014-05-15 07:01:30 +0000
4@@ -36,7 +36,7 @@
5 }
6
7 // TRANSLATORS: this is a time formatting string,
8- // see http://qt-project.org/doc/qt-5.0/qtqml/qml-qtquick2-date.html#details for valid expressions
9+ // see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions
10 var timeFormat = i18n.tr("hh:mm");
11 var startTime = event.startDateTime.toLocaleTimeString(Qt.locale(), timeFormat)
12 var endTime = event.endDateTime.toLocaleTimeString(Qt.locale(), timeFormat)
13
14=== modified file 'EventDetails.qml'
15--- EventDetails.qml 2014-05-08 00:57:11 +0000
16+++ EventDetails.qml 2014-05-15 07:01:30 +0000
17@@ -93,8 +93,12 @@
18
19 function showEvent(e) {
20 // TRANSLATORS: this is a time formatting string,
21- // see http://qt-project.org/doc/qt-5.0/qtqml/qml-qtquick2-date.html#details for valid expressions
22+ // see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions
23 var timeFormat = i18n.tr("hh:mm");
24+ // TRANSLATORS: this is a time & Date formatting string,
25+ //see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details
26+ var dateFormat = i18n.tr("dd-MMM-yyyy")
27+ eventDate.value = e.startDateTime.toLocaleString(Qt.locale(),dateFormat);
28 var startTime = e.startDateTime.toLocaleTimeString(Qt.locale(), timeFormat);
29 var endTime = e.endDateTime.toLocaleTimeString(Qt.locale(), timeFormat);
30
31@@ -216,7 +220,12 @@
32 left:parent.left
33 leftMargin: units.gu(2)
34 }
35- property int timeLabelMaxLen: Math.max( startHeader.headerWidth, endHeader.headerWidth)// Dynamic Width
36+ property int timeLabelMaxLen: Math.max( startHeader.headerWidth, endHeader.headerWidth,eventDate.headerWidth)// Dynamic Width
37+ EventDetailsInfo{
38+ id: eventDate
39+ xMargin:column.timeLabelMaxLen
40+ header: i18n.tr("Date")
41+ }
42 EventDetailsInfo{
43 id: startHeader
44 xMargin:column.timeLabelMaxLen

Subscribers

People subscribed via source and target branches

to status/vote changes: