fix: installateur Windows — accepter l'entree am-windows-x86_64.exe dans l'archive de release + i18n lang-aware pour am ai
- install.ps1 ne trouvait que 'am.exe' dans le zip : les archives (CI et manuelles) utilisent le nom plateforme 'am-windows-x86_64.exe' -> repli systematique sur cargo install au lieu du binaire precompile - Le script accepte desormais les deux noms (copie vers am.exe) ; chemin du message cargo install corrige (.cargo\bin\am.exe au lieu de binam) - i18n : am ai utilisait tr()/tr_fmt() globaux (flaky selon le process) — passage a tr_in/tr_fmt_in(app.lang()) + helper tr_fmt_in ajoute a i18n.rs - Archive v1.0.6 : les deux entrees (am.exe + am-windows-x86_64.exe) pour la compatibilite maximale (installateurs et self-update) - Tests ai_test insensibles a la locale (FR/EN) - v1.0.6 ; ROADMAP maintenance note ajoutee
This commit is contained in:
@@ -436,6 +436,15 @@ pub fn tr_fmt<'a>(key: &'a str, args: &[&dyn std::fmt::Display]) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
/// Format a message for a GIVEN locale (deterministic — follows the app's
|
||||
/// resolved language instead of the process-global locale).
|
||||
pub fn tr_fmt_in<'a>(lang: Lang, key: &'a str, args: &[&dyn std::fmt::Display]) -> String {
|
||||
match lang {
|
||||
Lang::Fr => fmt_args(key, args),
|
||||
Lang::En => fmt_args(lookup_en(key).unwrap_or(key), args),
|
||||
}
|
||||
}
|
||||
|
||||
/// Replace `{}` placeholders (positional) with the Display of each argument.
|
||||
fn fmt_args(template: &str, args: &[&dyn std::fmt::Display]) -> String {
|
||||
let mut out = String::with_capacity(template.len() + 16);
|
||||
|
||||
Reference in New Issue
Block a user