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.
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/ doc.qt. io/qt-5/ qml-qtqml- locale. html
[2] http://