88//
99
1010use clap:: Parser ;
11- use gettextrs:: { bind_textdomain_codeset, setlocale, textdomain, LocaleCategory } ;
11+ use gettextrs:: { bind_textdomain_codeset, gettext , setlocale, textdomain, LocaleCategory } ;
1212use iconv_lib:: {
1313 ascii,
1414 utf_16:: { self , UTF16Variant } ,
@@ -30,31 +30,25 @@ use strum_macros::{Display, EnumIter, EnumString};
3030
3131mod iconv_lib;
3232
33- /// iconv — codeset conversion
34- #[ derive( Parser , Debug ) ]
35- #[ command( author, version, about, long_about = None ) ]
33+ #[ derive( Parser ) ]
34+ #[ command( version, about=gettext( "iconv — codeset conversion" ) ) ]
3635struct Args {
37- /// Omit invalid characters of the input file from the output
38- #[ arg( short = 'c' ) ]
36+ #[ arg( short = 'c' , help=gettext( "Omit invalid characters of the input file from the output" ) ) ]
3937 omit_invalid : bool ,
4038
41- /// Suppress messages about invalid characters
42- #[ arg( short = 's' ) ]
39+ #[ arg( short = 's' , help=gettext( "Suppress messages about invalid characters" ) ) ]
4340 suppress_messages : bool ,
4441
45- /// Identify the codeset of the input file
46- #[ arg( short = 'f' ) ]
42+ #[ arg( short = 'f' , help=gettext( "Identify the codeset of the input file" ) ) ]
4743 from_codeset : Option < String > ,
4844
49- /// List all supported codeset values
50- #[ arg( short = 'l' ) ]
45+ #[ arg( short = 'l' , help=gettext( "List all supported codeset values" ) ) ]
5146 list_codesets : bool ,
5247
53- /// Identify the codeset for the output file
54- #[ arg( short = 't' ) ]
48+ #[ arg( short = 't' , help=gettext( "Identify the codeset of the output file" ) ) ]
5549 to_codeset : Option < String > ,
5650
57- /// Input files (reads from stdin if not provided)
51+ # [ arg ( help=gettext ( " Input files (reads from stdin if empty)" ) ) ]
5852 files : Option < Vec < PathBuf > > ,
5953}
6054
0 commit comments