dynamic translation support. closes #24

This commit is contained in:
Ilya Kitaev
2016-07-20 22:28:11 +03:00
parent 39b88daf32
commit 32ebf180ac
34 changed files with 837 additions and 314 deletions

View File

@@ -44,7 +44,7 @@ Rectangle {
font.family: "Arial"
font.pixelSize: 18
color: "#4A4949"
text: qsTr("Add new entry")
text: qsTr("Add new entry") + translationManager.emptyString
}
Label {
@@ -55,7 +55,7 @@ Rectangle {
anchors.topMargin: 17
text: qsTr("Address")
fontSize: 14
tipText: qsTr("<b>Tip tekst test</b>")
tipText: qsTr("<b>Tip tekst test</b>") + translationManager.emptyString
}
LineEdit {
@@ -74,9 +74,10 @@ Rectangle {
anchors.top: addressLine.bottom
anchors.leftMargin: 17
anchors.topMargin: 17
text: qsTr("Payment ID <font size='2'>(Optional)</font>")
text: qsTr("Payment ID <font size='2'>(Optional)</font>") + translationManager.emptyString
fontSize: 14
tipText: qsTr("<b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer")
+ translationManager.emptyString
}
LineEdit {
@@ -95,9 +96,9 @@ Rectangle {
anchors.top: paymentIdLine.bottom
anchors.leftMargin: 17
anchors.topMargin: 17
text: qsTr("Description <font size='2'>(Local database)</font>")
text: qsTr("Description <font size='2'>(Local database)</font>") + translationManager.emptyString
fontSize: 14
tipText: qsTr("<b>Tip tekst test</b><br/><br/>test line 2")
tipText: qsTr("<b>Tip tekst test</b><br/><br/>test line 2") + translationManager.emptyString
}
LineEdit {
@@ -169,9 +170,9 @@ Rectangle {
ListModel {
id: columnsModel
ListElement { columnName: "Address"; columnWidth: 148 }
ListElement { columnName: "Payment ID"; columnWidth: 148 }
ListElement { columnName: "Description"; columnWidth: 148 }
ListElement { columnName: qsTr("Address") + translationManager.emptyString; columnWidth: 148 }
ListElement { columnName: qsTr("Payment ID") + translationManager.emptyString; columnWidth: 148 }
ListElement { columnName: qsTr("Description") + translationManager.emptyString; columnWidth: 148 }
}
TableHeader {

View File

@@ -54,7 +54,7 @@ Rectangle {
font.family: "Arial"
font.pixelSize: 18
color: "#4A4949"
text: qsTr("Quick transfer")
text: qsTr("Quick transfer") + translationManager.emptyString
}
LineEdit {
@@ -101,6 +101,7 @@ Rectangle {
textFormat: Text.RichText
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>\
lookng for security level and address book? go to <a href='#'>Transfer</a> tab")
+ translationManager.emptyString
font.underline: false
onLinkActivated: appWindow.showPageRequest("Transfer")
}

View File

@@ -44,7 +44,7 @@ Rectangle {
font.family: "Arial"
font.pixelSize: 18
color: "#4A4949"
text: qsTr("Filter trasactions history")
text: qsTr("Filter trasactions history") + translationManager.emptyString
}
Label {
@@ -55,7 +55,7 @@ Rectangle {
anchors.topMargin: 17
text: qsTr("Address")
fontSize: 14
tipText: qsTr("<b>Tip tekst test</b>")
tipText: qsTr("<b>Tip tekst test</b>") + translationManager.emptyString
}
LineEdit {
@@ -74,9 +74,10 @@ Rectangle {
anchors.top: addressLine.bottom
anchors.leftMargin: 17
anchors.topMargin: 17
text: qsTr("Payment ID <font size='2'>(Optional)</font>")
text: qsTr("Payment ID <font size='2'>(Optional)</font>") + translationManager.emptyString
fontSize: 14
tipText: qsTr("<b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer")
+ translationManager.emptyString
}
LineEdit {
@@ -95,9 +96,9 @@ Rectangle {
anchors.top: paymentIdLine.bottom
anchors.leftMargin: 17
anchors.topMargin: 17
text: qsTr("Description <font size='2'>(Local database)</font>")
text: qsTr("Description <font size='2'>(Local database)</font>") + translationManager.emptyString
fontSize: 14
tipText: qsTr("<b>Tip tekst test</b><br/><br/>test line 2")
tipText: qsTr("<b>Tip tekst test</b><br/><br/>test line 2") + translationManager.emptyString
}
LineEdit {
@@ -117,9 +118,9 @@ Rectangle {
anchors.leftMargin: 17
anchors.topMargin: 17
width: 156
text: qsTr("Date from")
text: qsTr("Date from") + translationManager.emptyString
fontSize: 14
tipText: qsTr("<b>Tip tekst test</b>")
tipText: qsTr("<b>Tip tekst test</b>") + translationManager.emptyString
}
DatePicker {
@@ -139,7 +140,7 @@ Rectangle {
anchors.topMargin: 17
text: qsTr("To")
fontSize: 14
tipText: qsTr("<b>Tip tekst test</b>")
tipText: qsTr("<b>Tip tekst test</b>") + translationManager.emptyString
}
DatePicker {
@@ -185,9 +186,9 @@ Rectangle {
anchors.leftMargin: 17
anchors.topMargin: 17
width: 156
text: qsTr("Type of transation")
text: qsTr("Type of transation") + translationManager.emptyString
fontSize: 14
tipText: qsTr("<b>Tip tekst test</b>")
tipText: qsTr("<b>Tip tekst test</b>") + translationManager.emptyString
}
ListModel {
@@ -219,9 +220,9 @@ Rectangle {
anchors.leftMargin: 17
anchors.topMargin: 17
width: 156
text: qsTr("Amount from")
text: qsTr("Amount from") + translationManager.emptyString
fontSize: 14
tipText: qsTr("<b>Tip tekst test</b>")
tipText: qsTr("<b>Tip tekst test</b>") + translationManager.emptyString
}
LineEdit {
@@ -242,7 +243,7 @@ Rectangle {
width: 156
text: qsTr("To")
fontSize: 14
tipText: qsTr("<b>Tip tekst test</b>")
tipText: qsTr("<b>Tip tekst test</b>") + translationManager.emptyString
}
LineEdit {

View File

@@ -76,14 +76,14 @@ Rectangle {
Label {
id: addressLabel
fontSize: 14
text: qsTr("Address")
text: qsTr("Address") + translationManager.emptyString
width: mainLayout.labelWidth
}
LineEdit {
id: addressLine
fontSize: mainLayout.lineEditFontSize
placeholderText: "ReadOnly wallet address displayed here";
placeholderText: qsTr("ReadOnly wallet address displayed here") + translationManager.emptyString;
readOnly: true
width: mainLayout.editWidth
Layout.fillWidth: true
@@ -103,7 +103,7 @@ Rectangle {
Label {
id: integratedAddressLabel
fontSize: 14
text: qsTr("Integrated address")
text: qsTr("Integrated address") + translationManager.emptyString
width: mainLayout.labelWidth
}
@@ -112,7 +112,7 @@ Rectangle {
id: integratedAddressLine
fontSize: mainLayout.lineEditFontSize
placeholderText: "ReadOnly wallet integrated address displayed here";
placeholderText: qsTr("ReadOnly wallet integrated address displayed here") + translationManager.emptyString
readOnly: true
width: mainLayout.editWidth
Layout.fillWidth: true
@@ -133,7 +133,7 @@ Rectangle {
Label {
id: paymentIdLabel
fontSize: 14
text: qsTr("Payment ID")
text: qsTr("Payment ID") + translationManager.emptyString
width: mainLayout.labelWidth
}
@@ -141,7 +141,7 @@ Rectangle {
LineEdit {
id: paymentIdLine
fontSize: mainLayout.lineEditFontSize
placeholderText: "PaymentID here";
placeholderText: qsTr("PaymentID here") + translationManager.emptyString;
readOnly: false
width: mainLayout.editWidth

View File

@@ -54,7 +54,7 @@ Rectangle {
anchors.leftMargin: 17
anchors.rightMargin: 17
anchors.topMargin: 17
text: qsTr("Amount")
text: qsTr("Amount") + translationManager.emptyString
fontSize: 14
}
@@ -64,7 +64,7 @@ Rectangle {
anchors.topMargin: 17
fontSize: 14
x: (parent.width - 17) / 2 + 17
text: qsTr("Transaction priority")
text: qsTr("Transaction priority") + translationManager.emptyString
}
Row {
@@ -86,16 +86,16 @@ Rectangle {
// Amount input
LineEdit {
id: amountLine
placeholderText: qsTr("Amount...")
placeholderText: qsTr("Amount...") + translationManager.emptyString
width: parent.width - 37 - 17
}
}
ListModel {
id: priorityModel
ListElement { column1: "LOW"; column2: ""; priority: PendingTransaction.Priority_Low }
ListElement { column1: "MEDIUM"; column2: ""; priority: PendingTransaction.Priority_Medium }
ListElement { column1: "HIGH"; column2: ""; priority: PendingTransaction.Priority_High }
ListElement { column1: qsTr("LOW") + translationManager.emptyString; column2: ""; priority: PendingTransaction.Priority_Low }
ListElement { column1: qsTr("MEDIUM") + translationManager.emptyString; column2: ""; priority: PendingTransaction.Priority_Medium }
ListElement { column1: qsTr("HIGH") + translationManager.emptyString; column2: ""; priority: PendingTransaction.Priority_High }
}
StandardDropdown {
@@ -124,7 +124,7 @@ Rectangle {
anchors.rightMargin: 17
anchors.topMargin: 30
fontSize: 14
text: qsTr("Privacy Level")
text: qsTr("Privacy Level") + translationManager.emptyString
}
PrivacyLevel {
@@ -166,6 +166,7 @@ Rectangle {
textFormat: Text.RichText
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style>\
Address <font size='2'> ( Type in or select from </font> <a href='#'>Address</a><font size='2'> book )</font>")
+ translationManager.emptyString
onLinkActivated: appWindow.showPageRequest("AddressBook")
}
@@ -190,7 +191,7 @@ Rectangle {
anchors.rightMargin: 17
anchors.topMargin: 17
fontSize: 14
text: qsTr("Payment ID <font size='2'>( Optional )</font>")
text: qsTr("Payment ID <font size='2'>( Optional )</font>") + translationManager.emptyString
}
// payment id input
@@ -215,6 +216,7 @@ Rectangle {
anchors.topMargin: 17
fontSize: 14
text: qsTr("Description <font size='2'>( An optional description that will be saved to the local address book if entered )</font>")
+ translationManager.emptyString
}
LineEdit {
@@ -234,7 +236,7 @@ Rectangle {
anchors.leftMargin: 17
anchors.topMargin: 17
width: 60
text: qsTr("SEND")
text: qsTr("SEND") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"