From 338c80d5c97ebe5a5d98c75fda82865d4c084a8c Mon Sep 17 00:00:00 2001 From: Alix ANNERAUD Date: Wed, 11 Feb 2026 23:05:03 +0100 Subject: [PATCH 01/11] replace PO file handling with JSON for translations --- .../internationalization/macros/Cargo.toml | 1 + .../internationalization/macros/src/file.rs | 26 -- .../internationalization/macros/src/lib.rs | 84 +++--- .../internationalization/macros/src/parse.rs | 240 ------------------ 4 files changed, 43 insertions(+), 308 deletions(-) delete mode 100644 modules/internationalization/macros/src/file.rs delete mode 100644 modules/internationalization/macros/src/parse.rs diff --git a/modules/internationalization/macros/Cargo.toml b/modules/internationalization/macros/Cargo.toml index fa316cbe..2436a22b 100644 --- a/modules/internationalization/macros/Cargo.toml +++ b/modules/internationalization/macros/Cargo.toml @@ -9,6 +9,7 @@ quote = { workspace = true } proc-macro2 = { workspace = true } regex = { workspace = true } once_cell = "1.21" +serde_json = "1.0" [lib] proc-macro = true diff --git a/modules/internationalization/macros/src/file.rs b/modules/internationalization/macros/src/file.rs deleted file mode 100644 index 6b2cef93..00000000 --- a/modules/internationalization/macros/src/file.rs +++ /dev/null @@ -1,26 +0,0 @@ -use std::{ - fs::{self, DirEntry}, - io::Result, -}; - -pub fn filter_files(entry: Result) -> Option { - let path = match entry { - Ok(e) => e.path(), - Err(err) => { - eprintln!("Failed to read directory entry: {}", err); - return None; - } - }; - - if path.extension().and_then(|s| s.to_str()) != Some("po") { - return None; - } - - match fs::read_to_string(&path) { - Ok(content) => Some(content), - Err(err) => { - eprintln!("Failed to open PO file {:?}: {}", path, err); - None - } - } -} diff --git a/modules/internationalization/macros/src/lib.rs b/modules/internationalization/macros/src/lib.rs index 09a0da2f..f6dae684 100644 --- a/modules/internationalization/macros/src/lib.rs +++ b/modules/internationalization/macros/src/lib.rs @@ -1,14 +1,9 @@ -mod file; -mod parse; - use std::{collections::HashMap, fs}; use once_cell::sync::Lazy; use proc_macro::TokenStream; use quote::quote; -use crate::{file::filter_files, parse::PoParser}; - static TRANSLATION_MAP: Lazy> = Lazy::new(|| { let path = std::env::var("CARGO_MANIFEST_DIR") .map(std::path::PathBuf::from) @@ -20,50 +15,55 @@ static TRANSLATION_MAP: Lazy> = Lazy::new(|| { let path = path.canonicalize().expect("Failed to canonicalize path"); - let locale_directory_path = path.join(locale.to_lowercase()); - - let po_files = fs::read_dir(&locale_directory_path) - .expect("Failed to read locale directory") - .filter_map(filter_files); - let mut generated_items = HashMap::new(); - po_files.for_each(|content| { - PoParser::new(&content).for_each(|res| match res { - Ok((msgid, msgstr)) => { - if !msgstr.is_empty() { - generated_items.insert(msgid, msgstr); + // Load locale file + let locale_file_path = path.join(format!("{}.json", locale.to_lowercase())); + if locale_file_path.exists() { + match fs::read_to_string(&locale_file_path) { + Ok(content) => match serde_json::from_str::>(&content) { + Ok(translations) => { + for (key, value) in translations { + if !value.is_empty() { + generated_items.insert(key, value); + } + } } - } + Err(e) => { + eprintln!("Error parsing JSON file {:?}: {}", locale_file_path, e); + } + }, Err(e) => { - eprintln!("Error parsing PO file: {}", e); - } - }); - }); - - let fallback_directory_path = path.join(fallback.to_lowercase()); - - // open file - let po_files = fs::read_dir(&fallback_directory_path) - .map_err(|err| { - format!( - "Failed to read fallback locale directory {:?}: {}", - &fallback_directory_path, err - ) - }) - .expect("Failed to read fallback locale directory") - .filter_map(filter_files); - - po_files.for_each(|content| { - PoParser::new(&content).for_each(|res| match res { - Ok((msgid, msgstr)) => { - generated_items.entry(msgid).or_insert(msgstr); + eprintln!("Failed to read locale file {:?}: {}", locale_file_path, e); } + } + } + + // Load fallback file + let fallback_file_path = path.join(format!("{}.json", fallback.to_lowercase())); + if fallback_file_path.exists() { + match fs::read_to_string(&fallback_file_path) { + Ok(content) => match serde_json::from_str::>(&content) { + Ok(translations) => { + for (key, value) in translations { + generated_items.entry(key).or_insert(value); + } + } + Err(e) => { + eprintln!( + "Error parsing fallback JSON file {:?}: {}", + fallback_file_path, e + ); + } + }, Err(e) => { - eprintln!("Error parsing PO file: {}", e); + eprintln!( + "Failed to read fallback locale file {:?}: {}", + fallback_file_path, e + ); } - }); - }); + } + } generated_items }); diff --git a/modules/internationalization/macros/src/parse.rs b/modules/internationalization/macros/src/parse.rs deleted file mode 100644 index feaff7b3..00000000 --- a/modules/internationalization/macros/src/parse.rs +++ /dev/null @@ -1,240 +0,0 @@ -/// A PO (Portable Object) file parser that yields (msgid, msgstr) pairs -pub struct PoParser<'a> { - lines: std::iter::Peekable>, -} - -impl<'a> PoParser<'a> { - /// Create a new PO parser from a string slice - pub fn new(content: &'a str) -> Self { - Self { - lines: content.lines().peekable(), - } - } - - /// Parse a multi-line string value (msgid or msgstr) - fn parse_string_value(&mut self, first_line: &str) -> Result { - let mut result = String::new(); - - // Extract the initial quoted string from the first line - if let Some(quoted) = extract_quoted_string(first_line) { - result.push_str("ed); - } - - // Continue reading continuation lines - while let Some(line) = self.lines.peek() { - let trimmed = line.trim(); - if trimmed.starts_with('"') { - // It's a continuation line, consume it - self.lines.next(); - if let Some(quoted) = extract_quoted_string(trimmed) { - result.push_str("ed); - } - } else { - // Not a continuation line, stop - break; - } - } - - Ok(result) - } -} - -impl<'a> Iterator for PoParser<'a> { - type Item = Result<(String, String), String>; - - fn next(&mut self) -> Option { - loop { - // Read next line - let line = match self.lines.next() { - Some(l) => l.trim(), - None => return None, // EOF - }; - - // Skip empty lines and comments - if line.is_empty() || line.starts_with('#') { - continue; - } - - // Look for msgid - if let Some(identifier) = line.strip_prefix("msgid ") { - let msgid = match self.parse_string_value(identifier) { - Ok(s) => s, - Err(e) => return Some(Err(e)), - }; - - // Now look for the corresponding msgstr - loop { - let line = match self.lines.next() { - Some(l) => l.trim(), - None => { - return Some(Err("Expected msgstr after msgid".to_string())); - } - }; - - // Skip empty lines and comments between msgid and msgstr - if line.is_empty() || line.starts_with('#') { - continue; - } - - if let Some(value) = line.strip_prefix("msgstr ") { - let msgstr = match self.parse_string_value(value) { - Ok(s) => s, - Err(e) => return Some(Err(e)), - }; - - // Skip empty msgid (file header) - if msgid.is_empty() { - break; - } - - return Some(Ok((msgid, msgstr))); - } else { - return Some(Err(format!("Expected msgstr, found: {}", line))); - } - } - } - } - } -} - -/// Extract a quoted string, handling escape sequences -fn extract_quoted_string(line: &str) -> Option { - let line = line.trim(); - - if !line.starts_with('"') { - return None; - } - - let mut result = String::new(); - let chars = line[1..].chars(); - let mut escaped = false; - - for char in chars { - if escaped { - match char { - 'n' => result.push('\n'), - 't' => result.push('\t'), - 'r' => result.push('\r'), - '\\' => result.push('\\'), - '"' => result.push('"'), - _ => { - result.push('\\'); - result.push(char); - } - } - escaped = false; - } else if char == '\\' { - escaped = true; - } else if char == '"' { - // End of string - return Some(result); - } else { - result.push(char); - } - } - - // If we get here, the string wasn't properly closed - Some(result) -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_simple_po_entry() { - let po_content = r#" -msgid "hello" -msgstr "bonjour" - -msgid "world" -msgstr "monde" -"#; - let parser = PoParser::new(po_content); - - let entries: Vec<_> = parser.collect::, _>>().unwrap(); - - assert_eq!(entries.len(), 2); - assert_eq!(entries[0], ("hello".to_string(), "bonjour".to_string())); - assert_eq!(entries[1], ("world".to_string(), "monde".to_string())); - } - - #[test] - fn test_multiline_po_entry() { - let po_content = r#" -msgid "This is a " -"multiline string" -msgstr "Ceci est une " -"chaîne multiligne" -"#; - let parser = PoParser::new(po_content); - - let entries: Vec<_> = parser.collect::, _>>().unwrap(); - - assert_eq!(entries.len(), 1); - assert_eq!( - entries[0], - ( - "This is a multiline string".to_string(), - "Ceci est une chaîne multiligne".to_string() - ) - ); - } - - #[test] - fn test_with_comments() { - let po_content = r#" -# This is a comment -msgid "test" -msgstr "essai" - -# Another comment -msgid "example" -msgstr "exemple" -"#; - let parser = PoParser::new(po_content); - - let entries: Vec<_> = parser.collect::, _>>().unwrap(); - - assert_eq!(entries.len(), 2); - assert_eq!(entries[0], ("test".to_string(), "essai".to_string())); - assert_eq!(entries[1], ("example".to_string(), "exemple".to_string())); - } - - #[test] - fn test_escape_sequences() { - let po_content = r#" -msgid "Line 1\nLine 2" -msgstr "Ligne 1\nLigne 2" -"#; - let parser = PoParser::new(po_content); - - let entries: Vec<_> = parser.collect::, _>>().unwrap(); - - assert_eq!(entries.len(), 1); - assert_eq!( - entries[0], - ("Line 1\nLine 2".to_string(), "Ligne 1\nLigne 2".to_string()) - ); - } - - #[test] - fn test_empty_msgid_header_skipped() { - let po_content = r#" -msgid "" -msgstr "Project-Id-Version: 1.0\n" - -msgid "real_entry" -msgstr "vraie_entrée" -"#; - let parser = PoParser::new(po_content); - - let entries: Vec<_> = parser.collect::, _>>().unwrap(); - - assert_eq!(entries.len(), 1); - assert_eq!( - entries[0], - ("real_entry".to_string(), "vraie_entrée".to_string()) - ); - } -} From 68feaf54acc769d747905ad4b74eafdb7bc791d9 Mon Sep 17 00:00:00 2001 From: Alix ANNERAUD Date: Wed, 11 Feb 2026 23:05:16 +0100 Subject: [PATCH 02/11] replace PO files with JSON for translations in English and French --- executables/settings/locales/en.json | 44 ++++++ executables/settings/locales/en/messages.po | 151 -------------------- executables/settings/locales/fr.json | 44 ++++++ executables/settings/locales/fr/messages.po | 151 -------------------- executables/settings/locales/messages.pot | 151 -------------------- 5 files changed, 88 insertions(+), 453 deletions(-) create mode 100644 executables/settings/locales/en.json delete mode 100644 executables/settings/locales/en/messages.po create mode 100644 executables/settings/locales/fr.json delete mode 100644 executables/settings/locales/fr/messages.po delete mode 100644 executables/settings/locales/messages.pot diff --git a/executables/settings/locales/en.json b/executables/settings/locales/en.json new file mode 100644 index 00000000..09c6988d --- /dev/null +++ b/executables/settings/locales/en.json @@ -0,0 +1,44 @@ +{ + "Settings": "Settings", + "Graphics error : {}": "Graphics error : {}", + "File system error: {}": "File system error: {}", + "Virtual file system error: {}": "Virtual file system error: {}", + "Failed to create object": "Failed to create object", + "Failed to get child object": "Failed to get child object", + "Failed to set environment variable: {}": "Failed to set environment variable: {}", + "Invalid UTF-8 string: {}": "Invalid UTF-8 string: {}", + "Failed to set task user: {}": "Failed to set task user: {}", + "Failed to get current task identifier: {}": "Failed to get current task identifier: {}", + "Failed to read directory: {}": "Failed to read directory: {}", + "Failed to open standard file: {}": "Failed to open standard file: {}", + "Null character in string: {}": "Null character in string: {}", + "Failed to create UI element": "Failed to create UI element", + "Authentication failed: {}": "Authentication failed: {}", + "Formatting error": "Formatting error", + "General": "General", + "General settings will be implemented here.": "General settings will be implemented here.", + "Password": "Password", + "Current Password": "Current Password", + "New Password": "New Password", + "Confirm Password": "Confirm Password", + "Change Password": "Change Password", + "About": "About", + "Operating System:": "Operating System:", + "Description:": "Description:", + "Developed by:": "Developed by:", + "License:": "License:", + "Version:": "Version:", + "Locale:": "Locale:", + "Memory:": "Memory:", + "Cancel": "Cancel", + "Apply": "Apply", + "None": "None", + "DHCP": "DHCP", + "Static": "Static", + "Configuration Mode": "Configuration Mode", + "MAC Address": "MAC Address", + "Address": "Address", + "Routes": "Routes", + "Gateway": "Gateway", + "DNS Servers": "DNS Servers" +} diff --git a/executables/settings/locales/en/messages.po b/executables/settings/locales/en/messages.po deleted file mode 100644 index 0259c9f2..00000000 --- a/executables/settings/locales/en/messages.po +++ /dev/null @@ -1,151 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: settings.name -msgid "Settings" -msgstr "Settings" - -#: error.graphics -msgid "Graphics error : {}" -msgstr "Graphics error : {}" - -#: error.file_system -msgid "File system error: {}" -msgstr "File system error: {}" - -#: error.virtual_file_system -msgid "Virtual file system error: {}" -msgstr "Virtual file system error: {}" - -#: error.failed_to_create_object -msgid "Failed to create object" -msgstr "Failed to create object" - -#: error.failed_to_get_child_object -msgid "Failed to get child object" -msgstr "Failed to get child object" - -#: error.failed_to_set_environment_variable -msgid "Failed to set environment variable: {}" -msgstr "Failed to set environment variable: {}" - -#: error.invalid_utf8_string -msgid "Invalid UTF-8 string: {}" -msgstr "Invalid UTF-8 string: {}" - -#: error.failed_to_set_task_user -msgid "Failed to set task user: {}" -msgstr "Failed to set task user: {}" - -#: error.failed_to_get_current_task_identifier -msgid "Failed to get current task identifier: {}" -msgstr "Failed to get current task identifier: {}" - -#: error.failed_to_read_directory -msgid "Failed to read directory: {}" -msgstr "Failed to read directory: {}" - -#: error.failed_to_open_standard_file -msgid "Failed to open standard file: {}" -msgstr "Failed to open standard file: {}" - -#: error.null_character_in_string -msgid "Null character in string: {}" -msgstr "Null character in string: {}" - -#: error.failed_to_create_ui_element -msgid "Failed to create UI element" -msgstr "Failed to create UI element" - -#: error.authentication_failed -msgid "Authentication failed: {}" -msgstr "Authentication failed: {}" - -msgid "Formatting error" -msgstr "Formatting error" - -#: tabs.general.title -msgid "General" -msgstr "General" - -#: tabs.general.message -msgid "General settings will be implemented here." -msgstr "General settings will be implemented here." - -#: tabs.password.title -msgid "Password" -msgstr "Password" - -#: tabs.password.content.current_password -msgid "Current Password" -msgstr "Current Password" - -#: tabs.password.content.new_password -msgid "New Password" -msgstr "New Password" - -#: tabs.password.content.confirm_password -msgid "Confirm Password" -msgstr "Confirm Password" - -#: tabs.password.content.change_password -msgid "Change Password" -msgstr "Change Password" - -msgid "About" -msgstr "About" - -msgid "Operating System:" -msgstr "Operating System:" - -msgid "Description:" -msgstr "Description:" - -msgid "Developed by:" -msgstr "Developed by:" - -msgid "License:" -msgstr "License:" - -msgid "Version:" -msgstr "Version:" - -msgid "Locale:" -msgstr "Locale:" - -msgid "Memory:" -msgstr "Memory:" - -msgid "Cancel" -msgstr "Cancel" - -msgid "Apply" -msgstr "Apply" - -msgid "None" -msgstr "None" - -msgid "DHCP" -msgstr "DHCP" - -msgid "Static" -msgstr "Static" - -msgid "Configuration Mode" -msgstr "Configuration Mode" - -msgid "MAC Address" -msgstr "MAC Address" - -msgid "Address" -msgstr "Address" - -msgid "Routes" -msgstr "Routes" - -msgid "Gateway" -msgstr "Gateway" - -msgid "DNS Servers" -msgstr "DNS Servers" diff --git a/executables/settings/locales/fr.json b/executables/settings/locales/fr.json new file mode 100644 index 00000000..6c11eea1 --- /dev/null +++ b/executables/settings/locales/fr.json @@ -0,0 +1,44 @@ +{ + "Settings": "Réglages", + "Graphics error : {}": "Erreur graphique: {}", + "File system error: {}": "Erreur du système de fichiers: {}", + "Virtual file system error: {}": "Erreur du système de fichiers virtuel: {}", + "Failed to create object": "Échec de la création de l'objet", + "Failed to get child object": "Échec de l'obtention de l'objet enfant", + "Failed to set environment variable: {}": "Échec de la définition de la variable d'environnement: {}", + "Invalid UTF-8 string: {}": "Chaîne UTF-8 invalide : {}", + "Failed to set task user: {}": "Échec de la définition de l'utilisateur de la tâche: {}", + "Failed to get current task identifier: {}": "Échec de l'obtention de l'identifiant de la tâche en cours: {}", + "Failed to read directory: {}": "Échec de la lecture du répertoire: {}", + "Failed to open standard file: {}": "Échec de l'ouverture du fichier standard: {}", + "Null character in string: {}": "Caractère nul dans la chaîne: {}", + "Failed to create UI element": "Échec de la création de l'élément d'interface utilisateur", + "Authentication failed: {}": "Échec de l'authentification: {}", + "Formatting error": "Erreur de formatage", + "General": "Général", + "General settings will be implemented here.": "Les réglages généraux seront implémentés ici.", + "Password": "Mot de passe", + "Current Password": "Mot de passe actuel", + "New Password": "Nouveau mot de passe", + "Confirm Password": "Confirmer le mot de passe", + "Change Password": "Changer le mot de passe", + "About": "À propos", + "Operating System:": "Système d'exploitation :", + "Description:": "Description :", + "Developed by:": "Développé par :", + "License:": "Licence :", + "Version:": "Version :", + "Locale:": "Langue :", + "Memory:": "Mémoire :", + "Cancel": "Annuler", + "Apply": "Appliquer", + "None": "Aucun", + "DHCP": "DHCP", + "Static": "Statique", + "Configuration Mode": "Mode de configuration", + "MAC Address": "Adresse MAC", + "Address": "Adresse", + "Routes": "Routes", + "Gateway": "Passerelle", + "DNS Servers": "Serveurs DNS" +} diff --git a/executables/settings/locales/fr/messages.po b/executables/settings/locales/fr/messages.po deleted file mode 100644 index 10b5b6be..00000000 --- a/executables/settings/locales/fr/messages.po +++ /dev/null @@ -1,151 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: settings.name -msgid "Settings" -msgstr "Réglages" - -#: error.graphics -msgid "Graphics error : {}" -msgstr "Erreur graphique: {}" - -#: error.file_system -msgid "File system error: {}" -msgstr "Erreur du système de fichiers: {}" - -#: error.virtual_file_system -msgid "Virtual file system error: {}" -msgstr "Erreur du système de fichiers virtuel: {}" - -#: error.failed_to_create_object -msgid "Failed to create object" -msgstr "Échec de la création de l'objet" - -#: error.failed_to_get_child_object -msgid "Failed to get child object" -msgstr "Échec de l'obtention de l'objet enfant" - -#: error.failed_to_set_environment_variable -msgid "Failed to set environment variable: {}" -msgstr "Échec de la définition de la variable d'environnement: {}" - -#: error.invalid_utf8_string -msgid "Invalid UTF-8 string: {}" -msgstr "Chaîne UTF-8 invalide : {}" - -#: error.failed_to_set_task_user -msgid "Failed to set task user: {}" -msgstr "Échec de la définition de l'utilisateur de la tâche: {}" - -#: error.failed_to_get_current_task_identifier -msgid "Failed to get current task identifier: {}" -msgstr "Échec de l'obtention de l'identifiant de la tâche en cours: {}" - -#: error.failed_to_read_directory -msgid "Failed to read directory: {}" -msgstr "Échec de la lecture du répertoire: {}" - -#: error.failed_to_open_standard_file -msgid "Failed to open standard file: {}" -msgstr "Échec de l'ouverture du fichier standard: {}" - -#: error.null_character_in_string -msgid "Null character in string: {}" -msgstr "Caractère nul dans la chaîne: {}" - -#: error.failed_to_create_ui_element -msgid "Failed to create UI element" -msgstr "Échec de la création de l'élément d'interface utilisateur" - -#: error.authentication_failed -msgid "Authentication failed: {}" -msgstr "Échec de l'authentification: {}" - -msgid "Formatting error" -msgstr "Erreur de formatage" - -#: tabs.general.title -msgid "General" -msgstr "Général" - -#: tabs.general.message -msgid "General settings will be implemented here." -msgstr "Les réglages généraux seront implémentés ici." - -#: tabs.password.title -msgid "Password" -msgstr "Mot de passe" - -#: tabs.password.content.current_password -msgid "Current Password" -msgstr "Mot de passe actuel" - -#: tabs.password.content.new_password -msgid "New Password" -msgstr "Nouveau mot de passe" - -#: tabs.password.content.confirm_password -msgid "Confirm Password" -msgstr "Confirmer le mot de passe" - -#: tabs.password.content.change_password -msgid "Change Password" -msgstr "Changer le mot de passe" - -msgid "About" -msgstr "À propos" - -msgid "Operating System:" -msgstr "Système d'exploitation :" - -msgid "Description:" -msgstr "Description :" - -msgid "Developed by:" -msgstr "Développé par :" - -msgid "License:" -msgstr "Licence :" - -msgid "Version:" -msgstr "Version :" - -msgid "Locale:" -msgstr "Langue :" - -msgid "Memory:" -msgstr "Mémoire :" - -msgid "Cancel" -msgstr "Annuler" - -msgid "Apply" -msgstr "Appliquer" - -msgid "None" -msgstr "Aucun" - -msgid "DHCP" -msgstr "DHCP" - -msgid "Static" -msgstr "Statique" - -msgid "Configuration Mode" -msgstr "Mode de configuration" - -msgid "MAC Address" -msgstr "Adresse MAC" - -msgid "Address" -msgstr "Adresse" - -msgid "Routes" -msgstr "Routes" - -msgid "Gateway" -msgstr "Passerelle" - -msgid "DNS Servers" -msgstr "Serveurs DNS" diff --git a/executables/settings/locales/messages.pot b/executables/settings/locales/messages.pot deleted file mode 100644 index 192d10d5..00000000 --- a/executables/settings/locales/messages.pot +++ /dev/null @@ -1,151 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: settings.name -msgid "Settings" -msgstr "" - -#: error.graphics -msgid "Graphics error : {}" -msgstr "" - -#: error.file_system -msgid "File system error: {}" -msgstr "" - -#: error.virtual_file_system -msgid "Virtual file system error: {}" -msgstr "" - -#: error.failed_to_create_object -msgid "Failed to create object" -msgstr "" - -#: error.failed_to_get_child_object -msgid "Failed to get child object" -msgstr "" - -#: error.failed_to_set_environment_variable -msgid "Failed to set environment variable: {}" -msgstr "" - -#: error.invalid_utf8_string -msgid "Invalid UTF-8 string: {}" -msgstr "" - -#: error.failed_to_set_task_user -msgid "Failed to set task user: {}" -msgstr "" - -#: error.failed_to_get_current_task_identifier -msgid "Failed to get current task identifier: {}" -msgstr "" - -#: error.failed_to_read_directory -msgid "Failed to read directory: {}" -msgstr "" - -#: error.failed_to_open_standard_file -msgid "Failed to open standard file: {}" -msgstr "" - -#: error.null_character_in_string -msgid "Null character in string: {}" -msgstr "" - -#: error.failed_to_create_ui_element -msgid "Failed to create UI element" -msgstr "" - -#: error.authentication_failed -msgid "Authentication failed: {}" -msgstr "" - -msgid "Formatting error" -msgstr "" - -#: tabs.general.title -msgid "General" -msgstr "" - -#: tabs.general.message -msgid "General settings will be implemented here." -msgstr "" - -#: tabs.password.title -msgid "Password" -msgstr "" - -#: tabs.password.content.current_password -msgid "Current Password" -msgstr "" - -#: tabs.password.content.new_password -msgid "New Password" -msgstr "" - -#: tabs.password.content.confirm_password -msgid "Confirm Password" -msgstr "" - -#: tabs.password.content.change_password -msgid "Change Password" -msgstr "" - -msgid "About" -msgstr "" - -msgid "Operating System:" -msgstr "" - -msgid "Description:" -msgstr "" - -msgid "Developed by:" -msgstr "" - -msgid "License:" -msgstr "" - -msgid "Version:" -msgstr "" - -msgid "Locale:" -msgstr "" - -msgid "Memory:" -msgstr "" - -msgid "Cancel" -msgstr "" - -msgid "Apply" -msgstr "" - -msgid "None" -msgstr "" - -msgid "DHCP" -msgstr "" - -msgid "Static" -msgstr "" - -msgid "Configuration Mode" -msgstr "" - -msgid "MAC Address" -msgstr "" - -msgid "Address" -msgstr "" - -msgid "Routes" -msgstr "" - -msgid "Gateway" -msgstr "" - -msgid "DNS Servers" -msgstr "" From 9d5a5c33d394a676a2132bb0ed7f4397783cd6cf Mon Sep 17 00:00:00 2001 From: Alix ANNERAUD Date: Wed, 11 Feb 2026 23:05:26 +0100 Subject: [PATCH 03/11] replace PO files with JSON for translations in English and French --- .../shell/command_line/locales/en.json | 55 ++++++ .../shell/command_line/locales/en/messages.po | 184 ------------------ .../shell/command_line/locales/fr.json | 55 ++++++ .../shell/command_line/locales/fr/messages.po | 184 ------------------ .../shell/command_line/locales/messages.pot | 184 ------------------ 5 files changed, 110 insertions(+), 552 deletions(-) create mode 100644 executables/shell/command_line/locales/en.json delete mode 100644 executables/shell/command_line/locales/en/messages.po create mode 100644 executables/shell/command_line/locales/fr.json delete mode 100644 executables/shell/command_line/locales/fr/messages.po delete mode 100644 executables/shell/command_line/locales/messages.pot diff --git a/executables/shell/command_line/locales/en.json b/executables/shell/command_line/locales/en.json new file mode 100644 index 00000000..0fa159d5 --- /dev/null +++ b/executables/shell/command_line/locales/en.json @@ -0,0 +1,55 @@ +{ + "Authentication failed: {}": "Authentication failed: {}", + "Failed to set task user: {}": "Failed to set task user: {}", + "Failed to set environment variable: {}": "Failed to set environment variable: {}", + "Failed to tokenize command line": "Failed to tokenize command line", + "Missing file name after redirect out": "Missing file name after redirect out", + "Missing file name after redirect in": "Missing file name after redirect in", + "Missing command": "Missing command", + "Command not found": "Command not found", + "Failed to get task identifier": "Failed to get task identifier", + "Invalid path": "Invalid path", + "Failed to get environment variable": "Failed to get environment variable", + "Failed to execute command": "Failed to execute command", + "Failed to join task": "Failed to join task", + "Invalid number of arguments": "Invalid number of arguments", + "Failed to remove environment variable: {}": "Failed to remove environment variable: {}", + "Failed to join path": "Failed to join path", + "Failed to create directory: {}": "Failed to create directory: {}", + "Failed to remove directory: {}": "Failed to remove directory: {}", + "Failed to open directory: {}": "Failed to open directory: {}", + "Failed to open file: {}": "Failed to open file: {}", + "Option requires a value": "Option requires a value", + "Option does not require a value": "Option does not require a value", + "Invalid argument": "Invalid argument", + "Missing positional argument: {}": "Missing positional argument: {}", + "Invalid option": "Invalid option", + "Failed to get metadata: {}": "Failed to get metadata: {}", + "Failed to set current directory: {}": "Failed to set current directory: {}", + "Failed to read directory entry: {}": "Failed to read directory entry: {}", + "Failed to resolve domain: {}": "Failed to resolve domain: {}", + "Failed to create socket: {}": "Failed to create socket: {}", + "Format error": "Format error", + "Failed to read environment variable: {}": "Failed to read environment variable: {}", + "User name: ": "User name: ", + "Password: ": "Password: ", + "Kind": "Kind", + "Inode": "Inode", + "User": "User", + "Group": "Group", + "Permissions": "Permissions", + "Accessed": "Accessed", + "Modified": "Modified", + "Created": "Created", + "Status": "Status", + "Links": "Links", + "Size": "Size", + "{} record(s) for domain '{}':": "{} record(s) for domain '{}':", + "No {} records found for domain '{}'": "No {} records found for domain '{}'", + "Failed to resolve domain '{}' for {} records: {}": "Failed to resolve domain '{}' for {} records: {}", + "Cannot resolve {}: Unknown host": "Cannot resolve {}: Unknown host", + "PING {} ({}): {} data bytes": "PING {} ({}): {} data bytes", + "{} bytes from {}: icmp_seq={} time={:.2} ms": "{} bytes from {}: icmp_seq={} time={:.2} ms", + "Request timeout for icmp_seq {}": "Request timeout for icmp_seq {}", + "Error: {}": "Error: {}" +} diff --git a/executables/shell/command_line/locales/en/messages.po b/executables/shell/command_line/locales/en/messages.po deleted file mode 100644 index 32c55935..00000000 --- a/executables/shell/command_line/locales/en/messages.po +++ /dev/null @@ -1,184 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: error.authentication_failed -msgid "Authentication failed: {}" -msgstr "Authentication failed: {}" - -#: error.failed_to_set_task_user -msgid "Failed to set task user: {}" -msgstr "Failed to set task user: {}" - -#: error.failed_to_set_environment_variable -msgid "Failed to set environment variable: {}" -msgstr "Failed to set environment variable: {}" - -#: error.failed_to_tokenize_command_line -msgid "Failed to tokenize command line" -msgstr "Failed to tokenize command line" - -#: error.missing_file_name_after_redirect_out -msgid "Missing file name after redirect out" -msgstr "Missing file name after redirect out" - -#: error.missing_file_name_after_redirect_in -msgid "Missing file name after redirect in" -msgstr "Missing file name after redirect in" - -#: error.missing_command -msgid "Missing command" -msgstr "Missing command" - -#: error.command_not_found -msgid "Command not found" -msgstr "Command not found" - -#: error.failed_to_get_task_identifier -msgid "Failed to get task identifier" -msgstr "Failed to get task identifier" - -#: error.invalid_path -msgid "Invalid path" -msgstr "Invalid path" - -#: error.failed_to_get_path -msgid "Failed to get environment variable" -msgstr "Failed to get environment variable" - -#: error.failed_to_execute_command -msgid "Failed to execute command" -msgstr "Failed to execute command" - -#: error.failed_to_join_task -msgid "Failed to join task" -msgstr "Failed to join task" - -#: error.invalid_number_of_arguments -msgid "Invalid number of arguments" -msgstr "Invalid number of arguments" - -#: error.failed_to_remove_environment_variable -msgid "Failed to remove environment variable: {}" -msgstr "Failed to remove environment variable: {}" - -#: error.failed_to_join_path -msgid "Failed to join path" -msgstr "Failed to join path" - -#: error.failed_to_create_directory -msgid "Failed to create directory: {}" -msgstr "Failed to create directory: {}" - -#: error.failed_to_remove_directory -msgid "Failed to remove directory: {}" -msgstr "Failed to remove directory: {}" - -#: error.failed_to_open_directory -msgid "Failed to open directory: {}" -msgstr "Failed to open directory: {}" - -#: error.failed_to_open_file -msgid "Failed to open file: {}" -msgstr "Failed to open file: {}" - -msgid "Option requires a value" -msgstr "Option requires a value" - -msgid "Option does not require a value" -msgstr "Option does not require a value" - -#: error.invalid_argument -msgid "Invalid argument" -msgstr "Invalid argument" - -msgid "Missing positional argument: {}" -msgstr "Missing positional argument: {}" - -msgid "Invalid option" -msgstr "Invalid option" - -#: error.failed_to_get_metadata -msgid "Failed to get metadata: {}" -msgstr "Failed to get metadata: {}" - -msgid "Failed to set current directory: {}" -msgstr "Failed to set current directory: {}" - -msgid "Failed to read directory entry: {}" -msgstr "Failed to read directory entry: {}" - -msgid "Failed to resolve domain: {}" -msgstr "Failed to resolve domain: {}" - -msgid "Failed to create socket: {}" -msgstr "Failed to create socket: {}" - -msgid "Format error" -msgstr "Format error" - -msgid "Failed to read environment variable: {}" -msgstr "Failed to read environment variable: {}" - -msgid "User name: " -msgstr "User name: " - -msgid "Password: " -msgstr "Password: " - -msgid "Kind" -msgstr "Kind" - -msgid "Inode" -msgstr "Inode" - -msgid "User" -msgstr "User" - -msgid "Group" -msgstr "Group" - -msgid "Permissions" -msgstr "Permissions" - -msgid "Accessed" -msgstr "Accessed" - -msgid "Modified" -msgstr "Modified" - -msgid "Created" -msgstr "Created" - -msgid "Status" -msgstr "Status" - -msgid "Links" -msgstr "Links" - -msgid "Size" -msgstr "Size" - -msgid "{} record(s) for domain '{}':" -msgstr "{} record(s) for domain '{}':" - -msgid "No {} records found for domain '{}'" -msgstr "No {} records found for domain '{}'" - -msgid "Failed to resolve domain '{}' for {} records: {}" -msgstr "Failed to resolve domain '{}' for {} records: {}" - -msgid "Cannot resolve {}: Unknown host" -msgstr "Cannot resolve {}: Unknown host" - -msgid "PING {} ({}): {} data bytes" -msgstr "PING {} ({}): {} data bytes" - -msgid "{} bytes from {}: icmp_seq={} time={:.2} ms" -msgstr "{} bytes from {}: icmp_seq={} time={:.2} ms" - -msgid "Request timeout for icmp_seq {}" -msgstr "Request timeout for icmp_seq {}" - -msgid "Error: {}" -msgstr "Error: {}" \ No newline at end of file diff --git a/executables/shell/command_line/locales/fr.json b/executables/shell/command_line/locales/fr.json new file mode 100644 index 00000000..8c090848 --- /dev/null +++ b/executables/shell/command_line/locales/fr.json @@ -0,0 +1,55 @@ +{ + "Authentication failed: {}": "Échec de l'authentification: {}", + "Failed to set task user: {}": "Échec de la définition de l'utilisateur de la tâche: {}", + "Failed to set environment variable: {}": "Échec de la définition de la variable d'environnement: {}", + "Failed to tokenize command line": "Échec de la tokenisation de la ligne de commande", + "Missing file name after redirect out": "Nom de fichier manquant après la redirection de sortie", + "Missing file name after redirect in": "Nom de fichier manquant après la redirection d'entrée", + "Missing command": "Commande manquante", + "Command not found": "Commande introuvable", + "Failed to get task identifier": "Échec de la récupération de l'identifiant de la tâche", + "Invalid path": "Chemin invalide", + "Failed to get environment variable": "Échec de la récupération de la variable d'environnement", + "Failed to execute command": "Échec de l'exécution de la commande", + "Failed to join task": "Échec de la jonction de la tâche", + "Invalid number of arguments": "Nombre d'arguments invalide", + "Failed to remove environment variable: {}": "Échec de la suppression de la variable d'environnement: {}", + "Failed to join path": "Échec de la jonction du chemin", + "Failed to create directory: {}": "Échec de la création du répertoire: {}", + "Failed to remove directory: {}": "Échec de la suppression du répertoire: {}", + "Failed to open directory: {}": "Échec de l'ouverture du répertoire: {}", + "Failed to open file: {}": "Échec de l'ouverture du fichier: {}", + "Option requires a value": "L'option nécessite une valeur", + "Option does not require a value": "L'option ne nécessite pas de valeur", + "Invalid argument": "Argument invalide", + "Missing positional argument: {}": "Argument positionnel manquant: {}", + "Invalid option": "Option invalide", + "Failed to get metadata: {}": "Échec de la récupération des métadonnées: {}", + "Failed to set current directory: {}": "Échec de la définition du répertoire courant: {}", + "Failed to read directory entry: {}": "Échec de la lecture de l'entrée du répertoire: {}", + "Failed to resolve domain: {}": "Échec de la résolution du domaine: {}", + "Failed to create socket: {}": "Échec de la création du socket: {}", + "Format error": "Erreur de formatage", + "Failed to read environment variable: {}": "Échec de la lecture de la variable d'environnement: {}", + "User name: ": "Nom d'utilisateur: ", + "Password: ": "Mot de passe: ", + "Kind": "Type", + "Inode": "Nœud d'index", + "User": "Utilisateur", + "Group": "Groupe", + "Permissions": "Permissions", + "Accessed": "Accédé", + "Modified": "Modifié", + "Created": "Créé", + "Status": "Statut", + "Links": "Liens", + "Size": "Taille", + "{} record(s) for domain '{}':": "Enregistrement(s) {} pour le domaine '{}':", + "No {} records found for domain '{}'": "Aucun enregistrement {} trouvé pour le domaine '{}'", + "Failed to resolve domain '{}' for {} records: {}": "Échec de la résolution du domaine '{}' pour les enregistrements {}: {}", + "Cannot resolve {}: Unknown host": "Impossible de résoudre {}: Hôte inconnu", + "PING {} ({}): {} data bytes": "PING {} ({}): {} octets de données", + "{} bytes from {}: icmp_seq={} time={:.2} ms": "{} octets de {}: icmp_seq={} temps={:.2} ms", + "Request timeout for icmp_seq {}": "Délai d'attente dépassé pour icmp_seq {}", + "Error: {}": "Erreur: {}" +} diff --git a/executables/shell/command_line/locales/fr/messages.po b/executables/shell/command_line/locales/fr/messages.po deleted file mode 100644 index 53732da2..00000000 --- a/executables/shell/command_line/locales/fr/messages.po +++ /dev/null @@ -1,184 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: error.authentication_failed -msgid "Authentication failed: {}" -msgstr "Échec de l'authentification: {}" - -#: error.failed_to_set_task_user -msgid "Failed to set task user: {}" -msgstr "Échec de la définition de l'utilisateur de la tâche: {}" - -#: error.failed_to_set_environment_variable -msgid "Failed to set environment variable: {}" -msgstr "Échec de la définition de la variable d'environnement: {}" - -#: error.failed_to_tokenize_command_line -msgid "Failed to tokenize command line" -msgstr "Échec de la tokenisation de la ligne de commande" - -#: error.missing_file_name_after_redirect_out -msgid "Missing file name after redirect out" -msgstr "Nom de fichier manquant après la redirection de sortie" - -#: error.missing_file_name_after_redirect_in -msgid "Missing file name after redirect in" -msgstr "Nom de fichier manquant après la redirection d'entrée" - -#: error.missing_command -msgid "Missing command" -msgstr "Commande manquante" - -#: error.command_not_found -msgid "Command not found" -msgstr "Commande introuvable" - -#: error.failed_to_get_task_identifier -msgid "Failed to get task identifier" -msgstr "Échec de la récupération de l'identifiant de la tâche" - -#: error.invalid_path -msgid "Invalid path" -msgstr "Chemin invalide" - -#: error.failed_to_get_path -msgid "Failed to get environment variable" -msgstr "Échec de la récupération de la variable d'environnement" - -#: error.failed_to_execute_command -msgid "Failed to execute command" -msgstr "Échec de l'exécution de la commande" - -#: error.failed_to_join_task -msgid "Failed to join task" -msgstr "Échec de la jonction de la tâche" - -#: error.invalid_number_of_arguments -msgid "Invalid number of arguments" -msgstr "Nombre d'arguments invalide" - -#: error.failed_to_remove_environment_variable -msgid "Failed to remove environment variable: {}" -msgstr "Échec de la suppression de la variable d'environnement: {}" - -#: error.failed_to_join_path -msgid "Failed to join path" -msgstr "Échec de la jonction du chemin" - -#: error.failed_to_create_directory -msgid "Failed to create directory: {}" -msgstr "Échec de la création du répertoire: {}" - -#: error.failed_to_remove_directory -msgid "Failed to remove directory: {}" -msgstr "Échec de la suppression du répertoire: {}" - -#: error.failed_to_open_directory -msgid "Failed to open directory: {}" -msgstr "Échec de l'ouverture du répertoire: {}" - -#: error.failed_to_open_file -msgid "Failed to open file: {}" -msgstr "Échec de l'ouverture du fichier: {}" - -msgid "Option requires a value" -msgstr "L'option nécessite une valeur" - -msgid "Option does not require a value" -msgstr "L'option ne nécessite pas de valeur" - -#: error.invalid_argument -msgid "Invalid argument" -msgstr "Argument invalide" - -msgid "Missing positional argument: {}" -msgstr "Argument positionnel manquant: {}" - -msgid "Invalid option" -msgstr "Option invalide" - -#: error.failed_to_get_metadata -msgid "Failed to get metadata: {}" -msgstr "Échec de la récupération des métadonnées: {}" - -msgid "Failed to set current directory: {}" -msgstr "Échec de la définition du répertoire courant: {}" - -msgid "Failed to read directory entry: {}" -msgstr "Échec de la lecture de l'entrée du répertoire: {}" - -msgid "Failed to resolve domain: {}" -msgstr "Échec de la résolution du domaine: {}" - -msgid "Failed to create socket: {}" -msgstr "Échec de la création du socket: {}" - -msgid "Format error" -msgstr "Erreur de formatage" - -msgid "Failed to read environment variable: {}" -msgstr "Échec de la lecture de la variable d'environnement: {}" - -msgid "User name: " -msgstr "Nom d'utilisateur: " - -msgid "Password: " -msgstr "Mot de passe: " - -msgid "Kind" -msgstr "Type" - -msgid "Inode" -msgstr "Nœud d'index" - -msgid "User" -msgstr "Utilisateur" - -msgid "Group" -msgstr "Groupe" - -msgid "Permissions" -msgstr "Permissions" - -msgid "Accessed" -msgstr "Accédé" - -msgid "Modified" -msgstr "Modifié" - -msgid "Created" -msgstr "Créé" - -msgid "Status" -msgstr "Statut" - -msgid "Links" -msgstr "Liens" - -msgid "Size" -msgstr "Taille" - -msgid "{} record(s) for domain '{}':" -msgstr "Enregistrement(s) {} pour le domaine '{}':" - -msgid "No {} records found for domain '{}'" -msgstr "Aucun enregistrement {} trouvé pour le domaine '{}'" - -msgid "Failed to resolve domain '{}' for {} records: {}" -msgstr "Échec de la résolution du domaine '{}' pour les enregistrements {}: {}" - -msgid "Cannot resolve {}: Unknown host" -msgstr "Impossible de résoudre {}: Hôte inconnu" - -msgid "PING {} ({}): {} data bytes" -msgstr "PING {} ({}): {} octets de données" - -msgid "{} bytes from {}: icmp_seq={} time={:.2} ms" -msgstr "{} octets de {}: icmp_seq={} temps={:.2} ms" - -msgid "Request timeout for icmp_seq {}" -msgstr "Délai d'attente dépassé pour icmp_seq {}" - -msgid "Error: {}" -msgstr "Erreur: {}" diff --git a/executables/shell/command_line/locales/messages.pot b/executables/shell/command_line/locales/messages.pot deleted file mode 100644 index ae198a69..00000000 --- a/executables/shell/command_line/locales/messages.pot +++ /dev/null @@ -1,184 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: error.authentication_failed -msgid "Authentication failed: {}" -msgstr "" - -#: error.failed_to_set_task_user -msgid "Failed to set task user: {}" -msgstr "" - -#: error.failed_to_set_environment_variable -msgid "Failed to set environment variable: {}" -msgstr "" - -#: error.failed_to_tokenize_command_line -msgid "Failed to tokenize command line" -msgstr "" - -#: error.missing_file_name_after_redirect_out -msgid "Missing file name after redirect out" -msgstr "" - -#: error.missing_file_name_after_redirect_in -msgid "Missing file name after redirect in" -msgstr "" - -#: error.missing_command -msgid "Missing command" -msgstr "" - -#: error.command_not_found -msgid "Command not found" -msgstr "" - -#: error.failed_to_get_task_identifier -msgid "Failed to get task identifier" -msgstr "" - -#: error.invalid_path -msgid "Invalid path" -msgstr "" - -#: error.failed_to_get_path -msgid "Failed to get environment variable" -msgstr "" - -#: error.failed_to_execute_command -msgid "Failed to execute command" -msgstr "" - -#: error.failed_to_join_task -msgid "Failed to join task" -msgstr "" - -#: error.invalid_number_of_arguments -msgid "Invalid number of arguments" -msgstr "" - -#: error.failed_to_remove_environment_variable -msgid "Failed to remove environment variable: {}" -msgstr "" - -#: error.failed_to_join_path -msgid "Failed to join path" -msgstr "" - -#: error.failed_to_create_directory -msgid "Failed to create directory: {}" -msgstr "" - -#: error.failed_to_remove_directory -msgid "Failed to remove directory: {}" -msgstr "" - -#: error.failed_to_open_directory -msgid "Failed to open directory: {}" -msgstr "" - -#: error.failed_to_open_file -msgid "Failed to open file: {}" -msgstr "" - -msgid "Option requires a value" -msgstr "" - -msgid "Option does not require a value" -msgstr "" - -#: error.invalid_argument -msgid "Invalid argument" -msgstr "" - -msgid "Missing positional argument: {}" -msgstr "" - -msgid "Invalid option" -msgstr "" - -#: error.failed_to_get_metadata -msgid "Failed to get metadata: {}" -msgstr "" - -msgid "Failed to set current directory: {}" -msgstr "" - -msgid "Failed to read directory entry: {}" -msgstr "" - -msgid "Failed to resolve domain: {}" -msgstr "" - -msgid "Failed to create socket: {}" -msgstr "" - -msgid "Format error" -msgstr "" - -msgid "Failed to read environment variable: {}" -msgstr "" - -msgid "User name: " -msgstr "" - -msgid "Password: " -msgstr "" - -msgid "Kind" -msgstr "" - -msgid "Inode" -msgstr "" - -msgid "User" -msgstr "" - -msgid "Group" -msgstr "" - -msgid "Permissions" -msgstr "" - -msgid "Accessed" -msgstr "" - -msgid "Modified" -msgstr "" - -msgid "Created" -msgstr "" - -msgid "Status" -msgstr "" - -msgid "Links" -msgstr "" - -msgid "Size" -msgstr "" - -msgid "{} record(s) for domain '{}':" -msgstr "" - -msgid "No {} records found for domain '{}'" -msgstr "" - -msgid "Failed to resolve domain '{}' for {} records: {}" -msgstr "" - -msgid "Cannot resolve {}: Unknown host" -msgstr "" - -msgid "PING {} ({}): {} data bytes" -msgstr "" - -msgid "{} bytes from {}: icmp_seq={} time={:.2} ms" -msgstr "" - -msgid "Request timeout for icmp_seq {}" -msgstr "" - -msgid "Error: {}" -msgstr "" \ No newline at end of file From cd011135e3ccc0addf24bb9c077d8e785e98a886 Mon Sep 17 00:00:00 2001 From: Alix ANNERAUD Date: Wed, 11 Feb 2026 23:05:33 +0100 Subject: [PATCH 04/11] replace PO files with JSON for translations in English and French --- executables/shell/graphical/locales/en.json | 23 +++++ .../shell/graphical/locales/en/messages.po | 86 ------------------- executables/shell/graphical/locales/fr.json | 23 +++++ .../shell/graphical/locales/fr/messages.po | 78 ----------------- .../shell/graphical/locales/messages.pot | 86 ------------------- 5 files changed, 46 insertions(+), 250 deletions(-) create mode 100644 executables/shell/graphical/locales/en.json delete mode 100644 executables/shell/graphical/locales/en/messages.po create mode 100644 executables/shell/graphical/locales/fr.json delete mode 100644 executables/shell/graphical/locales/fr/messages.po delete mode 100644 executables/shell/graphical/locales/messages.pot diff --git a/executables/shell/graphical/locales/en.json b/executables/shell/graphical/locales/en.json new file mode 100644 index 00000000..f4fe71c2 --- /dev/null +++ b/executables/shell/graphical/locales/en.json @@ -0,0 +1,23 @@ +{ + "Graphics error: {}": "Graphics error: {}", + "Failed to create object": "Failed to create object", + "Failed to get child": "Failed to get child", + "Failed to set environment variable: {}": "Failed to set environment variable: {}", + "Invalid UTF-8: {}": "Invalid UTF-8: {}", + "Authentication failed: {}": "Authentication failed: {}", + "Failed to set task user: {}": "Failed to set task user: {}", + "Failed to deserialize shortcut: {}": "Failed to deserialize shortcut: {}", + "Failed to get current task identifier: {}": "Failed to get current task identifier: {}", + "Failed to read shortcut directory: {}": "Failed to read shortcut directory: {}", + "Failed to get shortcut file path": "Failed to get shortcut file path", + "Failed to read shortcut file: {}": "Failed to read shortcut file: {}", + "Failed to open standard file: {}": "Failed to open standard file: {}", + "Failed to execute shortcut: {}": "Failed to execute shortcut: {}", + "Null character in string: {}": "Null character in string: {}", + "Missing arguments": "Missing arguments", + "Failed to add shortcut: {}": "Failed to add shortcut: {}", + "Failed to open directory: {}": "Failed to open directory: {}", + "User name": "User name", + "Password": "Password", + "Login": "Login" +} diff --git a/executables/shell/graphical/locales/en/messages.po b/executables/shell/graphical/locales/en/messages.po deleted file mode 100644 index 112732ec..00000000 --- a/executables/shell/graphical/locales/en/messages.po +++ /dev/null @@ -1,86 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: error.graphics -msgid "Graphics error: {}" -msgstr "Graphics error: {}" - -#: error.failed_to_create_object -msgid "Failed to create object" -msgstr "Failed to create object" - -#: error.failed_to_get_child -msgid "Failed to get child" -msgstr "Failed to get child" - -#: error.failed_to_set_environment_variable -msgid "Failed to set environment variable: {}" -msgstr "Failed to set environment variable: {}" - -#: error.invalid_utf8 -msgid "Invalid UTF-8: {}" -msgstr "Invalid UTF-8: {}" - -#: error.authentication_failed -msgid "Authentication failed: {}" -msgstr "Authentication failed: {}" - -#: error.failed_to_set_task_user -msgid "Failed to set task user: {}" -msgstr "Failed to set task user: {}" - -#: error.failed_to_deserialize_shortcut -msgid "Failed to deserialize shortcut: {}" -msgstr "Failed to deserialize shortcut: {}" - -#: error.failed_to_get_current_task_identifier -msgid "Failed to get current task identifier: {}" -msgstr "Failed to get current task identifier: {}" - -#: error.failed_to_read_shortcut_directory -msgid "Failed to read shortcut directory: {}" -msgstr "Failed to read shortcut directory: {}" - -#: error.failed_to_get_shortcut_file_path -msgid "Failed to get shortcut file path" -msgstr "Failed to get shortcut file path" - -#: error.failed_to_read_shortcut_file -msgid "Failed to read shortcut file: {}" -msgstr "Failed to read shortcut file: {}" - -#: error.failed_to_open_standard_file -msgid "Failed to open standard file: {}" -msgstr "Failed to open standard file: {}" - -#: error.failed_to_execute_shortcut -msgid "Failed to execute shortcut: {}" -msgstr "Failed to execute shortcut: {}" - -#: error.null_character_in_string -msgid "Null character in string: {}" -msgstr "Null character in string: {}" - -#: error.missing_arguments -msgid "Missing arguments" -msgstr "Missing arguments" - -#: error.failed_to_add_shortcut -msgid "Failed to add shortcut: {}" -msgstr "Failed to add shortcut: {}" - -msgid "Failed to open directory: {}" -msgstr "Failed to open directory: {}" - -#: login.user_name -msgid "User name" -msgstr "User name" - -#: login.password -msgid "Password" -msgstr "Password" - -#: login.login -msgid "Login" -msgstr "Login" diff --git a/executables/shell/graphical/locales/fr.json b/executables/shell/graphical/locales/fr.json new file mode 100644 index 00000000..621f2c67 --- /dev/null +++ b/executables/shell/graphical/locales/fr.json @@ -0,0 +1,23 @@ +{ + "Graphics error: {}": "Erreur graphique: {}", + "Failed to create object": "Échec de la création de l'objet", + "Failed to get child": "Échec de la récupération de l'enfant", + "Failed to set environment variable: {}": "Échec de la définition de la variable d'environnement: {}", + "Invalid UTF-8: {}": "UTF-8 invalide: {}", + "Authentication failed: {}": "Échec de l'authentification: {}", + "Failed to set task user: {}": "Échec de la définition de l'utilisateur de la tâche: {}", + "Failed to deserialize shortcut: {}": "Échec de la désérialisation du raccourci: {}", + "Failed to get current task identifier: {}": "Échec de la récupération de l'identifiant de la tâche actuelle: {}", + "Failed to read shortcut directory: {}": "Échec de la lecture du répertoire de raccourcis: {}", + "Failed to get shortcut file path": "Échec de la récupération du chemin du fichier de raccourci", + "Failed to read shortcut file: {}": "Échec de la lecture du fichier de raccourci: {}", + "Failed to open standard file: {}": "Échec de l'ouverture du fichier standard: {}", + "Failed to execute shortcut: {}": "Échec de l'exécution du raccourci: {}", + "Null character in string: {}": "Caractère nul dans la chaîne: {}", + "Missing arguments": "Arguments manquants", + "Failed to add shortcut: {}": "Échec de l'ajout du raccourci: {}", + "Failed to open directory: {}": "Échec de l'ouverture du répertoire: {}", + "User name": "Nom d'utilisateur", + "Password": "Mot de passe", + "Login": "Se connecter" +} diff --git a/executables/shell/graphical/locales/fr/messages.po b/executables/shell/graphical/locales/fr/messages.po deleted file mode 100644 index df66d366..00000000 --- a/executables/shell/graphical/locales/fr/messages.po +++ /dev/null @@ -1,78 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -msgid "Graphics error: {}" -msgstr "Erreur graphique: {}" - -msgid "Failed to create object" -msgstr "Échec de la création de l'objet" - -msgid "Failed to get child" -msgstr "Échec de la récupération de l'enfant" - -msgid "Failed to set environment variable: {}" -msgstr "Échec de la définition de la variable d'environnement: {}" - -msgid "Invalid UTF-8: {}" -msgstr "UTF-8 invalide: {}" - -msgid "Authentication failed: {}" -msgstr "Échec de l'authentification: {}" - -msgid "Failed to set task user: {}" -msgstr "Échec de la définition de l'utilisateur de la tâche: {}" - -msgid "Failed to deserialize shortcut: {}" -msgstr "Échec de la désérialisation du raccourci: {}" - -#: error.failed_to_get_current_task_identifier -msgid "Failed to get current task identifier: {}" -msgstr "Échec de la récupération de l'identifiant de la tâche actuelle: {}" - -#: error.failed_to_read_shortcut_directory -msgid "Failed to read shortcut directory: {}" -msgstr "Échec de la lecture du répertoire de raccourcis: {}" - -#: error.failed_to_get_shortcut_file_path -msgid "Failed to get shortcut file path" -msgstr "Échec de la récupération du chemin du fichier de raccourci" - -#: error.failed_to_read_shortcut_file -msgid "Failed to read shortcut file: {}" -msgstr "Échec de la lecture du fichier de raccourci: {}" - -#: error.failed_to_open_standard_file -msgid "Failed to open standard file: {}" -msgstr "Échec de l'ouverture du fichier standard: {}" - -#: error.failed_to_execute_shortcut -msgid "Failed to execute shortcut: {}" -msgstr "Échec de l'exécution du raccourci: {}" - -#: error.null_character_in_string -msgid "Null character in string: {}" -msgstr "Caractère nul dans la chaîne: {}" - -#: error.missing_arguments -msgid "Missing arguments" -msgstr "Arguments manquants" - -#: error.failed_to_add_shortcut -msgid "Failed to add shortcut: {}" -msgstr "Échec de l'ajout du raccourci: {}" - -msgid "Failed to open directory: {}" -msgstr "Échec de l'ouverture du répertoire: {}" - -#: login.user_name -msgid "User name" -msgstr "Nom d'utilisateur" - -#: login.password -msgid "Password" -msgstr "Mot de passe" - -#: login.login -msgid "Login" -msgstr "Se connecter" diff --git a/executables/shell/graphical/locales/messages.pot b/executables/shell/graphical/locales/messages.pot deleted file mode 100644 index 2b6e921c..00000000 --- a/executables/shell/graphical/locales/messages.pot +++ /dev/null @@ -1,86 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: error.graphics -msgid "Graphics error: {}" -msgstr "" - -#: error.failed_to_create_object -msgid "Failed to create object" -msgstr "" - -#: error.failed_to_get_child -msgid "Failed to get child" -msgstr "" - -#: error.failed_to_set_environment_variable -msgid "Failed to set environment variable: {}" -msgstr "" - -#: error.invalid_utf8 -msgid "Invalid UTF-8: {}" -msgstr "" - -#: error.authentication_failed -msgid "Authentication failed: {}" -msgstr "" - -#: error.failed_to_set_task_user -msgid "Failed to set task user: {}" -msgstr "" - -#: error.failed_to_deserialize_shortcut -msgid "Failed to deserialize shortcut: {}" -msgstr "" - -#: error.failed_to_get_current_task_identifier -msgid "Failed to get current task identifier: {}" -msgstr "" - -#: error.failed_to_read_shortcut_directory -msgid "Failed to read shortcut directory: {}" -msgstr "" - -#: error.failed_to_get_shortcut_file_path -msgid "Failed to get shortcut file path" -msgstr "" - -#: error.failed_to_read_shortcut_file -msgid "Failed to read shortcut file: {}" -msgstr "" - -#: error.failed_to_open_standard_file -msgid "Failed to open standard file: {}" -msgstr "" - -#: error.failed_to_execute_shortcut -msgid "Failed to execute shortcut: {}" -msgstr "" - -#: error.null_character_in_string -msgid "Null character in string: {}" -msgstr "" - -#: error.missing_arguments -msgid "Missing arguments" -msgstr "" - -#: error.failed_to_add_shortcut -msgid "Failed to add shortcut: {}" -msgstr "" - -msgid "Failed to open directory: {}" -msgstr "" - -#: login.user_name -msgid "User name" -msgstr "" - -#: login.password -msgid "Password" -msgstr "" - -#: login.login -msgid "Login" -msgstr "" From d6e4fd950e4acd307a902b62832d441849f53d0d Mon Sep 17 00:00:00 2001 From: Alix ANNERAUD Date: Wed, 11 Feb 2026 23:05:38 +0100 Subject: [PATCH 05/11] replace PO files with JSON for translations in English and French --- executables/terminal/locales/en.json | 9 ++++++ executables/terminal/locales/en/messages.po | 31 --------------------- executables/terminal/locales/fr.json | 9 ++++++ executables/terminal/locales/fr/messages.po | 31 --------------------- executables/terminal/locales/messages.pot | 31 --------------------- 5 files changed, 18 insertions(+), 93 deletions(-) create mode 100644 executables/terminal/locales/en.json delete mode 100644 executables/terminal/locales/en/messages.po create mode 100644 executables/terminal/locales/fr.json delete mode 100644 executables/terminal/locales/fr/messages.po delete mode 100644 executables/terminal/locales/messages.pot diff --git a/executables/terminal/locales/en.json b/executables/terminal/locales/en.json new file mode 100644 index 00000000..eeef71af --- /dev/null +++ b/executables/terminal/locales/en.json @@ -0,0 +1,9 @@ +{ + "Graphics: {}": "Graphics: {}", + "Failed to create object": "Failed to create object", + "UTF-8: {}": "UTF-8: {}", + "Failed to mount device: {}": "Failed to mount device: {}", + "Failed to get task identifier: {}": "Failed to get task identifier: {}", + "Failed to execute: {}": "Failed to execute: {}", + "Resource busy": "Resource busy" +} diff --git a/executables/terminal/locales/en/messages.po b/executables/terminal/locales/en/messages.po deleted file mode 100644 index 0f09e6de..00000000 --- a/executables/terminal/locales/en/messages.po +++ /dev/null @@ -1,31 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: error.graphics -msgid "Graphics: {}" -msgstr "Graphics: {}" - -#: error.failed_to_create_object -msgid "Failed to create object" -msgstr "Failed to create object" - -#: error.utf8 -msgid "UTF-8: {}" -msgstr "UTF-8: {}" - -#: error.failed_to_mount_device -msgid "Failed to mount device: {}" -msgstr "Failed to mount device: {}" - -#: error.failed_to_get_task_identifier -msgid "Failed to get task identifier: {}" -msgstr "Failed to get task identifier: {}" - -#: error.failed_to_execute -msgid "Failed to execute: {}" -msgstr "Failed to execute: {}" - -#: error.ressource_busy -msgid "Resource busy" -msgstr "Resource busy" \ No newline at end of file diff --git a/executables/terminal/locales/fr.json b/executables/terminal/locales/fr.json new file mode 100644 index 00000000..21e7a8ab --- /dev/null +++ b/executables/terminal/locales/fr.json @@ -0,0 +1,9 @@ +{ + "Graphics: {}": "Graphique: {}", + "Failed to create object": "Échec de la création de l'objet", + "UTF-8: {}": "UTF-8: {}", + "Failed to mount device: {}": "Échec du montage du périphérique: {}", + "Failed to get task identifier: {}": "Échec de la récupération de l'identifiant de la tâche: {}", + "Failed to execute: {}": "Échec de l'exécution: {}", + "Resource busy": "Ressource occupée" +} diff --git a/executables/terminal/locales/fr/messages.po b/executables/terminal/locales/fr/messages.po deleted file mode 100644 index bd08874b..00000000 --- a/executables/terminal/locales/fr/messages.po +++ /dev/null @@ -1,31 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: error.graphics -msgid "Graphics: {}" -msgstr "Graphique: {}" - -#: error.failed_to_create_object -msgid "Failed to create object" -msgstr "Échec de la création de l'objet" - -#: error.utf8 -msgid "UTF-8: {}" -msgstr "UTF-8: {}" - -#: error.failed_to_mount_device -msgid "Failed to mount device: {}" -msgstr "Échec du montage du périphérique: {}" - -#: error.failed_to_get_task_identifier -msgid "Failed to get task identifier: {}" -msgstr "Échec de la récupération de l'identifiant de la tâche: {}" - -#: error.failed_to_execute -msgid "Failed to execute: {}" -msgstr "Échec de l'exécution: {}" - -#: error.ressource_busy -msgid "Resource busy" -msgstr "Ressource occupée" \ No newline at end of file diff --git a/executables/terminal/locales/messages.pot b/executables/terminal/locales/messages.pot deleted file mode 100644 index 0ef751a7..00000000 --- a/executables/terminal/locales/messages.pot +++ /dev/null @@ -1,31 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: error.graphics -msgid "Graphics: {}" -msgstr "" - -#: error.failed_to_create_object -msgid "Failed to create object" -msgstr "" - -#: error.utf8 -msgid "UTF-8: {}" -msgstr "" - -#: error.failed_to_mount_device -msgid "Failed to mount device: {}" -msgstr "" - -#: error.failed_to_get_task_identifier -msgid "Failed to get task identifier: {}" -msgstr "" - -#: error.failed_to_execute -msgid "Failed to execute: {}" -msgstr "" - -#: error.ressource_busy -msgid "Resource busy" -msgstr "" \ No newline at end of file From 229b7b7f21fc46143a2beb3d993e2d6daf2d3b78 Mon Sep 17 00:00:00 2001 From: Alix ANNERAUD Date: Wed, 11 Feb 2026 23:05:48 +0100 Subject: [PATCH 06/11] replace PO files with JSON for translations in English and French --- executables/wasm/locales/en.json | 31 ++++++++ executables/wasm/locales/en/messages.po | 101 ------------------------ executables/wasm/locales/fr.json | 31 ++++++++ executables/wasm/locales/fr/messages.po | 101 ------------------------ executables/wasm/locales/messages.pot | 101 ------------------------ 5 files changed, 62 insertions(+), 303 deletions(-) create mode 100644 executables/wasm/locales/en.json delete mode 100644 executables/wasm/locales/en/messages.po create mode 100644 executables/wasm/locales/fr.json delete mode 100644 executables/wasm/locales/fr/messages.po delete mode 100644 executables/wasm/locales/messages.pot diff --git a/executables/wasm/locales/en.json b/executables/wasm/locales/en.json new file mode 100644 index 00000000..490a8083 --- /dev/null +++ b/executables/wasm/locales/en.json @@ -0,0 +1,31 @@ +{ + "Missing argument: {}": "Missing argument: {}", + "Failed to get current directory": "Failed to get current directory", + "Invalid path": "Invalid path", + "Not a WASM file": "Not a WASM file", + "Failed to open file": "Failed to open file", + "Failed to read file": "Failed to read file", + "Failed to duplicate standard: {:?}": "Failed to duplicate standard: {:?}", + "Failed to transfer standard: {:?}": "Failed to transfer standard: {:?}", + "Failed to execute: {:?}": "Failed to execute: {:?}", + "Failed to open standard file: {:?}": "Failed to open standard file: {:?}", + "Failed to spawn task: {:?}": "Failed to spawn task: {:?}", + "Invalid pointer provided": "Invalid pointer provided", + "Invalid UTF-8 string": "Invalid UTF-8 string", + "Slice conversion failed: {:?}": "Slice conversion failed: {:?}", + "Functionality not implemented": "Functionality not implemented", + "WASM runtime initialization failed": "WASM runtime initialization failed", + "WASM compilation error: {}": "WASM compilation error: {}", + "WASM instantiation failure: {}": "WASM instantiation failure: {}", + "WASM instantiation error: {}": "WASM instantiation error: {}", + "WASM execution error: {}": "WASM execution error: {}", + "Requested function not found in module": "Requested function not found in module", + "Memory allocation failed": "Memory allocation failed", + "Failed to get task information: {:?}": "Failed to get task information: {:?}", + "Mutex or lock is poisoned": "Mutex or lock is poisoned", + "Invalid WASM module format or structure": "Invalid WASM module format or structure", + "Internal runtime error": "Internal runtime error", + "Invalid thread identifier provided": "Invalid thread identifier provided", + "Time-related error: {:?}": "Time-related error: {:?}", + "Failed to register file context": "Failed to register file context" +} diff --git a/executables/wasm/locales/en/messages.po b/executables/wasm/locales/en/messages.po deleted file mode 100644 index c528f53a..00000000 --- a/executables/wasm/locales/en/messages.po +++ /dev/null @@ -1,101 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: error.missing_argument -msgid "Missing argument: {}" -msgstr "Missing argument: {}" - -#: error.failed_to_get_current_directory -msgid "Failed to get current directory" -msgstr "Failed to get current directory" - -#: error.invalid_path -msgid "Invalid path" -msgstr "Invalid path" - -#: error.not_a_wasm_file -msgid "Not a WASM file" -msgstr "Not a WASM file" - -#: error.failed_to_open_file -msgid "Failed to open file" -msgstr "Failed to open file" - -#: error.failed_to_read_file -msgid "Failed to read file" -msgstr "Failed to read file" - -#: error.failed_to_duplicate_standard -msgid "Failed to duplicate standard: {:?}" -msgstr "Failed to duplicate standard: {:?}" - -#: error.failed_to_transfer_standard -msgid "Failed to transfer standard: {:?}" -msgstr "Failed to transfer standard: {:?}" - -#: error.failed_to_execute -msgid "Failed to execute: {:?}" -msgstr "Failed to execute: {:?}" - -#: error.failed_to_open_standard_file -msgid "Failed to open standard file: {:?}" -msgstr "Failed to open standard file: {:?}" - -#: error.failed_to_spawn_task -msgid "Failed to spawn task: {:?}" -msgstr "Failed to spawn task: {:?}" - -msgid "Invalid pointer provided" -msgstr "Invalid pointer provided" - -msgid "Invalid UTF-8 string" -msgstr "Invalid UTF-8 string" - -msgid "Slice conversion failed: {:?}" -msgstr "Slice conversion failed: {:?}" - -msgid "Functionality not implemented" -msgstr "Functionality not implemented" - -msgid "WASM runtime initialization failed" -msgstr "WASM runtime initialization failed" - -msgid "WASM compilation error: {}" -msgstr "WASM compilation error: {}" - -msgid "WASM instantiation failure: {}" -msgstr "WASM instantiation failure: {}" - -msgid "WASM instantiation error: {}" -msgstr "WASM instantiation error: {}" - -msgid "WASM execution error: {}" -msgstr "WASM execution error: {}" - -msgid "Requested function not found in module" -msgstr "Requested function not found in module" - -msgid "Memory allocation failed" -msgstr "Memory allocation failed" - -msgid "Failed to get task information: {:?}" -msgstr "Failed to get task information: {:?}" - -msgid "Mutex or lock is poisoned" -msgstr "Mutex or lock is poisoned" - -msgid "Invalid WASM module format or structure" -msgstr "Invalid WASM module format or structure" - -msgid "Internal runtime error" -msgstr "Internal runtime error" - -msgid "Invalid thread identifier provided" -msgstr "Invalid thread identifier provided" - -msgid "Time-related error: {:?}" -msgstr "Time-related error: {:?}" - -msgid "Failed to register file context" -msgstr "Failed to register file context" diff --git a/executables/wasm/locales/fr.json b/executables/wasm/locales/fr.json new file mode 100644 index 00000000..99c0d163 --- /dev/null +++ b/executables/wasm/locales/fr.json @@ -0,0 +1,31 @@ +{ + "Missing argument: {}": "Argument manquant: {}", + "Failed to get current directory": "Échec de la récupération du répertoire actuel", + "Invalid path": "Chemin invalide", + "Not a WASM file": "Pas un fichier WASM", + "Failed to open file": "Échec de l'ouverture du fichier", + "Failed to read file": "Échec de la lecture du fichier", + "Failed to duplicate standard: {:?}": "Échec de la duplication du standard: {:?}", + "Failed to transfer standard: {:?}": "Échec du transfert du standard: {:?}", + "Failed to execute: {:?}": "Échec de l'exécution: {:?}", + "Failed to open standard file: {:?}": "Échec de l'ouverture du fichier standard: {:?}", + "Failed to spawn task: {:?}": "Échec de la création de la tâche: {:?}", + "Invalid pointer provided": "Pointeur invalide fourni", + "Invalid UTF-8 string": "Chaîne UTF-8 invalide", + "Slice conversion failed: {:?}": "Échec de la conversion de tranche: {:?}", + "Functionality not implemented": "Fonctionnalité non implémentée", + "WASM runtime initialization failed": "Échec de l'initialisation du runtime WASM", + "WASM compilation error: {}": "Erreur de compilation WASM: {}", + "WASM instantiation failure: {}": "Échec de l'instanciation WASM: {}", + "WASM instantiation error: {}": "Erreur d'instanciation WASM: {}", + "WASM execution error: {}": "Erreur d'exécution WASM: {}", + "Requested function not found in module": "Fonction demandée non trouvée dans le module", + "Memory allocation failed": "Échec de l'allocation mémoire", + "Failed to get task information: {:?}": "Échec de la récupération des informations de tâche: {:?}", + "Mutex or lock is poisoned": "Le mutex ou le verrou est empoisonné", + "Invalid WASM module format or structure": "Format ou structure de module WASM invalide", + "Internal runtime error": "Erreur interne du runtime", + "Invalid thread identifier provided": "Identifiant de thread invalide fourni", + "Time-related error: {:?}": "Erreur liée au temps: {:?}", + "Failed to register file context": "Échec de l'enregistrement du contexte de fichier" +} diff --git a/executables/wasm/locales/fr/messages.po b/executables/wasm/locales/fr/messages.po deleted file mode 100644 index 83e049ea..00000000 --- a/executables/wasm/locales/fr/messages.po +++ /dev/null @@ -1,101 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: error.missing_argument -msgid "Missing argument: {}" -msgstr "Argument manquant: {}" - -#: error.failed_to_get_current_directory -msgid "Failed to get current directory" -msgstr "Échec de la récupération du répertoire actuel" - -#: error.invalid_path -msgid "Invalid path" -msgstr "Chemin invalide" - -#: error.not_a_wasm_file -msgid "Not a WASM file" -msgstr "Pas un fichier WASM" - -#: error.failed_to_open_file -msgid "Failed to open file" -msgstr "Échec de l'ouverture du fichier" - -#: error.failed_to_read_file -msgid "Failed to read file" -msgstr "Échec de la lecture du fichier" - -#: error.failed_to_duplicate_standard -msgid "Failed to duplicate standard: {:?}" -msgstr "Échec de la duplication du standard: {:?}" - -#: error.failed_to_transfer_standard -msgid "Failed to transfer standard: {:?}" -msgstr "Échec du transfert du standard: {:?}" - -#: error.failed_to_execute -msgid "Failed to execute: {:?}" -msgstr "Échec de l'exécution: {:?}" - -#: error.failed_to_open_standard_file -msgid "Failed to open standard file: {:?}" -msgstr "Échec de l'ouverture du fichier standard: {:?}" - -#: error.failed_to_spawn_task -msgid "Failed to spawn task: {:?}" -msgstr "Échec de la création de la tâche: {:?}" - -msgid "Invalid pointer provided" -msgstr "Pointeur invalide fourni" - -msgid "Invalid UTF-8 string" -msgstr "Chaîne UTF-8 invalide" - -msgid "Slice conversion failed: {:?}" -msgstr "Échec de la conversion de tranche: {:?}" - -msgid "Functionality not implemented" -msgstr "Fonctionnalité non implémentée" - -msgid "WASM runtime initialization failed" -msgstr "Échec de l'initialisation du runtime WASM" - -msgid "WASM compilation error: {}" -msgstr "Erreur de compilation WASM: {}" - -msgid "WASM instantiation failure: {}" -msgstr "Échec de l'instanciation WASM: {}" - -msgid "WASM instantiation error: {}" -msgstr "Erreur d'instanciation WASM: {}" - -msgid "WASM execution error: {}" -msgstr "Erreur d'exécution WASM: {}" - -msgid "Requested function not found in module" -msgstr "Fonction demandée non trouvée dans le module" - -msgid "Memory allocation failed" -msgstr "Échec de l'allocation mémoire" - -msgid "Failed to get task information: {:?}" -msgstr "Échec de la récupération des informations de tâche: {:?}" - -msgid "Mutex or lock is poisoned" -msgstr "Le mutex ou le verrou est empoisonné" - -msgid "Invalid WASM module format or structure" -msgstr "Format ou structure de module WASM invalide" - -msgid "Internal runtime error" -msgstr "Erreur interne du runtime" - -msgid "Invalid thread identifier provided" -msgstr "Identifiant de thread invalide fourni" - -msgid "Time-related error: {:?}" -msgstr "Erreur liée au temps: {:?}" - -msgid "Failed to register file context" -msgstr "Échec de l'enregistrement du contexte de fichier" diff --git a/executables/wasm/locales/messages.pot b/executables/wasm/locales/messages.pot deleted file mode 100644 index ac186180..00000000 --- a/executables/wasm/locales/messages.pot +++ /dev/null @@ -1,101 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" - -#: error.missing_argument -msgid "Missing argument: {}" -msgstr "" - -#: error.failed_to_get_current_directory -msgid "Failed to get current directory" -msgstr "" - -#: error.invalid_path -msgid "Invalid path" -msgstr "" - -#: error.not_a_wasm_file -msgid "Not a WASM file" -msgstr "" - -#: error.failed_to_open_file -msgid "Failed to open file" -msgstr "" - -#: error.failed_to_read_file -msgid "Failed to read file" -msgstr "" - -#: error.failed_to_duplicate_standard -msgid "Failed to duplicate standard: {:?}" -msgstr "" - -#: error.failed_to_transfer_standard -msgid "Failed to transfer standard: {:?}" -msgstr "" - -#: error.failed_to_execute -msgid "Failed to execute: {:?}" -msgstr "" - -#: error.failed_to_open_standard_file -msgid "Failed to open standard file: {:?}" -msgstr "" - -#: error.failed_to_spawn_task -msgid "Failed to spawn task: {:?}" -msgstr "" - -msgid "Invalid pointer provided" -msgstr "" - -msgid "Invalid UTF-8 string" -msgstr "" - -msgid "Slice conversion failed: {:?}" -msgstr "" - -msgid "Functionality not implemented" -msgstr "" - -msgid "WASM runtime initialization failed" -msgstr "" - -msgid "WASM compilation error: {}" -msgstr "" - -msgid "WASM instantiation failure: {}" -msgstr "" - -msgid "WASM instantiation error: {}" -msgstr "" - -msgid "WASM execution error: {}" -msgstr "" - -msgid "Requested function not found in module" -msgstr "" - -msgid "Memory allocation failed" -msgstr "" - -msgid "Failed to get task information: {:?}" -msgstr "" - -msgid "Mutex or lock is poisoned" -msgstr "" - -msgid "Invalid WASM module format or structure" -msgstr "" - -msgid "Internal runtime error" -msgstr "" - -msgid "Invalid thread identifier provided" -msgstr "" - -msgid "Time-related error: {:?}" -msgstr "" - -msgid "Failed to register file context" -msgstr "" From fcb6e0c334f0c6a854a4c0c7b9fca1808376f2bf Mon Sep 17 00:00:00 2001 From: Alix ANNERAUD Date: Wed, 11 Feb 2026 23:07:53 +0100 Subject: [PATCH 07/11] add prettier for JSON formatting and update Makefile tasks --- Makefile.toml | 6 +++++- package-lock.json | 19 ++++++++++++++++++- package.json | 3 ++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index e90b4973..e01d925c 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -23,8 +23,12 @@ install_crate = "taplo-cli" command = "taplo" args = ["format", "${@}"] +[tasks.format-json] +command = "npx" +args = ["prettier", "--write", "**/*.json", "${@}"] + [tasks.format] -dependencies = ["format-rust", "format-toml"] +dependencies = ["format-rust", "format-toml", "format-json"] [tasks.check-host] toolchain = "stable" diff --git a/package-lock.json b/package-lock.json index b821c250..a169ba53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,8 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "lv_font_conv": "github:lvgl/lv_font_conv" + "lv_font_conv": "github:lvgl/lv_font_conv", + "prettier": "^3.8.1" } }, "node_modules/lv_font_conv": { @@ -128,6 +129,22 @@ "dev": true, "inBundle": true, "license": "MIT" + }, + "node_modules/prettier": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz", + "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } } } } diff --git a/package.json b/package.json index c730553e..5b41b625 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "author": "", "license": "ISC", "devDependencies": { - "lv_font_conv": "github:lvgl/lv_font_conv" + "lv_font_conv": "github:lvgl/lv_font_conv", + "prettier": "^3.8.1" } } From 45bae03e52ff6c5dd29ea3ace2d2e7565c3052e5 Mon Sep 17 00:00:00 2001 From: Alix ANNERAUD Date: Wed, 11 Feb 2026 23:07:59 +0100 Subject: [PATCH 08/11] format JSON connections for consistency --- wokwi/esp32/diagram.json | 4 ++-- wokwi/esp32_s3/diagram.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wokwi/esp32/diagram.json b/wokwi/esp32/diagram.json index 5851f383..21a33657 100644 --- a/wokwi/esp32/diagram.json +++ b/wokwi/esp32/diagram.json @@ -12,8 +12,8 @@ } ], "connections": [ - [ "esp:TX", "$serialMonitor:RX", "", [] ], - [ "esp:RX", "$serialMonitor:TX", "", [] ] + ["esp:TX", "$serialMonitor:RX", "", []], + ["esp:RX", "$serialMonitor:TX", "", []] ], "serialMonitor": { "display": "terminal" }, "dependencies": {} diff --git a/wokwi/esp32_s3/diagram.json b/wokwi/esp32_s3/diagram.json index 99180540..a78bca6c 100644 --- a/wokwi/esp32_s3/diagram.json +++ b/wokwi/esp32_s3/diagram.json @@ -12,8 +12,8 @@ } ], "connections": [ - [ "esp:TX", "$serialMonitor:RX", "", [] ], - [ "esp:RX", "$serialMonitor:TX", "", [] ] + ["esp:TX", "$serialMonitor:RX", "", []], + ["esp:RX", "$serialMonitor:TX", "", []] ], "serialMonitor": { "display": "terminal" }, "dependencies": {} From cfdecbb2fd38ba9fd82de73fd52e197d79fc147f Mon Sep 17 00:00:00 2001 From: Alix ANNERAUD Date: Wed, 11 Feb 2026 23:08:30 +0100 Subject: [PATCH 09/11] fix: correct casing of package-ecosystem from "Cargo" to "cargo" in dependabot configuration --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 64a67328..336e9725 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,7 @@ version: 2 updates: - - package-ecosystem: "Cargo" # See documentation for possible values + - package-ecosystem: "cargo" # See documentation for possible values directory: "/" # Location of package manifests schedule: interval: "weekly" \ No newline at end of file From 311813ed2d522c8f701f195633ca75d81d098d7b Mon Sep 17 00:00:00 2001 From: Alix ANNERAUD Date: Wed, 11 Feb 2026 23:09:24 +0100 Subject: [PATCH 10/11] fix: update path for guest documentation copy in deploy workflow --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d26ce7dd..ed85f06a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,7 +35,7 @@ jobs: run: | cargo make doc-guest mkdir -p ./pages/guest/ - cp -r ./target/wasm32-unknown-unknown/doc/guest/* ./pages/guest/ + cp -r ./target/wasm32-unknown-unknown/doc/* ./pages/guest/ - name: Build | WASM demonstration (en) working-directory: ./examples/wasm From 2cf5622112047cb817387ae7da5ad73d6222bdae Mon Sep 17 00:00:00 2001 From: Alix ANNERAUD Date: Wed, 11 Feb 2026 23:16:17 +0100 Subject: [PATCH 11/11] add: include JSON formatting check in CI workflow --- .github/workflows/check.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 653e0b4f..2a01530f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -33,6 +33,9 @@ jobs: - name: Check | Formatting (Rust) run: cargo make format-rust -- --check + - name: Check | Formatting (JSON) + run: npx prettier --check "**/*.json" + - name: Check | Clippy (Host) run: cargo make clippy-host