Code review comment for lp:~pkunal-parmar/ubuntu-calendar-app/new_week_day_view

Revision history for this message
Olivier Tilloy (osomon) wrote :

506 + var startTime= Qt.formatDateTime(event.startTime,"hh:mm");
507 + var endTime= Qt.formatDateTime(event.endTime,"hh:mm");
508 +
509 + timeLabel.text = ""
510 + titleLabel.text = ""
511 + descriptionLabel.text = ""
512 +
513 + if( type == wideType) {
514 + timeLabel.text = startTime +" - "+ endTime

The format for startTime and endTime should be internationalized, to give translators a chance to change it based on locale. I think it is safe to assume that we want the same format for both startTime and endTime, so you should have only one call to i18n.tr(…) to assign the format to a variable. Please add a comment for translators, too.

Then the value of timeLabel should be formatted using string formatting, not concatenation, and it should be internationalized too (with a comment for translators):

    timeLabel.text = i18n.tr("%1 - %2").arg(startTime).arg(endTime)

review: Needs Fixing

« Back to merge proposal