Code review comment for lp:~nikwen/ubuntu-calendar-app/fix-standalone-month-name-i18n

Revision history for this message
Niklas Wenzel (nikwen) wrote :

Thank you, Kunal and David, for looking into this.

@David, to clear this up a bit:

qsTr() is responsible only for the format string here. i18n.tr() delivers the translated format string while qsTr() in combination with the arg() calls then goes ahead and replaces %1 and %2 with the arguments, i.e. the month and the year. That said, qsTr() does not do any translation job and is only needed for the format string story. I couldn't find anything in the i18n documentation to replace the qsTr() and arg() calls here. [1]
Regarding the year: Qt.locale() does not provide any way to localize the year. [2] Hence, I don't think we need to do anything, especially considering that we are talking about a number.

[1] https://developer.ubuntu.com/api/apps/qml/sdk-15.04.1/Ubuntu.Components.i18n/
[2] http://doc.qt.io/qt-5/qml-qtqml-locale.html

« Back to merge proposal