Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/cordiale-ui/lang/de/LC_MESSAGES/cordiale-ui.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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."
Expand Down
4 changes: 2 additions & 2 deletions crates/cordiale-ui/lang/es/LC_MESSAGES/cordiale-ui.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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."
Expand Down
8 changes: 4 additions & 4 deletions crates/cordiale-ui/lang/fr/LC_MESSAGES/cordiale-ui.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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."
Expand Down
4 changes: 2 additions & 2 deletions crates/cordiale-ui/lang/it/LC_MESSAGES/cordiale-ui.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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."
Expand Down
36 changes: 36 additions & 0 deletions crates/cordiale-ui/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Loading