1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-11 08:12:09 -04:00

Added plural support (#1750)

* Update it.json

* Enhance SettingsSliderRow: add resetText property and update reset button styling

* added i18n strings

* adjust reset button width to be dynamic based on content size

* added i18n strings

* Update template.json

* reverted changes

* Update it.json

* Update template.json

* Update NotificationSettings.qml

* added plurar support

* Update it.json

* Update ThemeColorsTab.qml
This commit is contained in:
Youseffo13
2026-02-26 15:36:42 +01:00
committed by GitHub
parent b4e7c4a4cd
commit 5d09acca4c
10 changed files with 136 additions and 45 deletions

View File

@@ -548,7 +548,7 @@ Item {
const count = CupsService.printerNames.length;
if (count === 0)
return I18n.tr("No printers configured");
return I18n.tr("%1 printer(s)").arg(count);
return I18n.ntr("%1 printer", "%1 printers", count).arg(count);
}
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
@@ -698,7 +698,7 @@ Item {
}
StyledText {
text: I18n.tr("%1 job(s)").arg(printerData?.jobs?.length ?? 0)
text: I18n.ntr("%1 job", "%1 jobs", printerData?.jobs?.length ?? 0).arg(printerData?.jobs?.length ?? 0)
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
visible: (printerData?.jobs?.length ?? 0) > 0
@@ -1245,7 +1245,7 @@ Item {
}
StyledText {
text: I18n.tr("%1 class(es)").arg(CupsService.printerClasses.length)
text: I18n.ntr("%1 class", "%1 classes", CupsService.printerClasses.length).arg(CupsService.printerClasses.length)
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
width: parent.width
@@ -1310,7 +1310,7 @@ Item {
}
StyledText {
text: I18n.tr("%1 printer(s)").arg(modelData.members?.length ?? 0)
text: I18n.ntr("%1 printer", "%1 printers", modelData.members?.length ?? 0).arg(modelData.members?.length ?? 0)
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}