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>
This commit is contained in:
parent
f97bdd0b70
commit
1c6afffc94
|
@ -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]
|
||||
|
|
|
@ -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.")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.")
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue