fix: 18n and category headers
This commit is contained in:
parent
159c82c329
commit
22f4815957
|
@ -106,7 +106,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: qsTrId(profileModel.network)
|
text: Utils.getNetworkName(profileModel.network)
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
anchors.right: caret3.left
|
anchors.right: caret3.left
|
||||||
anchors.rightMargin: Style.current.padding
|
anchors.rightMargin: Style.current.padding
|
||||||
|
|
|
@ -6,7 +6,7 @@ import "../../../../shared"
|
||||||
import "../../../../shared/status"
|
import "../../../../shared/status"
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
property string networkName: ""
|
property string network: ""
|
||||||
property string newNetwork: ""
|
property string newNetwork: ""
|
||||||
|
|
||||||
ConfirmationDialog {
|
ConfirmationDialog {
|
||||||
|
@ -21,7 +21,7 @@ RowLayout {
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
StyledText {
|
StyledText {
|
||||||
text: qsTrId(networkName)
|
text: Utils.getNetworkName(network)
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
}
|
}
|
||||||
StatusRadioButton {
|
StatusRadioButton {
|
||||||
|
@ -29,10 +29,10 @@ RowLayout {
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
ButtonGroup.group: networkSettings
|
ButtonGroup.group: networkSettings
|
||||||
rightPadding: 0
|
rightPadding: 0
|
||||||
checked: profileModel.network === networkName
|
checked: profileModel.network === network
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (profileModel.network === networkName) return;
|
if (profileModel.network === network) return;
|
||||||
newNetwork = networkName;
|
newNetwork = network;
|
||||||
confirmDialog.open();
|
confirmDialog.open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,35 +18,42 @@ ModalPopup {
|
||||||
|
|
||||||
ButtonGroup { id: networkSettings }
|
ButtonGroup { id: networkSettings }
|
||||||
|
|
||||||
NetworkRadioSelector {
|
StatusSectionHeadline {
|
||||||
networkName: Constants.networkMainnet
|
text: qsTr("Main networks")
|
||||||
}
|
}
|
||||||
|
|
||||||
NetworkRadioSelector {
|
NetworkRadioSelector {
|
||||||
networkName: Constants.networkPOA
|
network: Constants.networkMainnet
|
||||||
}
|
}
|
||||||
|
|
||||||
NetworkRadioSelector {
|
NetworkRadioSelector {
|
||||||
networkName: Constants.networkXDai
|
network: Constants.networkPOA
|
||||||
}
|
}
|
||||||
|
|
||||||
NetworkRadioSelector {
|
NetworkRadioSelector {
|
||||||
networkName: Constants.networkGoerli
|
network: Constants.networkXDai
|
||||||
|
}
|
||||||
|
|
||||||
|
StatusSectionHeadline {
|
||||||
|
text: qsTr("Test networks")
|
||||||
}
|
}
|
||||||
|
|
||||||
NetworkRadioSelector {
|
NetworkRadioSelector {
|
||||||
networkName: Constants.networkRinkeby
|
network: Constants.networkGoerli
|
||||||
}
|
}
|
||||||
|
|
||||||
NetworkRadioSelector {
|
NetworkRadioSelector {
|
||||||
networkName: Constants.networkRopsten
|
network: Constants.networkRinkeby
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkRadioSelector {
|
||||||
|
network: Constants.networkRopsten
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
anchors.top: column.bottom
|
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."
|
//% "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-")
|
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() {
|
function uuid() {
|
||||||
return Date.now().toString(36) + Math.random().toString(36).substr(2, 5)
|
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