~mutse-young/ubuntu-docviewer-app/trunk

« back to all changes in this revision

Viewing changes to src/app/qml/documentPage/DocumentListDelegate.qml

  • Committer: Tarmac
  • Author(s): Stefano Verzegnassi
  • Date: 2015-07-24 12:40:40 UTC
  • mfrom: (177.1.1 ubuntu-docviewer-app)
  • Revision ID: tarmac-20150724124040-l0w7jx0605kptayr
Simplified the translation for some string in DocumentListDelegate. Fixes: https://bugs.launchpad.net/bugs/1477502.

Approved by Roman Shchekin, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
        if (sortSettings.sortMode !== 0) {  // The sort rule is not "by date"
33
33
            switch(diff) {
34
34
            case 0:     // DocumentsModel.Today
35
 
                // TRANSLATORS: this is a datetime formatting string, and the
36
 
                // singlequote is an escape character.
37
 
                // See http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
38
 
                return Qt.formatDateTime(date, i18n.tr("'Today', hh:mm"))
 
35
                // TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings.
 
36
                // http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum
 
37
                return i18n.tr("Today, %1").arg(Qt.formatTime(date, Qt.locale().timeFormat(Locale.ShortFormat)))
39
38
 
40
39
            case 1:     // DocumentsModel.Yesterday
41
 
                // TRANSLATORS: this is a datetime formatting string, and the
42
 
                // singlequote is an escape character.
43
 
                // See http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
44
 
                return Qt.formatDateTime(date, i18n.tr("'Yesterday', hh:mm"))
 
40
                // TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings.
 
41
                // http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum
 
42
                return i18n.tr("Yesterday, %1").arg(Qt.formatTime(date, Qt.locale().timeFormat(Locale.ShortFormat)))
45
43
 
46
44
            default:    // DocumentsModel.LastWeek || DocumentsModel.LastMonth || DocumentsModel.Earlier
47
45
                // TRANSLATORS: this is a datetime formatting string,