Translate the remaining shell text at display and keep translated values out of logic

This commit is contained in:
ZacharyZhang-NY committed 2026-10-06 21:50:11 -04:00
1 parent e236713d9f
commit 2b2302a279
17 files changed
+112 -25

No files matched your search

+1
View File
@@ -768,6 +768,7 @@ Panel {
spacing: Style.space(2)
Text {
textFormat: Text.PlainText
text: I18n.tr("Audio")
color: root.bar.foreground
font.family: root.bar.fontFamily
+1
View File
@@ -738,6 +738,7 @@ Panel {
spacing: Style.space(2)
Text {
textFormat: Text.PlainText
text: I18n.tr("Bluetooth")
color: root.bar.foreground
font.family: root.bar.fontFamily
+3
View File
@@ -369,6 +369,7 @@ Panel {
Text {
anchors.verticalCenter: parent.verticalCenter
textFormat: Text.PlainText
text: I18n.tr("BORN")
color: Qt.darker(root.contentForeground, 1.5)
font.family: root.contentFontFamily
@@ -392,6 +393,7 @@ Panel {
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 0
leftPadding: Style.space(6)
textFormat: Text.PlainText
text: I18n.tr("LIVE TO")
color: Qt.darker(root.contentForeground, 1.5)
font.family: root.contentFontFamily
@@ -479,6 +481,7 @@ Panel {
id: lifeLabel
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
textFormat: Text.PlainText
text: I18n.tr("LIFE")
color: Qt.darker(root.contentForeground, 1.5)
font.family: root.contentFontFamily
+1
View File
@@ -327,6 +327,7 @@ Panel {
Text {
visible: dropbox.files.length === 0
width: parent.width
textFormat: Text.PlainText
text: I18n.tr("No synced files found.")
color: root.dim
font.family: root.fontFamily
+2 -2
View File
@@ -16,9 +16,9 @@ Column {
// Zone id -> offset text; read inside a binding, so its dependencies track.
property var offsetLabel: function(zoneId) { return "" }
property bool loading: false
property string buttonText: "+ Add a city"
property string buttonText: "+ " + I18n.tr("Add a city")
property string placeholderText: I18n.tr("Search cities…")
property string loadingText: "Loading zones\u2026"
property string loadingText: I18n.tr("Loading zones…")
property real fontSize: Style.font.bodySmall
property color foreground: Color.foreground
property color dim: Qt.darker(foreground, 1.55)
+2 -1
View File
@@ -555,6 +555,7 @@ Panel {
spacing: Style.space(2)
Text {
textFormat: Text.PlainText
text: I18n.tr("Display")
color: root.bar.foreground
font.family: root.bar.fontFamily
@@ -899,7 +900,7 @@ Panel {
Text {
textFormat: Text.PlainText
text: monitorRow.display.name + (monitorRow.display.focused ? " · focused" : "")
text: monitorRow.display.name + (monitorRow.display.focused ? " · " + I18n.tr("focused") : "")
color: root.bar.foreground
font.family: root.bar.fontFamily
font.pixelSize: Style.font.body
+2 -1
View File
@@ -346,6 +346,7 @@ Panel {
spacing: Style.space(2)
Text {
textFormat: Text.PlainText
text: I18n.tr("Battery")
color: root.bar.foreground
font.family: root.bar.fontFamily
@@ -483,7 +484,7 @@ Panel {
width: profileRow.cellWidth
iconText: root.profileIcon(String(modelData))
iconSize: Style.font.title
text: String(modelData).charAt(0).toUpperCase() + String(modelData).slice(1)
text: I18n.tr(String(modelData).charAt(0).toUpperCase() + String(modelData).slice(1))
fontSize: Style.font.bodySmall
foreground: root.bar.foreground
fontFamily: root.bar.fontFamily
+5
View File
@@ -520,6 +520,7 @@ Panel {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.margins: Style.space(12)
textFormat: Text.PlainText
text: I18n.tr("Tailscale CLI is not installed or not on PATH.")
color: root.dim
font.family: root.fontFamily
@@ -638,6 +639,7 @@ Panel {
Text {
visible: root.filteredMullvadRegions.length === 0
width: parent.width
textFormat: Text.PlainText
text: I18n.tr("No Mullvad regions found.")
color: root.dim
font.family: root.fontFamily
@@ -684,6 +686,7 @@ Panel {
Text {
visible: tailscale.installed && tailscale.active && tailscale.peers.length === 0
width: parent.width
textFormat: Text.PlainText
text: I18n.tr("No machines found on this tailnet.")
color: root.dim
font.family: root.fontFamily
@@ -777,6 +780,7 @@ Panel {
Text {
Layout.fillWidth: true
textFormat: Text.PlainText
text: I18n.tr("Authorize Tailscale operator")
color: root.foreground
font.family: root.fontFamily
@@ -786,6 +790,7 @@ Panel {
Text {
Layout.fillWidth: true
textFormat: Text.PlainText
text: I18n.tr("Allow this user to operate this Tailscale profile")
color: root.dim
font.family: root.fontFamily
+5 -1
View File
@@ -308,7 +308,7 @@ Panel {
}
function dayName(dateString) {
return Model.dayName(dateString, function(date) { return Qt.formatDate(date, "dddd") })
return Model.dayName(dateString, function(date) { return I18n.chinese ? Qt.locale().toString(date, "dddd") : Qt.formatDate(date, "dddd") })
}
// Bare degree value (no unit letter), used in the forecast row.
@@ -683,6 +683,7 @@ Panel {
Column {
spacing: Style.space(5)
Text {
textFormat: Text.PlainText
text: I18n.tr("FEELS")
color: Qt.darker(root.bar.foreground, 1.5)
font.family: root.bar.fontFamily
@@ -701,6 +702,7 @@ Panel {
Column {
spacing: Style.space(5)
Text {
textFormat: Text.PlainText
text: I18n.tr("WIND")
color: Qt.darker(root.bar.foreground, 1.5)
font.family: root.bar.fontFamily
@@ -719,6 +721,7 @@ Panel {
Column {
spacing: Style.space(5)
Text {
textFormat: Text.PlainText
text: I18n.tr("HUMID")
color: Qt.darker(root.bar.foreground, 1.5)
font.family: root.bar.fontFamily
@@ -792,6 +795,7 @@ Panel {
Text {
visible: !root.current
textFormat: Text.PlainText
text: I18n.tr("Fetching forecast…")
color: Qt.darker(root.bar.foreground, 1.5)
font.family: root.bar.fontFamily
+2
View File
@@ -305,6 +305,7 @@ Item {
Text {
visible: root.loading
textFormat: Text.PlainText
text: I18n.tr("Generating QR code…")
color: root.onScrimDim
font.family: root.fontFamily
@@ -328,6 +329,7 @@ Item {
Text {
visible: root.showingQr
textFormat: Text.PlainText
text: I18n.tr("Scan to join this network")
color: root.onScrimDim
font.family: root.fontFamily