← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1477502 into lp:ubuntu-docviewer-app

 

Stefano Verzegnassi has proposed merging lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1477502 into lp:ubuntu-docviewer-app.

Commit message:
Simplified the translation for some string in DocumentListDelegate

Requested reviews:
  Ubuntu Document Viewer Developers (ubuntu-docviewer-dev)
Related bugs:
  Bug #1477502 in Ubuntu Document Viewer App: "Better translators' comment for 'Today', hh:mm"
  https://bugs.launchpad.net/ubuntu-docviewer-app/+bug/1477502

For more details, see:
https://code.launchpad.net/~verzegnassi-stefano/ubuntu-docviewer-app/fix-1477502/+merge/265792

Simplified the translation for some string in DocumentListDelegate

See discussion in:
https://bugs.launchpad.net/ubuntu-docviewer-app/+bug/1477502
https://lists.ubuntu.com/archives/ubuntu-translators/2015-July/006952.html
-- 
Your team Ubuntu Document Viewer Developers is requested to review the proposed merge of lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1477502 into lp:ubuntu-docviewer-app.
=== modified file 'po/com.ubuntu.docviewer.pot'
--- po/com.ubuntu.docviewer.pot	2015-07-14 15:43:11 +0000
+++ po/com.ubuntu.docviewer.pot	2015-07-24 09:14:49 +0000
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-07-14 17:41+0200\n"
+"POT-Creation-Date: 2015-07-24 11:10+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -33,7 +33,7 @@
 msgstr ""
 
 #: ../src/app/docviewer-application.cpp:171
-#: /home/stefano/Progetti/docviewer/build-documentpage-add-contextual-actions-Desktop-Default/po/com.ubuntu.docviewer.desktop.in.in.h:1
+#: /home/stefano/Progetti/docviewer/build-ubuntu-docviewer-app-Desktop-Default/po/com.ubuntu.docviewer.desktop.in.in.h:1
 msgid "Document Viewer"
 msgstr ""
 
@@ -190,6 +190,7 @@
 #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings.
 #. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum
 #: ../src/app/qml/documentPage/DocumentGridDelegate.qml:32
+#: ../src/app/qml/documentPage/DocumentListDelegate.qml:37
 #, qt-format
 msgid "Today, %1"
 msgstr ""
@@ -197,6 +198,7 @@
 #. TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings.
 #. http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum
 #: ../src/app/qml/documentPage/DocumentGridDelegate.qml:37
+#: ../src/app/qml/documentPage/DocumentListDelegate.qml:42
 #, qt-format
 msgid "Yesterday, %1"
 msgstr ""
@@ -204,32 +206,18 @@
 #. TRANSLATORS: this is a datetime formatting string,
 #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
 #: ../src/app/qml/documentPage/DocumentGridDelegate.qml:42
-#: ../src/app/qml/documentPage/DocumentListDelegate.qml:60
+#: ../src/app/qml/documentPage/DocumentListDelegate.qml:58
 msgid "dddd, hh:mm"
 msgstr ""
 
 #. TRANSLATORS: this is a datetime formatting string,
 #. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
 #: ../src/app/qml/documentPage/DocumentGridDelegate.qml:46
-#: ../src/app/qml/documentPage/DocumentListDelegate.qml:49
-#: ../src/app/qml/documentPage/DocumentListDelegate.qml:65
+#: ../src/app/qml/documentPage/DocumentListDelegate.qml:47
+#: ../src/app/qml/documentPage/DocumentListDelegate.qml:63
 msgid "dd-MM-yyyy hh:mm"
 msgstr ""
 
-#. TRANSLATORS: this is a datetime formatting string, and the
-#. singlequote is an escape character.
-#. See http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
-#: ../src/app/qml/documentPage/DocumentListDelegate.qml:38
-msgid "'Today', hh:mm"
-msgstr ""
-
-#. TRANSLATORS: this is a datetime formatting string, and the
-#. singlequote is an escape character.
-#. See http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
-#: ../src/app/qml/documentPage/DocumentListDelegate.qml:44
-msgid "'Yesterday', hh:mm"
-msgstr ""
-
 #: ../src/app/qml/documentPage/DocumentListView.qml:157
 msgid "Today"
 msgstr ""
@@ -381,6 +369,6 @@
 msgid "Open"
 msgstr ""
 
-#: /home/stefano/Progetti/docviewer/build-documentpage-add-contextual-actions-Desktop-Default/po/com.ubuntu.docviewer.desktop.in.in.h:2
+#: /home/stefano/Progetti/docviewer/build-ubuntu-docviewer-app-Desktop-Default/po/com.ubuntu.docviewer.desktop.in.in.h:2
 msgid "documents;viewer;pdf;reader;"
 msgstr ""

=== modified file 'src/app/qml/documentPage/DocumentListDelegate.qml'
--- src/app/qml/documentPage/DocumentListDelegate.qml	2015-07-14 15:43:11 +0000
+++ src/app/qml/documentPage/DocumentListDelegate.qml	2015-07-24 09:14:49 +0000
@@ -32,16 +32,14 @@
         if (sortSettings.sortMode !== 0) {  // The sort rule is not "by date"
             switch(diff) {
             case 0:     // DocumentsModel.Today
-                // TRANSLATORS: this is a datetime formatting string, and the
-                // singlequote is an escape character.
-                // See http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
-                return Qt.formatDateTime(date, i18n.tr("'Today', hh:mm"))
+                // TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings.
+                // http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum
+                return i18n.tr("Today, %1").arg(Qt.formatTime(date, Qt.locale().timeFormat(Locale.ShortFormat)))
 
             case 1:     // DocumentsModel.Yesterday
-                // TRANSLATORS: this is a datetime formatting string, and the
-                // singlequote is an escape character.
-                // See http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
-                return Qt.formatDateTime(date, i18n.tr("'Yesterday', hh:mm"))
+                // TRANSLATORS: %1 refers to a time formatted as Locale.ShortFormat (e.g. hh:mm). It depends on system settings.
+                // http://qt-project.org/doc/qt-4.8/qlocale.html#FormatType-enum
+                return i18n.tr("Yesterday, %1").arg(Qt.formatTime(date, Qt.locale().timeFormat(Locale.ShortFormat)))
 
             default:    // DocumentsModel.LastWeek || DocumentsModel.LastMonth || DocumentsModel.Earlier
                 // TRANSLATORS: this is a datetime formatting string,


Follow ups