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

i18n: term overhaul

- Delete ~160-ish useless terms
- Add context to more terms
- Add a mechanism to duplicate the same terms with different contexts
- sync
This commit is contained in:
bbedward
2026-07-16 12:15:20 -04:00
parent 6c45413d7a
commit 3c0f2cbc48
83 changed files with 19570 additions and 20947 deletions
@@ -1518,7 +1518,7 @@ Singleton {
}
function showHyprlandReadOnlyWarning() {
ToastService.showWarning(I18n.tr("Hyprland conf mode"), I18n.tr("This install is still using hyprland.conf. Run dms setup to migrate before editing display settings."), "dms setup", "display-config");
ToastService.showWarning(I18n.tr("Hyprland conf mode"), I18n.tr("This install is still using hyprland.conf. Run dms setup to migrate before changing these settings."), "dms setup", "display-config");
}
function buildOutputsMap() {
@@ -2639,7 +2639,7 @@ Singleton {
function getTransformLabel(transform) {
switch (transform) {
case "Normal":
return I18n.tr("Normal");
return I18n.tr("Normal", "display rotation option", true);
case "90":
return I18n.tr("90°");
case "180":
@@ -2655,12 +2655,12 @@ Singleton {
case "Flipped270":
return I18n.tr("Flipped 270°");
default:
return I18n.tr("Normal");
return I18n.tr("Normal", "display rotation option", true);
}
}
function getTransformValue(label) {
if (label === I18n.tr("Normal"))
if (label === I18n.tr("Normal", "display rotation option", true))
return "Normal";
if (label === I18n.tr("90°"))
return "90";
@@ -60,9 +60,9 @@ StyledRect {
StyledText {
text: {
if (root.showLegacy)
return I18n.tr("This install is still using hyprland.conf. Run dms setup to migrate before editing display settings.");
return I18n.tr("This install is still using hyprland.conf. Run dms setup to migrate before changing these settings.");
if (root.showSetup)
return I18n.tr("Click 'Setup' to create the outputs config and add include to your compositor config.");
return I18n.tr("Click 'Setup' to create %1 and add include to your compositor config.").arg("dms/outputs");
return "";
}
font.pixelSize: Theme.fontSizeSmall
@@ -93,21 +93,21 @@ Column {
currentValue: {
if (!hotCornersData)
return I18n.tr("Inherit");
return I18n.tr("Inherit", "inherit from global setting");
if (hotCornersData.off)
return I18n.tr("Off");
const corners = hotCornersData.corners || [];
if (corners.length === 0)
return I18n.tr("Inherit");
return I18n.tr("Inherit", "inherit from global setting");
if (corners.length === 4)
return I18n.tr("All");
return I18n.tr("Select...");
}
options: [I18n.tr("Inherit"), I18n.tr("Off"), I18n.tr("All"), I18n.tr("Select...")]
options: [I18n.tr("Inherit", "inherit from global setting"), I18n.tr("Off"), I18n.tr("All"), I18n.tr("Select...")]
onValueChanged: value => {
switch (value) {
case I18n.tr("Inherit"):
case I18n.tr("Inherit", "inherit from global setting"):
DisplayConfigState.setNiriSetting(root.outputData, root.outputName, "hotCorners", null);
break;
case I18n.tr("Off"):
@@ -232,7 +232,7 @@ Column {
DankTextField {
width: parent.width
height: 40
placeholderText: I18n.tr("Inherit")
placeholderText: I18n.tr("Inherit", "inherit from global setting")
enabled: !settingsColumn.isDisabled
text: {
const layout = DisplayConfigState.getNiriSetting(root.outputData, root.outputName, "layout", null);
@@ -270,7 +270,7 @@ Column {
DankTextField {
width: parent.width
height: 40
placeholderText: I18n.tr("Inherit")
placeholderText: I18n.tr("Inherit", "inherit from global setting")
enabled: !settingsColumn.isDisabled
text: {
const layout = DisplayConfigState.getNiriSetting(root.outputData, root.outputName, "layout", null);
@@ -321,7 +321,7 @@ Column {
DankTextField {
width: parent.width
height: 40
placeholderText: I18n.tr("Inherit")
placeholderText: I18n.tr("Inherit", "inherit from global setting")
enabled: !settingsColumn.isDisabled
text: {
const layout = DisplayConfigState.getNiriSetting(root.outputData, root.outputName, "layout", null);
@@ -308,7 +308,7 @@ StyledRect {
return DisplayConfigState.getTransformLabel(pendingTransform);
return DisplayConfigState.getTransformLabel(root.outputData?.logical?.transform ?? "Normal");
}
options: [I18n.tr("Normal"), I18n.tr("90°"), I18n.tr("180°"), I18n.tr("270°"), I18n.tr("Flipped"), I18n.tr("Flipped 90°"), I18n.tr("Flipped 180°"), I18n.tr("Flipped 270°")]
options: [I18n.tr("Normal", "display rotation option", true), I18n.tr("90°"), I18n.tr("180°"), I18n.tr("270°"), I18n.tr("Flipped"), I18n.tr("Flipped 90°"), I18n.tr("Flipped 180°"), I18n.tr("Flipped 270°")]
onValueChanged: value => DisplayConfigState.setPendingChange(root.outputName, "transform", DisplayConfigState.getTransformValue(value))
}
}