1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-04 04:42:05 -04:00

Wrapped all missing i18n strings (#2013)

* Feat(i18n): wrapped missing strings

* Feat(i18n): wrapped missing strings

* feat(i18n): added pluralization to some strings

* feat: updated en.json and template.json

* Update en.json

* Update template.json
This commit is contained in:
Youseffo13
2026-03-17 17:43:23 +01:00
committed by GitHub
parent 0cf2c40377
commit 5c4ce86da4
21 changed files with 4824 additions and 6174 deletions

View File

@@ -713,7 +713,7 @@ Rectangle {
StyledText {
id: expandedActionText
text: {
const baseText = modelData.text || "Open";
const baseText = modelData.text || I18n.tr("Open");
if (keyboardNavigationActive && (isGroupSelected || selectedNotificationIndex >= 0))
return `${baseText} (${index + 1})`;
return baseText;
@@ -849,7 +849,7 @@ Rectangle {
StyledText {
id: collapsedActionText
text: {
const baseText = modelData.text || "Open";
const baseText = modelData.text || I18n.tr("Open");
if (keyboardNavigationActive && isGroupSelected) {
return `${baseText} (${index + 1})`;
}

View File

@@ -85,7 +85,7 @@ Rectangle {
function getTimeoutText(value) {
if (value === undefined || value === null || isNaN(value)) {
return "5 seconds";
return I18n.tr("5 seconds");
}
for (let i = 0; i < timeoutOptions.length; i++) {
@@ -94,15 +94,15 @@ Rectangle {
}
}
if (value === 0) {
return "Never";
return I18n.tr("Never");
}
if (value < 1000) {
return value + "ms";
}
if (value < 60000) {
return Math.round(value / 1000) + " seconds";
return Math.round(value / 1000) + " " + I18n.tr("seconds");
}
return Math.round(value / 60000) + " minutes";
return Math.round(value / 60000) + " " + I18n.tr("minutes");
}
Column {
@@ -169,7 +169,7 @@ Rectangle {
DankDropdown {
text: I18n.tr("Low Priority")
description: "Timeout for low priority notifications"
description: I18n.tr("Timeout for low priority notifications")
currentValue: getTimeoutText(SettingsData.notificationTimeoutLow)
options: timeoutOptions.map(opt => opt.text)
onValueChanged: value => {
@@ -184,7 +184,7 @@ Rectangle {
DankDropdown {
text: I18n.tr("Normal Priority")
description: "Timeout for normal priority notifications"
description: I18n.tr("Timeout for normal priority notifications")
currentValue: getTimeoutText(SettingsData.notificationTimeoutNormal)
options: timeoutOptions.map(opt => opt.text)
onValueChanged: value => {
@@ -199,7 +199,7 @@ Rectangle {
DankDropdown {
text: I18n.tr("Critical Priority")
description: "Timeout for critical priority notifications"
description: I18n.tr("Timeout for critical priority notifications")
currentValue: getTimeoutText(SettingsData.notificationTimeoutCritical)
options: timeoutOptions.map(opt => opt.text)
onValueChanged: value => {
@@ -225,6 +225,8 @@ Rectangle {
Row {
id: overlayRow
anchors.left: parent.left
anchors.right: overlayToggle.left
anchors.rightMargin: Theme.spacingM
anchors.verticalCenter: parent.verticalCenter
spacing: Theme.spacingM
@@ -238,17 +240,22 @@ Rectangle {
Column {
spacing: 2
anchors.verticalCenter: parent.verticalCenter
width: overlayRow.width - Theme.iconSizeSmall - Theme.spacingM
StyledText {
width: parent.width
text: I18n.tr("Notification Overlay")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceText
wrapMode: Text.Wrap
}
StyledText {
width: parent.width
text: I18n.tr("Display all priorities over fullscreen apps")
font.pixelSize: Theme.fontSizeSmall - 1
color: Theme.surfaceVariantText
wrapMode: Text.Wrap
}
}
}
@@ -269,6 +276,8 @@ Rectangle {
Row {
id: privacyRow
anchors.left: parent.left
anchors.right: privacyToggle.left
anchors.rightMargin: Theme.spacingM
anchors.verticalCenter: parent.verticalCenter
spacing: Theme.spacingM
@@ -282,17 +291,22 @@ Rectangle {
Column {
spacing: 2
anchors.verticalCenter: parent.verticalCenter
width: privacyRow.width - Theme.iconSizeSmall - Theme.spacingM
StyledText {
width: parent.width
text: I18n.tr("Privacy Mode")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceText
wrapMode: Text.Wrap
}
StyledText {
width: parent.width
text: I18n.tr("Hide notification content until expanded")
font.pixelSize: Theme.fontSizeSmall - 1
color: Theme.surfaceVariantText
wrapMode: Text.Wrap
}
}
}