Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/uu/tty/locales/en-US.ftl
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
tty-about = Print the file name of the terminal connected to standard input.
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
8 changes: 8 additions & 0 deletions src/uu/tty/locales/fr-FR.ftl
Original file line number Diff line number Diff line change
@@ -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
6 changes: 2 additions & 4 deletions src/uu/tty/src/tty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
//
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
// *
// * Synced with http://lingrok.org/xref/coreutils/src/tty.c

// spell-checker:ignore (ToDO) ttyname filedesc

Expand Down Expand Up @@ -41,7 +39,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
Ok(name) => writeln!(stdout, "{}", name.display()),
Err(_) => {
set_exit_code(1);
writeln!(stdout, "not a tty")
writeln!(stdout, "{}", get_message("tty-not-a-tty"))
}
};

Expand All @@ -65,7 +63,7 @@ pub fn uu_app() -> Command {
.long(options::SILENT)
.visible_alias("quiet")
.short('s')
.help("print nothing, only return an exit status")
.help(get_message("tty-help-silent"))
.action(ArgAction::SetTrue),
)
}
Loading