Add Simplified Chinese as a system language
The installer asks for the language before the keyboard, and Setup > Language (omarchy language en|zh) switches it later. Under zh_CN the menu reads its labels from omarchy-menu.zh-cn.jsonc, the shell from I18nZh.js through I18n.tr, and notifications are worded by their sender through omarchy-text, which reads the same table. User text is never translated.
This commit is contained in:
138 files changed
+1986
-558
No files matched your search
@@ -11,8 +11,8 @@ BarIndicator {
|
||||
active: dnd
|
||||
activeText: ""
|
||||
inactiveText: ""
|
||||
activeTooltipText: "Allow Notifications"
|
||||
inactiveTooltipText: "Silence Notifications"
|
||||
activeTooltipText: I18n.tr("Allow Notifications")
|
||||
inactiveTooltipText: I18n.tr("Silence Notifications")
|
||||
|
||||
onPressed: function() {
|
||||
if (root.notificationService) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Ui
|
||||
|
||||
BarIndicator {
|
||||
@@ -9,8 +10,8 @@ BarIndicator {
|
||||
active: nightlightService ? nightlightService.enabled : false
|
||||
activeText: ""
|
||||
inactiveText: ""
|
||||
activeTooltipText: "Day Light"
|
||||
inactiveTooltipText: "Night Light"
|
||||
activeTooltipText: I18n.tr("Day Light")
|
||||
inactiveTooltipText: I18n.tr("Night Light")
|
||||
|
||||
function toggle() {
|
||||
if (root.nightlightService) root.nightlightService.setNightlight(!root.active)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
@@ -13,8 +14,8 @@ BarIndicator {
|
||||
active: granted
|
||||
activeText: ""
|
||||
inactiveText: ""
|
||||
activeTooltipText: "Disable Passwordless Sudo"
|
||||
inactiveTooltipText: "Passwordless Sudo"
|
||||
activeTooltipText: I18n.tr("Disable Passwordless Sudo")
|
||||
inactiveTooltipText: I18n.tr("Passwordless Sudo")
|
||||
useActiveColor: true
|
||||
activeColor: Commons.Color.urgent
|
||||
|
||||
@@ -54,7 +55,7 @@ BarIndicator {
|
||||
command: ["omarchy-sudo-passwordless", "--disable"]
|
||||
onExited: function(exitCode, exitStatus) {
|
||||
if ((exitCode !== 0 || exitStatus !== 0) && root.bar)
|
||||
root.bar.run('omarchy-notification-send "Could not disable passwordless sudo" "Check the sudo configuration and try again."')
|
||||
Quickshell.execDetached([Quickshell.env("OMARCHY_PATH") + "/bin/omarchy-notification-send", I18n.tr("Could not disable passwordless sudo"), I18n.tr("Check the sudo configuration and try again.")])
|
||||
if (root.indicatorHost) root.indicatorHost.refresh()
|
||||
else root.refresh()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import Quickshell.Io
|
||||
import qs.Commons
|
||||
import qs.Ui
|
||||
|
||||
BarIndicator {
|
||||
@@ -10,8 +11,8 @@ BarIndicator {
|
||||
active: recording
|
||||
activeText: ""
|
||||
inactiveText: ""
|
||||
activeTooltipText: "Stop recording"
|
||||
inactiveTooltipText: "Screen Recording"
|
||||
activeTooltipText: I18n.tr("Stop recording")
|
||||
inactiveTooltipText: I18n.tr("Screen Recording")
|
||||
|
||||
function refresh() {
|
||||
if (!root.bar || statusProc.running) return
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Ui
|
||||
|
||||
BarIndicator {
|
||||
@@ -9,8 +10,8 @@ BarIndicator {
|
||||
active: idleService ? idleService.stayAwake : false
|
||||
activeText: ""
|
||||
inactiveText: ""
|
||||
activeTooltipText: "Allow Idle Lock & Screensaver"
|
||||
inactiveTooltipText: "Stay Awake"
|
||||
activeTooltipText: I18n.tr("Allow Idle Lock & Screensaver")
|
||||
inactiveTooltipText: I18n.tr("Stay Awake")
|
||||
|
||||
function toggle() {
|
||||
if (root.idleService) root.idleService.setIdleEnabled(root.active)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Services.Pipewire
|
||||
import qs.Commons
|
||||
import qs.Ui
|
||||
import qs.Commons
|
||||
|
||||
@@ -57,7 +58,7 @@ BarWidget {
|
||||
bar: root.bar
|
||||
text: root.muted ? "" : ""
|
||||
active: root.inUse
|
||||
tooltipText: root.muted ? "Microphone muted" : (root.inUse ? "Microphone in use" : "Microphone live")
|
||||
tooltipText: root.muted ? I18n.tr("Microphone muted") : (root.inUse ? I18n.tr("Microphone in use") : I18n.tr("Microphone live"))
|
||||
onPressed: function(b) {
|
||||
if (b === Qt.MiddleButton) root.bar.run("omarchy-shell shell toggle omarchy.audio")
|
||||
else root.toggleMute()
|
||||
|
||||
@@ -58,7 +58,7 @@ BarWidget {
|
||||
bar: root.bar
|
||||
text: "\uf021"
|
||||
slotSize: Style.bar.statusSlot
|
||||
tooltipText: "Pending Omarchy Updates"
|
||||
tooltipText: I18n.tr("Pending Omarchy Updates")
|
||||
onPressed: root.runUpdate()
|
||||
}
|
||||
}
|
||||
@@ -411,7 +411,8 @@ BarWidget {
|
||||
spacing: Style.space(8)
|
||||
|
||||
Text {
|
||||
text: "Tray icons"
|
||||
textFormat: Text.PlainText
|
||||
text: I18n.tr("Tray icons")
|
||||
color: root.foreground
|
||||
font.family: root.fontFamily
|
||||
font.pixelSize: Style.font.body
|
||||
@@ -419,7 +420,8 @@ BarWidget {
|
||||
}
|
||||
|
||||
Text {
|
||||
text: "Pinned icons stay visible. Hidden icons never show."
|
||||
textFormat: Text.PlainText
|
||||
text: I18n.tr("Pinned icons stay visible. Hidden icons never show.")
|
||||
color: Qt.darker(root.foreground, 1.4)
|
||||
font.family: root.fontFamily
|
||||
font.pixelSize: Style.font.caption
|
||||
@@ -429,7 +431,8 @@ BarWidget {
|
||||
|
||||
Text {
|
||||
visible: root.allItems.length === 0
|
||||
text: "No tray items reporting."
|
||||
textFormat: Text.PlainText
|
||||
text: I18n.tr("No tray items reporting.")
|
||||
color: Qt.darker(root.foreground, 1.5)
|
||||
font.family: root.fontFamily
|
||||
font.pixelSize: Style.font.bodySmall
|
||||
@@ -486,7 +489,7 @@ BarWidget {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
iconText: "\uf08d"
|
||||
text: rowRoot.isPinned ? "Unpin" : "Pin"
|
||||
text: rowRoot.isPinned ? I18n.tr("Unpin") : I18n.tr("Pin")
|
||||
foreground: root.foreground
|
||||
horizontalPadding: 8
|
||||
verticalPadding: 3
|
||||
@@ -501,7 +504,7 @@ BarWidget {
|
||||
anchors.right: rowPinBtn.left
|
||||
anchors.rightMargin: Style.space(6)
|
||||
iconText: "\uf06e"
|
||||
text: rowRoot.isHidden ? "Show" : "Hide"
|
||||
text: rowRoot.isHidden ? I18n.tr("Show") : I18n.tr("Hide")
|
||||
foreground: root.foreground
|
||||
horizontalPadding: 8
|
||||
verticalPadding: 3
|
||||
|
||||
Reference in new issue
Block a user