mfking chore: add qsTr() to strings for translations

This commit is contained in:
end-4
2025-05-20 00:35:09 +02:00
parent 26a5dbd91c
commit a32edd387e
26 changed files with 78 additions and 72 deletions
@@ -128,7 +128,7 @@ Scope {
GlobalShortcut {
name: "overviewToggle"
description: "Toggles overview on press"
description: qsTr("Toggles overview on press")
onPressed: {
GlobalStates.overviewOpen = !GlobalStates.overviewOpen
@@ -136,7 +136,7 @@ Scope {
}
GlobalShortcut {
name: "overviewClose"
description: "Closes overview"
description: qsTr("Closes overview")
onPressed: {
GlobalStates.overviewOpen = false
@@ -144,7 +144,7 @@ Scope {
}
GlobalShortcut {
name: "overviewToggleRelease"
description: "Toggles overview on release"
description: qsTr("Toggles overview on release")
onPressed: {
GlobalStates.superReleaseMightTrigger = true
@@ -160,9 +160,9 @@ Scope {
}
GlobalShortcut {
name: "overviewToggleReleaseInterrupt"
description: "Interrupts possibility of overview being toggled on release. " +
"This is necessary because GlobalShortcut.onReleased in quickshell triggers whether or not you press something else while holding the key. " +
"To make sure this works consistently, use binditn = MODKEYS, catchall in an automatically triggered submap that includes everything."
description: qsTr("Interrupts possibility of overview being toggled on release. ") +
qsTr("This is necessary because GlobalShortcut.onReleased in quickshell triggers whether or not you press something else while holding the key. ") +
qsTr("To make sure this works consistently, use binditn = MODKEYS, catchall in an automatically triggered submap that includes everything.")
onPressed: {
GlobalStates.superReleaseMightTrigger = false
@@ -103,7 +103,7 @@ Button {
StyledText {
font.pixelSize: Appearance.font.pixelSize.small
color: Appearance.colors.colSubtext
visible: root.itemType && root.itemType != "App"
visible: root.itemType && root.itemType != qsTr("App")
text: root.itemType
}
StyledText {
@@ -276,7 +276,7 @@ Item { // Wrapper
nonAppResultsTimer.restart();
const mathResultObject = {
name: root.mathResult,
clickActionName: "Copy",
clickActionName: qsTr("Copy"),
type: qsTr("Math result"),
fontType: "monospace",
materialSymbol: 'calculate',
@@ -286,7 +286,7 @@ Item { // Wrapper
}
const commandResultObject = {
name: searchingText,
clickActionName: "Run",
clickActionName: qsTr("Run"),
type: qsTr("Run command"),
fontType: "monospace",
materialSymbol: 'terminal',
@@ -300,8 +300,8 @@ Item { // Wrapper
if (actionString.startsWith(root.searchingText) || root.searchingText.startsWith(actionString)) {
return {
name: root.searchingText.startsWith(actionString) ? root.searchingText : actionString,
clickActionName: "Run",
type: "Action",
clickActionName: qsTr("Run"),
type: qsTr("Action"),
materialSymbol: 'settings_suggest',
execute: () => {
action.execute(root.searchingText.split(" ").slice(1).join(" "))
@@ -319,8 +319,8 @@ Item { // Wrapper
result = result.concat(
AppSearch.fuzzyQuery(root.searchingText)
.map((entry) => {
entry.clickActionName = "Launch";
entry.type = "App"
entry.clickActionName = qsTr("Launch");
entry.type = qsTr("App");
return entry;
})
);
@@ -344,8 +344,8 @@ Item { // Wrapper
// Web search
result.push({
name: root.searchingText,
clickActionName: "Search",
type: "Search the web",
clickActionName: qsTr("Search"),
type: qsTr("Search the web"),
materialSymbol: 'travel_explore',
execute: () => {
let url = ConfigOptions.search.engineBaseUrl + root.searchingText
@@ -361,8 +361,6 @@ Item { // Wrapper
}
delegate: SearchItem {
entry: modelData
// itemName: modelData.name
// itemIcon: modelData.icon
}
}