mirror of
https://github.com/status-im/status-app.git
synced 2026-08-27 15:11:20 +00:00
fix(settings): fix language toggle to keep its binding
This commit is contained in:
@@ -314,10 +314,14 @@ SettingsContentBase {
|
||||
text: qsTr("Enable translations")
|
||||
isSwitch: true
|
||||
checked: localAppSettings.translationsEnabled
|
||||
onToggled: {
|
||||
localAppSettings.translationsEnabled = !localAppSettings.translationsEnabled
|
||||
if (!checked)
|
||||
onClicked: {
|
||||
checked = Qt.binding(() => localAppSettings.translationsEnabled)
|
||||
|
||||
if (checked) {
|
||||
Global.openPopup(disableLanguagesPopupComponent)
|
||||
} else {
|
||||
localAppSettings.translationsEnabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,9 +330,13 @@ SettingsContentBase {
|
||||
ConfirmationDialog {
|
||||
destroyOnClose: true
|
||||
headerSettings.title: qsTr("Language reset")
|
||||
confirmationText: qsTr("Display language will be switched back to English. The app will restart if you confirm.")
|
||||
confirmationText: qsTr("Display language will be switched back to English.") + "\n" +
|
||||
qsTr("The app will restart if you confirm.")
|
||||
confirmButtonLabel: qsTr("Restart")
|
||||
onConfirmButtonClicked: SystemUtils.restartApplication()
|
||||
onConfirmButtonClicked: {
|
||||
localAppSettings.translationsEnabled = false
|
||||
SystemUtils.restartApplication()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,9 +421,11 @@ SettingsContentBase {
|
||||
id: confirmDialog
|
||||
destroyOnClose: true
|
||||
showCancelButton: true
|
||||
confirmationText: qsTr("Are you sure you want to %1 debug mode? The app will restart if you confirm.").arg(root.advancedStore.isDebugEnabled ?
|
||||
qsTr("disable") :
|
||||
qsTr("enable"))
|
||||
confirmationText: (root.advancedStore.isDebugEnabled ?
|
||||
qsTr("Are you sure you want to disable debug mode?") :
|
||||
qsTr("Are you sure you want to enable debug mode?"))
|
||||
+ "\n" +
|
||||
qsTr("The app will restart if you confirm.")
|
||||
onConfirmButtonClicked: {
|
||||
root.advancedStore.toggleDebug()
|
||||
SystemUtils.restartApplication()
|
||||
|
||||
@@ -1107,11 +1107,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Display language will be switched back to English. The app will restart if you confirm.</source>
|
||||
<source>Display language will be switched back to English.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to %1 debug mode? The app will restart if you confirm.</source>
|
||||
<source>The app will restart if you confirm.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
@@ -1143,11 +1143,11 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>disable</source>
|
||||
<source>Are you sure you want to disable debug mode?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>enable</source>
|
||||
<source>Are you sure you want to enable debug mode?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
|
||||
@@ -1358,14 +1358,14 @@
|
||||
<translation>Language reset</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Display language will be switched back to English. The app will restart if you confirm.</source>
|
||||
<source>Display language will be switched back to English.</source>
|
||||
<comment>AdvancedView</comment>
|
||||
<translation>Display language will be switched back to English. The app will restart if you confirm.</translation>
|
||||
<translation>Display language will be switched back to English.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to %1 debug mode? The app will restart if you confirm.</source>
|
||||
<source>The app will restart if you confirm.</source>
|
||||
<comment>AdvancedView</comment>
|
||||
<translation>Are you sure you want to %1 debug mode? The app will restart if you confirm.</translation>
|
||||
<translation>The app will restart if you confirm.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Restart</source>
|
||||
@@ -1403,14 +1403,14 @@
|
||||
<translation>RPC statistics</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>disable</source>
|
||||
<source>Are you sure you want to disable debug mode?</source>
|
||||
<comment>AdvancedView</comment>
|
||||
<translation>disable</translation>
|
||||
<translation>Are you sure you want to disable debug mode?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>enable</source>
|
||||
<source>Are you sure you want to enable debug mode?</source>
|
||||
<comment>AdvancedView</comment>
|
||||
<translation>enable</translation>
|
||||
<translation>Are you sure you want to enable debug mode?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>How many log files do you want to keep archived?</source>
|
||||
|
||||
+6
-6
@@ -1110,11 +1110,11 @@
|
||||
<translation>Reset jazyka</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Display language will be switched back to English. The app will restart if you confirm.</source>
|
||||
<source>Display language will be switched back to English.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to %1 debug mode? The app will restart if you confirm.</source>
|
||||
<source>The app will restart if you confirm.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
@@ -1146,12 +1146,12 @@
|
||||
<translation>Statistiky RPC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>disable</source>
|
||||
<translation>zakázat</translation>
|
||||
<source>Are you sure you want to disable debug mode?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>enable</source>
|
||||
<translation>povolit</translation>
|
||||
<source>Are you sure you want to enable debug mode?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>How many log files do you want to keep archived?</source>
|
||||
|
||||
+6
-6
@@ -1107,11 +1107,11 @@
|
||||
<translation>Restablecer idioma</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Display language will be switched back to English. The app will restart if you confirm.</source>
|
||||
<source>Display language will be switched back to English.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to %1 debug mode? The app will restart if you confirm.</source>
|
||||
<source>The app will restart if you confirm.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
@@ -1143,12 +1143,12 @@
|
||||
<translation>Estadísticas RPC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>disable</source>
|
||||
<translation>deshabilitar</translation>
|
||||
<source>Are you sure you want to disable debug mode?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>enable</source>
|
||||
<translation>habilitar</translation>
|
||||
<source>Are you sure you want to enable debug mode?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>How many log files do you want to keep archived?</source>
|
||||
|
||||
+6
-6
@@ -1104,11 +1104,11 @@
|
||||
<translation>언어 초기화</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Display language will be switched back to English. The app will restart if you confirm.</source>
|
||||
<source>Display language will be switched back to English.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to %1 debug mode? The app will restart if you confirm.</source>
|
||||
<source>The app will restart if you confirm.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
@@ -1140,12 +1140,12 @@
|
||||
<translation>rpc 통계</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>disable</source>
|
||||
<translation>비활성화</translation>
|
||||
<source>Are you sure you want to disable debug mode?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>enable</source>
|
||||
<translation>활성화</translation>
|
||||
<source>Are you sure you want to enable debug mode?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>How many log files do you want to keep archived?</source>
|
||||
|
||||
Reference in New Issue
Block a user