1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 15:32:50 -05:00

Localization framework

This commit is contained in:
bbedward
2025-10-06 16:00:50 -04:00
parent 2ccec607a0
commit 5460c20ac3
79 changed files with 5356 additions and 396 deletions

View File

@@ -96,7 +96,7 @@ Item {
}
StyledText {
text: "Wallpaper"
text: qsTr("Wallpaper")
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
@@ -434,14 +434,14 @@ Item {
anchors.verticalCenter: parent.verticalCenter
StyledText {
text: "Per-Mode Wallpapers"
text: qsTr("Per-Mode Wallpapers")
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
}
StyledText {
text: "Set different wallpapers for light and dark mode"
text: qsTr("Set different wallpapers for light and dark mode")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
width: parent.width
@@ -491,14 +491,14 @@ Item {
anchors.verticalCenter: parent.verticalCenter
StyledText {
text: "Per-Monitor Wallpapers"
text: qsTr("Per-Monitor Wallpapers")
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
}
StyledText {
text: "Set different wallpapers for each connected monitor"
text: qsTr("Set different wallpapers for each connected monitor")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
width: parent.width
@@ -523,7 +523,7 @@ Item {
leftPadding: Theme.iconSize + Theme.spacingM
StyledText {
text: "Monitor Selection:"
text: qsTr("Monitor Selection:")
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
font.weight: Font.Medium
@@ -532,7 +532,7 @@ Item {
DankDropdown {
id: monitorDropdown
text: "Monitor"
text: qsTr("Monitor")
description: "Select monitor to configure wallpaper"
currentValue: selectedMonitorName || "No monitors"
options: {
@@ -580,14 +580,14 @@ Item {
anchors.verticalCenter: parent.verticalCenter
StyledText {
text: "Automatic Cycling"
text: qsTr("Automatic Cycling")
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
}
StyledText {
text: "Automatically cycle through wallpapers in the same folder"
text: qsTr("Automatically cycle through wallpapers in the same folder")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
width: parent.width
@@ -629,7 +629,7 @@ Item {
width: parent.width - parent.leftPadding
StyledText {
text: "Mode:"
text: qsTr("Mode:")
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
@@ -696,7 +696,7 @@ Item {
return SessionData.wallpaperCyclingMode === "interval"
}
}
text: "Interval"
text: qsTr("Interval")
description: "How often to change wallpaper"
options: intervalOptions
currentValue: {
@@ -751,7 +751,7 @@ Item {
width: parent.width - parent.leftPadding
StyledText {
text: "Daily at:"
text: qsTr("Daily at:")
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
@@ -768,7 +768,7 @@ Item {
return SessionData.wallpaperCyclingTime
}
}
placeholderText: "00:00"
placeholderText: qsTr("00:00")
maximumLength: 5
topPadding: Theme.spacingS
bottomPadding: Theme.spacingS
@@ -826,7 +826,7 @@ Item {
}
StyledText {
text: "24-hour format"
text: qsTr("24-hour format")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
anchors.verticalCenter: parent.verticalCenter
@@ -843,7 +843,7 @@ Item {
}
DankDropdown {
text: "Transition Effect"
text: qsTr("Transition Effect")
description: "Visual effect used when wallpaper changes"
currentValue: {
if (SessionData.wallpaperTransition === "random") return "Random"
@@ -862,14 +862,14 @@ Item {
visible: SessionData.wallpaperTransition === "random"
StyledText {
text: "Include Transitions"
text: qsTr("Include Transitions")
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
font.weight: Font.Medium
}
StyledText {
text: "Select which transitions to include in randomization"
text: qsTr("Select which transitions to include in randomization")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
wrapMode: Text.WordWrap
@@ -934,14 +934,14 @@ Item {
anchors.verticalCenter: parent.verticalCenter
StyledText {
text: "Dynamic Theming"
text: qsTr("Dynamic Theming")
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
}
StyledText {
text: "Automatically extract colors from wallpaper"
text: qsTr("Automatically extract colors from wallpaper")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
wrapMode: Text.WordWrap
@@ -966,7 +966,7 @@ Item {
DankDropdown {
id: personalizationMatugenPaletteDropdown
text: "Matugen Palette"
text: qsTr("Matugen Palette")
description: "Select the palette algorithm used for wallpaper-based colors"
options: Theme.availableMatugenSchemes.map(function (option) { return option.label })
currentValue: Theme.getMatugenScheme(SettingsData.matugenScheme).label
@@ -995,7 +995,7 @@ Item {
}
StyledText {
text: "matugen not detected - dynamic theming unavailable"
text: qsTr("matugen not detected - dynamic theming unavailable")
font.pixelSize: Theme.fontSizeSmall
color: Theme.error
visible: ToastService.wallpaperErrorStatus === "matugen_missing"
@@ -1033,7 +1033,7 @@ Item {
}
StyledText {
text: "Display Settings"
text: qsTr("Display Settings")
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
@@ -1043,7 +1043,7 @@ Item {
DankToggle {
width: parent.width
text: "Light Mode"
text: qsTr("Light Mode")
description: "Use light theme instead of dark theme"
checked: SessionData.isLightMode
onToggleCompleted: checked => {
@@ -1064,7 +1064,7 @@ Item {
id: nightModeToggle
width: parent.width
text: "Night Mode"
text: qsTr("Night Mode")
description: "Apply warm color temperature to reduce eye strain. Use automation settings below to control when it activates."
checked: DisplayService.nightModeEnabled
onToggled: checked => {
@@ -1081,7 +1081,7 @@ Item {
}
DankDropdown {
text: "Temperature"
text: qsTr("Temperature")
description: "Color temperature for night mode"
currentValue: SessionData.nightModeTemperature + "K"
options: {
@@ -1100,7 +1100,7 @@ Item {
DankToggle {
id: automaticToggle
width: parent.width
text: "Automatic Control"
text: qsTr("Automatic Control")
description: "Only adjust gamma based on time or location rules."
checked: SessionData.nightModeAutoEnabled
onToggled: checked => {
@@ -1183,7 +1183,7 @@ Item {
leftPadding: 45
StyledText {
text: "Hour"
text: qsTr("Hour")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
width: 50
@@ -1192,7 +1192,7 @@ Item {
}
StyledText {
text: "Minute"
text: qsTr("Minute")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
width: 50
@@ -1208,7 +1208,7 @@ Item {
StyledText {
id: startLabel
text: "Start"
text: qsTr("Start")
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
width: 50
@@ -1256,7 +1256,7 @@ Item {
height: 32
StyledText {
text: "End"
text: qsTr("End")
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
width: startLabel.width
@@ -1307,7 +1307,7 @@ Item {
DankToggle {
width: parent.width
text: "Auto-location"
text: qsTr("Auto-location")
description: DisplayService.geoclueAvailable ? "Use automatic location detection (geoclue2)" : "Geoclue service not running - cannot auto-detect location"
checked: SessionData.nightModeLocationProvider === "geoclue2"
enabled: DisplayService.geoclueAvailable
@@ -1323,7 +1323,7 @@ Item {
}
StyledText {
text: "Manual Coordinates"
text: qsTr("Manual Coordinates")
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
visible: SessionData.nightModeLocationProvider !== "geoclue2"
@@ -1337,7 +1337,7 @@ Item {
spacing: Theme.spacingXS
StyledText {
text: "Latitude"
text: qsTr("Latitude")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
@@ -1346,7 +1346,7 @@ Item {
width: 120
height: 40
text: SessionData.latitude.toString()
placeholderText: "0.0"
placeholderText: qsTr("0.0")
onTextChanged: {
const lat = parseFloat(text) || 0.0
if (lat >= -90 && lat <= 90) {
@@ -1360,7 +1360,7 @@ Item {
spacing: Theme.spacingXS
StyledText {
text: "Longitude"
text: qsTr("Longitude")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
@@ -1369,7 +1369,7 @@ Item {
width: 120
height: 40
text: SessionData.longitude.toString()
placeholderText: "0.0"
placeholderText: qsTr("0.0")
onTextChanged: {
const lon = parseFloat(text) || 0.0
if (lon >= -180 && lon <= 180) {
@@ -1420,7 +1420,7 @@ Item {
}
StyledText {
text: "Notification Popups"
text: qsTr("Notification Popups")
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
@@ -1429,7 +1429,7 @@ Item {
}
DankDropdown {
text: "Popup Position"
text: qsTr("Popup Position")
description: "Choose where notification popups appear on screen"
currentValue: {
if (SettingsData.notificationPopupPosition === -1) {
@@ -1480,7 +1480,7 @@ Item {
DankToggle {
width: parent.width
text: "Always Show OSD Percentage"
text: qsTr("Always Show OSD Percentage")
description: "Display volume and brightness percentage values by default in OSD popups"
checked: SettingsData.osdAlwaysShowValue
onToggled: checked => {
@@ -1518,7 +1518,7 @@ Item {
}
StyledText {
text: "Font Settings"
text: qsTr("Font Settings")
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
@@ -1527,7 +1527,7 @@ Item {
}
DankDropdown {
text: "Font Family"
text: qsTr("Font Family")
description: "Select system font family"
currentValue: {
if (SettingsData.fontFamily === SettingsData.defaultFontFamily)
@@ -1548,7 +1548,7 @@ Item {
}
DankDropdown {
text: "Font Weight"
text: qsTr("Font Weight")
description: "Select font weight"
currentValue: {
switch (SettingsData.fontWeight) {
@@ -1614,7 +1614,7 @@ Item {
}
DankDropdown {
text: "Monospace Font"
text: qsTr("Monospace Font")
description: "Select monospace font for process list and technical displays"
currentValue: {
if (SettingsData.monoFontFamily === SettingsData.defaultMonoFontFamily)
@@ -1649,14 +1649,14 @@ Item {
spacing: Theme.spacingXS
StyledText {
text: "Font Scale"
text: qsTr("Font Scale")
font.pixelSize: Theme.fontSizeMedium
font.weight: Font.Medium
color: Theme.surfaceText
}
StyledText {
text: "Scale all font sizes"
text: qsTr("Scale all font sizes")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
width: parent.width
@@ -1748,7 +1748,7 @@ Item {
}
StyledText {
text: "Animations"
text: qsTr("Animations")
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
@@ -1761,14 +1761,14 @@ Item {
spacing: Theme.spacingS
StyledText {
text: "Animation Speed"
text: qsTr("Animation Speed")
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
font.weight: Font.Medium
}
StyledText {
text: "Control the speed of animations throughout the interface"
text: qsTr("Control the speed of animations throughout the interface")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
wrapMode: Text.WordWrap
@@ -1819,7 +1819,7 @@ Item {
}
StyledText {
text: "Lock Screen"
text: qsTr("Lock Screen")
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
@@ -1829,7 +1829,7 @@ Item {
DankToggle {
width: parent.width
text: "Show Power Actions"
text: qsTr("Show Power Actions")
description: "Show power, restart, and logout buttons on the lock screen"
checked: SettingsData.lockScreenShowPowerActions
onToggled: checked => {