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

Merge pull request #8110 from sylvestre/l10n-tty

l10n: port tty to translation + add french
This commit is contained in:
Daniel Hofstetter 2025-06-08 16:37:02 +02:00 committed by GitHub
commit 92402a4101
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 4 deletions

View file

@ -1,2 +1,8 @@
tty-about = Print the file name of the terminal connected to standard input. tty-about = Print the file name of the terminal connected to standard input.
tty-usage = tty [OPTION]... tty-usage = tty [OPTION]...
# Help messages
tty-help-silent = print nothing, only return an exit status
# Output messages
tty-not-a-tty = not a tty

View file

@ -0,0 +1,8 @@
tty-about = Afficher le nom de fichier du terminal connecté à l'entrée standard.
tty-usage = tty [OPTION]...
# Messages d'aide
tty-help-silent = n'afficher rien, retourner seulement un code de sortie
# Messages de sortie
tty-not-a-tty = n'est pas un tty

View file

@ -2,8 +2,6 @@
// //
// For the full copyright and license information, please view the LICENSE // For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code. // file that was distributed with this source code.
// *
// * Synced with http://lingrok.org/xref/coreutils/src/tty.c
// spell-checker:ignore (ToDO) ttyname filedesc // spell-checker:ignore (ToDO) ttyname filedesc
@ -41,7 +39,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
Ok(name) => writeln!(stdout, "{}", name.display()), Ok(name) => writeln!(stdout, "{}", name.display()),
Err(_) => { Err(_) => {
set_exit_code(1); set_exit_code(1);
writeln!(stdout, "not a tty") writeln!(stdout, "{}", get_message("tty-not-a-tty"))
} }
}; };
@ -65,7 +63,7 @@ pub fn uu_app() -> Command {
.long(options::SILENT) .long(options::SILENT)
.visible_alias("quiet") .visible_alias("quiet")
.short('s') .short('s')
.help("print nothing, only return an exit status") .help(get_message("tty-help-silent"))
.action(ArgAction::SetTrue), .action(ArgAction::SetTrue),
) )
} }