44use clap:: { Parser , Subcommand } ;
55
66#[ derive( Parser ) ]
7- #[ clap( name = "registry" , version = "0.0.1" , about = "Manage state of Windows registry" , long_about = None ) ]
7+ #[ clap( name = "registry" , version = "0.0.1" , about = t! ( "cli.about" ) . to_string ( ) , long_about = None ) ]
88pub struct Arguments {
99
1010 #[ clap( subcommand) ]
@@ -13,66 +13,66 @@ pub struct Arguments {
1313
1414#[ derive( Debug , PartialEq , Eq , Subcommand ) ]
1515pub enum ConfigSubCommand {
16- #[ clap( name = "get" , about = "Retrieve registry configuration." ) ]
16+ #[ clap( name = "get" , about = t! ( "cli.config.get.about" ) . to_string ( ) ) ]
1717 Get {
18- #[ clap( short, long, required = true , help = "The registry JSON input." ) ]
18+ #[ clap( short, long, required = true , help = t! ( "cli.config.args. input.help" ) . to_string ( ) ) ]
1919 input : String ,
2020 } ,
21- #[ clap( name = "set" , about = "Apply registry configuration." ) ]
21+ #[ clap( name = "set" , about = t! ( "cli.config.set.about" ) . to_string ( ) ) ]
2222 Set {
23- #[ clap( short, long, required = true , help = "The registry JSON input." ) ]
23+ #[ clap( short, long, required = true , help = t! ( "cli.config.args. input.help" ) . to_string ( ) ) ]
2424 input : String ,
25- #[ clap( short = 'w' , long, help = "Run as a what-if operation instead of applying the registry configuration" ) ]
25+ #[ clap( short = 'w' , long, help = t! ( "cli.config.args.what_if.help" ) . to_string ( ) ) ]
2626 what_if : bool ,
2727 } ,
28- #[ clap( name = "delete" , about = "Delete registry configuration." ) ]
28+ #[ clap( name = "delete" , about = t! ( "cli.config.delete.about" ) . to_string ( ) ) ]
2929 Delete {
30- #[ clap( short, long, required = true , help = "The registry JSON input." ) ]
30+ #[ clap( short, long, required = true , help = t! ( "cli.config.args. input.help" ) . to_string ( ) ) ]
3131 input : String ,
3232 } ,
3333}
3434
3535#[ derive( Debug , PartialEq , Eq , Subcommand ) ]
3636pub enum SubCommand {
37- #[ clap( name = "query" , about = "Query a registry key or value." , arg_required_else_help = true ) ]
37+ #[ clap( name = "query" , about = t! ( "cli.query.about" ) . to_string ( ) , arg_required_else_help = true ) ]
3838 Query {
39- #[ clap( short, long, required = true , help = "The registry key path to query." ) ]
39+ #[ clap( short, long, required = true , help = t! ( "cli. query.args.key_path.help" ) . to_string ( ) ) ]
4040 key_path : String ,
41- #[ clap( short, long, help = "The name of the value to query." ) ]
41+ #[ clap( short, long, help = t! ( "cli. query.args.value_name.help" ) . to_string ( ) ) ]
4242 value_name : Option < String > ,
43- #[ clap( short, long, help = "Recursively query subkeys." ) ]
43+ #[ clap( short, long, help = t! ( "cli. query.args.recurse.help" ) . to_string ( ) ) ]
4444 recurse : bool ,
4545 } ,
46- #[ clap( name = "set" , about = "Set a registry key or value." ) ]
46+ #[ clap( name = "set" , about = t! ( "cli.set.about" ) . to_string ( ) ) ]
4747 Set {
48- #[ clap( short, long, required = true , help = "The registry key path to set." ) ]
48+ #[ clap( short, long, required = true , help = t! ( "cli. set.args.key_path.help" ) . to_string ( ) ) ]
4949 key_path : String ,
50- #[ clap( short, long, help = "The value to set." ) ]
50+ #[ clap( short, long, help = t! ( "cli. set.args.value.help" ) . to_string ( ) ) ]
5151 value : String ,
5252 } ,
53- #[ clap( name = "remove" , about = "Remove a registry key or value." , arg_required_else_help = true ) ]
53+ #[ clap( name = "remove" , about = t! ( "cli.remove.about" ) . to_string ( ) , arg_required_else_help = true ) ]
5454 Remove {
55- #[ clap( short, long, required = true , help = "The registry key path to remove." ) ]
55+ #[ clap( short, long, required = true , help = t! ( "cli. remove.args.key_path.help" ) . to_string ( ) ) ]
5656 key_path : String ,
57- #[ clap( short, long, help = "The name of the value to remove." ) ]
57+ #[ clap( short, long, help = t! ( "cli. remove.args.value_name.help" ) . to_string ( ) ) ]
5858 value_name : Option < String > ,
59- #[ clap( short, long, help = "Recursively remove subkeys." ) ]
59+ #[ clap( short, long, help = t! ( "cli. remove.args.recurse.help" ) . to_string ( ) ) ]
6060 recurse : bool ,
6161 } ,
62- #[ clap( name = "find" , about = "Find a registry key or value." , arg_required_else_help = true ) ]
62+ #[ clap( name = "find" , about = t! ( "cli.find.about" ) . to_string ( ) , arg_required_else_help = true ) ]
6363 Find {
64- #[ clap( short, long, required = true , help = "The registry key path to start find." ) ]
64+ #[ clap( short, long, required = true , help = t! ( "cli. find.args.key_path.help" ) . to_string ( ) ) ]
6565 key_path : String ,
66- #[ clap( short, long, required = true , help = "The string to find." ) ]
66+ #[ clap( short, long, required = true , help = t! ( "cli. find.args.find.help" ) . to_string ( ) ) ]
6767 find : String ,
68- #[ clap( short, long, help = "Recursively find." ) ]
68+ #[ clap( short, long, help = t! ( "cli. find.args.recurse.help" ) . to_string ( ) ) ]
6969 recurse : bool ,
70- #[ clap( long, help = "Only find keys." ) ]
70+ #[ clap( long, help = t! ( "cli. find.args.keys_only.help" ) . to_string ( ) ) ]
7171 keys_only : bool ,
72- #[ clap( long, help = "Only find values." ) ]
72+ #[ clap( long, help = t! ( "cli. find.args.values_only.help" ) . to_string ( ) ) ]
7373 values_only : bool ,
7474 } ,
75- #[ clap( name = "config" , about = "Manage registry configuration." , arg_required_else_help = true ) ]
75+ #[ clap( name = "config" , about = t! ( "cli.config.about" ) . to_string ( ) , arg_required_else_help = true ) ]
7676 Config {
7777 #[ clap( subcommand) ]
7878 subcommand : ConfigSubCommand ,
0 commit comments