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

Added Missing i18n Strings (#2398)

* Update hypr-colors.conf

* added i18n strings

* added missing i18n strings

* Update TypographyMotionTab.qml
This commit is contained in:
Youseffo13
2026-05-13 15:23:50 +02:00
committed by GitHub
parent 8f958658dc
commit e6da762870
17 changed files with 79 additions and 69 deletions
@@ -25,12 +25,12 @@ Rectangle {
function setProfile(profile) {
if (typeof PowerProfiles === "undefined") {
ToastService.showError("power-profiles-daemon not available");
ToastService.showError(I18n.tr("power-profiles-daemon not available"));
return;
}
PowerProfiles.profile = profile;
if (PowerProfiles.profile !== profile) {
ToastService.showError("Failed to set power profile");
ToastService.showError(I18n.tr("Failed to set power profile"));
}
}
@@ -141,7 +141,7 @@ BasePill {
// This is after the other delta checks so it only shows on valid Y scroll
if (typeof PowerProfiles === "undefined") {
ToastService.showError("power-profiles-daemon not available");
ToastService.showError(I18n.tr("power-profiles-daemon not available"));
return;
}
@@ -162,7 +162,7 @@ BasePill {
// Set new profile
PowerProfiles.profile = profiles[index];
if (PowerProfiles.profile !== profiles[index]) {
ToastService.showError("Failed to set power profile");
ToastService.showError(I18n.tr("Failed to set power profile"));
}
}
}
@@ -128,7 +128,7 @@ Item {
anchors.leftMargin: -Theme.spacingM
width: parent.width + Theme.spacingM
text: I18n.tr("Use Monospace Font")
description: "Toggle fonts"
description: I18n.tr("Toggle fonts")
checked: SettingsData.notepadUseMonospace
onToggled: checked => {
SettingsData.notepadUseMonospace = checked;
@@ -140,7 +140,7 @@ Item {
anchors.leftMargin: -Theme.spacingM
width: parent.width + Theme.spacingM
text: I18n.tr("Show Line Numbers")
description: "Display line numbers in editor"
description: I18n.tr("Display line numbers in editor")
checked: SettingsData.notepadShowLineNumbers
onToggled: checked => {
SettingsData.notepadShowLineNumbers = checked;
@@ -212,7 +212,7 @@ Item {
options: cachedFontFamilies
currentValue: {
if (!SettingsData.notepadFontFamily || SettingsData.notepadFontFamily === "")
return "Default (Global)";
return I18n.tr("Default (Global)");
else
return SettingsData.notepadFontFamily;
}
@@ -322,7 +322,7 @@ Item {
anchors.leftMargin: -Theme.spacingM
width: parent.width + Theme.spacingM
text: I18n.tr("Custom Transparency")
description: "Override global transparency for Notepad"
description: I18n.tr("Override global transparency for Notepad")
checked: SettingsData.notepadTransparencyOverride >= 0
onToggled: checked => {
if (checked) {
@@ -356,7 +356,7 @@ Item {
StyledText {
width: parent.width
text: SettingsData.notepadUseMonospace ? "Using global monospace font from Settings → Personalization" : "Global fonts can be configured in Settings → Personalization"
text: SettingsData.notepadUseMonospace ? I18n.tr("Using global monospace font from Settings → Personalization") : I18n.tr("Global fonts can be configured in Settings → Personalization")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceTextMedium
wrapMode: Text.WordWrap
+10 -10
View File
@@ -203,10 +203,10 @@ StyledRect {
const currentPluginId = root.pluginId;
DMSService.update(currentPluginName, response => {
if (response.error) {
ToastService.showError("Update failed: " + response.error);
ToastService.showError(I18n.tr("Update failed: %1").arg(response.error));
return;
}
ToastService.showInfo("Plugin updated: " + currentPluginName);
ToastService.showInfo(I18n.tr("Plugin updated: %1").arg(currentPluginName));
PluginService.forceRescanPlugin(currentPluginId);
if (DMSService.apiVersion >= 8)
DMSService.listInstalled();
@@ -246,10 +246,10 @@ StyledRect {
const currentPluginName = root.pluginName;
DMSService.uninstall(currentPluginName, response => {
if (response.error) {
ToastService.showError("Uninstall failed: " + response.error);
ToastService.showError(I18n.tr("Uninstall failed: %1").arg(response.error));
return;
}
ToastService.showInfo("Plugin uninstalled: " + currentPluginName);
ToastService.showInfo(I18n.tr("Plugin uninstalled: %1").arg(currentPluginName));
PluginService.scanPlugins();
if (root.isExpanded)
root.expandedPluginId = "";
@@ -290,10 +290,10 @@ StyledRect {
const currentPluginName = root.pluginName;
root.isReloading = true;
if (PluginService.reloadPlugin(currentPluginId)) {
ToastService.showInfo("Plugin reloaded: " + currentPluginName);
ToastService.showInfo(I18n.tr("Plugin reloaded: %1").arg(currentPluginName));
return;
}
ToastService.showError("Failed to reload plugin: " + currentPluginName);
ToastService.showError(I18n.tr("Failed to reload plugin: %1").arg(currentPluginName));
root.isReloading = false;
}
onEntered: {
@@ -317,19 +317,19 @@ StyledRect {
if (isChecked) {
if (PluginService.enablePlugin(currentPluginId)) {
ToastService.showInfo("Plugin enabled: " + currentPluginName);
ToastService.showInfo(I18n.tr("Plugin enabled: %1").arg(currentPluginName));
return;
}
ToastService.showError("Failed to enable plugin: " + currentPluginName);
ToastService.showError(I18n.tr("Failed to enable plugin: %1").arg(currentPluginName));
return;
}
if (PluginService.disablePlugin(currentPluginId)) {
ToastService.showInfo("Plugin disabled: " + currentPluginName);
ToastService.showInfo(I18n.tr("Plugin disabled: %1").arg(currentPluginName));
if (root.isExpanded)
root.expandedPluginId = "";
return;
}
ToastService.showError("Failed to disable plugin: " + currentPluginName);
ToastService.showError(I18n.tr("Failed to disable plugin: %1").arg(currentPluginName));
}
}
}
+1 -1
View File
@@ -257,7 +257,7 @@ FocusScope {
PluginService.openPluginDirectory();
} else {
PluginService.createPluginDirectory();
ToastService.showInfo("Created plugin directory: " + PluginService.pluginDirectory);
ToastService.showInfo(I18n.tr("Created plugin directory: %1").arg(PluginService.pluginDirectory));
}
}
}
@@ -251,59 +251,69 @@ Item {
settingKey: "fontWeight"
text: I18n.tr("Font Weight")
description: I18n.tr("Select font weight for UI text")
options: ["Thin", "Extra Light", "Light", "Regular", "Medium", "Demi Bold", "Bold", "Extra Bold", "Black"]
options: [
I18n.tr("Thin"),
I18n.tr("Extra Light"),
I18n.tr("Light"),
I18n.tr("Regular"),
I18n.tr("Medium"),
I18n.tr("Demi Bold"),
I18n.tr("Bold"),
I18n.tr("Extra Bold"),
I18n.tr("Black")
]
currentValue: {
switch (SettingsData.fontWeight) {
case Font.Thin:
return "Thin";
return I18n.tr("Thin");
case Font.ExtraLight:
return "Extra Light";
return I18n.tr("Extra Light");
case Font.Light:
return "Light";
return I18n.tr("Light");
case Font.Normal:
return "Regular";
return I18n.tr("Regular");
case Font.Medium:
return "Medium";
return I18n.tr("Medium");
case Font.DemiBold:
return "Demi Bold";
return I18n.tr("Demi Bold");
case Font.Bold:
return "Bold";
return I18n.tr("Bold");
case Font.ExtraBold:
return "Extra Bold";
return I18n.tr("Extra Bold");
case Font.Black:
return "Black";
return I18n.tr("Black");
default:
return "Regular";
return I18n.tr("Regular");
}
}
onValueChanged: value => {
var weight;
switch (value) {
case "Thin":
case I18n.tr("Thin"):
weight = Font.Thin;
break;
case "Extra Light":
case I18n.tr("Extra Light"):
weight = Font.ExtraLight;
break;
case "Light":
case I18n.tr("Light"):
weight = Font.Light;
break;
case "Regular":
case I18n.tr("Regular"):
weight = Font.Normal;
break;
case "Medium":
case I18n.tr("Medium"):
weight = Font.Medium;
break;
case "Demi Bold":
case I18n.tr("Demi Bold"):
weight = Font.DemiBold;
break;
case "Bold":
case I18n.tr("Bold"):
weight = Font.Bold;
break;
case "Extra Bold":
case I18n.tr("Extra Bold"):
weight = Font.ExtraBold;
break;
case "Black":
case I18n.tr("Black"):
weight = Font.Black;
break;
default: