Skip to content

Commit bfe8a11

Browse files
committed
l10n: port tty to translation + add french
1 parent a769fc7 commit bfe8a11

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

src/uu/tty/locales/en-US.ftl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
tty-about = Print the file name of the terminal connected to standard input.
22
tty-usage = tty [OPTION]...
3+
4+
# Help messages
5+
tty-help-silent = print nothing, only return an exit status
6+
7+
# Output messages
8+
tty-not-a-tty = not a tty

src/uu/tty/locales/fr-FR.ftl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
tty-about = Afficher le nom de fichier du terminal connecté à l'entrée standard.
2+
tty-usage = tty [OPTION]...
3+
4+
# Messages d'aide
5+
tty-help-silent = n'afficher rien, retourner seulement un code de sortie
6+
7+
# Messages de sortie
8+
tty-not-a-tty = n'est pas un tty

src/uu/tty/src/tty.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
//
33
// For the full copyright and license information, please view the LICENSE
44
// file that was distributed with this source code.
5-
// *
6-
// * Synced with http://lingrok.org/xref/coreutils/src/tty.c
75

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

@@ -41,7 +39,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
4139
Ok(name) => writeln!(stdout, "{}", name.display()),
4240
Err(_) => {
4341
set_exit_code(1);
44-
writeln!(stdout, "not a tty")
42+
writeln!(stdout, "{}", get_message("tty-not-a-tty"))
4543
}
4644
};
4745

@@ -65,7 +63,7 @@ pub fn uu_app() -> Command {
6563
.long(options::SILENT)
6664
.visible_alias("quiet")
6765
.short('s')
68-
.help("print nothing, only return an exit status")
66+
.help(get_message("tty-help-silent"))
6967
.action(ArgAction::SetTrue),
7068
)
7169
}

0 commit comments

Comments
 (0)