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
@@ -2,6 +2,7 @@ import "root:/"
import "root:/services"
import "root:/modules/common"
import "root:/modules/common/widgets"
import "root:/services/"
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
@@ -168,7 +169,7 @@ Scope { // Scope
GlobalShortcut {
name: "sidebarLeftToggle"
description: qsTr("Toggles left sidebar on press")
description: Translation.tr("Toggles left sidebar on press")
onPressed: {
GlobalStates.sidebarLeftOpen = !GlobalStates.sidebarLeftOpen;
@@ -177,7 +178,7 @@ Scope { // Scope
GlobalShortcut {
name: "sidebarLeftOpen"
description: qsTr("Opens left sidebar on press")
description: Translation.tr("Opens left sidebar on press")
onPressed: {
GlobalStates.sidebarLeftOpen = true;
@@ -186,7 +187,7 @@ Scope { // Scope
GlobalShortcut {
name: "sidebarLeftClose"
description: qsTr("Closes left sidebar on press")
description: Translation.tr("Closes left sidebar on press")
onPressed: {
GlobalStates.sidebarLeftOpen = false;
@@ -195,7 +196,7 @@ Scope { // Scope
GlobalShortcut {
name: "sidebarLeftToggleDetach"
description: qsTr("Detach left sidebar into a window/Attach it back")
description: Translation.tr("Detach left sidebar into a window/Attach it back")
onPressed: {
root.detach = !root.detach;