mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-24 12:39:25 +00:00
Merge pull request #548
4c2f78a
Fix translations in dropdown menu (Jaquee)
This commit is contained in:
commit
b757cc28b8
3 changed files with 13 additions and 4 deletions
|
@ -107,7 +107,7 @@ Item {
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
text: column.currentIndex < repeater.model.rowCount() ? repeater.model.get(column.currentIndex).column1 : ""
|
text: column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column1) + translationManager.emptyString : ""
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
@ -119,7 +119,7 @@ Item {
|
||||||
font.family: "Arial"
|
font.family: "Arial"
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
text: column.currentIndex < repeater.model.rowCount() ? repeater.model.get(column.currentIndex).column2 : ""
|
text: column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column2) + translationManager.emptyString : ""
|
||||||
|
|
||||||
property int w: 0
|
property int w: 0
|
||||||
Component.onCompleted: w = implicitWidth
|
Component.onCompleted: w = implicitWidth
|
||||||
|
@ -193,6 +193,12 @@ Item {
|
||||||
Repeater {
|
Repeater {
|
||||||
id: repeater
|
id: repeater
|
||||||
|
|
||||||
|
// Workaround for translations in listElements. All translated strings needs to be listed in this file.
|
||||||
|
property string stringLow: qsTr("Low (x1 fee)") + translationManager.emptyString
|
||||||
|
property string stringMedium: qsTr("Medium (x20 fee)") + translationManager.emptyString
|
||||||
|
property string stringHigh: qsTr("High (x166 fee)") + translationManager.emptyString
|
||||||
|
|
||||||
|
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
@ -210,7 +216,7 @@ Item {
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: 12
|
font.pixelSize: 12
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
text: column1
|
text: qsTr(column1) + translationManager.emptyString
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
|
3
main.qml
3
main.qml
|
@ -178,6 +178,9 @@ ApplicationWindow {
|
||||||
translationManager.setLanguage(locale.split("_")[0]);
|
translationManager.setLanguage(locale.split("_")[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reload transfer page with translations enabled
|
||||||
|
middlePanel.transferView.onPageCompleted();
|
||||||
|
|
||||||
// If currentWallet exists, we're just switching daemon - close/reopen wallet
|
// If currentWallet exists, we're just switching daemon - close/reopen wallet
|
||||||
if (typeof currentWallet !== "undefined" && currentWallet !== null) {
|
if (typeof currentWallet !== "undefined" && currentWallet !== null) {
|
||||||
console.log("Daemon change - closing " + currentWallet)
|
console.log("Daemon change - closing " + currentWallet)
|
||||||
|
|
|
@ -688,13 +688,13 @@ Rectangle {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
//Disable password page until enabled by updateStatus
|
//Disable password page until enabled by updateStatus
|
||||||
pageRoot.enabled = false
|
pageRoot.enabled = false
|
||||||
updateMixin()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// fires on every page load
|
// fires on every page load
|
||||||
function onPageCompleted() {
|
function onPageCompleted() {
|
||||||
console.log("transfer page loaded")
|
console.log("transfer page loaded")
|
||||||
updateStatus();
|
updateStatus();
|
||||||
|
updateMixin();
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Add daemon sync status
|
//TODO: Add daemon sync status
|
||||||
|
|
Loading…
Reference in a new issue