File tree Expand file tree Collapse file tree 4 files changed +18
-18
lines changed Expand file tree Collapse file tree 4 files changed +18
-18
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ # Error message when system architecture information cannot be retrieved
2
+ cannot-get-system = cannot get system name
3
+
4
+ arch-usage = arch
5
+ arch-about = Display machine architecture
6
+ arch-after-help = Determine architecture name for current machine.
Original file line number Diff line number Diff line change
1
+ # Error message when system architecture information cannot be retrieved
2
+ cannot-get-system = impossible d'obtenir le nom du système
3
+
4
+ arch-usage = arch
5
+ arch-about = Afficher l'architecture de la machine
6
+ arch-after-help = Déterminer le nom de l'architecture pour la machine actuelle.
Original file line number Diff line number Diff line change @@ -7,16 +7,15 @@ use platform_info::*;
7
7
8
8
use clap:: Command ;
9
9
use uucore:: error:: { UResult , USimpleError } ;
10
- use uucore:: { help_about, help_section} ;
11
-
12
- static ABOUT : & str = help_about ! ( "arch.md" ) ;
13
- static SUMMARY : & str = help_section ! ( "after help" , "arch.md" ) ;
10
+ use uucore:: locale:: { self , get_message} ;
14
11
15
12
#[ uucore:: main]
16
13
pub fn uumain ( args : impl uucore:: Args ) -> UResult < ( ) > {
14
+ locale:: setup_localization ( "src/uu/arch/locales/" ) ?;
17
15
uu_app ( ) . try_get_matches_from ( args) ?;
18
16
19
- let uts = PlatformInfo :: new ( ) . map_err ( |_e| USimpleError :: new ( 1 , "cannot get system name" ) ) ?;
17
+ let uts =
18
+ PlatformInfo :: new ( ) . map_err ( |_e| USimpleError :: new ( 1 , get_message ( "cannot-get-system" ) ) ) ?;
20
19
21
20
println ! ( "{}" , uts. machine( ) . to_string_lossy( ) . trim( ) ) ;
22
21
Ok ( ( ) )
@@ -25,7 +24,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
25
24
pub fn uu_app ( ) -> Command {
26
25
Command :: new ( uucore:: util_name ( ) )
27
26
. version ( uucore:: crate_version!( ) )
28
- . about ( ABOUT )
29
- . after_help ( SUMMARY )
27
+ . about ( get_message ( "arch-about" ) )
28
+ . after_help ( get_message ( "arch-after-help" ) )
30
29
. infer_long_args ( true )
31
30
}
You can’t perform that action at this time.
0 commit comments