diff options
author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2023-01-11 10:37:45 +0100 |
---|---|---|
committer | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2023-01-17 16:45:12 +0100 |
commit | 1c6afffc9403a2610de952a434f7633c5761117a (patch) | |
tree | 11dd72ff65adf9cd87cf69da3a31eb49914824ca /examples/quick | |
parent | f97bdd0b70ce0b20b7057161b442a8859f7dd1a8 (diff) |
Quick scenegraph examples: use qsTr() for user facing strings
All user facing strings should use qsTr()
Pick-to: 6.5
Change-Id: I2f776fe088b05bb046ceafbc6c29528212a2c1a0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'examples/quick')
9 files changed, 15 insertions, 17 deletions
diff --git a/examples/quick/scenegraph/customgeometry/main.qml b/examples/quick/scenegraph/customgeometry/main.qml index 2f440b441e..472a618237 100644 --- a/examples/quick/scenegraph/customgeometry/main.qml +++ b/examples/quick/scenegraph/customgeometry/main.qml @@ -32,7 +32,7 @@ Item { width: parent.width - 40 wrapMode: Text.WordWrap - text: "This curve is a custom scene graph item, implemented using line strips" + text: qsTr("This curve is a custom scene graph item, implemented using line strips") } } //! [4] diff --git a/examples/quick/scenegraph/custommaterial/main.qml b/examples/quick/scenegraph/custommaterial/main.qml index 9626711d38..ce22f9c8e9 100644 --- a/examples/quick/scenegraph/custommaterial/main.qml +++ b/examples/quick/scenegraph/custommaterial/main.qml @@ -45,8 +45,8 @@ Item { anchors.bottom: parent.bottom anchors.margins: 20 wrapMode: Text.WordWrap - text: "This example shows how to create a custom material in C++ and use it in QML.\n" + text: qsTr("This example shows how to create a custom material in C++ and use it in QML.\n" + "The custom material uses a fragment shader that calculates the Mandelbrot set," - + " and exposes the shader uniforms as QML properties." + + " and exposes the shader uniforms as QML properties.") } } diff --git a/examples/quick/scenegraph/customrendernode/main.qml b/examples/quick/scenegraph/customrendernode/main.qml index 3abc10d777..5c9bc240ad 100644 --- a/examples/quick/scenegraph/customrendernode/main.qml +++ b/examples/quick/scenegraph/customrendernode/main.qml @@ -15,7 +15,7 @@ Item { anchors.fill: parent Text { - text: "Direct" + text: qsTr("Direct") color: 'white' SplitView.preferredWidth: root.width/2 @@ -26,7 +26,7 @@ Item { } Text { - text: "Layer" + text: qsTr("Layer") color: 'white' SplitView.preferredWidth: root.width/2 @@ -45,11 +45,11 @@ Item { anchors.bottom: parent.bottom anchors.margins: 20 wrapMode: Text.WordWrap - text: "This example creates a custom scenegraph QSGRenderNode render node and " + + text: qsTr("This example creates a custom scenegraph QSGRenderNode render node and " + "demonstrates its use. The render node is placed in front of a red " + "rectangle, and behind a white rectangle. Rendering is demonstrated " + "directly into the scenegraph, and as a layered item. Opacity and " + - "rotation transform changes are exercised." + "rotation transform changes are exercised.") Rectangle { z:-1 diff --git a/examples/quick/scenegraph/fboitem/main.qml b/examples/quick/scenegraph/fboitem/main.qml index 78f0f27e74..db2df19197 100644 --- a/examples/quick/scenegraph/fboitem/main.qml +++ b/examples/quick/scenegraph/fboitem/main.qml @@ -75,7 +75,7 @@ Item { anchors.right: renderer.right anchors.margins: 20 wrapMode: Text.WordWrap - text: "The blue rectangle with the vintage 'Q' is an FBO, rendered by the application on the scene graph rendering thread. The FBO is managed and displayed using the QQuickFramebufferObject convenience class." + text: qsTr("The blue rectangle with the vintage 'Q' is an FBO, rendered by the application on the scene graph rendering thread. The FBO is managed and displayed using the QQuickFramebufferObject convenience class.") } diff --git a/examples/quick/scenegraph/openglunderqml/main.qml b/examples/quick/scenegraph/openglunderqml/main.qml index 46cbef18eb..1cb088b538 100644 --- a/examples/quick/scenegraph/openglunderqml/main.qml +++ b/examples/quick/scenegraph/openglunderqml/main.qml @@ -32,7 +32,7 @@ Item { id: label color: "black" wrapMode: Text.WordWrap - text: "The background here is a squircle rendered with raw OpenGL using the 'beforeRender()' signal in QQuickWindow. This text label and its border is rendered using QML" + text: qsTr("The background here is a squircle rendered with raw OpenGL using the 'beforeRender()' signal in QQuickWindow. This text label and its border is rendered using QML") anchors.right: parent.right anchors.left: parent.left anchors.bottom: parent.bottom diff --git a/examples/quick/scenegraph/threadedanimation/main.qml b/examples/quick/scenegraph/threadedanimation/main.qml index 33e72af1f1..23def8fbcf 100644 --- a/examples/quick/scenegraph/threadedanimation/main.qml +++ b/examples/quick/scenegraph/threadedanimation/main.qml @@ -27,7 +27,7 @@ Rectangle { Text { id: blockingLabel color: blocker.running ? "red" : "black" - text: blocker.running ? "Blocked!" : "Not blocked" + text: blocker.running ? qsTr("Blocked!") : qsTr("Not blocked") anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 100 @@ -86,7 +86,7 @@ Rectangle { id: label color: "black" wrapMode: Text.WordWrap - text: "This application shows two spinners. The one to the right is animated on the scene graph thread (when applicable) and the left one is using the normal Qt Quick animation system." + text: qsTr("This application shows two spinners. The one to the right is animated on the scene graph thread (when applicable) and the left one is using the normal Qt Quick animation system.") anchors.right: parent.right anchors.left: parent.left anchors.bottom: parent.bottom diff --git a/examples/quick/scenegraph/twotextureproviders/main.qml b/examples/quick/scenegraph/twotextureproviders/main.qml index e28f6347a8..13d229631e 100644 --- a/examples/quick/scenegraph/twotextureproviders/main.qml +++ b/examples/quick/scenegraph/twotextureproviders/main.qml @@ -51,7 +51,7 @@ Item { Text { anchors.centerIn: parent color: "black" // Qt.hsla(0.8, 0.8, 0.8); - text: "Qt\nQuick" + text: qsTr("Qt\nQuick") horizontalAlignment: Text.AlignHCenter @@ -89,8 +89,6 @@ Item { anchors.bottom: parent.bottom anchors.margins: 20 wrapMode: Text.WordWrap - text: "This example creates two animated items and sets 'layer.enabled: true' on both of them. " + - "This turns the items into texture providers and we can access their texture from C++ in a custom material. " + - "The XorBlender is a custom C++ item which uses performs an Xor blend between them." + text: qsTr("This example creates two animated items and sets 'layer.enabled: true' on both of them. This turns the items into texture providers and we can access their texture from C++ in a custom material. The XorBlender is a custom C++ item which uses performs an Xor blend between them.") } } diff --git a/examples/quick/scenegraph/vulkantextureimport/main.qml b/examples/quick/scenegraph/vulkantextureimport/main.qml index 081a496bca..e718258e40 100644 --- a/examples/quick/scenegraph/vulkantextureimport/main.qml +++ b/examples/quick/scenegraph/vulkantextureimport/main.qml @@ -71,6 +71,6 @@ Rectangle { anchors.right: renderer.right anchors.margins: 20 wrapMode: Text.WordWrap - text: "The squircle, using rendering code borrowed from the vulkanunderqml example, is rendered into a texture directly with Vulkan. The VkImage is then imported and used in a custom Qt Quick item." + text: qsTr("The squircle, using rendering code borrowed from the vulkanunderqml example, is rendered into a texture directly with Vulkan. The VkImage is then imported and used in a custom Qt Quick item.") } } diff --git a/examples/quick/scenegraph/vulkanunderqml/main.qml b/examples/quick/scenegraph/vulkanunderqml/main.qml index bae014b328..4981c352de 100644 --- a/examples/quick/scenegraph/vulkanunderqml/main.qml +++ b/examples/quick/scenegraph/vulkanunderqml/main.qml @@ -32,7 +32,7 @@ Item { id: label color: "black" wrapMode: Text.WordWrap - text: "The background here is a squircle rendered with raw Vulkan using the beforeRendering() and beforeRenderPassRecording() signals in QQuickWindow. This text label and its border is rendered using QML" + text: qsTr("The background here is a squircle rendered with raw Vulkan using the beforeRendering() and beforeRenderPassRecording() signals in QQuickWindow. This text label and its border is rendered using QML") anchors.right: parent.right anchors.left: parent.left anchors.bottom: parent.bottom |