forked from Shinonome/dots-hyprland
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:
@@ -4,6 +4,7 @@ import "root:/modules/common"
|
||||
import "root:/modules/common/widgets"
|
||||
import "root:/modules/common/functions/string_utils.js" as StringUtils
|
||||
import "./quickToggles/"
|
||||
import "root:/services/"
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
@@ -119,7 +120,7 @@ Scope {
|
||||
StyledText {
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.colors.colOnLayer0
|
||||
text: StringUtils.format(qsTr("Uptime: {0}"), DateTime.uptime)
|
||||
text: StringUtils.format(Translation.tr("Uptime: {0}"), DateTime.uptime)
|
||||
textFormat: Text.MarkdownText
|
||||
}
|
||||
|
||||
@@ -136,7 +137,7 @@ Scope {
|
||||
Quickshell.reload(true)
|
||||
}
|
||||
StyledToolTip {
|
||||
content: qsTr("Reload Hyprland & Quickshell")
|
||||
content: Translation.tr("Reload Hyprland & Quickshell")
|
||||
}
|
||||
}
|
||||
QuickToggleButton {
|
||||
@@ -147,7 +148,7 @@ Scope {
|
||||
Hyprland.dispatch(`global quickshell:sidebarRightClose`)
|
||||
}
|
||||
StyledToolTip {
|
||||
content: qsTr("Plasma Settings")
|
||||
content: Translation.tr("Plasma Settings")
|
||||
}
|
||||
}
|
||||
QuickToggleButton {
|
||||
@@ -157,7 +158,7 @@ Scope {
|
||||
Hyprland.dispatch("global quickshell:sessionOpen")
|
||||
}
|
||||
StyledToolTip {
|
||||
content: qsTr("Session")
|
||||
content: Translation.tr("Session")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -218,7 +219,7 @@ Scope {
|
||||
|
||||
GlobalShortcut {
|
||||
name: "sidebarRightToggle"
|
||||
description: qsTr("Toggles right sidebar on press")
|
||||
description: Translation.tr("Toggles right sidebar on press")
|
||||
|
||||
onPressed: {
|
||||
GlobalStates.sidebarRightOpen = !GlobalStates.sidebarRightOpen;
|
||||
@@ -227,7 +228,7 @@ Scope {
|
||||
}
|
||||
GlobalShortcut {
|
||||
name: "sidebarRightOpen"
|
||||
description: qsTr("Opens right sidebar on press")
|
||||
description: Translation.tr("Opens right sidebar on press")
|
||||
|
||||
onPressed: {
|
||||
GlobalStates.sidebarRightOpen = true;
|
||||
@@ -236,7 +237,7 @@ Scope {
|
||||
}
|
||||
GlobalShortcut {
|
||||
name: "sidebarRightClose"
|
||||
description: qsTr("Closes right sidebar on press")
|
||||
description: Translation.tr("Closes right sidebar on press")
|
||||
|
||||
onPressed: {
|
||||
GlobalStates.sidebarRightOpen = false;
|
||||
|
||||
Reference in New Issue
Block a user