Merge pull request #540 from LorenDB/master

Use qsTr() for strings
This commit is contained in:
DeepBlueV7.X 2021-03-31 21:13:34 +00:00 committed by GitHub
commit 6cf3d97ebd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 15 deletions

View file

@ -56,7 +56,7 @@ ApplicationWindow {
Text {
id: errorText
text: "Error Text"
text: qsTr("Error Text")
color: "red"
visible: opacity > 0
opacity: 0
@ -100,7 +100,7 @@ ApplicationWindow {
}
MatrixText {
text: "%1 member(s)".arg(roomSettings.memberCount)
text: qsTr("%1 member(s)").arg(roomSettings.memberCount)
Layout.alignment: Qt.AlignHCenter
}
@ -143,7 +143,7 @@ ApplicationWindow {
rowSpacing: 10
MatrixText {
text: "SETTINGS"
text: qsTr("SETTINGS")
font.bold: true
}
@ -152,12 +152,12 @@ ApplicationWindow {
}
MatrixText {
text: "Notifications"
text: qsTr("Notifications")
Layout.fillWidth: true
}
ComboBox {
model: ["Muted", "Mentions only", "All messages"]
model: [qsTr("Muted"), qsTr("Mentions only"), qsTr("All messages")]
currentIndex: roomSettings.notifications
onActivated: {
roomSettings.changeNotifications(index);
@ -172,7 +172,7 @@ ApplicationWindow {
ComboBox {
enabled: roomSettings.canChangeJoinRules
model: ["Anyone and guests", "Anyone", "Invited users"]
model: [qsTr("Anyone and guests"), qsTr("Anyone"), qsTr("Invited users")]
currentIndex: roomSettings.accessJoinRules
onActivated: {
roomSettings.changeAccessRules(index);
@ -181,7 +181,7 @@ ApplicationWindow {
}
MatrixText {
text: "Encryption"
text: qsTr("Encryption")
}
ToggleButton {
@ -219,7 +219,7 @@ ApplicationWindow {
MatrixText {
visible: roomSettings.isEncryptionEnabled
text: "Respond to key requests"
text: qsTr("Respond to key requests")
}
ToggleButton {
@ -245,7 +245,7 @@ ApplicationWindow {
}
MatrixText {
text: "INFO"
text: qsTr("INFO")
font.bold: true
}
@ -254,7 +254,7 @@ ApplicationWindow {
}
MatrixText {
text: "Internal ID"
text: qsTr("Internal ID")
}
MatrixText {
@ -264,7 +264,7 @@ ApplicationWindow {
}
MatrixText {
text: "Room Version"
text: qsTr("Room Version")
}
MatrixText {
@ -277,7 +277,7 @@ ApplicationWindow {
Button {
Layout.alignment: Qt.AlignRight
text: "Ok"
text: qsTr("OK")
onClicked: close()
}

View file

@ -21,7 +21,7 @@ ApplicationWindow {
minimumHeight: 420
palette: colors
color: colors.window
title: profile.isGlobalUserProfile ? "Global User Profile" : "Room User Profile"
title: profile.isGlobalUserProfile ? qsTr("Global User Profile") : qsTr("Room User Profile")
Shortcut {
sequence: StandardKey.Cancel
@ -54,7 +54,7 @@ ApplicationWindow {
Text {
id: errorText
text: "Error Text"
text: qsTr("Error Text")
color: "red"
visible: opacity > 0
opacity: 0
@ -238,7 +238,7 @@ ApplicationWindow {
id: verifyButton
visible: (!profile.userVerificationEnabled && !profile.isSelf) || (profile.isSelf && (model.verificationStatus != VerificationStatus.VERIFIED || !profile.userVerificationEnabled))
text: (model.verificationStatus != VerificationStatus.VERIFIED) ? "Verify" : "Unverify"
text: (model.verificationStatus != VerificationStatus.VERIFIED) ? qsTr("Verify") : qsTr("Unverify")
onClicked: {
if (model.verificationStatus == VerificationStatus.VERIFIED)
profile.unverify(model.deviceId);