1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-08 06:25:37 -05:00

i18n: add some terms

This commit is contained in:
bbedward
2025-10-20 09:22:03 -04:00
parent f54e53b8a0
commit 59669d8b7f
10 changed files with 658 additions and 54 deletions

View File

@@ -257,9 +257,9 @@ Item {
}
StyledText {
text: `dms is a highly customizable, modern desktop shell with a <a href="https://m3.material.io/" style="text-decoration:none; color:${Theme.primary};">material 3 inspired</a> design.
text: I18n.tr(`dms is a highly customizable, modern desktop shell with a <a href="https://m3.material.io/" style="text-decoration:none; color:${Theme.primary};">material 3 inspired</a> design.
<br /><br/>It is built with <a href="https://quickshell.org" style="text-decoration:none; color:${Theme.primary};">Quickshell</a>, a QT6 framework for building desktop shells, and <a href="https://go.dev" style="text-decoration:none; color:${Theme.primary};">Go</a>, a statically typed, compiled programming language.
`
`)
textFormat: Text.RichText
font.pixelSize: Theme.fontSizeMedium
linkColor: Theme.primary

View File

@@ -705,7 +705,7 @@ Item {
DankButtonGroup {
id: positionButtonGroup
anchors.verticalCenter: parent.verticalCenter
model: ["Top", "Bottom", "Left", "Right"]
model: [I18n.tr("Top"), I18n.tr("Bottom"), I18n.tr("Left"), I18n.tr("Right")]
currentIndex: {
switch (SettingsData.dankBarPosition) {
case SettingsData.Position.Top: return 0
@@ -1740,7 +1740,7 @@ Item {
id: leftSection
anchors.fill: parent
anchors.margins: Theme.spacingL
title: SettingsData.dankBarIsVertical ? "Top Section" : "Left Section"
title: SettingsData.dankBarIsVertical ? I18n.tr("Top Section") : I18n.tr("Left Section")
titleIcon: "format_align_left"
sectionId: "left"
allWidgets: dankBarTab.baseWidgetDefinitions
@@ -1892,7 +1892,7 @@ Item {
id: rightSection
anchors.fill: parent
anchors.margins: Theme.spacingL
title: SettingsData.dankBarIsVertical ? "Bottom Section" : "Right Section"
title: SettingsData.dankBarIsVertical ? I18n.tr("Bottom Section") : I18n.tr("Right Section")
titleIcon: "format_align_right"
sectionId: "right"
allWidgets: dankBarTab.baseWidgetDefinitions

View File

@@ -12,42 +12,42 @@ Item {
property var variantComponents: [{
"id": "dankBar",
"name": "Dank Bar",
"description": "System bar with widgets and system information",
"description": I18n.tr("System bar with widgets and system information"),
"icon": "toolbar"
}, {
"id": "dock",
"name": "Application Dock",
"description": "Bottom dock for pinned and running applications",
"name": I18n.tr("Application Dock"),
"description": I18n.tr("Bottom dock for pinned and running applications"),
"icon": "dock"
}, {
"id": "notifications",
"name": "Notification Popups",
"description": "Notification toast popups",
"name": I18n.tr("Notification Popups"),
"description": I18n.tr("Notification toast popups"),
"icon": "notifications"
}, {
"id": "wallpaper",
"name": "Wallpaper",
"description": "Desktop background images",
"name": I18n.tr("Wallpaper"),
"description": I18n.tr("Desktop background images"),
"icon": "wallpaper"
}, {
"id": "osd",
"name": "On-Screen Displays",
"description": "Volume, brightness, and other system OSDs",
"name": I18n.tr("On-Screen Displays"),
"description": I18n.tr("Volume, brightness, and other system OSDs"),
"icon": "picture_in_picture"
}, {
"id": "toast",
"name": "Toast Messages",
"description": "System toast notifications",
"name": I18n.tr("Toast Messages"),
"description": I18n.tr("System toast notifications"),
"icon": "campaign"
}, {
"id": "notepad",
"name": "Notepad Slideout",
"description": "Quick note-taking slideout panel",
"name": I18n.tr("Notepad Slideout"),
"description": I18n.tr("Quick note-taking slideout panel"),
"icon": "sticky_note_2"
}, {
"id": "systemTray",
"name": "System Tray",
"description": "System tray icons",
"name": I18n.tr("System Tray"),
"description": I18n.tr("System tray icons"),
"icon": "notifications"
}]
@@ -116,7 +116,7 @@ Item {
width: parent.width
text: I18n.tr("Night Mode")
description: "Apply warm color temperature to reduce eye strain. Use automation settings below to control when it activates."
description: I18n.tr("Apply warm color temperature to reduce eye strain. Use automation settings below to control when it activates.")
checked: DisplayService.nightModeEnabled
onToggled: checked => {
DisplayService.toggleNightMode()
@@ -160,7 +160,7 @@ Item {
id: automaticToggle
width: parent.width
text: I18n.tr("Automatic Control")
description: "Only adjust gamma based on time or location rules."
description: I18n.tr("Only adjust gamma based on time or location rules.")
checked: SessionData.nightModeAutoEnabled
onToggled: checked => {
if (checked && !DisplayService.nightModeEnabled) {
@@ -362,7 +362,7 @@ Item {
DankToggle {
width: parent.width
text: I18n.tr("Auto-location")
description: DisplayService.geoclueAvailable ? "Use automatic location detection (geoclue2)" : "Geoclue service not running - cannot auto-detect location"
description: DisplayService.geoclueAvailable ? I18n.tr("Use automatic location detection (geoclue2)") : I18n.tr("Geoclue service not running - cannot auto-detect location")
checked: SessionData.nightModeLocationProvider === "geoclue2"
enabled: DisplayService.geoclueAvailable
onToggled: checked => {

View File

@@ -449,7 +449,7 @@ Item {
DankTextField {
width: parent.width
text: SettingsData.launchPrefix
placeholderText: "Enter launch prefix (e.g., 'uwsm-app')"
placeholderText: I18n.tr("Enter launch prefix (e.g., 'uwsm-app')")
onTextEdited: {
SettingsData.setLaunchPrefix(text)
}
@@ -688,21 +688,25 @@ Item {
var diffDays = Math.floor(
diffMs / (1000 * 60 * 60 * 24))
if (diffMins < 1)
return "Last launched just now"
return I18n.tr("Last launched just now")
if (diffMins < 60)
return "Last launched " + diffMins + " minute"
+ (diffMins === 1 ? "" : "s") + " ago"
return I18n.tr("Last launched %1 minute%2 ago")
.arg(diffMins)
.arg(diffMins === 1 ? "" : "s")
if (diffHours < 24)
return "Last launched " + diffHours + " hour"
+ (diffHours === 1 ? "" : "s") + " ago"
return I18n.tr("Last launched %1 hour%2 ago")
.arg(diffHours)
.arg(diffHours === 1 ? "" : "s")
if (diffDays < 7)
return "Last launched " + diffDays + " day"
+ (diffDays === 1 ? "" : "s") + " ago"
return I18n.tr("Last launched %1 day%2 ago")
.arg(diffDays)
.arg(diffDays === 1 ? "" : "s")
return "Last launched " + date.toLocaleDateString()
return I18n.tr("Last launched %1")
.arg(date.toLocaleDateString())
}
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText

View File

@@ -1274,7 +1274,7 @@ Item {
DankDropdown {
id: personalizationMatugenPaletteDropdown
text: I18n.tr("Matugen Palette")
description: "Select the palette algorithm used for wallpaper-based colors"
description: I18n.tr("Select the palette algorithm used for wallpaper-based colors")
options: Theme.availableMatugenSchemes.map(function (option) { return option.label })
currentValue: Theme.getMatugenScheme(SettingsData.matugenScheme).label
enabled: Theme.matugenAvailable

View File

@@ -627,7 +627,7 @@ Item {
DankDropdown {
id: matugenPaletteDropdown
text: I18n.tr("Matugen Palette")
description: "Select the palette algorithm used for wallpaper-based colors"
description: I18n.tr("Select the palette algorithm used for wallpaper-based colors")
options: cachedMatugenSchemes
currentValue: Theme.getMatugenScheme(SettingsData.matugenScheme).label
enabled: Theme.matugenAvailable
@@ -1393,7 +1393,7 @@ Item {
}
StyledText {
text: `Generate baseline GTK3/4 or QT5/QT6 (requires qt6ct-kde) configurations to follow DMS colors. Only needed once.<br /><br />It is recommended to install <a href="https://github.com/AvengeMedia/DankMaterialShell/blob/master/README.md#Theming" style="text-decoration:none; color:${Theme.primary};">Colloid</a> GTK theme prior to applying GTK themes.`
text: I18n.tr(`Generate baseline GTK3/4 or QT5/QT6 (requires qt6ct-kde) configurations to follow DMS colors. Only needed once.<br /><br />It is recommended to configure <a href="https://github.com/AvengeMedia/DankMaterialShell/blob/master/README.md#Theming" style="text-decoration:none; color:${Theme.primary};">adw-gtk3</a> prior to applying GTK themes.`)
textFormat: Text.RichText
linkColor: Theme.primary
onLinkActivated: url => Qt.openUrlExternally(url)

View File

@@ -58,7 +58,7 @@ Item {
DankToggle {
width: parent.width
text: I18n.tr("Workspace Index Numbers")
description: "Show workspace index numbers in the top bar workspace switcher"
description: I18n.tr("Show workspace index numbers in the top bar workspace switcher")
checked: SettingsData.showWorkspaceIndex
onToggled: checked => {
return SettingsData.setShowWorkspaceIndex(
@@ -68,7 +68,7 @@ Item {
DankToggle {
width: parent.width
text: I18n.tr("Window Scrolling")
description: "Scroll through windows, rather than workspaces"
description: I18n.tr("Scroll through windows, rather than workspaces")
checked: SettingsData.workspaceScrolling
visible: CompositorService.isNiri
onToggled: checked => {
@@ -79,7 +79,7 @@ Item {
DankToggle {
width: parent.width
text: I18n.tr("Workspace Padding")
description: "Always show a minimum of 3 workspaces, even if fewer are available"
description: I18n.tr("Always show a minimum of 3 workspaces, even if fewer are available")
checked: SettingsData.showWorkspacePadding
onToggled: checked => {
return SettingsData.setShowWorkspacePadding(
@@ -90,7 +90,7 @@ Item {
DankToggle {
width: parent.width
text: I18n.tr("Show Workspace Apps")
description: "Display application icons in workspace indicators"
description: I18n.tr("Display application icons in workspace indicators")
checked: SettingsData.showWorkspaceApps
onToggled: checked => {
return SettingsData.setShowWorkspaceApps(
@@ -143,7 +143,7 @@ Item {
DankToggle {
width: parent.width
text: I18n.tr("Per-Monitor Workspaces")
description: "Show only workspaces belonging to each specific monitor."
description: I18n.tr("Show only workspaces belonging to each specific monitor.")
checked: SettingsData.workspacesPerMonitor
onToggled: checked => {
return SettingsData.setWorkspacesPerMonitor(checked);
@@ -191,7 +191,7 @@ Item {
DankToggle {
width: parent.width
text: I18n.tr("Wave Progress Bars")
description: "Use animated wave progress bars for media playback"
description: I18n.tr("Use animated wave progress bars for media playback")
checked: SettingsData.waveProgressEnabled
onToggled: checked => {
return SettingsData.setWaveProgressEnabled(checked);
@@ -386,7 +386,7 @@ Item {
DankToggle {
width: parent.width
text: I18n.tr("Running Apps Only In Current Workspace")
description: "Show only apps running in current workspace"
description: I18n.tr("Show only apps running in current workspace")
checked: SettingsData.runningAppsCurrentWorkspace
onToggled: checked => {
return SettingsData.setRunningAppsCurrentWorkspace(