mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
chore: add i18n about strings for CLI commands
This commit is contained in:
@@ -572,7 +572,9 @@ pub fn package<C: Context>() -> ParentHandler<C> {
|
||||
)
|
||||
.subcommand(
|
||||
"attach",
|
||||
from_fn_async_local(service::cli_attach).no_display(),
|
||||
from_fn_async_local(service::cli_attach)
|
||||
.no_display()
|
||||
.with_about("about.execute-commands-container"),
|
||||
)
|
||||
.subcommand(
|
||||
"host",
|
||||
|
||||
@@ -117,6 +117,7 @@ pub fn forward_api<C: Context>() -> ParentHandler<C> {
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.with_about("about.dump-port-forward-table")
|
||||
.with_call_remote::<CliContext>(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -108,6 +108,7 @@ pub fn address_api<C: Context, Kind: HostApiKind>()
|
||||
.with_about("about.remove-public-domain-from-host")
|
||||
.with_call_remote::<CliContext>(),
|
||||
)
|
||||
.with_about("about.commands-host-public-domain")
|
||||
.with_inherited(|_, a| a),
|
||||
)
|
||||
.subcommand(
|
||||
@@ -131,8 +132,10 @@ pub fn address_api<C: Context, Kind: HostApiKind>()
|
||||
.with_about("about.remove-private-domain-from-host")
|
||||
.with_call_remote::<CliContext>(),
|
||||
)
|
||||
.with_about("about.commands-host-private-domain")
|
||||
.with_inherited(|_, a| a),
|
||||
)
|
||||
.with_about("about.commands-host-address-domain")
|
||||
.with_inherited(Kind::inheritance),
|
||||
)
|
||||
.subcommand(
|
||||
|
||||
@@ -521,18 +521,27 @@ pub fn host_api<C: Context>() -> ParentHandler<C, RequiresPackageId> {
|
||||
.subcommand(
|
||||
"address",
|
||||
address_api::<C, ForPackage>()
|
||||
.with_inherited(|RequiresPackageId { package }, _| package),
|
||||
.with_inherited(|RequiresPackageId { package }, _| package)
|
||||
.with_about("about.commands-host-addresses"),
|
||||
)
|
||||
.subcommand(
|
||||
"binding",
|
||||
binding::<C, ForPackage>().with_inherited(|RequiresPackageId { package }, _| package),
|
||||
binding::<C, ForPackage>()
|
||||
.with_inherited(|RequiresPackageId { package }, _| package)
|
||||
.with_about("about.commands-host-bindings"),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn server_host_api<C: Context>() -> ParentHandler<C> {
|
||||
ParentHandler::<C>::new()
|
||||
.subcommand("address", address_api::<C, ForServer>())
|
||||
.subcommand("binding", binding::<C, ForServer>())
|
||||
.subcommand(
|
||||
"address",
|
||||
address_api::<C, ForServer>().with_about("about.commands-host-addresses"),
|
||||
)
|
||||
.subcommand(
|
||||
"binding",
|
||||
binding::<C, ForServer>().with_about("about.commands-host-bindings"),
|
||||
)
|
||||
}
|
||||
|
||||
pub async fn list_hosts(
|
||||
|
||||
@@ -126,24 +126,28 @@ pub fn vhost_api<C: Context>() -> ParentHandler<C> {
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.with_about("about.dump-vhost-proxy-table")
|
||||
.with_call_remote::<CliContext>(),
|
||||
)
|
||||
.subcommand(
|
||||
"add-passthrough",
|
||||
from_fn_async(add_passthrough)
|
||||
.no_display()
|
||||
.with_about("about.add-vhost-passthrough")
|
||||
.with_call_remote::<CliContext>(),
|
||||
)
|
||||
.subcommand(
|
||||
"remove-passthrough",
|
||||
from_fn_async(remove_passthrough)
|
||||
.no_display()
|
||||
.with_about("about.remove-vhost-passthrough")
|
||||
.with_call_remote::<CliContext>(),
|
||||
)
|
||||
.subcommand(
|
||||
"list-passthrough",
|
||||
from_fn(list_passthrough)
|
||||
.with_display_serializable()
|
||||
.with_about("about.list-vhost-passthrough")
|
||||
.with_call_remote::<CliContext>(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -79,7 +79,10 @@ pub fn registry_api<C: Context>() -> ParentHandler<C> {
|
||||
.with_about("about.list-registry-info-packages")
|
||||
.with_call_remote::<CliContext>(),
|
||||
)
|
||||
.subcommand("info", info::info_api::<C>())
|
||||
.subcommand(
|
||||
"info",
|
||||
info::info_api::<C>().with_about("about.commands-registry-info"),
|
||||
)
|
||||
// set info and categories
|
||||
.subcommand(
|
||||
"os",
|
||||
|
||||
@@ -56,6 +56,7 @@ pub fn category_api<C: Context>() -> ParentHandler<C> {
|
||||
.with_custom_display_fn(|params, categories| {
|
||||
display_categories(params.params, categories)
|
||||
})
|
||||
.with_about("about.list-registry-categories")
|
||||
.with_call_remote::<CliContext>(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -18,7 +18,10 @@ use crate::util::serde::{HandlerExtSerde, display_serializable};
|
||||
|
||||
pub fn tunnel_api<C: Context>() -> ParentHandler<C> {
|
||||
ParentHandler::new()
|
||||
.subcommand("web", super::web::web_api::<C>())
|
||||
.subcommand(
|
||||
"web",
|
||||
super::web::web_api::<C>().with_about("about.commands-tunnel-web"),
|
||||
)
|
||||
.subcommand(
|
||||
"db",
|
||||
super::db::db_api::<C>().with_about("about.commands-interact-with-db-dump-apply"),
|
||||
@@ -69,7 +72,8 @@ pub fn tunnel_api<C: Context>() -> ParentHandler<C> {
|
||||
.no_display()
|
||||
.with_about("about.enable-or-disable-port-forward")
|
||||
.with_call_remote::<CliContext>(),
|
||||
),
|
||||
)
|
||||
.with_about("about.commands-port-forward"),
|
||||
)
|
||||
.subcommand(
|
||||
"restart",
|
||||
@@ -94,7 +98,8 @@ pub fn tunnel_api<C: Context>() -> ParentHandler<C> {
|
||||
.with_display_serializable()
|
||||
.with_about("about.apply-available-update")
|
||||
.with_call_remote::<CliContext>(),
|
||||
),
|
||||
)
|
||||
.with_about("about.commands-tunnel-update"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,8 @@ pub fn auth_api<C: Context>() -> ParentHandler<C> {
|
||||
})
|
||||
.with_about("about.list-authorized-keys")
|
||||
.with_call_remote::<CliContext>(),
|
||||
),
|
||||
)
|
||||
.with_about("about.commands-authorized-keys"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user