Merge pull request #540 from LorenDB/master

Use qsTr() for strings
pull/547/head
DeepBlueV7.X 4 years ago committed by GitHub
commit 6cf3d97ebd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      resources/qml/RoomSettings.qml
  2. 6
      resources/qml/UserProfile.qml

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

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

Loading…
Cancel
Save