mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-14 00:02:45 -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:
+10
-10
@@ -1859,7 +1859,7 @@ Singleton {
|
||||
function applyGtkColors() {
|
||||
if (!matugenAvailable) {
|
||||
if (typeof ToastService !== "undefined") {
|
||||
ToastService.showError("matugen not available or disabled - cannot apply GTK colors");
|
||||
ToastService.showError(I18n.tr("matugen not available or disabled - cannot apply GTK colors"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1868,11 +1868,11 @@ Singleton {
|
||||
Proc.runCommand("gtkApplier", [shellDir + "/scripts/gtk.sh", configDir, isLight, shellDir], (output, exitCode) => {
|
||||
if (exitCode === 0) {
|
||||
if (typeof ToastService !== "undefined" && typeof NiriService !== "undefined" && !NiriService.matugenSuppression) {
|
||||
ToastService.showInfo("GTK colors applied successfully");
|
||||
ToastService.showInfo(I18n.tr("GTK colors applied successfully"));
|
||||
}
|
||||
} else {
|
||||
if (typeof ToastService !== "undefined") {
|
||||
ToastService.showError("Failed to apply GTK colors");
|
||||
ToastService.showError(I18n.tr("Failed to apply GTK colors"));
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1881,7 +1881,7 @@ Singleton {
|
||||
function applyQtColors() {
|
||||
if (!matugenAvailable) {
|
||||
if (typeof ToastService !== "undefined") {
|
||||
ToastService.showError("matugen not available or disabled - cannot apply Qt colors");
|
||||
ToastService.showError(I18n.tr("matugen not available or disabled - cannot apply Qt colors"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1889,11 +1889,11 @@ Singleton {
|
||||
Proc.runCommand("qtApplier", [shellDir + "/scripts/qt.sh", configDir], (output, exitCode) => {
|
||||
if (exitCode === 0) {
|
||||
if (typeof ToastService !== "undefined") {
|
||||
ToastService.showInfo("Qt colors applied successfully");
|
||||
ToastService.showInfo(I18n.tr("Qt colors applied successfully"));
|
||||
}
|
||||
} else {
|
||||
if (typeof ToastService !== "undefined") {
|
||||
ToastService.showError("Failed to apply Qt colors");
|
||||
ToastService.showError(I18n.tr("Failed to apply Qt colors"));
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -2034,7 +2034,7 @@ Singleton {
|
||||
break;
|
||||
default:
|
||||
if (typeof ToastService !== "undefined") {
|
||||
ToastService.showError("Theme worker failed (" + exitCode + ")");
|
||||
ToastService.showError(I18n.tr("Theme worker failed (%1)").arg(exitCode));
|
||||
}
|
||||
log.warn("Matugen worker failed with exit code:", exitCode);
|
||||
root.matugenCompleted(currentMode, "error");
|
||||
@@ -2060,7 +2060,7 @@ Singleton {
|
||||
var themeData = JSON.parse(customThemeFileView.text());
|
||||
loadCustomTheme(themeData);
|
||||
} catch (e) {
|
||||
ToastService.showError("Invalid JSON format: " + e.message);
|
||||
ToastService.showError(I18n.tr("Invalid JSON format: %1").arg(e.message));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2074,7 +2074,7 @@ Singleton {
|
||||
|
||||
onLoadFailed: function (error) {
|
||||
if (typeof ToastService !== "undefined") {
|
||||
ToastService.showError("Failed to read theme file: " + error);
|
||||
ToastService.showError(I18n.tr("Failed to read theme file: %1").arg(error));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2102,7 +2102,7 @@ Singleton {
|
||||
log.error("Failed to parse dynamic colors:", e);
|
||||
if (typeof ToastService !== "undefined") {
|
||||
ToastService.wallpaperErrorStatus = "error";
|
||||
ToastService.showError("Dynamic colors parse error: " + e.message);
|
||||
ToastService.showError(I18n.tr("Dynamic colors parse error: %1").arg(e.message));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ DankModal {
|
||||
|
||||
property string confirmTitle: ""
|
||||
property string confirmMessage: ""
|
||||
property string confirmButtonText: "Confirm"
|
||||
property string cancelButtonText: "Cancel"
|
||||
property string confirmButtonText: I18n.tr("Confirm")
|
||||
property string cancelButtonText: I18n.tr("Cancel")
|
||||
property color confirmButtonColor: Theme.primary
|
||||
property var onConfirm: function () {}
|
||||
property var onCancel: function () {}
|
||||
@@ -22,8 +22,8 @@ DankModal {
|
||||
function show(title, message, onConfirmCallback, onCancelCallback) {
|
||||
confirmTitle = title || "";
|
||||
confirmMessage = message || "";
|
||||
confirmButtonText = "Confirm";
|
||||
cancelButtonText = "Cancel";
|
||||
confirmButtonText = I18n.tr("Confirm");
|
||||
cancelButtonText = I18n.tr("Cancel");
|
||||
confirmButtonColor = Theme.primary;
|
||||
onConfirm = onConfirmCallback || (() => {});
|
||||
onCancel = onCancelCallback || (() => {});
|
||||
@@ -35,8 +35,8 @@ DankModal {
|
||||
function showWithOptions(options) {
|
||||
confirmTitle = options.title || "";
|
||||
confirmMessage = options.message || "";
|
||||
confirmButtonText = options.confirmText || "Confirm";
|
||||
cancelButtonText = options.cancelText || "Cancel";
|
||||
confirmButtonText = options.confirmText || I18n.tr("Confirm");
|
||||
cancelButtonText = options.cancelText || I18n.tr("Cancel");
|
||||
confirmButtonColor = options.confirmColor || Theme.primary;
|
||||
onConfirm = options.onConfirm || (() => {});
|
||||
onCancel = options.onCancel || (() => {});
|
||||
|
||||
@@ -73,7 +73,7 @@ DankModal {
|
||||
|
||||
function copyColorToClipboard(colorValue) {
|
||||
Quickshell.execDetached(["dms", "cl", "copy", colorValue]);
|
||||
ToastService.showInfo(`Color ${colorValue} copied`);
|
||||
ToastService.showInfo(I18n.tr("Color %1 copied").arg(colorValue));
|
||||
SessionData.addRecentColor(currentColor);
|
||||
}
|
||||
|
||||
@@ -679,7 +679,7 @@ DankModal {
|
||||
rgbString = `rgb(${r}, ${g}, ${b})`;
|
||||
}
|
||||
Quickshell.execDetached(["dms", "cl", "copy", rgbString]);
|
||||
ToastService.showInfo(`${rgbString} copied`);
|
||||
ToastService.showInfo(I18n.tr("%1 copied").arg(rgbString));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -744,7 +744,7 @@ DankModal {
|
||||
hsvString = `${h}, ${s}, ${v}`;
|
||||
}
|
||||
Quickshell.execDetached(["dms", "cl", "copy", hsvString]);
|
||||
ToastService.showInfo(`HSV ${hsvString} copied`);
|
||||
ToastService.showInfo(I18n.tr("HSV %1 copied").arg(hsvString));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ Item {
|
||||
if (!selectedItem)
|
||||
return;
|
||||
if (!SessionService.wtypeAvailable) {
|
||||
ToastService.showError("wtype not available - install wtype for paste support");
|
||||
ToastService.showError(I18n.tr("wtype not available - install wtype for paste support"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ DankModal {
|
||||
ssid: ssid
|
||||
}, response => {
|
||||
if (response.error) {
|
||||
ToastService.showError("Failed to fetch network QR code: ", JSON.stringify(response.error));
|
||||
ToastService.showError(I18n.tr("Failed to fetch network QR code: %1").arg(JSON.stringify(response.error)));
|
||||
} else if (response.result) {
|
||||
themedQrCodePath = response.result[0];
|
||||
normalQrCodePath = response.result[1];
|
||||
@@ -66,7 +66,7 @@ DankModal {
|
||||
path: path
|
||||
}, response => {
|
||||
if (response.error) {
|
||||
ToastService.showError(`Failed to remove QR code at ${path}: `, JSON.stringify(response.error));
|
||||
ToastService.showError(I18n.tr("Failed to remove QR code at %1: %2").arg(path).arg(JSON.stringify(response.error)));
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -373,7 +373,7 @@ Singleton {
|
||||
if (wifiConnected && currentWifiSSID === pendingConnectionSSID && wifiIP) {
|
||||
const elapsed = Date.now() - pendingConnectionStartTime;
|
||||
log.info("Successfully connected to", pendingConnectionSSID, "in", elapsed, "ms");
|
||||
ToastService.showInfo(`Connected to ${pendingConnectionSSID}`);
|
||||
ToastService.showInfo(I18n.tr("Connected to %1").arg(pendingConnectionSSID));
|
||||
|
||||
if (userPreference === "wifi" || userPreference === "auto") {
|
||||
setConnectionPriority("wifi");
|
||||
|
||||
@@ -342,7 +342,7 @@ Singleton {
|
||||
log.info("Connected (API v" + apiVersion + ", CLI " + cliVersion + ") -", JSON.stringify(capabilities));
|
||||
|
||||
if (apiVersion < expectedApiVersion) {
|
||||
ToastService.showError("DMS server is outdated (API v" + apiVersion + ", expected v" + expectedApiVersion + ")");
|
||||
ToastService.showError(I18n.tr("DMS server is outdated (API v%1, expected v%2)").arg(apiVersion).arg(expectedApiVersion));
|
||||
}
|
||||
|
||||
capabilitiesReceived();
|
||||
|
||||
@@ -444,7 +444,7 @@ Singleton {
|
||||
// Night Mode Functions - Simplified
|
||||
function enableNightMode() {
|
||||
if (!gammaControlAvailable) {
|
||||
ToastService.showWarning("Night mode failed: DMS gamma control not available");
|
||||
ToastService.showWarning(I18n.tr("Night mode failed: DMS gamma control not available"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ Singleton {
|
||||
if (exitCode === 0) {
|
||||
configValidationOutput = "";
|
||||
} else if (hasInitialConnection && configValidationOutput.length > 0) {
|
||||
ToastService.showError("niri: failed to load config", configValidationOutput, "", "niri-config");
|
||||
ToastService.showError(I18n.tr("niri: failed to load config"), configValidationOutput, "", "niri-config");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -568,7 +568,7 @@ Singleton {
|
||||
configReloaded();
|
||||
|
||||
if (hasInitialConnection && !suppressConfigToast && !suppressNextConfigToast && !matugenSuppression) {
|
||||
ToastService.showInfo("niri: config reloaded", "", "", "niri-config");
|
||||
ToastService.showInfo(I18n.tr("niri: config reloaded"), "", "", "niri-config");
|
||||
} else if (suppressNextConfigToast) {
|
||||
suppressNextConfigToast = false;
|
||||
suppressResetTimer.stop();
|
||||
|
||||
@@ -116,7 +116,7 @@ Singleton {
|
||||
errorOutput = "";
|
||||
return;
|
||||
}
|
||||
ToastService.showError("Hibernate failed", errorOutput);
|
||||
ToastService.showError(I18n.tr("Hibernate failed"), errorOutput);
|
||||
errorOutput = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# ! Auto-generated file. Do not edit directly.
|
||||
# Auto-generated by DMS - do not edit manually
|
||||
# Remove source = ./dms/colors.conf from your config to override.
|
||||
|
||||
$primary = rgb({{colors.primary.default.hex_stripped}})
|
||||
|
||||
Reference in New Issue
Block a user