Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.8.0
Description
It would be nice to be able to write translatable string using template literals in QML files like
import QtQuick Window { id: root width: 640 height: 480 visible: true Column { Text { text: qsTr("Width: %1 Height: %2").arg(root.width).arg(root.height) } Text { text: qsTr(`Width: ${root.width} Height: ${root.height}`) } } }
This is currently not possible since the template string is evaluated by the JS interpreter.
We need to research how we can support this.
One possibility is the introduction of a new tag function like explained in https://bugreports.qt.io/browse/QTBUG-127527?focusedId=836985&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-836985
Attachments
Issue Links
- resulted from
-
QTBUG-127527 lupdate truncates JavaScript template literal strings
- Closed