From 76c9411329d2ece0c33e729d1a5220ace89e8f1f Mon Sep 17 00:00:00 2001 From: Patryk Osmaczko Date: Mon, 9 May 2022 19:39:02 +0200 Subject: [PATCH] chore(translations): add missing qsTrs issue: status-im/status-desktop#4544 --- ui/StatusQ/src/StatusQ/Components/StatusBadge.qml | 2 +- .../StatusQ/Components/StatusChatListAndCategories.qml | 4 ++-- .../StatusQ/Components/StatusChatListCategoryItem.qml | 8 ++++---- .../src/StatusQ/Components/StatusChatListItem.qml | 2 +- .../src/StatusQ/Components/StatusChatToolBar.qml | 8 ++++---- .../src/StatusQ/Components/StatusToastMessage.qml | 6 +++--- .../src/StatusQ/Components/StatusWizardStepper.qml | 6 +++--- ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml | 4 ++-- ui/StatusQ/src/StatusQ/Controls/StatusInput.qml | 4 ++-- .../Controls/StatusPasswordStrengthIndicator.qml | 10 +++++----- .../src/StatusQ/Controls/StatusWalletColorSelect.qml | 2 +- .../Validators/StatusAddressOrEnsValidator.qml | 2 +- .../Controls/Validators/StatusAddressValidator.qml | 2 +- .../Controls/Validators/StatusAsyncEnsValidator.qml | 2 +- .../Controls/Validators/StatusAsyncValidator.qml | 2 +- .../Controls/Validators/StatusFloatValidator.qml | 2 +- .../StatusQ/Controls/Validators/StatusIntValidator.qml | 2 +- .../StatusQ/Controls/Validators/StatusUrlValidator.qml | 2 +- .../StatusQ/Controls/Validators/StatusValidator.qml | 2 +- ui/StatusQ/src/StatusQ/Core/StatusBaseText.qml | 2 +- .../src/StatusQ/Platform/StatusMacNotification.qml | 6 +++--- ui/StatusQ/src/StatusQ/Popups/StatusModal.qml | 10 +++++----- .../src/StatusQ/Popups/StatusSearchLocationMenu.qml | 2 +- ui/StatusQ/src/StatusQ/Popups/StatusSearchPopup.qml | 6 +++--- 24 files changed, 49 insertions(+), 49 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Components/StatusBadge.qml b/ui/StatusQ/src/StatusQ/Components/StatusBadge.qml index 361c2c7666..bee30d406d 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusBadge.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusBadge.qml @@ -32,7 +32,7 @@ Rectangle { anchors.centerIn: parent text: { if (statusBadge.value > 99) { - return "99+"; + return qsTr("99+"); } return statusBadge.value; } diff --git a/ui/StatusQ/src/StatusQ/Components/StatusChatListAndCategories.qml b/ui/StatusQ/src/StatusQ/Components/StatusChatListAndCategories.qml index eb07046470..c54c0ed5df 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusChatListAndCategories.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusChatListAndCategories.qml @@ -14,10 +14,10 @@ Item { implicitWidth: chatListsAndCategories.width property StatusTooltipSettings categoryAddButtonToolTip: StatusTooltipSettings { - text: "Add channel inside category" + text: qsTr("Add channel inside category") } property StatusTooltipSettings categoryMenuButtonToolTip: StatusTooltipSettings { - text: "More" + text: qsTr("More") } property var model: [] diff --git a/ui/StatusQ/src/StatusQ/Components/StatusChatListCategoryItem.qml b/ui/StatusQ/src/StatusQ/Components/StatusChatListCategoryItem.qml index 1bb9be76bf..55a75d11f4 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusChatListCategoryItem.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusChatListCategoryItem.qml @@ -39,21 +39,21 @@ StatusListItem { id: addButton icon.name: "add" icon.width: 20 - visible: statusChatListCategoryItem.showAddButton && + visible: statusChatListCategoryItem.showAddButton && (statusChatListCategoryItem.highlighted || statusChatListCategoryItem.sensor.containsMouse) onClicked: statusChatListCategoryItem.addButtonClicked(mouse) - tooltip.text: "Add channel inside category" + tooltip.text: qsTr("Add channel inside category") }, StatusChatListCategoryItemButton { id: menuButton icon.name: "more" icon.width: 21 - visible: statusChatListCategoryItem.showMenuButton && + visible: statusChatListCategoryItem.showMenuButton && (statusChatListCategoryItem.highlighted || statusChatListCategoryItem.sensor.containsMouse) onClicked: statusChatListCategoryItem.menuButtonClicked(mouse) - tooltip.text: "More" + tooltip.text: qsTr("More") }, StatusChatListCategoryItemButton { id: toggleButton diff --git a/ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml b/ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml index 64c960a59a..ccf17d5e10 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml @@ -180,7 +180,7 @@ Rectangle { } StatusToolTip { - text: "Unmute" + text: qsTr("Unmute") visible: mutedIconSensor.containsMouse } } diff --git a/ui/StatusQ/src/StatusQ/Components/StatusChatToolBar.qml b/ui/StatusQ/src/StatusQ/Components/StatusChatToolBar.qml index ead08e1d2c..10f479f718 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusChatToolBar.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusChatToolBar.qml @@ -58,7 +58,7 @@ Rectangle { onClicked: statusChatToolBar.searchButtonClicked() // initializing the tooltip - tooltip.text: "Search" + tooltip.text: qsTr("Search") tooltip.orientation: StatusToolTip.Orientation.Bottom tooltip.y: parent.height + 12 } @@ -72,7 +72,7 @@ Rectangle { onClicked: statusChatToolBar.membersButtonClicked() // initializing the tooltip - tooltip.text: "Members" + tooltip.text: qsTr("Members") tooltip.orientation: StatusToolTip.Orientation.Bottom tooltip.y: parent.height + 12 } @@ -87,7 +87,7 @@ Rectangle { // initializing the tooltip tooltip.visible: !!tooltip.text && menuButton.hovered && !popupMenuSlot.item.opened - tooltip.text: "More" + tooltip.text: qsTr("More") tooltip.orientation: StatusToolTip.Orientation.Bottom tooltip.y: parent.height + 12 @@ -141,7 +141,7 @@ Rectangle { type: StatusFlatRoundButton.Type.Secondary // initializing the tooltip - tooltip.text: "Activity" + tooltip.text: qsTr("Activity") tooltip.orientation: StatusToolTip.Orientation.Bottom tooltip.y: parent.height + 12 diff --git a/ui/StatusQ/src/StatusQ/Components/StatusToastMessage.qml b/ui/StatusQ/src/StatusQ/Components/StatusToastMessage.qml index 0252338ed3..e0b484819a 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusToastMessage.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusToastMessage.qml @@ -20,8 +20,8 @@ import StatusQ.Core.Theme 0.1 \qml StatusToastMessage { - primaryText: "Collectible is being minted..." - secondaryText: "View on Etherscan" + primaryText: qsTr("Collectible is being minted...") + secondaryText: qsTr("View on Etherscan") loading: true type: 0 linkUrl: "http://google.com" @@ -109,7 +109,7 @@ Control { MouseArea { anchors.fill: parent onClicked: { - toastMessage.open("Verification Request Sent", "", "checkmark-circle", 1, false,""); + toastMessage.open(qsTr("Verification Request Sent"), "", "checkmark-circle", 1, false,""); } } \endqml diff --git a/ui/StatusQ/src/StatusQ/Components/StatusWizardStepper.qml b/ui/StatusQ/src/StatusQ/Components/StatusWizardStepper.qml index 5ce2bcd99b..6b9c099c42 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusWizardStepper.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusWizardStepper.qml @@ -20,9 +20,9 @@ import StatusQ.Core.Theme 0.1 StatusWizardStepper { id: wizardStepper stepsModel: ListModel { - ListElement {description:"Send Request"; loadingTime: 0; stepCompleted: false} - ListElement {description:"Receive Response"; loadingTime: 0; stepCompleted: false} - ListElement {description:"Confirm Identity"; loadingTime: 0; stepCompleted: false} + ListElement {description: qsTr("Send Request"); loadingTime: 0; stepCompleted: false} + ListElement {description: qsTr("Receive Response"); loadingTime: 0; stepCompleted: false} + ListElement {description: qsTr("Confirm Identity"); loadingTime: 0; stepCompleted: false} } } \endqml diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml b/ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml index 6c9a746edf..77976d54d6 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml @@ -26,7 +26,7 @@ import StatusQ.Core.Theme 0.1 topPadding: 8 bottomPadding: 8 clearable: true - placeholderText: "Search" + placeholderText: qsTr("Search") icon.name: "search" } \endqml @@ -47,7 +47,7 @@ Item { /*! \qmlproperty bool StatusBaseInput::acceptReturn - This property indicates whether the StatusBaseInput allows pressing Enter or Return. + This property indicates whether the StatusBaseInput allows pressing Enter or Return. This is used in case multiline is false and we still want to interact using Enter or Return. Default value is false. */ property bool acceptReturn: false diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusInput.qml b/ui/StatusQ/src/StatusQ/Controls/StatusInput.qml index 0e233e3bdd..004132fb76 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusInput.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusInput.qml @@ -19,9 +19,9 @@ import StatusQ.Controls.Validators 0.1 StatusInput { label: "Label" charLimit: 30 - errorMessage: "Input doesn't match validator" + errorMessage: qsTr("Input doesn't match validator") input.clearable: true - input.placeholderText: "Placeholder text" + input.placeholderText: qsTr("Placeholder text") } \endqml diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusPasswordStrengthIndicator.qml b/ui/StatusQ/src/StatusQ/Controls/StatusPasswordStrengthIndicator.qml index a7b93f749c..f20ff80521 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusPasswordStrengthIndicator.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusPasswordStrengthIndicator.qml @@ -60,35 +60,35 @@ StatusProgressBar { Default value: "Very weak" */ - property string labelVeryWeak: "Very weak" + property string labelVeryWeak: qsTr("Very weak") /*! \qmlproperty string StatusPasswordStrengthIndicator::labelWeak This property holds the text shown when the strength is StatusPasswordStrengthIndicator.Strength.Weak. Default value: "Weak" */ - property string labelWeak: "Weak" + property string labelWeak: qsTr("Weak") /*! \qmlproperty string StatusPasswordStrengthIndicator::labelSoso This property holds the text shown when the strength is StatusPasswordStrengthIndicator.Strength.SoSo. Default value: "So-so" */ - property string labelSoso: "So-so" + property string labelSoso: qsTr("So-so") /*! \qmlproperty string StatusPasswordStrengthIndicator::labelGood This property holds the text shown when the strength is StatusPasswordStrengthIndicator.Strength.Good. Default value: "Good" */ - property string labelGood: "Good" + property string labelGood: qsTr("Good") /*! \qmlproperty string StatusPasswordStrengthIndicator::labelGreat This property holds the text shown when the strength is StatusPasswordStrengthIndicator.Strength.Great. Default value: "Great" */ - property string labelGreat: "Great" + property string labelGreat: qsTr("Great") enum Strength { None, // 0 diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusWalletColorSelect.qml b/ui/StatusQ/src/StatusQ/Controls/StatusWalletColorSelect.qml index cb14737f8a..9003e2a014 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusWalletColorSelect.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusWalletColorSelect.qml @@ -10,7 +10,7 @@ import StatusQ.Controls 0.1 Item { id: control property string selectedColor - property string label: "Account color" + property string label: qsTr("Account color") property var model property bool enabled: true diff --git a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAddressOrEnsValidator.qml b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAddressOrEnsValidator.qml index 45f7b424bb..42182ebb7d 100644 --- a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAddressOrEnsValidator.qml +++ b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAddressOrEnsValidator.qml @@ -4,7 +4,7 @@ import StatusQ.Core.Utils 0.1 StatusValidator { name: "addressOrEns" - errorMessage: "Please enter a valid address or ENS name." + errorMessage: qsTr("Please enter a valid address or ENS name.") validate: function (t) { return Utils.isValidAddress(t) || Utils.isValidEns(t) ? diff --git a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAddressValidator.qml b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAddressValidator.qml index 33324d4750..5da7486e73 100644 --- a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAddressValidator.qml +++ b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAddressValidator.qml @@ -4,7 +4,7 @@ import StatusQ.Core.Utils 0.1 StatusValidator { name: "address" - errorMessage: "Please enter a valid address." + errorMessage: qsTr("Please enter a valid address.") validate: function (t) { return Utils.isValidAddress(t) ? true : { actual: t } diff --git a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAsyncEnsValidator.qml b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAsyncEnsValidator.qml index 3fc6a5abfe..9e5e197953 100644 --- a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAsyncEnsValidator.qml +++ b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAsyncEnsValidator.qml @@ -6,7 +6,7 @@ StatusAsyncValidator { name: "asyncEns" - errorMessage: "ENS name could not be resolved in to an address" + errorMessage: qsTr("ENS name could not be resolved in to an address") validate: function (asyncResult) { return Utils.isValidAddress(asyncResult) diff --git a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAsyncValidator.qml b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAsyncValidator.qml index fa3d831bad..7b0c2d0860 100644 --- a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAsyncValidator.qml +++ b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusAsyncValidator.qml @@ -5,7 +5,7 @@ Item { id: statusAsyncValidator property string name: "" - property string errorMessage: "invalid input" + property string errorMessage: qsTr("invalid input") signal asyncComplete(var result) signal validationComplete(var value, bool valid) diff --git a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusFloatValidator.qml b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusFloatValidator.qml index d361abd5bb..838abee6ac 100644 --- a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusFloatValidator.qml +++ b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusFloatValidator.qml @@ -45,7 +45,7 @@ StatusValidator { property real top name: "floatValidator" - errorMessage: "Please enter a valid numeric value." + errorMessage: qsTr("Please enter a valid numeric value.") validate: function (t) { return !isNaN(t) && t >= bottom && t <= top ? true : { diff --git a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusIntValidator.qml b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusIntValidator.qml index 5ccc9f24e3..4186ffa95e 100644 --- a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusIntValidator.qml +++ b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusIntValidator.qml @@ -47,7 +47,7 @@ StatusValidator { property int top name: "intValidator" - errorMessage: "Please enter a valid numeric value." + errorMessage: qsTr("Please enter a valid numeric value.") validatorObj: IntValidator { bottom: root.bottom; locale: root.locale; top: root.top } validate: function (t) { diff --git a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusUrlValidator.qml b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusUrlValidator.qml index dd80825869..896c1c2aba 100644 --- a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusUrlValidator.qml +++ b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusUrlValidator.qml @@ -5,7 +5,7 @@ StatusValidator { name: "url" - errorMessage: "Please enter a valid URL" + errorMessage: qsTr("Please enter a valid URL") validate: function (value) { return Utils.isURL(value); diff --git a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusValidator.qml b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusValidator.qml index ba62778da2..549a882951 100644 --- a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusValidator.qml +++ b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusValidator.qml @@ -5,7 +5,7 @@ QtObject { id: statusValidator property string name: "" - property string errorMessage: "invalid input" + property string errorMessage: qsTr("invalid input") property var validatorObj property var validate: function (value) { diff --git a/ui/StatusQ/src/StatusQ/Core/StatusBaseText.qml b/ui/StatusQ/src/StatusQ/Core/StatusBaseText.qml index 6406162ffb..0b6fafb923 100644 --- a/ui/StatusQ/src/StatusQ/Core/StatusBaseText.qml +++ b/ui/StatusQ/src/StatusQ/Core/StatusBaseText.qml @@ -14,7 +14,7 @@ import StatusQ.Core.Theme 0.1 \qml StatusBaseText { width: 240 - text: "Hello World!" + text: qsTr("Hello World!") font.pixelSize: 24 color: Theme.pallete.directColor1 } diff --git a/ui/StatusQ/src/StatusQ/Platform/StatusMacNotification.qml b/ui/StatusQ/src/StatusQ/Platform/StatusMacNotification.qml index 466f621b5e..3b296437f8 100644 --- a/ui/StatusQ/src/StatusQ/Platform/StatusMacNotification.qml +++ b/ui/StatusQ/src/StatusQ/Platform/StatusMacNotification.qml @@ -10,7 +10,7 @@ Rectangle { id: root property string chatId: "" property string name: "channelName" - property string message: "My latest message\n with a return" + property string message: qsTr("My latest message\n with a return") property string identicon: "" // TODO: what about dark theme? @@ -22,7 +22,7 @@ Rectangle { Loader { id: identicon - sourceComponent: root.identicon === "" ? statusIdenticon : userOrChannelIdenticon + sourceComponent: root.identicon === "" ? statusIdenticon : userOrChannelIdenticon anchors.left: parent.left anchors.leftMargin: 16 anchors.verticalCenter: parent.verticalCenter @@ -120,7 +120,7 @@ Rectangle { font.pixelSize: 14 anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter - text: "Open" + text: qsTr("Open") color: "black" } } diff --git a/ui/StatusQ/src/StatusQ/Popups/StatusModal.qml b/ui/StatusQ/src/StatusQ/Popups/StatusModal.qml index 8f68e21c6f..b3cb084ef9 100644 --- a/ui/StatusQ/src/StatusQ/Popups/StatusModal.qml +++ b/ui/StatusQ/src/StatusQ/Popups/StatusModal.qml @@ -39,10 +39,10 @@ import "statusModal" as Spares ] rightButtons: [ StatusButton { - text: "Button" + text: qsTr("Button") }, StatusButton { - text: "Button" + text: qsTr("Button") } ] } @@ -87,7 +87,7 @@ QC.Popup { border.width: 1 StatusBaseText { anchors.centerIn: parent - text: "Add any header here" + text: qsTr("Add any header here") font.pixelSize: 15 color: Theme.palette.directColor1 } @@ -115,7 +115,7 @@ QC.Popup { border.width: 1 StatusBaseText { anchors.centerIn: parent - text: "Add any footer here" + text: qsTr("Add any footer here") font.pixelSize: 15 color: Theme.palette.directColor1 } @@ -137,7 +137,7 @@ QC.Popup { This property exposes the different properties of the standard header. \endqml */ - property StatusModalHeaderSettings header: StatusModalHeaderSettings {} + property StatusModalHeaderSettings header: StatusModalHeaderSettings {} /*! \qmlproperty rightButtons This property helps user assign the right buttons on the footer. diff --git a/ui/StatusQ/src/StatusQ/Popups/StatusSearchLocationMenu.qml b/ui/StatusQ/src/StatusQ/Popups/StatusSearchLocationMenu.qml index 5384348c5a..9614eae506 100644 --- a/ui/StatusQ/src/StatusQ/Popups/StatusSearchLocationMenu.qml +++ b/ui/StatusQ/src/StatusQ/Popups/StatusSearchLocationMenu.qml @@ -16,7 +16,7 @@ StatusPopupMenu { signal itemClicked(string firstLevelItemValue, string secondLevelItemValue) StatusMenuItem { - text: "Anywhere" + text: qsTr("Anywhere") onTriggered: { searchPopup.resetSearchSelection(); root.itemClicked("", ""); diff --git a/ui/StatusQ/src/StatusQ/Popups/StatusSearchPopup.qml b/ui/StatusQ/src/StatusQ/Popups/StatusSearchPopup.qml index 3fe2f50414..f8ddb450fc 100644 --- a/ui/StatusQ/src/StatusQ/Popups/StatusSearchPopup.qml +++ b/ui/StatusQ/src/StatusQ/Popups/StatusSearchPopup.qml @@ -18,8 +18,8 @@ StatusModal { showFooter: false property string searchText: contentItem.searchText - property string noResultsLabel: "No results" - property string defaultSearchLocationText: "Anywhere" + property string noResultsLabel: qsTr("No results") + property string defaultSearchLocationText: qsTr("Anywhere") property bool loading: false property Menu searchOptionsPopupMenu: Menu { } property var searchResults: [ ] @@ -121,7 +121,7 @@ StatusModal { root.searchSelectionButton = searchOptionsMenuButton } - property string prefixText: "In" + property string prefixText: qsTr("In") property string primaryText: "" property string secondaryText: "" property StatusIconSettings iconSettings: StatusIconSettings {