Skip to content

Commit 108fe6a

Browse files
authored
Merge pull request #453 from rustcoreutils/updates
Use gettext for all --help util summaries
2 parents f3c0c3d + e762f1e commit 108fe6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1929
-231
lines changed

calc/bc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ use bc_util::{
1515
};
1616
use clap::Parser;
1717

18-
use gettextrs::{bind_textdomain_codeset, setlocale, textdomain, LocaleCategory};
18+
use gettextrs::{bind_textdomain_codeset, gettext, setlocale, textdomain, LocaleCategory};
1919
use rustyline::{error::ReadlineError, DefaultEditor, Result};
2020

2121
mod bc_util;
2222

2323
/// bc - arbitrary-precision arithmetic language
2424
#[derive(Parser)]
25-
#[command(version, about)]
25+
#[command(version, about = gettext("bc - arbitrary-precision arithmetic language"))]
2626
struct Args {
2727
#[arg(short = 'l')]
2828
define_math_functions: bool,

dev/ar.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use chrono::DateTime;
1111
use clap::{Parser, Subcommand};
12+
use gettextrs::gettext;
1213
use object::{Object, ObjectSymbol, SymbolKind};
1314
use std::ffi::{OsStr, OsString};
1415
use std::io::{stdout, Write};
@@ -157,7 +158,7 @@ enum Commands {
157158

158159
/// ar - create and maintain library archives
159160
#[derive(Parser)]
160-
#[command(version, about)]
161+
#[command(version, about = gettext("ar - create and maintain library archives"))]
161162
struct Args {
162163
#[command(subcommand)]
163164
command: Commands,

dev/nm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use object::{
1717
};
1818

1919
use clap::{Parser, ValueEnum};
20-
use gettextrs::{bind_textdomain_codeset, setlocale, textdomain, LocaleCategory};
20+
use gettextrs::{bind_textdomain_codeset, gettext, setlocale, textdomain, LocaleCategory};
2121
use std::collections::HashMap;
2222
use std::fs;
2323

@@ -30,7 +30,7 @@ enum OutputType {
3030

3131
/// nm - write the name list of an object file
3232
#[derive(Parser)]
33-
#[command(version, about)]
33+
#[command(version, about = gettext("nm - write the name list of an object file"))]
3434
struct Args {
3535
/// Write the full pathname or library name of an object on each line.
3636
#[arg(short = 'A', long = "print-file-name")]

dev/strings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use std::ffi::OsString;
1111

1212
use clap::{Parser, ValueEnum};
13-
use gettextrs::{bind_textdomain_codeset, setlocale, textdomain, LocaleCategory};
13+
use gettextrs::{bind_textdomain_codeset, gettext, setlocale, textdomain, LocaleCategory};
1414
use object::{Object, ObjectSection};
1515

1616
#[derive(Clone, Copy, ValueEnum)]
@@ -40,7 +40,7 @@ struct OutputOptions {
4040

4141
/// strings - find printable strings in files
4242
#[derive(Parser)]
43-
#[command(version, about)]
43+
#[command(version, about = gettext("strings - find printable strings in files"))]
4444
struct Args {
4545
#[command(flatten)]
4646
output_options: OutputOptions,

0 commit comments

Comments
 (0)