i18n: localize the welcome burst (001-003/251) via trf() dynamic templates (fr, es)

This commit is contained in:
Jean Chevronnet 2026-08-25 12:18:17 +00:00
parent 560c860f1d
commit 6f8ff39f99
No known key found for this signature in database
GPG key ID: 439666D63A9477E4
3 changed files with 24 additions and 20 deletions

View file

@ -4,6 +4,12 @@
# nombres de comandos, letras de modo) se mantienen. Una entrada ausente
# recae en el inglés.
# --- bienvenida (001-004): prosa dinámica, plantillas {0}/{1} ---
"Welcome to the {0} IRC Network, {1}" = "Bienvenido a la red IRC {0}, {1}"
"Your host is {0}, running echoircd-{1}" = "Tu host es {0}, ejecutando echoircd-{1}"
"This server was created at unix {0}" = "Este servidor fue creado el (unix) {0}"
"There are {0} users on 1 server" = "Hay {0} usuarios en 1 servidor"
# --- avisos / desafíos ---
"*** Cloudflare Challenge: verification successful — you may continue." = "*** Desafío de Cloudflare: verificación exitosa — puedes continuar."
"*** Correct — you may now message freely; please resend your message." = "*** Correcto — ya puedes enviar mensajes libremente; por favor reenvía tu mensaje."

View file

@ -4,6 +4,12 @@
# noms de commandes, lettres de mode) restent tels quels. Une entrée absente
# retombe sur l'anglais.
# --- accueil (001-004) : prose dynamique, gabarits {0}/{1} ---
"Welcome to the {0} IRC Network, {1}" = "Bienvenue sur le réseau IRC {0}, {1}"
"Your host is {0}, running echoircd-{1}" = "Votre hôte est {0}, sous echoircd-{1}"
"This server was created at unix {0}" = "Ce serveur a été créé le (unix) {0}"
"There are {0} users on 1 server" = "Il y a {0} utilisateurs sur 1 serveur"
# --- notices / défis ---
"*** Cloudflare Challenge: verification successful — you may continue." = "*** Défi Cloudflare : vérification réussie — vous pouvez continuer."
"*** Correct — you may now message freely; please resend your message." = "*** Correct — vous pouvez maintenant envoyer des messages librement ; veuillez renvoyer votre message."

View file

@ -460,21 +460,15 @@ impl Server {
.get(&uid)
.map(|u| u.nick.clone())
.unwrap_or_default();
self.numeric(
uid,
RPL_WELCOME,
&format!(":Welcome to the {} IRC Network, {nick}", self.disp_network(uid)),
);
self.numeric(
uid,
RPL_YOURHOST,
&format!(":Your host is {}, running echoircd-{RELEASE}", self.disp_name(uid)),
);
self.numeric(
uid,
RPL_CREATED,
&format!(":This server was created at unix {}", self.created),
);
let net = self.disp_network(uid).to_string();
let welcome = self.trf("Welcome to the {0} IRC Network, {1}", &[net.as_str(), nick.as_str()]);
self.numeric(uid, RPL_WELCOME, &format!(":{welcome}"));
let host = self.disp_name(uid).to_string();
let yourhost = self.trf("Your host is {0}, running echoircd-{1}", &[host.as_str(), RELEASE]);
self.numeric(uid, RPL_YOURHOST, &format!(":{yourhost}"));
let created = self.created.to_string();
let created_msg = self.trf("This server was created at unix {0}", &[created.as_str()]);
self.numeric(uid, RPL_CREATED, &format!(":{created_msg}"));
self.numeric(
uid,
RPL_MYINFO,
@ -491,11 +485,9 @@ impl Server {
.map(|u| u.caps.ext_isupport && u.caps.batch)
.unwrap_or(false);
self.send_isupport(uid, batched);
self.numeric(
uid,
RPL_LUSERCLIENT,
&format!(":There are {} users on 1 server", self.users.len()),
);
let count = self.users.len().to_string();
let lusers = self.trf("There are {0} users on 1 server", &[count.as_str()]);
self.numeric(uid, RPL_LUSERCLIENT, &format!(":{lusers}"));
self.send_motd(uid);
// connbanner: NOTICE lines to every connecting client
for line in self.conf_all("connbanner").to_vec() {