From 1ebae809ec89e858077cdfbb25f5b651ae44b5fc Mon Sep 17 00:00:00 2001
From: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Date: Thu, 25 Mar 2010 14:59:54 +0100
Subject: [PATCH] QmlDesigner.propertyEditor: add qsTr() for translation

---
 .../propertyeditor/Qt/ExpressionEditor.qml    |  2 +-
 .../Qt/ExtendedFunctionButton.qml             |  4 +--
 .../propertyeditor/Qt/FontGroupBox.qml        | 12 ++++----
 .../propertyeditor/Qt/Geometry.qml            |  6 ++--
 .../propertyeditor/Qt/ImageSpecifics.qml      |  8 +++---
 .../qmldesigner/propertyeditor/Qt/Layout.qml  | 26 ++++++++---------
 .../Qt/RectangleColorGroupBox.qml             | 10 +++----
 .../propertyeditor/Qt/RectangleSpecifics.qml  |  4 +--
 .../Qt/StandardTextColorGroupBox.qml          | 28 +++++++++----------
 .../Qt/StandardTextGroupBox.qml               |  6 ++--
 .../propertyeditor/Qt/TextEditSpecifics.qml   |  4 +--
 .../propertyeditor/Qt/TextInputGroupBox.qml   | 10 +++----
 .../qmldesigner/propertyeditor/Qt/Type.qml    |  6 ++--
 .../propertyeditor/Qt/Visibility.qml          | 10 +++----
 14 files changed, 67 insertions(+), 69 deletions(-)

diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExpressionEditor.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/ExpressionEditor.qml
index e96def4b26e..70750d469cc 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExpressionEditor.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/ExpressionEditor.qml
@@ -48,7 +48,7 @@ QWidget {
     ExpressionEdit {
         id: textEdit;
         styleSheet: "QTextEdit {border-radius: 0px;}"
-        documentTitle: "Expression"
+        documentTitle: qsTr("Expression")
 
         width: expressionEdit.width
         height: expressionEdit.height
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedFunctionButton.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedFunctionButton.qml
index bf99982d1a7..70bfbd22275 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedFunctionButton.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/ExtendedFunctionButton.qml
@@ -61,14 +61,14 @@ QToolButton {
 
     actions:  [
     QAction {
-        text: "Reset";
+        text: qsTr("Reset")
         onTriggered: {
             backendValue.resetValue();
         }
 
     },
     QAction {
-        text: "Set Expression";
+        text: qsTr("Set Expression");
         onTriggered: {
             expressionEdit.globalY = extendedFunctionButton.globalY;
             expressionEdit.backendValue = extendedFunctionButton.backendValue
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/FontGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/FontGroupBox.qml
index dfc62d76bc7..ddc16d996f6 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/FontGroupBox.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/FontGroupBox.qml
@@ -12,7 +12,7 @@ GroupBox {
             layout: HorizontalLayout {
 			    rightMargin: 12
                 Label {
-                    text: "Font"
+                    text: qsTr("Font")
                 }
                 FontComboBox {
                     id: fontSelector
@@ -28,7 +28,7 @@ GroupBox {
 
         IntEditor {
             maximumWidth: 200
-            caption: "Size"
+            caption: qsTr("Size")
             slider: false
             backendValue: backendValues.font_pointSize
             baseStateFlag: isBaseState;
@@ -37,17 +37,17 @@ GroupBox {
         QWidget {
             layout: HorizontalLayout {
                 Label {
-                    text: "Font Style"
+                    text: qsTr("Font Style")
                 }
 
                 CheckBox {
-                    text: "Bold";
+                    text: qsTr("Bold")
                     backendValue: backendValues.font_bold
                     baseStateFlag: isBaseState;
                     checkable: true;
                 }
                 CheckBox {
-                    text: "Italic";
+                    text: qsTr("Italic")
                     backendValue: backendValues.font_italic
                     baseStateFlag: isBaseState;
                     checkable: true;
@@ -61,7 +61,7 @@ GroupBox {
             layout: HorizontalLayout {
 			    rightMargin: 12
                 Label {
-                    text: "Style"
+                    text: qsTr("Style")
                 }
 
                 ComboBox {
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml
index 560c0f80c87..2fc5595799d 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/Geometry.qml
@@ -5,7 +5,7 @@ GroupBox {
     finished: finishedNotify
     id: geometry
 
-    caption: "Geometry"
+    caption: qsTr("Geometry")
 
     layout: VerticalLayout {
 
@@ -13,7 +13,7 @@ GroupBox {
             layout: HorizontalLayout {
 
                 Label {
-                    text: "Position"
+                    text: qsTr("Position")
                 }
 
                 DoubleSpinBox {
@@ -52,7 +52,7 @@ GroupBox {
             layout: HorizontalLayout {
 
                 Label {
-                    text: "Size"
+                    text: qsTr("Size")
                 }
 
                 DoubleSpinBox {
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/ImageSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/ImageSpecifics.qml
index 0b03bb1463a..ccf0ca82d66 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/ImageSpecifics.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/ImageSpecifics.qml
@@ -23,7 +23,7 @@ QWidget {
 
                 FileWidget {
                     enabled: isBaseState || backendValues.id.value != "";
-                    text: "Source: ";
+                    text: qsTr("Source ")
                     fileName: backendValues.source.value;
                     onFileNameChanged: {
                         backendValues.source.value = fileName;
@@ -33,7 +33,7 @@ QWidget {
                 QWidget {
                     layout: HorizontalLayout {
                         Label {
-                            text: "Fill Mode"
+                            text: qsTr("Fill Mode")
                         }
 
                         ComboBox {
@@ -51,11 +51,11 @@ QWidget {
                 QWidget {
                     layout: HorizontalLayout {
                         Label {
-                            text: "Aliasing"
+                            text: qsTr("Aliasing")
                         }
 
                         CheckBox {
-                            text: "Smooth";
+                            text: qsTr("Smooth")
                             backendValue: backendValues.smooth
                             baseStateFlag: isBaseState;
                             checkable: true;
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Layout.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/Layout.qml
index e57c76e2d10..19e9c21cec3 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Layout.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/Layout.qml
@@ -14,7 +14,7 @@ GroupBox {
 
     layout: VerticalLayout {
         Label {
-            text: "Anchors"
+            text: qsTr("Anchors")
         }
         QWidget {
             layout: HorizontalLayout {
@@ -46,7 +46,7 @@ GroupBox {
                         }
 
                         Label {
-                            text: "Target"
+                            text: qsTr("Target")
                             fixedWidth: targetLabelWidth
                         }
                         SiblingComboBox {
@@ -64,7 +64,7 @@ GroupBox {
                         IntEditor {
                             id:topbox
                             slider: false
-                            caption: "Margin"
+                            caption: qsTr("Margin")
                             backendValue: backendValues.anchors_topMargin
                             baseStateFlag: isBaseState;
                             maximumValue: 1000
@@ -95,7 +95,7 @@ GroupBox {
                         }
 
                         Label {
-                            text: "Target"
+                            text: qsTr("Target")
                             fixedWidth: targetLabelWidth
                         }
                         SiblingComboBox {
@@ -112,7 +112,7 @@ GroupBox {
 					    leftMargin: leftMarginMargin
                         IntEditor {
                             slider: false
-                            caption: "Margin"
+                            caption: qsTr("Margin")
                             backendValue: backendValues.anchors_bottomMargin
                             baseStateFlag: isBaseState;
                             maximumValue: 1000
@@ -143,7 +143,7 @@ GroupBox {
                         }
 
                         Label {
-                            text: "Target"
+                            text: qsTr("Target")
                             fixedWidth: targetLabelWidth
                         }
                         SiblingComboBox {
@@ -159,7 +159,7 @@ GroupBox {
 					    leftMargin: leftMarginMargin
                         IntEditor {
                             slider: false
-                            caption: "Margin"
+                            caption: qsTr("Margin")
                             backendValue: backendValues.anchors_leftMargin
                             baseStateFlag: isBaseState;
                             maximumValue: 1000
@@ -190,7 +190,7 @@ GroupBox {
                         }
 
                         Label {
-                            text: "Target"
+                            text: qsTr("Target")
                             fixedWidth: targetLabelWidth
                         }
                         SiblingComboBox {
@@ -206,7 +206,7 @@ GroupBox {
 					    leftMargin: leftMarginMargin
                         IntEditor {
                             slider: false
-                            caption: "Margin"
+                            caption: qsTr("Margin")
                             backendValue: backendValues.anchors_rightMargin
                             baseStateFlag: isBaseState;
                             maximumValue: 1000
@@ -237,7 +237,7 @@ GroupBox {
                         }
 
                         Label {
-                            text: "Target"
+                            text: qsTr("Target")
                             fixedWidth: targetLabelWidth
                         }
                         SiblingComboBox {
@@ -253,7 +253,7 @@ GroupBox {
 					    leftMargin: leftMarginMargin
                         IntEditor {
                             slider: false
-                            caption: "Margin"
+                            caption: qsTr("Margin")
                             baseStateFlag: isBaseState;
                             backendValue: backendValues.anchors_horizontalCenterOffset
                             maximumValue: 1000
@@ -284,7 +284,7 @@ GroupBox {
                         }
 
                         Label {
-                            text: "Target"
+                            text: qsTr("Target")
                             fixedWidth: targetLabelWidth
                         }
                         SiblingComboBox {
@@ -300,7 +300,7 @@ GroupBox {
 					    leftMargin: leftMarginMargin
                         IntEditor {						    
                             slider: false
-                            caption: "Margin"
+                            caption: qsTr("Margin")
                             backendValue: backendValues.anchors_verticalCenterOffset
                             baseStateFlag: isBaseState;
                             maximumValue: 1000
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml
index a8299551f89..3855b6c87dc 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml
@@ -4,20 +4,18 @@ import Bauhaus 1.0
 GroupBox {
     id: rectangleColorGroupBox
 
-    caption: "Colors"
+    caption: qsTr("Colors")
 
     layout: VerticalLayout {        
 
         ColorGroupBox {
-		    caption: "Rectangle"
-
-            finished: finishedNotify
-
+            caption: qsTr("Rectangle")
+            finished: finishedNotify            
             backendColor: backendValues.color
         }        
 
         ColorGroupBox {
-            caption: "Border"
+            caption: qsTr("Border")
             finished: finishedNotify
 
             backendColor: backendValues.border_color
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml
index 197ee274c12..e6d06a2af24 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml
@@ -24,7 +24,7 @@ QWidget {
 
                 IntEditor {
                     backendValue: backendValues.radius
-                    caption: "Radius"
+                    caption: qsTr("Radius")
                     baseStateFlag: isBaseState;
                     step: 1;
                     minimumValue: 0;
@@ -36,7 +36,7 @@ QWidget {
                     id: borderWidth;
                     backendValue: backendValues.border_width === undefined ? 0 : backendValues.border_width
 
-                    caption: "Border"
+                    caption: qsTr("Border")
                     baseStateFlag: isBaseState;
 
                     step: 1;
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextColorGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextColorGroupBox.qml
index 38926cb8345..70ac01631ee 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextColorGroupBox.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextColorGroupBox.qml
@@ -3,40 +3,40 @@ import Bauhaus 1.0
 
 GroupBox {
     id: standardTextColorGroupBox
-	
-	property bool showStyleColor: false
-	property bool showSelectionColor: false
-	property bool showSelectedTextColor: false	
 
-    caption: "Color"
+    property bool showStyleColor: false
+    property bool showSelectionColor: false
+    property bool showSelectedTextColor: false
+
+    caption: qsTr("Color")
 
     layout: VerticalLayout {
         ColorGroupBox {
-            caption: "Text"
+            caption: qsTr("Text")
             finished: finishedNotify
 
             backendColor: backendValues.color
         }
         
         ColorGroupBox {
-		    caption: "Style"
-			visible: showStyleColor
+            caption: qsTr("Style")
+            visible: showStyleColor
             finished: finishedNotify
 
             backendColor: backendValues.styleColor
         }
-		
-		 ColorGroupBox {
-            caption: "Selection"
-			visible: showSelectionColor
+
+        ColorGroupBox {
+            caption: qsTr("Selection")
+            visible: showSelectionColor
             finished: finishedNotify
 
             backendColor: backendValues.selectionColor
         }
         
         ColorGroupBox {
-		    visible: showSelectedTextColor
-		    caption: "Selected"
+            visible: showSelectedTextColor
+            caption: qsTr("Selected")
 
             finished: finishedNotify
 
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextGroupBox.qml
index 056c176e137..8722d8302ea 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextGroupBox.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextGroupBox.qml
@@ -14,7 +14,7 @@ GroupBox {
             layout: HorizontalLayout {
 
                 Label {
-                    text: "Text"
+                    text: qsTr("Text")
                 }
 
                 LineEdit {
@@ -31,7 +31,7 @@ GroupBox {
                 }
                 CheckBox {
                     baseStateFlag: isBaseState;
-                    text: "Is Wrapping";
+                    text: qsTr("Is Wrapping")
                     checkable: true;
                     backendValue: backendValues.wrap;
                 }
@@ -42,7 +42,7 @@ GroupBox {
             layout: HorizontalLayout {
 
                 Label {
-                    text: "Alignment"
+                    text: qsTr("Alignment")
                 }
                 AlignmentHorizontalButtons {}
                 AlignmentVerticalButtons { visible: showVerticalAlignment }
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextEditSpecifics.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/TextEditSpecifics.qml
index 75e317155bc..6d44a036df5 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextEditSpecifics.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/TextEditSpecifics.qml
@@ -22,7 +22,7 @@ QWidget {
         }
 
         GroupBox {
-            caption: "Text Edit"
+            caption: qsTr("Text Edit")
             finished: finishedNotify;
             layout: VerticalLayout {
 
@@ -30,7 +30,7 @@ QWidget {
                     layout: HorizontalLayout {
 					rightMargin: 12
                         Label {
-                            text: "Format"
+                            text: qsTr("Format")
                         }
                         ComboBox {
                             baseStateFlag: isBaseState
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputGroupBox.qml
index 25d69558d99..e2c9a09ac08 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputGroupBox.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputGroupBox.qml
@@ -4,16 +4,16 @@ import Bauhaus 1.0
 GroupBox {
 
     id: textInputGroupBox
-    caption: "Text Input";
+    caption: qsTr("Text Input")
 
     layout: VerticalLayout {       
 
         QWidget {
             layout: HorizontalLayout {
-                Label {text: "Flags"}
+                Label {text: qsTr("Flags") }
 
                 CheckBox {
-                    text: "Read Only";
+                    text: qsTr("Read Only")
                     baseStateFlag: isBaseState;
                     checkable: true;
                     backendValue: backendValues.readOnly;
@@ -31,7 +31,7 @@ GroupBox {
 
                 CheckBox {
 
-                    text: "Cursor Visible";
+                    text: qsTr("Cursor Visible")
                     baseStateFlag: isBaseState;
                     checkable: true;
                     backendValue: backendValues.cursorVisible;
@@ -45,7 +45,7 @@ GroupBox {
             layout: HorizontalLayout {
                 Label {text: ""}
                 CheckBox {
-                    text: "Focus On Press";
+                    text: qsTr("Focus On Press")
                     baseStateFlag: isBaseState;
                     checkable: true;
                     backendValue:  backendValues. focusOnPress;
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Type.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/Type.qml
index eaa1543c743..6623e3a2519 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Type.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/Type.qml
@@ -4,14 +4,14 @@ import Bauhaus 1.0
 GroupBox {
     id: type;
     finished: finishedNotify;
-    caption: "Type";
+    caption: qsTr("Type")
 
     layout: VerticalLayout {
         spacing: 6
         QWidget {
             layout: HorizontalLayout {
                 Label {
-                    text: "type";
+                    text: qsTr("Type")
                     windowTextColor: isBaseState ? "#000000" : "#FF0000";
                 }
 
@@ -28,7 +28,7 @@ GroupBox {
 
             layout: HorizontalLayout {
                 Label {
-                    text: "Id";
+                    text: qsTr("Id");
                 }
 
                 QLineEdit {
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/Visibility.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/Visibility.qml
index 85e92ec22a7..1768e5937a4 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/Visibility.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/Visibility.qml
@@ -11,19 +11,19 @@ GroupBox {
 
         QWidget {
             layout: HorizontalLayout {
-                Label {
-                    text: "Visibility"
+                Label {                    
+                    text: qsTr("Visibility")
                 }
                 CheckBox {
                     id: visibleCheckBox;
-                    text: "Is visible";
+                    text: qsTr("Is visible")
                     backendValue: backendValues.visible;
                     baseStateFlag: isBaseState;
                     checkable: true;
                 }
                 CheckBox {
                     id: clipCheckBox;
-                    text: "Clip Content";
+                    text: qsTr("Clip Content")
                     backendValue: backendValues.clip;
                     baseStateFlag: isBaseState;
                     checkable: true;
@@ -34,7 +34,7 @@ GroupBox {
             layout: HorizontalLayout {
 
                 Label {
-                    text: "Opacity"
+                    text: qsTr("Opacity")
                 }
 
                 DoubleSpinBox {
-- 
GitLab