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
@@ -192,7 +192,7 @@ Scope { // Scope
GlobalShortcut {
name: "sidebarLeftToggle"
description: "Toggles left sidebar on press"
description: qsTr("Toggles left sidebar on press")
onPressed: {
sidebarLoader.active = !sidebarLoader.active;
@@ -202,7 +202,7 @@ Scope { // Scope
GlobalShortcut {
name: "sidebarLeftOpen"
description: "Opens left sidebar on press"
description: qsTr("Opens left sidebar on press")
onPressed: {
sidebarLoader.active = true;
@@ -212,7 +212,7 @@ Scope { // Scope
GlobalShortcut {
name: "sidebarLeftClose"
description: "Closes left sidebar on press"
description: qsTr("Closes left sidebar on press")
onPressed: {
sidebarLoader.active = false;
@@ -151,7 +151,7 @@ Rectangle {
color: Appearance.m3colors.m3onSecondaryContainer
text: messageData.role == 'assistant' ? Ai.models[messageData.model].name :
(messageData.role == 'user' && SystemInfo.username) ? SystemInfo.username :
(messageData.role == 'interface') ? qsTr("Interface") : qsTr("Unknown")
qsTr("Interface")
}
}
}
@@ -99,7 +99,7 @@ Item {
id: thinkBlockLanguage
Layout.fillWidth: false
Layout.alignment: Qt.AlignLeft
text: root.completed ? "Chain of Thought" : ("Thinking" + ".".repeat(Math.random() * 4))
text: root.completed ? qsTr("Chain of Thought") : (qsTr("Thinking") + ".".repeat(Math.random() * 4))
}
Item { Layout.fillWidth: true }
Button { // Expand button
@@ -94,7 +94,7 @@ Button {
PointingHandInteraction {}
StyledToolTip {
content: `${StringUtils.wordWrap(root.imageData.tags, root.maxTagStringLineLength)}\nClick for options`
content: `${StringUtils.wordWrap(root.imageData.tags, root.maxTagStringLineLength)}\n${qsTr("Click for options")}`
}
background: Rectangle {
@@ -177,7 +177,7 @@ Button {
MenuButton {
id: downloadButton
Layout.fillWidth: true
buttonText: "Download"
buttonText: qsTr("Download")
onClicked: {
root.showActions = false
Hyprland.dispatch(`exec curl '${root.imageData.file_url}' -o '${root.imageData.is_nsfw ? root.nsfwPath : root.downloadPath}/${root.fileName}' && notify-send '${qsTr("Download complete")}' '${root.downloadPath}/${root.fileName}'`)
@@ -2,6 +2,7 @@ import "root:/"
import "root:/services"
import "root:/modules/common"
import "root:/modules/common/widgets"
import "root:/modules/common/functions/string_utils.js" as StringUtils
import "../"
import QtQuick
import QtQuick.Controls
@@ -93,7 +94,8 @@ Rectangle {
anchors.centerIn: parent
font.pixelSize: Appearance.font.pixelSize.smaller
color: Appearance.colors.colOnLayer2
text: `Page ${root.responseData.page}`
// text: `Page ${root.responseData.page}`
text: StringUtils.format(qsTr("Page {0}"), root.responseData.page)
}
}
}