1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

l10n: port users to translation + add french

This commit is contained in:
Sylvestre Ledru 2025-06-08 10:43:23 +02:00 committed by Sylvestre Ledru
parent a769fc7904
commit 852963737d
3 changed files with 17 additions and 5 deletions

View file

@ -1,4 +1,7 @@
users-about = Print the user names of users currently logged in to the current host.
users-usage = users [FILE]
users-about-musl-warning = Warning: When built with musl libc, the `users` utility may show '0 users',
users-about-musl-warning =
Warning: When built with musl libc, the `users` utility may show '0 users',
due to musl's stub implementation of utmpx functions.
users-long-usage = Output who is currently logged in according to FILE.
If FILE is not specified, use { $default_path }. /var/log/wtmp as FILE is common.

View file

@ -0,0 +1,7 @@
users-about = Afficher les noms d'utilisateur des utilisateurs actuellement connectés à l'hôte actuel.
users-usage = users [FICHIER]
users-about-musl-warning =
Avertissement : Lorsqu'il est compilé avec musl libc, l'utilitaire `users` peut afficher '0 utilisateurs',
à cause de l'implémentation stub des fonctions utmpx de musl.
users-long-usage = Afficher qui est actuellement connecté selon FICHIER.
Si FICHIER n'est pas spécifié, utiliser { $default_path }. /var/log/wtmp comme FICHIER est courant.

View file

@ -5,6 +5,7 @@
// spell-checker:ignore (paths) wtmp
use std::collections::HashMap;
use std::ffi::OsString;
use std::path::Path;
@ -18,7 +19,7 @@ use utmp_classic::{UtmpEntry, parse_from_path};
#[cfg(not(target_os = "openbsd"))]
use uucore::utmpx::{self, Utmpx};
use uucore::locale::get_message;
use uucore::locale::{get_message, get_message_with_args};
#[cfg(target_os = "openbsd")]
const OPENBSD_UTMP_FILE: &str = "/var/run/utmp";
@ -30,9 +31,10 @@ fn get_long_usage() -> String {
let default_path: &str = utmpx::DEFAULT_FILE;
#[cfg(target_os = "openbsd")]
let default_path: &str = OPENBSD_UTMP_FILE;
format!(
"Output who is currently logged in according to FILE.
If FILE is not specified, use {default_path}. /var/log/wtmp as FILE is common."
get_message_with_args(
"users-long-usage",
HashMap::from([("default_path".to_string(), default_path.to_string())]),
)
}