translator: remove debug print

This commit is contained in:
end-4
2025-06-11 22:30:55 +02:00
parent a3818322a6
commit c2c7078957
2 changed files with 5 additions and 15 deletions
@@ -47,7 +47,7 @@ Item {
repeat: false repeat: false
onTriggered: () => { onTriggered: () => {
if (root.inputField.text.trim().length > 0) { if (root.inputField.text.trim().length > 0) {
console.log("Translating with command:", translateProc.command); // console.log("Translating with command:", translateProc.command);
translateProc.running = false; translateProc.running = false;
translateProc.buffer = ""; // Clear the buffer translateProc.buffer = ""; // Clear the buffer
translateProc.running = true; // Restart the process translateProc.running = true; // Restart the process
@@ -72,8 +72,8 @@ Item {
onExited: (exitCode, exitStatus) => { onExited: (exitCode, exitStatus) => {
// 1. Split into sections by double newlines // 1. Split into sections by double newlines
const sections = translateProc.buffer.trim().split(/\n\s*\n/); const sections = translateProc.buffer.trim().split(/\n\s*\n/);
console.log("BUFFER:", translateProc.buffer); // console.log("BUFFER:", translateProc.buffer);
console.log("SECTIONS:", sections); // console.log("SECTIONS:", sections);
// 2. Extract relevant data // 2. Extract relevant data
root.translatedText = sections.length > 1 ? sections[1].trim() : ""; root.translatedText = sections.length > 1 ? sections[1].trim() : "";
+2 -12
View File
@@ -23,16 +23,11 @@ Singleton {
property bool preventNextLoad: false property bool preventNextLoad: false
property var preventNextNotification: false property var preventNextNotification: false
onPreventNextNotificationChanged: {
console.log("HMM: preventNextNotification:", root.preventNextNotification);
}
function loadConfig() { function loadConfig() {
configFileView.reload() configFileView.reload()
} }
function applyConfig(fileContent) { function applyConfig(fileContent) {
console.log("[ConfigLoader] Applying config from file:", root.filePath);
try { try {
if (fileContent.trim() === "") { if (fileContent.trim() === "") {
console.warn("[ConfigLoader] Config file is empty, skipping load."); console.warn("[ConfigLoader] Config file is empty, skipping load.");
@@ -82,8 +77,6 @@ Singleton {
} }
} }
console.log(parents.join("."));
console.log(`[ConfigLoader] Setting live config value: ${nestedKey} = ${convertedValue}`);
obj[keys[keys.length - 1]] = convertedValue; obj[keys[keys.length - 1]] = convertedValue;
} }
@@ -95,7 +88,6 @@ Singleton {
function setConfigValueAndSave(nestedKey, value, preventNextNotification = true) { function setConfigValueAndSave(nestedKey, value, preventNextNotification = true) {
setLiveConfigValue(nestedKey, value); setLiveConfigValue(nestedKey, value);
root.preventNextNotification = preventNextNotification; root.preventNextNotification = preventNextNotification;
console.log("SETTING: preventNextNotification:", root.preventNextNotification);
saveConfig(); saveConfig();
} }
@@ -104,7 +96,6 @@ Singleton {
interval: ConfigOptions.hacks.arbitraryRaceConditionDelay interval: ConfigOptions.hacks.arbitraryRaceConditionDelay
running: false running: false
onTriggered: { onTriggered: {
console.log("GONNA APPLY KONFIG preventNextNotification:", root.preventNextNotification);
if (root.preventNextLoad) { if (root.preventNextLoad) {
root.preventNextLoad = false; root.preventNextLoad = false;
return; return;
@@ -112,12 +103,11 @@ Singleton {
if (root.firstLoad) { if (root.firstLoad) {
root.applyConfig(configFileView.text()) root.applyConfig(configFileView.text())
} else { } else {
console.log("APPLYING: preventNextNotification:", root.preventNextNotification);
root.applyConfig(configFileView.text()) root.applyConfig(configFileView.text())
if (!root.preventNextNotification) { if (!root.preventNextNotification) {
Hyprland.dispatch(`exec notify-send "${qsTr("Shell configuration reloaded")}" "${root.filePath}"`) // Hyprland.dispatch(`exec notify-send "${qsTr("Shell configuration reloaded")}" "${root.filePath}"`)
} else { } else {
// root.preventNextNotification = false; root.preventNextNotification = false;
} }
} }
} }