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
@@ -65,19 +65,19 @@ Panel {
|
||||
|
||||
property int phraseIndex: 0
|
||||
readonly property var activePhrases: [
|
||||
"Untangling wires",
|
||||
"Streaming vikings",
|
||||
"Pairing mysteries",
|
||||
"Herding headsets",
|
||||
"Taming radios",
|
||||
"Summoning speakers",
|
||||
"Wrangling codecs",
|
||||
"Polishing packets"
|
||||
I18n.tr("Untangling wires"),
|
||||
I18n.tr("Streaming vikings"),
|
||||
I18n.tr("Pairing mysteries"),
|
||||
I18n.tr("Herding headsets"),
|
||||
I18n.tr("Taming radios"),
|
||||
I18n.tr("Summoning speakers"),
|
||||
I18n.tr("Wrangling codecs"),
|
||||
I18n.tr("Polishing packets")
|
||||
]
|
||||
readonly property bool rotatingPhrases: adapter && adapter.enabled
|
||||
readonly property string heroStatusText: {
|
||||
if (!adapter) return "No adapter"
|
||||
if (!adapter.enabled) return "Turned Off"
|
||||
if (!adapter) return I18n.tr("No adapter")
|
||||
if (!adapter.enabled) return I18n.tr("Turned Off")
|
||||
return activePhrases[phraseIndex % activePhrases.length]
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ Panel {
|
||||
// sits above the device sections so the adapter can be toggled by keyboard
|
||||
// even when it is off and no device rows exist.
|
||||
readonly property bool headerHasCursor: cursorActive && focusSection === "header"
|
||||
readonly property string toggleHint: root.adapter && root.adapter.enabled ? "Turn Bluetooth off" : "Turn Bluetooth on"
|
||||
readonly property string toggleHint: root.adapter && root.adapter.enabled ? I18n.tr("Turn Bluetooth off") : I18n.tr("Turn Bluetooth on")
|
||||
|
||||
readonly property color hoverFill: bar
|
||||
? Style.hoverFillFor(bar.foreground, Commons.Color.accent)
|
||||
@@ -184,7 +184,7 @@ Panel {
|
||||
var rows = scrollRows
|
||||
if (index < 0 || index >= rows.length) return ""
|
||||
if (index > 0 && rows[index - 1].section === rows[index].section) return ""
|
||||
return rows[index].section === "known" ? "PAIRED" : "AVAILABLE"
|
||||
return rows[index].section === "known" ? I18n.tr("PAIRED") : I18n.tr("AVAILABLE")
|
||||
}
|
||||
|
||||
function audioSinks() {
|
||||
@@ -739,7 +739,8 @@ Panel {
|
||||
spacing: Style.space(2)
|
||||
|
||||
Text {
|
||||
text: "Bluetooth"
|
||||
textFormat: Text.PlainText
|
||||
text: I18n.tr("Bluetooth")
|
||||
color: root.bar.foreground
|
||||
font.family: root.bar.fontFamily
|
||||
font.pixelSize: Style.font.title
|
||||
@@ -776,7 +777,7 @@ Panel {
|
||||
spacing: Style.space(10)
|
||||
|
||||
PanelSectionHeader {
|
||||
text: "CONNECTED"
|
||||
text: I18n.tr("CONNECTED")
|
||||
foreground: root.bar.foreground
|
||||
fontFamily: root.bar.fontFamily
|
||||
}
|
||||
@@ -868,9 +869,9 @@ Panel {
|
||||
Text {
|
||||
textFormat: Text.PlainText
|
||||
visible: root.connectedDevices.length === 0 && root.scrollRows.length === 0
|
||||
text: !root.adapter ? "No Bluetooth adapter"
|
||||
: !root.adapter.enabled ? "Turn Bluetooth on to scan"
|
||||
: "Scanning for devices…"
|
||||
text: !root.adapter ? I18n.tr("No Bluetooth adapter")
|
||||
: !root.adapter.enabled ? I18n.tr("Turn Bluetooth on to scan")
|
||||
: I18n.tr("Scanning for devices…")
|
||||
color: Qt.darker(root.bar.foreground, 1.5)
|
||||
font.family: root.bar.fontFamily
|
||||
font.pixelSize: Style.font.bodySmall
|
||||
@@ -895,9 +896,9 @@ Panel {
|
||||
readonly property string action: root.pendingAction(dev ? dev.address : "")
|
||||
readonly property string actionTooltip: {
|
||||
if (!dev) return ""
|
||||
if (isConnected) return "Disconnect"
|
||||
if (isDiscovered) return "Pair"
|
||||
return "Connect"
|
||||
if (isConnected) return I18n.tr("Disconnect")
|
||||
if (isDiscovered) return I18n.tr("Pair")
|
||||
return I18n.tr("Connect")
|
||||
}
|
||||
|
||||
readonly property bool rowSelected: root.cursorActive && root.focusSection === sectionName && root.selectedIndex === rowIndex
|
||||
@@ -912,13 +913,13 @@ Panel {
|
||||
|
||||
readonly property string statusText: {
|
||||
if (!dev) return ""
|
||||
if (action === "forgetting") return "Forgetting…"
|
||||
if (action === "disconnecting" || devState === 2) return "Disconnecting…"
|
||||
if (action === "forgetting") return I18n.tr("Forgetting…")
|
||||
if (action === "disconnecting" || devState === 2) return I18n.tr("Disconnecting…")
|
||||
if (isConnected) {
|
||||
if (dev.batteryAvailable) return Math.round(dev.battery * 100) + "%"
|
||||
return sectionName === "connected" ? "" : "Connected"
|
||||
return sectionName === "connected" ? "" : I18n.tr("Connected")
|
||||
}
|
||||
if (action === "connecting" || devState === 3 || dev.pairing === true) return "Connecting…"
|
||||
if (action === "connecting" || devState === 3 || dev.pairing === true) return I18n.tr("Connecting…")
|
||||
if (isDiscovered) return ""
|
||||
return ""
|
||||
}
|
||||
@@ -995,7 +996,7 @@ Panel {
|
||||
|
||||
Text {
|
||||
textFormat: Text.PlainText
|
||||
text: root.deviceLabel(row.dev) || "Device"
|
||||
text: root.deviceLabel(row.dev) || I18n.tr("Device")
|
||||
color: root.bar.foreground
|
||||
font.family: root.bar.fontFamily
|
||||
font.pixelSize: Style.font.body
|
||||
@@ -1020,7 +1021,7 @@ Panel {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: row.showForgetButton
|
||||
iconText: ""
|
||||
tooltipText: "Forget"
|
||||
tooltipText: I18n.tr("Forget")
|
||||
foreground: root.bar.foreground
|
||||
hoverColor: root.bar.foreground
|
||||
fontFamily: root.bar.fontFamily
|
||||
|
||||
Reference in new issue
Block a user