diff --git a/crates/cordiale-ui/lang/de/LC_MESSAGES/cordiale-ui.po b/crates/cordiale-ui/lang/de/LC_MESSAGES/cordiale-ui.po index b8f4368..2f65a0b 100644 --- a/crates/cordiale-ui/lang/de/LC_MESSAGES/cordiale-ui.po +++ b/crates/cordiale-ui/lang/de/LC_MESSAGES/cordiale-ui.po @@ -294,7 +294,7 @@ msgstr "Hinzufügen" msgctxt "AppWindow" msgid "Mask (nick!user@host)" -msgstr "Maske (Nick!Benutzer@Host)" +msgstr "Maske (nick!user@host)" msgctxt "AppWindow" msgid "Command" @@ -1226,7 +1226,7 @@ msgstr "Host (*!*@host)" msgctxt "AppWindow" msgid "User and host (*!user@host)" -msgstr "Benutzer und Host (*!benutzer@host)" +msgstr "Benutzer und Host (*!user@host)" msgctxt "AppWindow" msgid "Used by /kb and /kickban. Saved to your account." diff --git a/crates/cordiale-ui/lang/es/LC_MESSAGES/cordiale-ui.po b/crates/cordiale-ui/lang/es/LC_MESSAGES/cordiale-ui.po index 6f7e775..19cc4ed 100644 --- a/crates/cordiale-ui/lang/es/LC_MESSAGES/cordiale-ui.po +++ b/crates/cordiale-ui/lang/es/LC_MESSAGES/cordiale-ui.po @@ -294,7 +294,7 @@ msgstr "Añadir" msgctxt "AppWindow" msgid "Mask (nick!user@host)" -msgstr "Máscara (nick!usuario@host)" +msgstr "Máscara (nick!user@host)" msgctxt "AppWindow" msgid "Command" @@ -1226,7 +1226,7 @@ msgstr "Host (*!*@host)" msgctxt "AppWindow" msgid "User and host (*!user@host)" -msgstr "Usuario y host (*!usuario@host)" +msgstr "Usuario y host (*!user@host)" msgctxt "AppWindow" msgid "Used by /kb and /kickban. Saved to your account." diff --git a/crates/cordiale-ui/lang/fr/LC_MESSAGES/cordiale-ui.po b/crates/cordiale-ui/lang/fr/LC_MESSAGES/cordiale-ui.po index 9fb7776..cd6391c 100644 --- a/crates/cordiale-ui/lang/fr/LC_MESSAGES/cordiale-ui.po +++ b/crates/cordiale-ui/lang/fr/LC_MESSAGES/cordiale-ui.po @@ -294,7 +294,7 @@ msgstr "Ajouter" msgctxt "AppWindow" msgid "Mask (nick!user@host)" -msgstr "Masque (pseudo!utilisateur@hôte)" +msgstr "Masque (nick!user@host)" msgctxt "AppWindow" msgid "Command" @@ -1218,15 +1218,15 @@ msgstr "Type de bannissement par défaut" msgctxt "AppWindow" msgid "Nick (nick!*@*)" -msgstr "Pseudo (pseudo!*@*)" +msgstr "Pseudo (nick!*@*)" msgctxt "AppWindow" msgid "Host (*!*@host)" -msgstr "Hôte (*!*@hôte)" +msgstr "Hôte (*!*@host)" msgctxt "AppWindow" msgid "User and host (*!user@host)" -msgstr "Utilisateur et hôte (*!utilisateur@hôte)" +msgstr "Utilisateur et hôte (*!user@host)" msgctxt "AppWindow" msgid "Used by /kb and /kickban. Saved to your account." diff --git a/crates/cordiale-ui/lang/it/LC_MESSAGES/cordiale-ui.po b/crates/cordiale-ui/lang/it/LC_MESSAGES/cordiale-ui.po index e23fa1f..28f9a36 100644 --- a/crates/cordiale-ui/lang/it/LC_MESSAGES/cordiale-ui.po +++ b/crates/cordiale-ui/lang/it/LC_MESSAGES/cordiale-ui.po @@ -294,7 +294,7 @@ msgstr "Aggiungi" msgctxt "AppWindow" msgid "Mask (nick!user@host)" -msgstr "Maschera (nick!utente@host)" +msgstr "Maschera (nick!user@host)" msgctxt "AppWindow" msgid "Command" @@ -1226,7 +1226,7 @@ msgstr "Host (*!*@host)" msgctxt "AppWindow" msgid "User and host (*!user@host)" -msgstr "Utente e host (*!utente@host)" +msgstr "Utente e host (*!user@host)" msgctxt "AppWindow" msgid "Used by /kb and /kickban. Saved to your account." diff --git a/crates/cordiale-ui/src/tests.rs b/crates/cordiale-ui/src/tests.rs index 1ccdf42..b5e2ea6 100644 --- a/crates/cordiale-ui/src/tests.rs +++ b/crates/cordiale-ui/src/tests.rs @@ -5622,6 +5622,42 @@ fn upload_507_copy_does_not_attribute_the_cause() { } } +/// The example masks in the ban-type picker and the ignore-mask hint are +/// IRC syntax, not prose: every catalog must keep them as in the source. +#[test] +fn translated_labels_keep_the_irc_mask_examples() { + const LABELS: [(&str, &str); 4] = [ + ("Nick (nick!*@*)", "nick!*@*"), + ("Host (*!*@host)", "*!*@host"), + ("User and host (*!user@host)", "*!user@host"), + ("Mask (nick!user@host)", "nick!user@host"), + ]; + let slint = include_str!("../ui/appwindow.slint"); + for (msgid, _) in LABELS { + assert!(slint.contains(&format!("@tr(\"{msgid}\"")), "{msgid}"); + } + + for (lang, catalog) in [ + ("it", include_str!("../lang/it/LC_MESSAGES/cordiale-ui.po")), + ("fr", include_str!("../lang/fr/LC_MESSAGES/cordiale-ui.po")), + ("de", include_str!("../lang/de/LC_MESSAGES/cordiale-ui.po")), + ("es", include_str!("../lang/es/LC_MESSAGES/cordiale-ui.po")), + ] { + for (label, mask) in LABELS { + let msgid = format!("msgid \"{label}\""); + let msgstr = catalog + .lines() + .skip_while(|line| *line != msgid) + .nth(1) + .unwrap_or_else(|| panic!("{lang}: missing msgid {label}")); + assert!( + msgstr.starts_with("msgstr \"") && msgstr.contains(&format!("({mask})")), + "{lang}: {msgstr}" + ); + } + } +} + #[test] fn a_rejected_date_format_has_its_own_message() { assert_eq!(display_prefs_error_key(Some(422)), "display-prefs-rejected");