diff --git a/auto-dark-light@gihaume/CHANGELOG.md b/auto-dark-light@gihaume/CHANGELOG.md index ae56a8179b4..3a4fce3b21b 100644 --- a/auto-dark-light@gihaume/CHANGELOG.md +++ b/auto-dark-light@gihaume/CHANGELOG.md @@ -1,6 +1,12 @@ +## 1.2.1 - 22.10.2024 + +- Custom commands launching feature: + - Corrected list's `Active` attribute default to `true` + - Added shell features support + ## 1.2.0 - 22.10.2024 -- Added commands launching feature +- Added custom commands launching feature ## 1.1.0 - 02.09.2024 diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/applet.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/applet.js index 82a0d7d6303..3a49a2db208 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/applet.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/applet.js @@ -1,15 +1,15 @@ const Themes_handler = require('./lib/themes_handler.js'); const Background_handler = require('./lib/background_handler.js'); -const Twilights_calculator = require('./lib/twilights_calculator.js'); +const Twilights_calculator = require('./lib/twilights_calculator/twilights_calculator.js'); const Event_scheduler = require('./lib/event_scheduler.js'); const Timer_absolute = require('./lib/timer_absolute.js'); const Time_of_day = require('./lib/time_of_day.js'); const Time_change_listener = require('./lib/time_change_listener/time_change_listener.js'); const Timezone_change_listener = require('./lib/timezone_change_listener.js'); const Timezone_coordinates_finder = require('./lib/timezones_coordinates/timezone_coordinates_finder.js'); -const Sleep_wakeup_listener = require('./lib/sleep_wakeup_listener.js'); +const Sleep_wakeup_listener = require('./lib/sleep_wakeup_listener/sleep_wakeup_listener.js'); const Color_scheme_change_listener = require('./lib/color_scheme_change_listener.js'); -const Commands_launcher = require('./lib/commands_launcher.js'); +const Commands_launcher = require('./lib/commands_launcher/commands_launcher.js'); const { _ } = require('./lib/translator.js'); const Applet = imports.ui.applet; @@ -120,7 +120,8 @@ class ThisApplet extends Applet.IconApplet { try { this.time_change_listener = new Time_change_listener( `${this.metadata.path}/lib/time_change_listener`, - this._update.bind(this) + this._update.bind(this), + this._notify_error.bind(this) ); } catch (error) { this._notify_critical(error.message); diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/background_handler.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/background_handler.js index 270457bd5b7..87dd10d2f6c 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/background_handler.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/background_handler.js @@ -10,9 +10,7 @@ const IO = { } }; -/** - * A `Cinnamon desktop` background handler that detects and applies the background settings. - */ +/** A `Cinnamon desktop` background handler that detects and applies the background settings. */ class Background_handler { /** * @param {Settings.XletSettingsBase} settings - The settings of the desk/applet. @@ -27,9 +25,7 @@ class Background_handler { settings.bindWithObject(this, keys.slideshow_folder, "slideshow_folder"); } - /** - * Detects and save the current background settings applied to Cinnamon desktop. - */ + /** Detects and save the current background settings applied to Cinnamon desktop. */ detect() { this.is_slideshow = IO.SLIDESHOW. get_boolean(IO.KEYS.IS_SLIDESHOW); this.background_file = IO.BACKGROUND.get_string( IO.KEYS.BACKGROUND_FILE); @@ -40,9 +36,7 @@ class Background_handler { this.slideshow_folder = IO.SLIDESHOW.get_string(IO.KEYS.SLIDESHOW_FOLDER).replace('directory://', "file://"); } - /** - * Applies the saved background settings to Cinnamon desktop. - */ + /** Applies the saved background settings to Cinnamon desktop. */ apply() { IO.SLIDESHOW. set_boolean(IO.KEYS.IS_SLIDESHOW, this.is_slideshow); IO.BACKGROUND.set_string( IO.KEYS.BACKGROUND_FILE, this.background_file); diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/color_scheme_change_listener.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/color_scheme_change_listener.js index f5f6b408a3f..ae91fd03e95 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/color_scheme_change_listener.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/color_scheme_change_listener.js @@ -1,8 +1,6 @@ const Gio = imports.gi.Gio; -/** - * Listens for changes in the color scheme and calls the provided callback - */ +/** Listens for changes in the color scheme and calls the provided callback */ class Color_scheme_change_listener { #interface = Gio.Settings.new('org.x.apps.portal'); #callback; @@ -25,9 +23,7 @@ class Color_scheme_change_listener { } } - /** - * Declare the object as finished to release any ressource acquired. - */ + /** Declare the object as finished to release any ressource acquired. */ finalize() { this.disable(); } } diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/commands_launcher.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/commands_launcher/commands_launcher.js similarity index 82% rename from auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/commands_launcher.js rename to auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/commands_launcher/commands_launcher.js index c06d901f58f..acd914cc6de 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/commands_launcher.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/commands_launcher/commands_launcher.js @@ -1,15 +1,16 @@ -const launch_command = require('./lib/launch_command.js'); +const launch_command = require('./lib/commands_launcher/launch_command.js'); const { _ } = require('./lib/translator.js'); const {Gio, GLib} = imports.gi; +/** A launcher for the commands of the settings list. */ class Commands_launcher { #callback_for_errors; /** * @param {Settings.XletSettingsBase} settings - The settings of the desk/applet. * @param {object} key_of_list - The keys of the settings' commands list. - * @param {function(string): void} callback_for_errors - The callback with a message for when an error occurs. + * @param {function(string): void} callback_for_errors - The function to call with a message for when an error occurs. */ constructor(settings, key_of_list, callback_for_errors) { settings.bindWithObject(this, key_of_list, "list"); @@ -19,13 +20,13 @@ class Commands_launcher { async launch_commands() { for (const item of this.list) { const { name, active, expiry, command } = item; - if (!active) continue; try { await launch_command(command, expiry); } catch (error) { - let msg = `${_("the command")} '${name}' ${_("failed")}`; + const name_for_error = name !== '' ? name : command; + let msg = `${_("the command")} '${name_for_error}' ${_("failed")}`; if (error instanceof GLib.ShellError) msg += ` ${_("due to a wrong format")}${_(":")} ${error.message}`; else diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/launch_command.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/commands_launcher/launch_command.js similarity index 97% rename from auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/launch_command.js rename to auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/commands_launcher/launch_command.js index caf4dac0952..cac342b047d 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/launch_command.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/commands_launcher/launch_command.js @@ -4,7 +4,6 @@ Gio._promisify(Gio.Subprocess.prototype, 'communicate_utf8_async'); /** * Executes a command with a timeout and transmits any error on failure. - * * @async * @param {string} command - The shell command to execute. * @param {number} [timeout_seconds=10] - The delay in seconds before cancelling the command. `0` means infinity/never. @@ -14,6 +13,7 @@ Gio._promisify(Gio.Subprocess.prototype, 'communicate_utf8_async'); * @throws {Gio.IOErrorEnum.FAILED} - If the command fails with a non-zero exit code. The error message is the `stderr` output if any, otherwise the exit status. */ async function launch_command(command, timeout_seconds = 10) { + command = `sh -c ${GLib.shell_quote(`exec ${command}`)}`; // brings shell features const [_ok, argvp] = GLib.shell_parse_argv(command); // can throw GLib.ShellError const proc = new Gio.Subprocess({ diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/dbus.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/dbus.js index 8e9cf923054..fa78259b32e 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/dbus.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/dbus.js @@ -1,9 +1,7 @@ const {Gio, GLib} = imports.gi; class Dbus { - /** - * An interface to read the system screensaver lock state. - */ + /** An interface to read the system screensaver lock state. */ static Screen_lock = class { #signal_id; @@ -61,9 +59,7 @@ class Dbus { } } - /** - * An interface to read the system sleep/wakeup state. - */ + /** An interface to read the system sleep/wakeup state. */ static Sleep = class { #signal_id; @@ -97,9 +93,7 @@ class Dbus { } } - /** - * An interface to read the system timezone. - */ + /** An interface to read the system timezone. */ static Timezone = class { #signal_id; diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/event_scheduler.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/event_scheduler.js index 9e445ae4a6b..6acf043160b 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/event_scheduler.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/event_scheduler.js @@ -2,9 +2,7 @@ const Mainloop = imports.mainloop; const Time_of_day = require('./lib/time_of_day.js'); -/** - * A single-event scheduler which call a function at a specified due time of day. - */ +/** A single-event scheduler which call a function at a specified due time of day. */ class Event_scheduler { #event_id; @@ -29,9 +27,7 @@ class Event_scheduler { // ); } - /** - * Unset the scheduled event if it exists. - */ + /** Unset the scheduled event if it exists. */ unset_the_event() { if (this.#event_id !== undefined) { Mainloop.source_remove(this.#event_id); @@ -39,9 +35,7 @@ class Event_scheduler { } } - /** - * Declare the object as finished to release any ressource acquired. - */ + /** Declare the object as finished to release any ressource acquired. */ finalize() { this.unset_the_event(); } } diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/screen_lock_handler.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/sleep_wakeup_listener/screen_lock_checker.js similarity index 75% rename from auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/screen_lock_handler.js rename to auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/sleep_wakeup_listener/screen_lock_checker.js index 32ab2fe3364..2a8d65c485b 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/screen_lock_handler.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/sleep_wakeup_listener/screen_lock_checker.js @@ -1,9 +1,7 @@ const Dbus = require('./lib/dbus.js'); -/** - * A gatekeeper for the screen locked state. - */ -class Screen_lock_handler { +/** A gatekeeper for the screen locked state. */ +class Screen_lock_checker { #lock = new Dbus.Screen_lock(); /** @@ -24,15 +22,11 @@ class Screen_lock_handler { }); } - /** - * Cancel the `try_now_or_postpone` procedure. - */ + /** Cancel the `try_now_or_postpone` procedure. */ cancel() { this.#lock.unsubscribe_to_changes(); } - /** - * Declare the object as finished to release any ressource acquired. - */ + /** Declare the object as finished to release any ressource acquired. */ finalize() { this.cancel(); } } -module.exports = Screen_lock_handler; +module.exports = Screen_lock_checker; diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/sleep_wakeup_listener.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/sleep_wakeup_listener/sleep_wakeup_listener.js similarity index 60% rename from auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/sleep_wakeup_listener.js rename to auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/sleep_wakeup_listener/sleep_wakeup_listener.js index 8d9ae7703b1..6911f3b95b1 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/sleep_wakeup_listener.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/sleep_wakeup_listener/sleep_wakeup_listener.js @@ -1,12 +1,10 @@ const Dbus = require('./lib/dbus.js'); -const Screen_lock_handler = require('./lib/screen_lock_handler.js'); +const Screen_lock_checker = require('./lib/sleep_wakeup_listener/screen_lock_checker.js'); -/** - * A gatekeeper for the sleep combined with the screen locked on wakeup. - */ +/** A gatekeeper for the sleep combined with the screen locked on wakeup. */ class Sleep_wakeup_listener { - #sleep = new Dbus.Sleep(); - #lock = new Screen_lock_handler(); + #sleep_dbus = new Dbus.Sleep(); + #lock_checker = new Screen_lock_checker(); #on_sleep_entry_callback; #on_wakeup_unlocked_callback; @@ -20,27 +18,25 @@ class Sleep_wakeup_listener { } enable() { - this.#sleep.subscribe_to_changes((is_sleeping) => { + this.#sleep_dbus.subscribe_to_changes((is_sleeping) => { if (is_sleeping) this.#on_sleep_entry_callback(); else - this.#lock.try_now_or_postpone_until_unlocked( + this.#lock_checker.try_now_or_postpone_until_unlocked( this.#on_wakeup_unlocked_callback.bind(this) ); }); } disable() { - this.#sleep.unsubscribe_to_changes(); - this.#lock.cancel(); + this.#sleep_dbus.unsubscribe_to_changes(); + this.#lock_checker.cancel(); } - /** - * Declare the object as finished to release any ressource acquired. - */ + /** Declare the object as finished to release any ressource acquired. */ finalize() { - this.#sleep.unsubscribe_to_changes(); - this.#lock.finalize(); + this.#sleep_dbus.unsubscribe_to_changes(); + this.#lock_checker.finalize(); } } diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/themes_handler.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/themes_handler.js index feb805dbe0f..f9ff841f675 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/themes_handler.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/themes_handler.js @@ -13,9 +13,7 @@ const IO = { } }; -/** - * A `Cinnamon desktop` themes handler that detects and applies the themes. - */ +/** A `Cinnamon desktop` themes handler that detects and applies the themes. */ class Themes_handler { #color_scheme; @@ -38,9 +36,7 @@ class Themes_handler { this.#color_scheme = is_dark ? 'prefer-dark' : 'prefer-light'; } - /** - * Detects and save the current themes applied to Cinnamon desktop. - */ + /** Detects and save the current themes applied to Cinnamon desktop. */ detect() { this.mouse_pointer = IO.DESKTOP .get_string(IO.KEYS.MOUSE_POINTER); this.applications = IO.DESKTOP .get_string(IO.KEYS.APPLICATIONS); @@ -49,9 +45,7 @@ class Themes_handler { this.has_detected = true; } - /** - * Applies the saved themes to Cinnamon desktop. - */ + /** Applies the saved themes to Cinnamon desktop. */ apply() { if (!this.has_detected) return; diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_change_listener/Makefile b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_change_listener/Makefile index 13ab771f1bd..b1202004ce1 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_change_listener/Makefile +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_change_listener/Makefile @@ -1,9 +1,9 @@ BUILD_FOLDER := build SOURCE_FILES := $(wildcard *.cpp) OBJECT_FILES := $(patsubst %.cpp, $(BUILD_FOLDER)/%.o, $(SOURCE_FILES)) -EXECUTABLE := time_change_listener +EXECUTABLE := auto-dark-light-time-change-listener COMPILER := g++ -COMPILER_FLAGS := -std=c++20 -Wall -pedantic -Wextra +COMPILER_FLAGS := -std=c++20 LINKER_FLAGS := @@ -22,11 +22,7 @@ $(BUILD_FOLDER)/%.o: %.cpp $(COMPILER) -c $(COMPILER_FLAGS) -o $@ $< -MMD -MF $(@:.o=.d) -run: $(EXECUTABLE) - ./$(EXECUTABLE) - - clean: $(RM) -rf $(BUILD_FOLDER) -.PHONY: all build run clean +.PHONY: all build clean diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_change_listener/main.cpp b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_change_listener/main.cpp index e6c031300c0..04b320e20d3 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_change_listener/main.cpp +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_change_listener/main.cpp @@ -6,21 +6,24 @@ #include int main(int argc, char* argv[]) { - std::vector args{argv, argv + argc}; + { + std::vector args{argv, argv + argc}; - if (std::find(args.begin(), args.end(), "--help") != args.end()) { - std::cout << "Usage: " << args[0] << '\n' - << "Listens for system time changes and prints 'changed' to `stdout` each time it occurs.\n" - << '\n' - << "Commands via `stdin`:\n" - << " 'enable': Enable listening for the system time changes.\n" - << " 'disable': Disable listening for the system time changes.\n" - << " 'exit': Exit the program.\n" - << '\n' - << "Options:\n" - << " --help: Display this help message.\n" - << std::endl; - return 0; + if (std::find(args.begin(), args.end(), "--help") != args.end()) { + std::cout + << "Usage: " << args[0] << '\n' + << "Listens for system time changes and prints 'changed' to `stdout` each time it occurs.\n" + << '\n' + << "Commands via `stdin`:\n" + << " 'enable': Enable listening for the system time changes.\n" + << " 'disable': Disable listening for the system time changes.\n" + << " 'exit': Exit the program.\n" + << '\n' + << "Options:\n" + << " --help: Display this help message.\n" + << std::endl; + return 0; + } } try { diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_change_listener/time_change_listener.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_change_listener/time_change_listener.js index fe3e65248e9..54b04648636 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_change_listener/time_change_listener.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_change_listener/time_change_listener.js @@ -1,13 +1,16 @@ -const { _ } = require('./lib/translator.js'); +const { _ } = require('./lib/translator.js'); const {Gio, GLib} = imports.gi; +const EXECUTABLE_NAME = "auto-dark-light-time-change-listener"; + /** * A passive listener for system time changes. It interfaces the C++ program * which API is in `time_change_listener.hpp`. */ class Time_change_listener { - #callback; + #callback_when_change; + #callback_for_errors; #subprocess; #input; #input_error; @@ -16,12 +19,13 @@ class Time_change_listener { /** * @param {string} path - The absolute path where the C++ files are located. - * @param {function(): void} callback - The function to be called when the system time changes. - * @throws {Error} If the `make` and `gcc` commands are not found in the system. - * + * @param {function(): void} callback_when_change - The function to be called when the system time changes. + * @param {function(string): void} callback_for_errors - The function to call with a message for when an error occurs. + * @throws {Error} If the `make` and `gcc` commands are not found in the system or if the compilation of the C++ program fails. */ - constructor(path, callback) { - this.#callback = callback; + constructor(path, callback_when_change, callback_for_errors) { + this.#callback_when_change = callback_when_change; + this.#callback_for_errors = callback_for_errors; if (!(GLib.find_program_in_path('make') && GLib.find_program_in_path('gcc'))) throw new Error(_("Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based system with `sudo apt install build-essential`, then reload the applet (in e.g. in restarting Cinnamon).")); @@ -37,12 +41,12 @@ class Time_change_listener { throw new Error(stderr); } catch (error) { throw new Error( - "Compilation of `time_change_listener` failed.\n\n" + `${_("Compilation of")} \`${EXECUTABLE_NAME}\` ${_("failed")}.\n\n` + error.message ); } - const executable_path = `${path}/time_change_listener`; + const executable_path = `${path}/${EXECUTABLE_NAME}`; this.#subprocess = new Gio.Subprocess({ argv: [executable_path], flags: @@ -69,7 +73,7 @@ class Time_change_listener { await new Promise(resolve => this.#input.read_line_async(GLib.PRIORITY_DEFAULT, null, resolve) ); - this.#callback(); + this.#callback_when_change(); } while (!this.#end_listen); } @@ -82,32 +86,28 @@ class Time_change_listener { (source, result) => { try { resolve(source.read_line_finish(result)); } catch (error) { - global.logError(error); + this.#callback_for_errors(error); resolve([null, 0]); } } ) ); if (line !== null && length > 0) - global.logError("time_change_listener process error: " + line); + this.#callback_for_errors( + `${_("the subprocess")} \`${EXECUTABLE_NAME}\` ${_("wrote on its error output")}${_(":")} ${line}` + ); } while (!this.#end_listen); } - /** - * Enable listening for the system time changes. - */ + /** Enable listening for the system time changes. */ enable() { this.#output.write('enable\n', null); } - /** - * Disable listening for the system time changes. - */ + /** Disable listening for the system time changes. */ disable() { this.#output.write('disable\n', null); } - /** - * Declare the object as finished to release any ressource acquired. - */ + /** Declare the object as finished to release any ressource acquired. */ finalize() { - this.#callback = () => {}; + this.#callback_when_change = () => {}; this.#end_listen = true; this.#output.write('exit\n', null); this.#subprocess.wait(null); diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_of_day.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_of_day.js index 6b2f7d1e640..e2434def7a5 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_of_day.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/time_of_day.js @@ -1,8 +1,6 @@ const GLib = imports.gi.GLib; -/** - * A time handler in hour, minute and second and 24-hour format. - */ +/** A time handler in hour, minute and second and 24-hour format. */ class Time_of_day { #hour; #minute; @@ -10,7 +8,7 @@ class Time_of_day { /** * @param {GLib.DateTime} date - The object to take the hour, minute and second from. - * `GLib.DateTime` type is chosen over `Date` to take into account timezone changes during runtime. + * @note `GLib.DateTime` type is chosen over `Date` to take into account timezone changes during runtime. */ constructor(date) { this.#hour = date.get_hour(); @@ -18,14 +16,10 @@ class Time_of_day { this.#second = date.get_second(); } - /** - * @returns {Time_of_day} The current local time of day. - */ + /** @returns {Time_of_day} The current local time of day. */ static now() { return new Time_of_day(GLib.DateTime.new_now_local()); } - /** - * @returns {string} The time of day as a string in the format "(H)H:MM:SS". - */ + /** @returns {string} The time of day as a string in the format "(H)H:MM:SS". */ as_string() { const minute = String(this.#minute).padStart(2, '0'), second = String(this.#second).padStart(2, '0'); diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/timer_absolute.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/timer_absolute.js index a17c7dd450a..f4576543672 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/timer_absolute.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/timer_absolute.js @@ -1,20 +1,14 @@ const Time_of_day = require('./lib/time_of_day.js'); -/** - * A basic query-based absolute timer in time of day. - */ +/** A basic query-based absolute timer in time of day. */ class Timer_absolute { - /** - * @param {Time_of_day} due_time - The next time of day at which the timer has to expire. - */ + /** @param {Time_of_day} due_time - The next time of day at which the timer has to expire. */ set(due_time) { const due_delay = due_time.get_seconds_from_now(); // [s] this.timeout = new Date().getTime() + due_delay * 1000; // [ms] } - /** - * @returns {boolean} Wether the timeout has expired. - */ + /** @returns {boolean} Wether the timeout has expired. */ has_expired() { return new Date().getTime() > this.timeout; } } diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/timezone_change_listener.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/timezone_change_listener.js index 2382f7b82d1..8e10bf6f396 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/timezone_change_listener.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/timezone_change_listener.js @@ -1,34 +1,22 @@ const Dbus = require('./lib/dbus.js'); -/** - * A listener for the system timezone changes. - */ +/** A listener for the system timezone changes. */ class Timezone_change_listener { #timezone_dbus = new Dbus.Timezone(); #callback; - /** - * @param {function(): void} on_timezone_change_callback - The callback function to be executed when the system timezone changes. - */ + /** @param {function(): void} on_timezone_change_callback - The callback function to be executed when the system timezone changes. */ constructor(on_timezone_change_callback) { this.#callback = on_timezone_change_callback; } - /** - * Enable the listener. - */ enable() { this.#timezone_dbus.subscribe_to_changes(this.#callback.bind(this)); } - /** - * Disable the listener. - */ disable() { this.#timezone_dbus.unsubscribe_to_changes(); } - /** - * Declare the object as finished to release any ressource acquired. - */ + /** Declare the object as finished to release any ressource acquired. */ finalize() { this.disable(); } } diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/suncalc.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/twilights_calculator/suncalc.js similarity index 98% rename from auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/suncalc.js rename to auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/twilights_calculator/suncalc.js index 1673ec49b7f..b95020594b7 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/suncalc.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/twilights_calculator/suncalc.js @@ -31,9 +31,7 @@ SunCalc is a JavaScript library for calculating sun/moon position and light phas https://github.com/mourner/suncalc */ -/** - * This version has been reduced by `gihaume` to contain only the used parts. - */ +// This version has been reduced to contain only the useful parts for the `auto-dark-light` applet. (function () { 'use strict'; diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/twilights_calculator.js b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/twilights_calculator/twilights_calculator.js similarity index 90% rename from auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/twilights_calculator.js rename to auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/twilights_calculator/twilights_calculator.js index 9ceddc798f3..28dd7822d90 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/twilights_calculator.js +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/lib/twilights_calculator/twilights_calculator.js @@ -1,13 +1,11 @@ -const SunCalc = require('./lib/suncalc.js'); +const SunCalc = require('./lib/twilights_calculator/suncalc.js'); const Time_of_day = require('./lib/time_of_day.js'); const { _ } = require('./lib/translator.js'); const GLib = imports.gi.GLib; const DateTime = GLib.DateTime; -/** - * A twilight times calculator of the ~current day. - */ +/** A twilight times calculator of the ~current day. */ const Twilights_calculator = { /** * Get the twilight times of the current day. diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/metadata.json b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/metadata.json index 3ac50bdd0de..a33c7752455 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/metadata.json +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/metadata.json @@ -2,6 +2,6 @@ "uuid": "auto-dark-light@gihaume", "name": "Automatic dark/light themes", "description": "Automatically switch between dark and light themes at twilight times.", - "version": "1.2.0", + "version": "1.2.1", "max-instances": "1" } diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/auto-dark-light@gihaume.pot b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/auto-dark-light@gihaume.pot index 6682ea0d160..de15579c29b 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/auto-dark-light@gihaume.pot +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/auto-dark-light@gihaume.pot @@ -5,10 +5,10 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: auto-dark-light@gihaume 1.2.0\n" +"Project-Id-Version: auto-dark-light@gihaume 1.2.1\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-10-22 07:37+0200\n" +"POT-Creation-Date: 2024-10-22 19:07+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -25,63 +25,78 @@ msgstr "" msgid "Middle-click: toggle automatic switch mode" msgstr "" -#. applet.js:366 +#. applet.js:367 msgid "Today's automatic mode switch times" msgstr "" -#. applet.js:366 applet.js:367 applet.js:368 applet.js:411 applet.js:417 -#. lib/commands_launcher.js:30 lib/commands_launcher.js:37 -#. lib/commands_launcher.js:39 +#. applet.js:367 applet.js:368 applet.js:369 applet.js:412 applet.js:418 +#. lib/time_change_listener/time_change_listener.js:97 +#. lib/commands_launcher/commands_launcher.js:31 +#. lib/commands_launcher/commands_launcher.js:38 +#. lib/commands_launcher/commands_launcher.js:40 msgid ":" msgstr "" #. settings-schema.json->light-mode->title -#. applet.js:367 +#. applet.js:368 msgid "Light mode" msgstr "" #. settings-schema.json->dark-mode->title -#. applet.js:368 +#. applet.js:369 msgid "Dark mode" msgstr "" -#. applet.js:411 +#. applet.js:412 msgid "Error" msgstr "" -#. applet.js:417 +#. applet.js:418 msgid "Critical error" msgstr "" -#. lib/commands_launcher.js:28 -msgid "the command" +#. lib/time_change_listener/time_change_listener.js:31 +msgid "" +"Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based " +"system with `sudo apt install build-essential`, then reload the applet (in e." +"g. in restarting Cinnamon)." msgstr "" -#. lib/commands_launcher.js:28 -msgid "failed" +#. lib/time_change_listener/time_change_listener.js:44 +msgid "Compilation of" msgstr "" -#. lib/commands_launcher.js:30 -msgid "due to a wrong format" +#. lib/time_change_listener/time_change_listener.js:44 +#. lib/commands_launcher/commands_launcher.js:29 +msgid "failed" msgstr "" -#. lib/commands_launcher.js:34 -msgid "due to time expiration" +#. lib/time_change_listener/time_change_listener.js:97 +msgid "the subprocess" msgstr "" -#. lib/commands_launcher.js:37 -msgid "with the following errors" +#. lib/time_change_listener/time_change_listener.js:97 +msgid "wrote on its error output" msgstr "" -#. lib/twilights_calculator.js:24 +#. lib/twilights_calculator/twilights_calculator.js:22 msgid "unable to calculate twilight times, check coordinates format or range" msgstr "" -#. lib/time_change_listener/time_change_listener.js:27 -msgid "" -"Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based " -"system with `sudo apt install build-essential`, then reload the applet (in e." -"g. in restarting Cinnamon)." +#. lib/commands_launcher/commands_launcher.js:29 +msgid "the command" +msgstr "" + +#. lib/commands_launcher/commands_launcher.js:31 +msgid "due to a wrong format" +msgstr "" + +#. lib/commands_launcher/commands_launcher.js:35 +msgid "due to time expiration" +msgstr "" + +#. lib/commands_launcher/commands_launcher.js:38 +msgid "with the following errors" msgstr "" #. metadata.json->name diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/ca.po b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/ca.po index 66727053b78..bb88b60c1db 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/ca.po +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/ca.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-10-22 07:37+0200\n" +"POT-Creation-Date: 2024-10-22 19:07+0200\n" "PO-Revision-Date: 2024-10-22 07:41+0200\n" "Last-Translator: Odyssey \n" "Language-Team: \n" @@ -27,69 +27,84 @@ msgstr "Clic: alterna el mode fosc/clar" msgid "Middle-click: toggle automatic switch mode" msgstr "Clic del mig: alterna el mode de canvi automàtic" -#. applet.js:366 +#. applet.js:367 msgid "Today's automatic mode switch times" msgstr "Hores de canvi de mode automàtic d'avui" -#. applet.js:366 applet.js:367 applet.js:368 applet.js:411 applet.js:417 -#. lib/commands_launcher.js:30 lib/commands_launcher.js:37 -#. lib/commands_launcher.js:39 +#. applet.js:367 applet.js:368 applet.js:369 applet.js:412 applet.js:418 +#. lib/time_change_listener/time_change_listener.js:97 +#. lib/commands_launcher/commands_launcher.js:31 +#. lib/commands_launcher/commands_launcher.js:38 +#. lib/commands_launcher/commands_launcher.js:40 msgid ":" msgstr ":" #. settings-schema.json->light-mode->title -#. applet.js:367 +#. applet.js:368 msgid "Light mode" msgstr "Mode clar" #. settings-schema.json->dark-mode->title -#. applet.js:368 +#. applet.js:369 msgid "Dark mode" msgstr "Mode fosc" -#. applet.js:411 +#. applet.js:412 msgid "Error" msgstr "Error" -#. applet.js:417 +#. applet.js:418 msgid "Critical error" msgstr "Error crític" -#. lib/commands_launcher.js:28 -msgid "the command" +#. lib/time_change_listener/time_change_listener.js:31 +msgid "" +"Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based " +"system with `sudo apt install build-essential`, then reload the applet (in e." +"g. in restarting Cinnamon)." msgstr "" +"Falten les dependències `make` i `gcc`. Instal·leu-les, per exemple, en " +"sistemes basats en Debian, amb `sudo apt install build-essential` i " +"recarregueu la miniaplicació (per exemple, reiniciant Cinnamon)." -#. lib/commands_launcher.js:28 -msgid "failed" +#. lib/time_change_listener/time_change_listener.js:44 +msgid "Compilation of" msgstr "" -#. lib/commands_launcher.js:30 -msgid "due to a wrong format" +#. lib/time_change_listener/time_change_listener.js:44 +#. lib/commands_launcher/commands_launcher.js:29 +msgid "failed" msgstr "" -#. lib/commands_launcher.js:34 -msgid "due to time expiration" +#. lib/time_change_listener/time_change_listener.js:97 +msgid "the subprocess" msgstr "" -#. lib/commands_launcher.js:37 -msgid "with the following errors" +#. lib/time_change_listener/time_change_listener.js:97 +msgid "wrote on its error output" msgstr "" -#. lib/twilights_calculator.js:24 +#. lib/twilights_calculator/twilights_calculator.js:22 msgid "unable to calculate twilight times, check coordinates format or range" msgstr "" "no s'han pogut calcular les hores de crepuscle, reviseu el format o el rang " "de les coordenades" -#. lib/time_change_listener/time_change_listener.js:27 -msgid "" -"Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based " -"system with `sudo apt install build-essential`, then reload the applet (in e." -"g. in restarting Cinnamon)." +#. lib/commands_launcher/commands_launcher.js:29 +msgid "the command" +msgstr "" + +#. lib/commands_launcher/commands_launcher.js:31 +msgid "due to a wrong format" +msgstr "" + +#. lib/commands_launcher/commands_launcher.js:35 +msgid "due to time expiration" +msgstr "" + +#. lib/commands_launcher/commands_launcher.js:38 +msgid "with the following errors" msgstr "" -"Falten les dependències `make` i `gcc`. Instal·leu-les, per exemple, en " -"sistemes basats en Debian, amb `sudo apt install build-essential` i " -"recarregueu la miniaplicació (per exemple, reiniciant Cinnamon)." #. metadata.json->name msgid "Automatic dark/light themes" diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/es.po b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/es.po index 22596c06c6a..ede7edc21f9 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/es.po +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-10-22 07:37+0200\n" +"POT-Creation-Date: 2024-10-22 19:07+0200\n" "PO-Revision-Date: 2024-10-22 12:41-0300\n" "Last-Translator: \n" "Language-Team: \n" @@ -26,70 +26,85 @@ msgstr "Clic: alternar modo oscuro/claro" msgid "Middle-click: toggle automatic switch mode" msgstr "Botón central: cambiar el modo de conmutación automática" -#. applet.js:366 +#. applet.js:367 msgid "Today's automatic mode switch times" msgstr "Tiempos de cambio de modo automático de hoy" -#. applet.js:366 applet.js:367 applet.js:368 applet.js:411 applet.js:417 -#. lib/commands_launcher.js:30 lib/commands_launcher.js:37 -#. lib/commands_launcher.js:39 +#. applet.js:367 applet.js:368 applet.js:369 applet.js:412 applet.js:418 +#. lib/time_change_listener/time_change_listener.js:97 +#. lib/commands_launcher/commands_launcher.js:31 +#. lib/commands_launcher/commands_launcher.js:38 +#. lib/commands_launcher/commands_launcher.js:40 msgid ":" msgstr ":" #. settings-schema.json->light-mode->title -#. applet.js:367 +#. applet.js:368 msgid "Light mode" msgstr "Modo claro" #. settings-schema.json->dark-mode->title -#. applet.js:368 +#. applet.js:369 msgid "Dark mode" msgstr "Modo oscuro" -#. applet.js:411 +#. applet.js:412 msgid "Error" msgstr "Error" -#. applet.js:417 +#. applet.js:418 msgid "Critical error" msgstr "Error crítico" -#. lib/commands_launcher.js:28 -msgid "the command" -msgstr "el comando" +#. lib/time_change_listener/time_change_listener.js:31 +msgid "" +"Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based " +"system with `sudo apt install build-essential`, then reload the applet (in e." +"g. in restarting Cinnamon)." +msgstr "" +"Faltan las dependencias `make` y `gcc`. Instálelas, por ejemplo, en un " +"sistema basado en Debian con `sudo apt install build-essential` y, a " +"continuación, vuelva a cargar el applet (por ejemplo, reiniciando Cinnamon)." + +#. lib/time_change_listener/time_change_listener.js:44 +msgid "Compilation of" +msgstr "" -#. lib/commands_launcher.js:28 +#. lib/time_change_listener/time_change_listener.js:44 +#. lib/commands_launcher/commands_launcher.js:29 msgid "failed" msgstr "ha fallado" -#. lib/commands_launcher.js:30 +#. lib/time_change_listener/time_change_listener.js:97 +msgid "the subprocess" +msgstr "" + +#. lib/time_change_listener/time_change_listener.js:97 +msgid "wrote on its error output" +msgstr "" + +#. lib/twilights_calculator/twilights_calculator.js:22 +msgid "unable to calculate twilight times, check coordinates format or range" +msgstr "" +"no puede calcular las horas crepusculares, compruebe el formato o el rango " +"de las coordenadas" + +#. lib/commands_launcher/commands_launcher.js:29 +msgid "the command" +msgstr "el comando" + +#. lib/commands_launcher/commands_launcher.js:31 msgid "due to a wrong format" msgstr "debido a un formato incorrecto" -#. lib/commands_launcher.js:34 +#. lib/commands_launcher/commands_launcher.js:35 msgid "due to time expiration" msgstr "por expiración del plazo" -#. lib/commands_launcher.js:37 +#. lib/commands_launcher/commands_launcher.js:38 msgid "with the following errors" msgstr "con los siguientes errores" -#. lib/twilights_calculator.js:24 -msgid "unable to calculate twilight times, check coordinates format or range" -msgstr "" -"no puede calcular las horas crepusculares, compruebe el formato o el rango " -"de las coordenadas" - -#. lib/time_change_listener/time_change_listener.js:27 -msgid "" -"Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based " -"system with `sudo apt install build-essential`, then reload the applet (in e." -"g. in restarting Cinnamon)." -msgstr "" -"Faltan las dependencias `make` y `gcc`. Instálelas, por ejemplo, en un " -"sistema basado en Debian con `sudo apt install build-essential` y, a " -"continuación, vuelva a cargar el applet (por ejemplo, reiniciando Cinnamon)." - #. metadata.json->name msgid "Automatic dark/light themes" msgstr "Temas oscuros/claro automáticos" diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/fr.po b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/fr.po index 17f2056db65..fe8f0fd9701 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/fr.po +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/fr.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: auto-dark-light@gihaume 1.0.0\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-10-22 07:37+0200\n" -"PO-Revision-Date: 2024-10-22 07:48+0200\n" +"POT-Creation-Date: 2024-10-22 19:07+0200\n" +"PO-Revision-Date: 2024-10-22 19:07+0200\n" "Last-Translator: gihaume \n" "Language-Team: \n" "Language: fr\n" @@ -26,70 +26,85 @@ msgstr "Clique : basculer le mode sombre/clair" msgid "Middle-click: toggle automatic switch mode" msgstr "Clique du milieu : basculer la commutation de mode automatique" -#. applet.js:366 +#. applet.js:367 msgid "Today's automatic mode switch times" msgstr "Heures des commutations de mode automatiques d'aujourd'hui" -#. applet.js:366 applet.js:367 applet.js:368 applet.js:411 applet.js:417 -#. lib/commands_launcher.js:30 lib/commands_launcher.js:37 -#. lib/commands_launcher.js:39 +#. applet.js:367 applet.js:368 applet.js:369 applet.js:412 applet.js:418 +#. lib/time_change_listener/time_change_listener.js:97 +#. lib/commands_launcher/commands_launcher.js:31 +#. lib/commands_launcher/commands_launcher.js:38 +#. lib/commands_launcher/commands_launcher.js:40 msgid ":" msgstr " :" #. settings-schema.json->light-mode->title -#. applet.js:367 +#. applet.js:368 msgid "Light mode" msgstr "Mode clair" #. settings-schema.json->dark-mode->title -#. applet.js:368 +#. applet.js:369 msgid "Dark mode" msgstr "Mode sombre" -#. applet.js:411 +#. applet.js:412 msgid "Error" msgstr "Erreur" -#. applet.js:417 +#. applet.js:418 msgid "Critical error" msgstr "Erreur critique" -#. lib/commands_launcher.js:28 -msgid "the command" -msgstr "la commande" +#. lib/time_change_listener/time_change_listener.js:31 +msgid "" +"Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based " +"system with `sudo apt install build-essential`, then reload the applet (in e." +"g. in restarting Cinnamon)." +msgstr "" +"Dépendances `make` et `gcc` manquantes. Installez-les, p. ex. sur un système " +"basé sur Debian avec `sudo apt install build-essential`, puis rechargez " +"l'applet (p. ex. en redémarrant Cinnamon)." + +#. lib/time_change_listener/time_change_listener.js:44 +msgid "Compilation of" +msgstr "La compilation de" -#. lib/commands_launcher.js:28 +#. lib/time_change_listener/time_change_listener.js:44 +#. lib/commands_launcher/commands_launcher.js:29 msgid "failed" msgstr "a échoué" -#. lib/commands_launcher.js:30 +#. lib/time_change_listener/time_change_listener.js:97 +msgid "the subprocess" +msgstr "le sous-processus" + +#. lib/time_change_listener/time_change_listener.js:97 +msgid "wrote on its error output" +msgstr "a écrit sur sa sortie d'erreur" + +#. lib/twilights_calculator/twilights_calculator.js:22 +msgid "unable to calculate twilight times, check coordinates format or range" +msgstr "" +"impossible de calculer les heures de crépuscule, vérifiez le format ou la " +"plage des coordonnées" + +#. lib/commands_launcher/commands_launcher.js:29 +msgid "the command" +msgstr "la commande" + +#. lib/commands_launcher/commands_launcher.js:31 msgid "due to a wrong format" msgstr "en raison d'un mauvais formattage" -#. lib/commands_launcher.js:34 +#. lib/commands_launcher/commands_launcher.js:35 msgid "due to time expiration" msgstr "en raison de l'expiration du délai" -#. lib/commands_launcher.js:37 +#. lib/commands_launcher/commands_launcher.js:38 msgid "with the following errors" msgstr "avec les erreurs suivantes" -#. lib/twilights_calculator.js:24 -msgid "unable to calculate twilight times, check coordinates format or range" -msgstr "" -"impossible de calculer les heures de crépuscule, vérifiez le format ou la " -"plage des coordonnées" - -#. lib/time_change_listener/time_change_listener.js:27 -msgid "" -"Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based " -"system with `sudo apt install build-essential`, then reload the applet (in e." -"g. in restarting Cinnamon)." -msgstr "" -"Dépendances `make` et `gcc` manquantes. Installez-les, p. ex. sur un système " -"basé sur Debian avec `sudo apt install build-essential`, puis rechargez " -"l'applet (p. ex. en redémarrant Cinnamon)." - #. metadata.json->name msgid "Automatic dark/light themes" msgstr "Thèmes sombres/clairs automatiques" diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/hu.po b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/hu.po index ba795e936f9..1a389344112 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/hu.po +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/hu.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: auto-dark-light@gihaume 1.1.0\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-10-22 07:37+0200\n" +"POT-Creation-Date: 2024-10-22 19:07+0200\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -26,69 +26,84 @@ msgstr "Kattintás: sötét/világos üzemmód váltása" msgid "Middle-click: toggle automatic switch mode" msgstr "Középső kattintás: automatikus kapcsolási mód váltása" -#. applet.js:366 +#. applet.js:367 msgid "Today's automatic mode switch times" msgstr "A mai automatikus üzemmódváltás ideje" -#. applet.js:366 applet.js:367 applet.js:368 applet.js:411 applet.js:417 -#. lib/commands_launcher.js:30 lib/commands_launcher.js:37 -#. lib/commands_launcher.js:39 +#. applet.js:367 applet.js:368 applet.js:369 applet.js:412 applet.js:418 +#. lib/time_change_listener/time_change_listener.js:97 +#. lib/commands_launcher/commands_launcher.js:31 +#. lib/commands_launcher/commands_launcher.js:38 +#. lib/commands_launcher/commands_launcher.js:40 msgid ":" msgstr ":" #. settings-schema.json->light-mode->title -#. applet.js:367 +#. applet.js:368 msgid "Light mode" msgstr "Világos mód" #. settings-schema.json->dark-mode->title -#. applet.js:368 +#. applet.js:369 msgid "Dark mode" msgstr "Sötét mód" -#. applet.js:411 +#. applet.js:412 msgid "Error" msgstr "Hiba" -#. applet.js:417 +#. applet.js:418 msgid "Critical error" msgstr "Kritikus hiba" -#. lib/commands_launcher.js:28 -msgid "the command" +#. lib/time_change_listener/time_change_listener.js:31 +msgid "" +"Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based " +"system with `sudo apt install build-essential`, then reload the applet (in e." +"g. in restarting Cinnamon)." msgstr "" +"Hiányzó függőségek `make` és `gcc`. Telepítse őket, pl. Debian-alapú " +"rendszeren a `sudo apt install build-essential` segítségével, majd töltse " +"újra az appletet (pl. a Cinnamon újraindításával)." -#. lib/commands_launcher.js:28 -msgid "failed" +#. lib/time_change_listener/time_change_listener.js:44 +msgid "Compilation of" msgstr "" -#. lib/commands_launcher.js:30 -msgid "due to a wrong format" +#. lib/time_change_listener/time_change_listener.js:44 +#. lib/commands_launcher/commands_launcher.js:29 +msgid "failed" msgstr "" -#. lib/commands_launcher.js:34 -msgid "due to time expiration" +#. lib/time_change_listener/time_change_listener.js:97 +msgid "the subprocess" msgstr "" -#. lib/commands_launcher.js:37 -msgid "with the following errors" +#. lib/time_change_listener/time_change_listener.js:97 +msgid "wrote on its error output" msgstr "" -#. lib/twilights_calculator.js:24 +#. lib/twilights_calculator/twilights_calculator.js:22 msgid "unable to calculate twilight times, check coordinates format or range" msgstr "" "nem tudja kiszámítani a szürkület idejét, ellenőrizze a koordináták " "formátumát vagy tartományát" -#. lib/time_change_listener/time_change_listener.js:27 -msgid "" -"Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based " -"system with `sudo apt install build-essential`, then reload the applet (in e." -"g. in restarting Cinnamon)." +#. lib/commands_launcher/commands_launcher.js:29 +msgid "the command" +msgstr "" + +#. lib/commands_launcher/commands_launcher.js:31 +msgid "due to a wrong format" +msgstr "" + +#. lib/commands_launcher/commands_launcher.js:35 +msgid "due to time expiration" +msgstr "" + +#. lib/commands_launcher/commands_launcher.js:38 +msgid "with the following errors" msgstr "" -"Hiányzó függőségek `make` és `gcc`. Telepítse őket, pl. Debian-alapú " -"rendszeren a `sudo apt install build-essential` segítségével, majd töltse " -"újra az appletet (pl. a Cinnamon újraindításával)." #. metadata.json->name msgid "Automatic dark/light themes" diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/nl.po b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/nl.po index bab352dd287..e8394044597 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/nl.po +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/po/nl.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: auto-dark-light@gihaume 1.1.0\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-applets/" "issues\n" -"POT-Creation-Date: 2024-10-22 07:37+0200\n" +"POT-Creation-Date: 2024-10-22 19:07+0200\n" "PO-Revision-Date: 2024-10-22 07:41+0200\n" "Last-Translator: qadzek\n" "Language-Team: \n" @@ -25,69 +25,84 @@ msgstr "Klik: schakelen tussen donkere/lichte modus" msgid "Middle-click: toggle automatic switch mode" msgstr "Middelklik: in- en uitschakelen van automatische omschakelingsmodus" -#. applet.js:366 +#. applet.js:367 msgid "Today's automatic mode switch times" msgstr "Automatische omschakeltijden van vandaag" -#. applet.js:366 applet.js:367 applet.js:368 applet.js:411 applet.js:417 -#. lib/commands_launcher.js:30 lib/commands_launcher.js:37 -#. lib/commands_launcher.js:39 +#. applet.js:367 applet.js:368 applet.js:369 applet.js:412 applet.js:418 +#. lib/time_change_listener/time_change_listener.js:97 +#. lib/commands_launcher/commands_launcher.js:31 +#. lib/commands_launcher/commands_launcher.js:38 +#. lib/commands_launcher/commands_launcher.js:40 msgid ":" msgstr ":" #. settings-schema.json->light-mode->title -#. applet.js:367 +#. applet.js:368 msgid "Light mode" msgstr "Lichte modus" #. settings-schema.json->dark-mode->title -#. applet.js:368 +#. applet.js:369 msgid "Dark mode" msgstr "Donkere modus" -#. applet.js:411 +#. applet.js:412 msgid "Error" msgstr "Fout" -#. applet.js:417 +#. applet.js:418 msgid "Critical error" msgstr "Kritieke fout" -#. lib/commands_launcher.js:28 -msgid "the command" +#. lib/time_change_listener/time_change_listener.js:31 +msgid "" +"Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based " +"system with `sudo apt install build-essential`, then reload the applet (in e." +"g. in restarting Cinnamon)." msgstr "" +"Ontbrekende afhankelijkheden `make` en `gcc`. Installeer ze, bv. op een " +"Debian-gebaseerd systeem met `sudo apt install build-essential`, en herlaad " +"vervolgens de applet (bv. door Cinnamon opnieuw op te starten)." -#. lib/commands_launcher.js:28 -msgid "failed" +#. lib/time_change_listener/time_change_listener.js:44 +msgid "Compilation of" msgstr "" -#. lib/commands_launcher.js:30 -msgid "due to a wrong format" +#. lib/time_change_listener/time_change_listener.js:44 +#. lib/commands_launcher/commands_launcher.js:29 +msgid "failed" msgstr "" -#. lib/commands_launcher.js:34 -msgid "due to time expiration" +#. lib/time_change_listener/time_change_listener.js:97 +msgid "the subprocess" msgstr "" -#. lib/commands_launcher.js:37 -msgid "with the following errors" +#. lib/time_change_listener/time_change_listener.js:97 +msgid "wrote on its error output" msgstr "" -#. lib/twilights_calculator.js:24 +#. lib/twilights_calculator/twilights_calculator.js:22 msgid "unable to calculate twilight times, check coordinates format or range" msgstr "" "kan de schemeringstijden niet berekenen, controleer het coördinatenformaat " "of het bereik" -#. lib/time_change_listener/time_change_listener.js:27 -msgid "" -"Missing dependencies `make` and `gcc`. Install them, in e.g. on Debian-based " -"system with `sudo apt install build-essential`, then reload the applet (in e." -"g. in restarting Cinnamon)." +#. lib/commands_launcher/commands_launcher.js:29 +msgid "the command" +msgstr "" + +#. lib/commands_launcher/commands_launcher.js:31 +msgid "due to a wrong format" +msgstr "" + +#. lib/commands_launcher/commands_launcher.js:35 +msgid "due to time expiration" +msgstr "" + +#. lib/commands_launcher/commands_launcher.js:38 +msgid "with the following errors" msgstr "" -"Ontbrekende afhankelijkheden `make` en `gcc`. Installeer ze, bv. op een " -"Debian-gebaseerd systeem met `sudo apt install build-essential`, en herlaad " -"vervolgens de applet (bv. door Cinnamon opnieuw op te starten)." #. metadata.json->name msgid "Automatic dark/light themes" diff --git a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/settings-schema.json b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/settings-schema.json index 7f11f9be6bb..751d2dc1347 100644 --- a/auto-dark-light@gihaume/files/auto-dark-light@gihaume/settings-schema.json +++ b/auto-dark-light@gihaume/files/auto-dark-light@gihaume/settings-schema.json @@ -288,7 +288,7 @@ "type" : "list", "columns" : [ {"id": "name", "title": "Name", "type": "string", "default": "unnamed"}, - {"id": "active", "title": "Active", "type": "boolean", "defaut": true}, + {"id": "active", "title": "Active", "type": "boolean", "default": true}, {"id": "expiry", "title": "Expiry (s)", "type": "integer", "align": 1, "default": 10, "min": 0, "max": 1000}, {"id": "command", "title": "Command", "type": "string"} ], @@ -392,7 +392,7 @@ "type" : "list", "columns" : [ {"id": "name", "title": "Name", "type": "string", "default": "unnamed"}, - {"id": "active", "title": "Active", "type": "boolean", "defaut": true}, + {"id": "active", "title": "Active", "type": "boolean", "default": true}, {"id": "expiry", "title": "Expiry (s)", "type": "integer", "align": 1, "default": 10, "min": 0, "max": 1000}, {"id": "command", "title": "Command", "type": "string"} ],