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

Proposed by Gary.Wang
Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 654
Merged at revision: 656
Proposed branch: lp:~gary-wzl77/ubuntu-calendar-app/fix-1460433
Merge into: lp:ubuntu-calendar-app
Diff against target: 270 lines (+70/-38)
2 files modified
TimeLineBase.qml (+34/-6)
po/com.ubuntu.calendar.pot (+36/-32)
To merge this branch: bzr merge lp:~gary-wzl77/ubuntu-calendar-app/fix-1460433
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Review via email: mp+260688@code.launchpad.net

Commit message

Fix 1460433

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

Looks good!

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 'TimeLineBase.qml'
2--- TimeLineBase.qml 2015-03-20 17:32:03 +0000
3+++ TimeLineBase.qml 2015-06-01 09:05:25 +0000
4@@ -219,13 +219,41 @@
5 }
6
7 function assignBubbleProperties(eventBubble, event, depth, sizeOfRow) {
8- var hour = event.startDateTime.getHours();
9- var yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
10+ var yPos = 0;
11+ var height = 0;
12+ var hour = 0;
13+ var durationMin = 0;
14+
15+ if (event.endDateTime.getDate() - day.getDate() == 0 &&
16+ event.startDateTime.getDate() - day.getDate() == 0) {
17+ hour = event.startDateTime.getHours();
18+ yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
19+ durationMin = (event.endDateTime.getHours() - event.startDateTime.getHours()) * 60;
20+ durationMin += (event.endDateTime.getMinutes() - event.startDateTime.getMinutes());
21+ }
22+ if (event.endDateTime.getDate() - day.getDate() == 0 &&
23+ event.startDateTime.getDate() - day.getDate() < 0) {
24+ hour = 0;
25+ yPos = 0;
26+ durationMin = event.endDateTime.getHours() * 60;
27+ durationMin += event.endDateTime.getMinutes();
28+ }
29+ if (event.endDateTime.getDate() - day.getDate() > 0 &&
30+ event.startDateTime.getDate() - day.getDate() == 0) {
31+ hour = event.startDateTime.getHours();
32+ yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
33+ durationMin = (24 - event.startDateTime.getHours()) * 60;
34+ }
35+
36+ if (event.endDateTime.getDate() - day.getDate() > 0 &&
37+ event.startDateTime.getDate() - day.getDate() < 0) {
38+ hour = 0;
39+ yPos = 0;
40+ durationMin = 24 * 60;
41+ }
42+
43 eventBubble.y = yPos;
44-
45- var durationMin = (event.endDateTime.getHours() - event.startDateTime.getHours()) * 60;
46- durationMin += (event.endDateTime.getMinutes() - event.startDateTime.getMinutes());
47- var height = (durationMin * hourHeight )/ 60;
48+ height = (durationMin * hourHeight )/ 60;
49 eventBubble.height = (height > eventBubble.minimumHeight) ? height:eventBubble.minimumHeight ;
50
51 eventBubble.model = bubbleOverLay.model
52
53=== modified file 'po/com.ubuntu.calendar.pot'
54--- po/com.ubuntu.calendar.pot 2015-04-17 05:05:13 +0000
55+++ po/com.ubuntu.calendar.pot 2015-06-01 09:05:25 +0000
56@@ -8,7 +8,7 @@
57 msgstr ""
58 "Project-Id-Version: \n"
59 "Report-Msgid-Bugs-To: \n"
60-"POT-Creation-Date: 2015-04-17 07:04+0200\n"
61+"POT-Creation-Date: 2015-06-01 16:53+0800\n"
62 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
63 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
64 "Language-Team: LANGUAGE <LL@li.org>\n"
65@@ -37,7 +37,7 @@
66
67 #. TRANSLATORS: the first argument (%1) refers to a start time for an event,
68 #. while the second one (%2) refers to the end time
69-#: ../AgendaView.qml:168 ../EventBubble.qml:131
70+#: ../AgendaView.qml:168 ../EventBubble.qml:133
71 #, qt-format
72 msgid "%1 - %2"
73 msgstr ""
74@@ -59,7 +59,7 @@
75 msgstr[0] ""
76 msgstr[1] ""
77
78-#: ../CalendarChoicePopup.qml:33 ../EventActions.qml:59
79+#: ../CalendarChoicePopup.qml:33 ../EventActions.qml:60
80 msgid "Calendars"
81 msgstr ""
82
83@@ -77,15 +77,15 @@
84 msgid "Syncing"
85 msgstr ""
86
87-#: ../CalendarChoicePopup.qml:70
88+#: ../CalendarChoicePopup.qml:71
89 msgid "Add new Calendar"
90 msgstr ""
91
92-#: ../ColorPickerDialog.qml:24
93+#: ../ColorPickerDialog.qml:25
94 msgid "Select Color"
95 msgstr ""
96
97-#: ../ColorPickerDialog.qml:53 ../DeleteConfirmationDialog.qml:60
98+#: ../ColorPickerDialog.qml:55 ../DeleteConfirmationDialog.qml:60
99 #: ../EditEventConfirmationDialog.qml:53
100 msgid "Cancel"
101 msgstr ""
102@@ -101,7 +101,7 @@
103 #. TRANSLATORS: this is a time formatting string,
104 #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
105 #. It's used in the header of the month and week views
106-#: ../DayView.qml:59 ../MonthView.qml:57 ../WeekView.qml:61
107+#: ../DayView.qml:59 ../MonthView.qml:58 ../WeekView.qml:61
108 msgid "MMMM yyyy"
109 msgstr ""
110
111@@ -136,7 +136,7 @@
112 msgid "Delete"
113 msgstr ""
114
115-#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:283
116+#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:296
117 msgid "Edit Event"
118 msgstr ""
119
120@@ -154,18 +154,18 @@
121 msgid "Edit this"
122 msgstr ""
123
124-#: ../EventActions.qml:50 ../NewEvent.qml:283
125+#: ../EventActions.qml:50 ../NewEvent.qml:296
126 msgid "New Event"
127 msgstr ""
128
129 #. TRANSLATORS: the first argument (%1) refers to a time for an event,
130 #. while the second one (%2) refers to title of event
131-#: ../EventBubble.qml:142 ../EventBubble.qml:147
132+#: ../EventBubble.qml:144 ../EventBubble.qml:149
133 #, qt-format
134 msgid "%1 <b>%2</b>"
135 msgstr ""
136
137-#: ../EventDetails.qml:42 ../NewEvent.qml:393
138+#: ../EventDetails.qml:42 ../NewEvent.qml:407
139 msgid "Event Details"
140 msgstr ""
141
142@@ -189,11 +189,11 @@
143 msgid "Edit"
144 msgstr ""
145
146-#: ../EventDetails.qml:347 ../NewEvent.qml:479
147+#: ../EventDetails.qml:347 ../NewEvent.qml:509
148 msgid "Guests"
149 msgstr ""
150
151-#: ../EventDetails.qml:390 ../EventReminder.qml:35 ../NewEvent.qml:578
152+#: ../EventDetails.qml:390 ../EventReminder.qml:35 ../NewEvent.qml:606
153 msgid "Reminder"
154 msgstr ""
155
156@@ -201,26 +201,26 @@
157 #. and it is shown as the header of the page to choose repetition
158 #. and as the header of the list item that shows the repetition
159 #. summary in the page that displays the event details
160-#: ../EventRepetition.qml:41 ../EventRepetition.qml:132
161+#: ../EventRepetition.qml:41 ../EventRepetition.qml:150
162 msgid "Repeat"
163 msgstr ""
164
165-#: ../EventRepetition.qml:151
166+#: ../EventRepetition.qml:169
167 msgid "Repeats On:"
168 msgstr ""
169
170-#: ../EventRepetition.qml:196
171+#: ../EventRepetition.qml:214
172 msgid "Recurring event ends"
173 msgstr ""
174
175 #. TRANSLATORS: this refers to how often a recurrent event repeats
176 #. and it is shown as the header of the option selector to choose
177 #. its repetition
178-#: ../EventRepetition.qml:219 ../NewEvent.qml:560
179+#: ../EventRepetition.qml:237 ../NewEvent.qml:590
180 msgid "Repeats"
181 msgstr ""
182
183-#: ../EventRepetition.qml:244
184+#: ../EventRepetition.qml:262
185 msgid "Date"
186 msgstr ""
187
188@@ -259,51 +259,51 @@
189 msgid "After Date"
190 msgstr ""
191
192-#: ../NewEvent.qml:59
193+#: ../NewEvent.qml:61
194 msgid "Save"
195 msgstr ""
196
197-#: ../NewEvent.qml:165
198+#: ../NewEvent.qml:170
199 msgid "End time can't be before start time"
200 msgstr ""
201
202-#: ../NewEvent.qml:293
203+#: ../NewEvent.qml:306
204 msgid "Error"
205 msgstr ""
206
207-#: ../NewEvent.qml:295
208+#: ../NewEvent.qml:308
209 msgid "OK"
210 msgstr ""
211
212-#: ../NewEvent.qml:347
213+#: ../NewEvent.qml:361
214 msgid "From"
215 msgstr ""
216
217-#: ../NewEvent.qml:360
218+#: ../NewEvent.qml:374
219 msgid "To"
220 msgstr ""
221
222-#: ../NewEvent.qml:377
223+#: ../NewEvent.qml:391
224 msgid "All day event"
225 msgstr ""
226
227-#: ../NewEvent.qml:406
228+#: ../NewEvent.qml:420
229 msgid "Event Name"
230 msgstr ""
231
232-#: ../NewEvent.qml:419
233+#: ../NewEvent.qml:438
234 msgid "Description"
235 msgstr ""
236
237-#: ../NewEvent.qml:432
238+#: ../NewEvent.qml:456
239 msgid "Location"
240 msgstr ""
241
242-#: ../NewEvent.qml:441 com.ubuntu.calendar_calendar.desktop.in.in.h:1
243+#: ../NewEvent.qml:471 com.ubuntu.calendar_calendar.desktop.in.in.h:1
244 msgid "Calendar"
245 msgstr ""
246
247-#: ../NewEvent.qml:483
248+#: ../NewEvent.qml:513
249 msgid "Add Guest"
250 msgstr ""
251
252@@ -390,13 +390,17 @@
253 msgid "2 weeks"
254 msgstr ""
255
256+#: ../TimeLineBase.qml:80
257+msgid "Untitled"
258+msgstr ""
259+
260 #. TRANSLATORS: W refers to Week, followed by the actual week number (%1)
261-#: ../TimeLineHeader.qml:49
262+#: ../TimeLineHeader.qml:51
263 #, qt-format
264 msgid "W%1"
265 msgstr ""
266
267-#: ../TimeLineHeader.qml:61
268+#: ../TimeLineHeader.qml:63
269 msgid "All Day"
270 msgstr ""
271

Subscribers

People subscribed via source and target branches

to status/vote changes: