Skip to content

Commit

Permalink
refactor: add missing i18n for OpenBSD steps
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed Oct 21, 2024
1 parent 2c2569c commit a614c89
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions locales/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -610,3 +610,15 @@ _version: 2
en: "Windows Update"
es: "Actualización de Windows"
zh_TW: "Windows 更新"
"Would check if OpenBSD is -current":
en: "Would check if OpenBSD is -current"
es: "Comprobaría si OpenBSD está en -current"
zh_TW: "會檢查 OpenBSD 是否為 -current"
"Would upgrade the OpenBSD system":
en: "Would upgrade the OpenBSD system"
es: "Actualizaría el sistema OpenBSD"
zh_TW: "會升級 OpenBSD 系統"
"Would upgrade OpenBSD packages":
en: "Would upgrade OpenBSD packages"
es: "Actualizaría los paquetes de OpenBSD"
zh_TW: "會升級 OpenBSD 套件"
6 changes: 3 additions & 3 deletions src/steps/os/openbsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn is_openbsd_current(ctx: &ExecutionContext) -> Result<bool> {
let motd_content = fs::read_to_string("/etc/motd")?;
let is_current = motd_content.contains("-current");
if ctx.config().dry_run() {
println!("Would check if OpenBSD is -current");
println!("{}", t!("Would check if OpenBSD is -current"));
Ok(is_current)
} else {
Ok(is_current)
Expand All @@ -24,7 +24,7 @@ pub fn upgrade_openbsd(ctx: &ExecutionContext) -> Result<()> {
let is_current = is_openbsd_current(ctx)?;

if ctx.config().dry_run() {
println!("Would upgrade the OpenBSD system");
println!("{}", t!("Would upgrade the OpenBSD system"));
return Ok(());
}

Expand All @@ -43,7 +43,7 @@ pub fn upgrade_packages(ctx: &ExecutionContext) -> Result<()> {
let is_current = is_openbsd_current(ctx)?;

if ctx.config().dry_run() {
println!("Would upgrade OpenBSD packages");
println!("{}", t!("Would upgrade OpenBSD packages"));
return Ok(());
}

Expand Down

0 comments on commit a614c89

Please sign in to comment.