fix: 18n and category headers
This commit is contained in:
parent
159c82c329
commit
22f4815957
|
@ -106,7 +106,7 @@ Item {
|
|||
}
|
||||
|
||||
StyledText {
|
||||
text: qsTrId(profileModel.network)
|
||||
text: Utils.getNetworkName(profileModel.network)
|
||||
font.pixelSize: 15
|
||||
anchors.right: caret3.left
|
||||
anchors.rightMargin: Style.current.padding
|
||||
|
|
|
@ -6,7 +6,7 @@ import "../../../../shared"
|
|||
import "../../../../shared/status"
|
||||
|
||||
RowLayout {
|
||||
property string networkName: ""
|
||||
property string network: ""
|
||||
property string newNetwork: ""
|
||||
|
||||
ConfirmationDialog {
|
||||
|
@ -21,7 +21,7 @@ RowLayout {
|
|||
|
||||
width: parent.width
|
||||
StyledText {
|
||||
text: qsTrId(networkName)
|
||||
text: Utils.getNetworkName(network)
|
||||
font.pixelSize: 15
|
||||
}
|
||||
StatusRadioButton {
|
||||
|
@ -29,10 +29,10 @@ RowLayout {
|
|||
Layout.alignment: Qt.AlignRight
|
||||
ButtonGroup.group: networkSettings
|
||||
rightPadding: 0
|
||||
checked: profileModel.network === networkName
|
||||
checked: profileModel.network === network
|
||||
onClicked: {
|
||||
if (profileModel.network === networkName) return;
|
||||
newNetwork = networkName;
|
||||
if (profileModel.network === network) return;
|
||||
newNetwork = network;
|
||||
confirmDialog.open();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ ModalPopup {
|
|||
title: qsTr("Network")
|
||||
|
||||
property string newNetwork: "";
|
||||
|
||||
|
||||
Column {
|
||||
id: column
|
||||
spacing: Style.current.padding
|
||||
|
@ -18,35 +18,42 @@ ModalPopup {
|
|||
|
||||
ButtonGroup { id: networkSettings }
|
||||
|
||||
NetworkRadioSelector {
|
||||
networkName: Constants.networkMainnet
|
||||
StatusSectionHeadline {
|
||||
text: qsTr("Main networks")
|
||||
}
|
||||
|
||||
NetworkRadioSelector {
|
||||
networkName: Constants.networkPOA
|
||||
network: Constants.networkMainnet
|
||||
}
|
||||
|
||||
NetworkRadioSelector {
|
||||
networkName: Constants.networkXDai
|
||||
network: Constants.networkPOA
|
||||
}
|
||||
|
||||
NetworkRadioSelector {
|
||||
networkName: Constants.networkGoerli
|
||||
network: Constants.networkXDai
|
||||
}
|
||||
|
||||
StatusSectionHeadline {
|
||||
text: qsTr("Test networks")
|
||||
}
|
||||
|
||||
NetworkRadioSelector {
|
||||
networkName: Constants.networkRinkeby
|
||||
network: Constants.networkGoerli
|
||||
}
|
||||
|
||||
NetworkRadioSelector {
|
||||
networkName: Constants.networkRopsten
|
||||
network: Constants.networkRinkeby
|
||||
}
|
||||
|
||||
NetworkRadioSelector {
|
||||
network: Constants.networkRopsten
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
StyledText {
|
||||
anchors.top: column.bottom
|
||||
anchors.topMargin: Style.current.padding * 2
|
||||
anchors.topMargin: Style.current.padding
|
||||
//% "Under development\nNOTE: You will be logged out and all installed\nsticker packs will be removed and will\nneed to be reinstalled. Purchased sticker\npacks will not need to be re-purchased."
|
||||
text: qsTrId("under-development-nnote--you-will-be-logged-out-and-all-installed-nsticker-packs-will-be-removed-and-will-nneed-to-be-reinstalled--purchased-sticker-npacks-will-not-need-to-be-re-purchased-")
|
||||
}
|
||||
|
|
|
@ -181,4 +181,16 @@ QtObject {
|
|||
function uuid() {
|
||||
return Date.now().toString(36) + Math.random().toString(36).substr(2, 5)
|
||||
}
|
||||
|
||||
function getNetworkName(network){
|
||||
switch(network){
|
||||
case Constants.networkMainnet: return qsTr("Mainnet with upstream RPC")
|
||||
case Constants.networkPOA: return qsTr("POA Network")
|
||||
case Constants.networkXDai: return qsTr("xDai Chain")
|
||||
case Constants.networkGoerli: return qsTr("Goerli with upstream RPC")
|
||||
case Constants.networkRinkeby: return qsTr("Rinkeby with upstream RPC")
|
||||
case Constants.networkRopsten: return qsTr("Ropsten with upstream RPC")
|
||||
default: return network
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue