ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #08424
Re: [Merge] lp:~majster-pl/ubuntu-calendar-app/new-agenda-view into lp:ubuntu-calendar-app
Diff comments:
> === modified file 'AgendaView.qml'
> --- AgendaView.qml 2016-02-03 08:06:25 +0000
> +++ AgendaView.qml 2016-02-29 21:47:50 +0000
> @@ -172,10 +158,6 @@
> var startTime = event.startDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
> var endTime = event.endDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
>
There is no need to translate just a time stamp eg. (10:20)
> - // TRANSLATORS: the first argument (%1) refers to a start time for an event,
> - // while the second one (%2) refers to the end time
> - var timeString = i18n.tr("%1 - %2").arg(startTime).arg(endTime)
> -
> if (mainView.displayLunarCalendar) {
> var lunarDate = Lunar.calendar.solar2lunar(event.startDateTime.getFullYear(),
> event.startDateTime.getMonth() + 1,
> @@ -183,18 +165,32 @@
> header.text = i18n.tr("%1 %2 %3 %4 %5").arg(lunarDate.gzYear).arg(lunarDate .IMonthCn).arg(lunarDate.IDayCn)
> .arg(lunarDate.gzDay).arg(lunarDate.isTerm ? lunarDate.Term : "")
> } else {
> - header.text = date
> + header.text = date.charAt(0).toUpperCase() + date.slice(1);
> }
>
> - timeLabel.text = timeString
> + timeLabelStart.text = startTime + " -"
> + timeLabelEnd.text = endTime
> +
I don't think there is any other way to connect those two in just one string... unless I use array which might be even worst.
> header.color = event.startDateTime.toLocaleDateString() === new Date().toLocaleDateString() ? UbuntuColors.orange : UbuntuColors.darkGrey
> - detailsContainer.color = eventListModel.collection(event.collectionId).color
> + calendarIndicator.backgroundColor = eventListModel.collection(event.collectionId).color
>
> - if( event.displayLabel) {
> - titleLabel.text = event.displayLabel;
> + if(event.displayLabel) {
> + detailsListitemlayout.title.text = i18n.tr("%1").arg(event.displayLabel);
I think we can also remove translation to Event title as I guess user will set different event name every time... no way translators will be able to translate it :D
> + }
> + if(event.location) {
> + detailsListitemlayout.subtitle.text = event.location
> + detailsListitemlayout.subtitle.color = UbuntuColors.coolGrey
> + detailsListitemlayout.subtitle.font.italic = false
> + } else {
> + detailsListitemlayout.subtitle.text = i18n.tr("no location")
> + detailsListitemlayout.subtitle.color = "#b3b3b3"
> + detailsListitemlayout.subtitle.font.italic = true
> }
> }
>
> +
> +
> + // main Column to hold header (date) and details (time, Description and location)
> Column {
> id: container
> objectName: "eventContainer" + index
--
https://code.launchpad.net/~majster-pl/ubuntu-calendar-app/new-agenda-view/+merge/287448
Your team Ubuntu Calendar Developers is subscribed to branch lp:ubuntu-calendar-app.
References