Quickshell qstr seems not to be working, trying to implement custom translation

Add Chinese (zh_CN) translations for Quickshell interface and settings
This commit is contained in:
月月
2025-06-17 12:29:21 +08:00
parent 54dfad1d5b
commit b32734b9f5
50 changed files with 1324 additions and 187 deletions
@@ -123,7 +123,7 @@ Item {
TextCanvas { // Content translation
id: outputCanvas
isInput: false
placeholderText: qsTr("Translation goes here...")
placeholderText: Translation.tr("Translation goes here...")
property bool hasTranslation: (root.translatedText.trim().length > 0)
text: hasTranslation ? root.translatedText : ""
GroupButton {
@@ -178,7 +178,7 @@ Item {
TextCanvas { // Content input
id: inputCanvas
isInput: true
placeholderText: qsTr("Enter text to translate...")
placeholderText: Translation.tr("Enter text to translate...")
onInputTextChanged: {
translateTimer.restart();
}
@@ -223,7 +223,7 @@ Item {
z: 9999
sourceComponent: SelectionDialog {
id: languageSelectorDialog
titleText: qsTr("Select Language")
titleText: Translation.tr("Select Language")
items: root.languages
defaultChoice: root.languageSelectorTarget ? root.targetLanguage : root.sourceLanguage
onCanceled: () => {