Show the desktop shell in Chinese under zh_CN

This commit is contained in:
ZacharyZhang-NY committed 2026-10-06 21:29:39 -04:00
1 parent e590f22de6
commit e236713d9f
55 files changed
+867 -331

No files matched your search

+26 -26
View File
@@ -64,19 +64,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]
}
@@ -101,7 +101,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, Color.accent)
@@ -183,7 +183,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() {
@@ -738,7 +738,7 @@ Panel {
spacing: Style.space(2)
Text {
text: "Bluetooth"
text: I18n.tr("Bluetooth")
color: root.bar.foreground
font.family: root.bar.fontFamily
font.pixelSize: Style.font.title
@@ -775,7 +775,7 @@ Panel {
spacing: Style.space(10)
PanelSectionHeader {
text: "CONNECTED"
text: I18n.tr("CONNECTED")
foreground: root.bar.foreground
fontFamily: root.bar.fontFamily
}
@@ -867,9 +867,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
@@ -894,9 +894,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
@@ -911,13 +911,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 ""
}
@@ -994,7 +994,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
@@ -1019,7 +1019,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