32
32
if (sortSettings.sortMode !== 0) { // The sort rule is not "by date"
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)))
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)))
46
44
default: // DocumentsModel.LastWeek || DocumentsModel.LastMonth || DocumentsModel.Earlier
47
45
// TRANSLATORS: this is a datetime formatting string,