From 1afdbebdc2b1d0ae544629b33a49dd69748d441e Mon Sep 17 00:00:00 2001 From: Dayuan Date: Thu, 13 Jul 2023 21:40:50 +0800 Subject: [PATCH] unify the flag `--output` of the `kusion version` command with other commands --- docs/cmd/en_US/kusion.md | 6 +- docs/cmd/en_US/kusion_version.md | 10 +- docs/cmd/zh_CN/kusion.md | 6 +- docs/cmd/zh_CN/kusion_version.md | 14 +- pkg/cmd/version/options.go | 28 +- pkg/cmd/version/version.go | 27 +- pkg/cmd/version/version_test.go | 20 +- .../kusion/en_US/LC_MESSAGES/kusion.mo | Bin 22129 -> 21513 bytes .../kusion/en_US/LC_MESSAGES/kusion.po | 990 +++++++++--------- .../i18n/translations/kusion/template.pot | 537 +++++----- .../kusion/zh_CN/LC_MESSAGES/kusion.mo | Bin 14095 -> 14255 bytes .../kusion/zh_CN/LC_MESSAGES/kusion.po | 945 ++++++++--------- pkg/version/api.go | 8 - pkg/version/types.go | 4 - pkg/version/types_test.go | 2 - 15 files changed, 1270 insertions(+), 1327 deletions(-) diff --git a/docs/cmd/en_US/kusion.md b/docs/cmd/en_US/kusion.md index 52e4207b..0b673452 100644 --- a/docs/cmd/en_US/kusion.md +++ b/docs/cmd/en_US/kusion.md @@ -26,7 +26,7 @@ kusion [flags] * [kusion env](kusion_env.md) - Print Kusion environment information * [kusion init](kusion_init.md) - Initialize the scaffolding for a project * [kusion ls](kusion_ls.md) - List all project and stack information -* [kusion preview](kusion_preview.md) - Preview a series of resource changes within the stack -* [kusion version](kusion_version.md) - Print the kusion version info +* [kusion preview](kusion_preview.md) - Preview a series of resource changes within the stack +* [kusion version](kusion_version.md) - Print the kusion version information for the current context. -###### Auto generated by spf13/cobra on 11-Jul-2023 +###### Auto generated by spf13/cobra on 13-Jul-2023 diff --git a/docs/cmd/en_US/kusion_version.md b/docs/cmd/en_US/kusion_version.md index 1cc3cb1e..cfd02747 100644 --- a/docs/cmd/en_US/kusion_version.md +++ b/docs/cmd/en_US/kusion_version.md @@ -1,6 +1,6 @@ ## kusion version -Print the kusion version info + Print the kusion version information for the current context. ### Synopsis @@ -20,14 +20,12 @@ kusion version [flags] ### Options ``` - -h, --help help for version - -j, --json Print version info as JSON - -s, --short Print version info as versionShort string - -y, --yaml Print version info as YAML + -h, --help help for version + -o, --output string Output format. Only json format is supported for now ``` ### SEE ALSO * [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code -###### Auto generated by spf13/cobra on 11-Jul-2023 +###### Auto generated by spf13/cobra on 13-Jul-2023 diff --git a/docs/cmd/zh_CN/kusion.md b/docs/cmd/zh_CN/kusion.md index ffde220c..7c65e712 100644 --- a/docs/cmd/zh_CN/kusion.md +++ b/docs/cmd/zh_CN/kusion.md @@ -26,7 +26,7 @@ kusion [flags] * [kusion env](kusion_env.md) - Print Kusion environment information * [kusion init](kusion_init.md) - 初始化一个 Project 的脚手架 * [kusion ls](kusion_ls.md) - List all project and stack information -* [kusion preview](kusion_preview.md) - Preview a series of resource changes within the stack -* [kusion version](kusion_version.md) - Print the kusion version info +* [kusion preview](kusion_preview.md) - Preview a series of resource changes within the stack +* [kusion version](kusion_version.md) - 打印当前 Kusion 的版本信息 -###### Auto generated by spf13/cobra on 11-Jul-2023 +###### Auto generated by spf13/cobra on 13-Jul-2023 diff --git a/docs/cmd/zh_CN/kusion_version.md b/docs/cmd/zh_CN/kusion_version.md index dc284c4a..ee1d4b29 100644 --- a/docs/cmd/zh_CN/kusion_version.md +++ b/docs/cmd/zh_CN/kusion_version.md @@ -1,10 +1,10 @@ ## kusion version -Print the kusion version info +打印当前 Kusion 的版本信息 ### Synopsis -Print the kusion version information for the current context. +打印当前 Kusion 的版本信息 ``` kusion version [flags] @@ -13,21 +13,19 @@ kusion version [flags] ### Examples ``` - # Print the kusion version + # 打印 Kusion 版本 kusion version ``` ### Options ``` - -h, --help help for version - -j, --json 将版本信息打印成 JSON 格式 - -s, --short 将版本信息打印成短版本字符串 - -y, --yaml 将版本信息打印成 YAML 格式 + -h, --help help for version + -o, --output string 输出格式。当前只支持 json 格式的输出 ``` ### SEE ALSO * [kusion](kusion.md) - Kusion manages the Kubernetes cluster by code -###### Auto generated by spf13/cobra on 11-Jul-2023 +###### Auto generated by spf13/cobra on 13-Jul-2023 diff --git a/pkg/cmd/version/options.go b/pkg/cmd/version/options.go index 33eeb283..598bc6fb 100644 --- a/pkg/cmd/version/options.go +++ b/pkg/cmd/version/options.go @@ -1,44 +1,34 @@ package version import ( + "errors" "fmt" + "strings" "kusionstack.io/kusion/pkg/version" ) +const jsonOutput = "json" + type VersionOptions struct { - ExportJSON bool - ExportYAML bool - Short bool + Output string } func NewVersionOptions() *VersionOptions { return &VersionOptions{} } -func (o *VersionOptions) Complete() { - if !(o.ExportYAML || o.ExportJSON || o.Short) { - o.ExportYAML = true - } -} - func (o *VersionOptions) Validate() error { - if (o.ExportJSON && o.ExportYAML) || (o.ExportJSON && o.Short) || (o.ExportYAML && o.Short) { - return fmt.Errorf("invalid options") + if o.Output != "" && o.Output != jsonOutput { + return errors.New("invalid output type, output must be 'json'") } - return nil } func (o *VersionOptions) Run() { - switch { - case o.ExportJSON: + if strings.ToLower(o.Output) == jsonOutput { fmt.Println(version.JSON()) - case o.ExportYAML: - fmt.Println(version.YAML()) - case o.Short: - fmt.Println(version.ShortString()) - default: + } else { fmt.Println(version.String()) } } diff --git a/pkg/cmd/version/version.go b/pkg/cmd/version/version.go index 189f461f..4eeadd4f 100644 --- a/pkg/cmd/version/version.go +++ b/pkg/cmd/version/version.go @@ -8,40 +8,31 @@ import ( "kusionstack.io/kusion/pkg/util/i18n" ) -var ( - versionShort = i18n.T(`Print the kusion version info`) - - versionLong = i18n.T(` - Print the kusion version information for the current context.`) - - versionExample = i18n.T(` - # Print the kusion version +func NewCmdVersion() *cobra.Command { + var ( + versionShort = i18n.T(`Print the Kusion version information for the current context`) + versionExample = i18n.T(` + # Print the Kusion version kusion version`) -) + ) -func NewCmdVersion() *cobra.Command { o := NewVersionOptions() cmd := &cobra.Command{ Use: "version", Short: versionShort, - Long: templates.LongDesc(versionLong), + Long: templates.LongDesc(versionShort), Example: templates.Examples(versionExample), RunE: func(cmd *cobra.Command, args []string) (err error) { defer util.RecoverErr(&err) - o.Complete() util.CheckErr(o.Validate()) o.Run() return }, } - cmd.Flags().BoolVarP(&o.ExportJSON, "json", "j", false, - i18n.T("Print version info as JSON")) - cmd.Flags().BoolVarP(&o.ExportYAML, "yaml", "y", false, - i18n.T("Print version info as YAML")) - cmd.Flags().BoolVarP(&o.Short, "short", "s", false, - i18n.T("Print version info as versionShort string")) + cmd.Flags().StringVarP(&o.Output, "output", "o", "", + i18n.T("Output format. Only json format is supported for now")) return cmd } diff --git a/pkg/cmd/version/version_test.go b/pkg/cmd/version/version_test.go index bc4f3270..f99dabfc 100644 --- a/pkg/cmd/version/version_test.go +++ b/pkg/cmd/version/version_test.go @@ -12,25 +12,9 @@ func TestNewCmdVersion(t *testing.T) { _, err := version.NewInfo() assert.Nil(t, err) - t.Run("ExportJSON", func(t *testing.T) { + t.Run("json", func(t *testing.T) { cmd := NewCmdVersion() - err := cmd.Flags().Set("json", "true") - assert.Nil(t, err) - err = cmd.Execute() - assert.Nil(t, err) - }) - - t.Run("ExportYaml", func(t *testing.T) { - cmd := NewCmdVersion() - err := cmd.Flags().Set("yaml", "true") - assert.Nil(t, err) - err = cmd.Execute() - assert.Nil(t, err) - }) - - t.Run("ShortString", func(t *testing.T) { - cmd := NewCmdVersion() - err := cmd.Flags().Set("short", "true") + err := cmd.Flags().Set("output", "json") assert.Nil(t, err) err = cmd.Execute() assert.Nil(t, err) diff --git a/pkg/util/i18n/translations/kusion/en_US/LC_MESSAGES/kusion.mo b/pkg/util/i18n/translations/kusion/en_US/LC_MESSAGES/kusion.mo index 94d17ecf206163a9d8ae11c4ce9c79ef920a39d0..f9a61981ecff763a177d733cda967ffdbf4ac519 100644 GIT binary patch delta 1666 zcmZ|PU1-&H9LMp`$+?|9=^omAn6;_RJ-Y`}m%0b%+1y$>x5ZX@6U z|2$i|M}I-CbQW{+r02OlSs=Z`eZLe+&HO*|s5Bf=T(d<|2OWPEOJmr+Mq0!hIKhpd zt(AV@|K|15-VIEsCeUr2kJCU*JEj)r#=>EI77k6xCR(J{-lQN!=W^pqP;0>fp8_NA49*&jx z2D<-4JjnC)J15U#+ZL$~r;$I+aj3yxu?34Nq$V81K71EP@kiW_-F*8HzKuLvH&ZUB zEUl7ixgNt8a1`Ty(080P;vHmLR9-Ey`r3u-Z~#5f5scw)=ovRMI#yc;kloP;9>e$W zFy6-9*vnIEB3wsjDZwnArJuL*wGPwTh7hJLOz%1$co`k0de+Thntn2bX_9?$nDTao zFrDDr9i}BDOsZg+I{18?eHz0#T*O|I>MYf^hb(=$H)Ls|gK1sihV%PEn7Wys!}K*e zOj%taOrPuzVan|eVH!fdOH;@#T0rk{Nl(a9A37^z=q!DM&eDB6f<;e<{?lvF^ zhiMs0aJ)B!X%-!p-e*FXK0-fe4lD6bbbsjq!i2A*v-B0R$|~lfw>XCEhF(EuX$Dzj z#cy)rFhw~yOwXai^es9}Iuyb*obpV{kFl2SYv?fDK|knVf5_6C=qz1CXXz?BOAF{M zEg_2>*Q*TQGftqx^gTLEOXx6V4u&v|BHOHaWM`7I;FXbV{PdHn5=E~juY_cvJwT$8 z3@s!-&+A0&ric|UFov>{lLuQ47YZp4%%lFdk;DI*m)A4PPhH7FFL43o7Y>n7F6Gul zWmDDEDrzIOl}au}J$lJKd$&@mjB2Ocyc$(h1?3l&o5SSgb=yHX3u#mqNusO1d{v^dXnjuN eZqIZyZSeSOC#PCF%Mx{iu@#B?bt9`E*7*;sv%gdT delta 2259 zcmd^=-*1yu7{|W_Ht4!BevAo@A1{IkTN#6`j=^wioj7oV$zTRYVwSR%vC&CalnYHE z#5iL>6Tl@VazR3r$PJbl3`C=7BwnD=M8bu*=x!h}2*D7&5I@g*x|sJ_y`C6UbbjG3mI7&E#D2*aWE$7UuDXIG-<72c%D675r_oRK%S5L8*c9 za7elg`{7Q;BZbnRjK5nX9fZfGN!#f!ohcn+-iswtCAbeQq3Inwt$-+Ea38-7tHU4Wl+>Q~^a^Q0!`{RM|%!vbkH{Z~D=Zfv2{ z%=2ro9$tZs?61%x(t0{tU^P4nSHrL26Htq!TF?MFt6qk2co^FFZ5V}Bi=`tl1v#4n zk4mTDJh%m3f=pHE61UG9xRm{sq+t_=;U;(!ZiRJ^Nz368NS7|c3ivBr2aA_Vt6(d% z@*RMC;dd|sW6PutxF2#ReVgN5$R%k`xs>5HRZGLT1u~{R&^|B>!|)<}9^Qa(Bw)%lkY4v`EI~Cyq_D7w>bGuLX&S4mchYR zC*NDp+=?KU$u|UTpED3mlo_F66M`5-Q#+u^_aWr=r8ZadN?5_;HfZu4geKo-kg2)@ zO}^N(PQG){M_geKq5&?W}koqUzhK&qr4q1{N?HYZ;#H2FGU!e;KJ(MiWOxE4k@Hl@@wax7NR2$5!Q zF&QK)Nn5yvX_6p>>w zmBu8}Zowi#PWM}`wn*>ago%cKexQ{f{PwtVLc3jyQquMpKXk$ym6LPHFgX@hTl2zX znMF<^EegqnWFxtN#7E5}CzBSdNGsC>k}roJR`;r0+u*s&aXt36SmT=hUvnXkEFt+9 z;D`Mzn}q+4{Ot1lrm5v^sorGTOYiFT`t}X>4kW#ox>Lr2VDP^kI{JG_d3JXFAE9W0 zM~wGDuQ%B pod-full.yaml\n" +"\t\techo '---' >> pod-full.yaml\n" +"\t\tcat pod-2.yaml >> pod-full.yaml\n" +"\t\tcat pod-full.yaml | kusion diff -" msgstr "" -"Paths to focus on to inspect. It cannot be empty and each path needs to be a " -"valid relative path from the workdir" +"\n" +"\t\t# The comparison object comes from the files\n" +"\t\tkusion diff pod-1.yaml pod-2.yaml\n" +"\t\tkusion diff pod-1.yaml pod-2.yaml --swap=true\n" +"\n" +"\t\t# The comparison object comes from the stdin\n" +"\t\tcat pod-1.yaml > pod-full.yaml\n" +"\t\techo '---' >> pod-full.yaml\n" +"\t\tcat pod-2.yaml >> pod-full.yaml\n" +"\t\tcat pod-full.yaml | kusion diff -" -#: pkg/cmd/deps/deps.go:55 +#: pkg/cmd/preview/preview.go:14 msgid "" -"Direct is set to \"down\", \"only\" means only the downstream project/stack " -"list will be output. Valid values: project, stack. Defaults to project" +"\n" +"\t\tPreview a series of resource changes within the stack.\n" +"\n" +"\t\tCreate or update or delete resources according to the KCL files within a " +"stack. By default,\n" +" Kusion will generate an execution plan and present it for your approval " +"before taking any action." msgstr "" -"Direct is set to \"down\", \"only\" means only the downstream project/stack " -"list will be output. Valid values: project, stack. Defaults to project" +"\n" +"\t\tPreview a series of resource changes within the stack.\n" +"\n" +"\t\tCreate or update or delete resources according to the KCL files within a " +"stack. By default,\n" +" Kusion will generate an execution plan and present it for your approval " +"before taking any action." -#: pkg/cmd/diff/diff.go:74 -msgid "Specify the output style. One of human and raw. The default is human" -msgstr "Specify the output style. One of human and raw. The default is human" +#: pkg/cmd/preview/preview.go:66 +msgid "no-style sets to RawOutput mode and disables all of styling" +msgstr "no-style sets to RawOutput mode and disables all of styling" -#: pkg/cmd/init/init.go:76 -msgid "List templates used to initialize a project" -msgstr "List templates used to initialize a project" +#: pkg/cmd/diff/diff.go:25 +msgid "" +"\n" +"\t\tCompare files differences and display the delta.\n" +"\t\tSupport input file types are: YAML (http://yaml.org/) and JSON (http://" +"json.org/)." +msgstr "" +"\n" +"\t\tCompare files differences and display the delta.\n" +"\t\tSupport input file types are: YAML (http://yaml.org/) and JSON (http://" +"json.org/)." -#: pkg/cmd/init/init.go:111 +#: pkg/cmd/diff/diff.go:70 msgid "" -"Specify the output format of templates. If specified, only support json for " -"now; if not, template name and description is given" +"Swap and for comparison. Note that it is invalid when is " +"stdin. The default is false" msgstr "" -"Specify the output format of templates. If specified, only support json for " -"now; if not, template name and description is given" +"Swap and for comparison. Note that it is invalid when is " +"stdin. The default is false" -#: pkg/cmd/apply/apply.go:62 +#: pkg/cmd/init/init.go:78 msgid "" -"After creating/updating/deleting the requested object, watch for changes" +"\n" +"\t\tThis command gets the descriptions and definitions of the templates " +"which are used to initialize the project scaffolding." msgstr "" -"After creating/updating/deleting the requested object, watch for changes" +"\n" +"\t\tThis command gets the descriptions and definitions of the templates " +"which are used to initialize the project scaffolding." -#: pkg/cmd/destroy/destroy.go:24 +#: pkg/cmd/ls/ls.go:20 msgid "" "\n" -"\t\t# Delete the configuration of current stack\n" -"\t\tkusion destroy" +"\t\t# List all project and stack information in the current directory\n" +"\t\tkusion ls\n" +"\n" +"\t\t# List all project and stack information in the specify directory\n" +"\t\tkusion ls ./path/to/project_dir\n" +"\n" +"\t\t# List all project and stack information in the specify directory,\n" +"\t\t# and output in a Tree format\n" +"\t\tkusion ls ./path/to/project_dir --format=tree\n" +"\n" +"\t\t# List all project and stack information in the specify directory,\n" +"\t\t# and output in a JSON format\n" +"\t\tkusion ls ./path/to/project_dir --format=json\n" +"\n" +"\t\t# List all project and stack information in the specify directory,\n" +"\t\t# and output in a YAML format\n" +"\t\tkusion ls ./path/to/project_dir --format=yaml\n" +"\n" +"\t\t# List all project and stack by level, and output in a Tree format\n" +"\t\tkusion ls ./path/to/project_dir --format=tree --level=1" msgstr "" "\n" -"\t\t# Delete the configuration of current stack\n" -"\t\tkusion destroy" +"\t\t# List all project and stack information in the current directory\n" +"\t\tkusion ls\n" +"\n" +"\t\t# List all project and stack information in the specify directory\n" +"\t\tkusion ls ./path/to/project_dir\n" +"\n" +"\t\t# List all project and stack information in the specify directory,\n" +"\t\t# and output in a Tree format\n" +"\t\tkusion ls ./path/to/project_dir --format=tree\n" +"\n" +"\t\t# List all project and stack information in the specify directory,\n" +"\t\t# and output in a JSON format\n" +"\t\tkusion ls ./path/to/project_dir --format=json\n" +"\n" +"\t\t# List all project and stack information in the specify directory,\n" +"\t\t# and output in a YAML format\n" +"\t\tkusion ls ./path/to/project_dir --format=yaml\n" +"\n" +"\t\t# List all project and stack by level, and output in a Tree format\n" +"\t\tkusion ls ./path/to/project_dir --format=tree --level=1" -#: pkg/cmd/init/init.go:13 -msgid "Initialize the scaffolding for a project" -msgstr "Initialize the scaffolding for a project" +#: pkg/cmd/check/check.go:15 +msgid "" +"\n" +"\t\tCheck if KCL configurations in current directory ok to compile." +msgstr "" +"\n" +"\t\tCheck if KCL configurations in current directory ok to compile." -#: pkg/cmd/preview/preview.go:12 -msgid "Preview a series of resource changes within the stack" -msgstr "Preview a series of resource changes within the stack" +#: pkg/cmd/compile/compile.go:21 +msgid "" +"\n" +"\t\t# Compile configuration in main.k into YAML format\n" +"\t\tkusion compile main.k\n" +"\n" +"\t\t# Compile main.k with arguments\n" +"\t\tkusion compile main.k -D name=test -D age=18\n" +"\n" +"\t\t# Compile main.k with arguments from settings.yaml\n" +"\t\tkusion compile main.k -Y settings.yaml\n" +"\n" +"\t\t# Compile main.k with work directory\n" +"\t\tkusion compile main.k -w appops/demo/dev\n" +"\n" +"\t\t# Compile with override\n" +"\t\tkusion compile -O __main__:appConfiguration.image=nginx:latest -a\n" +"\n" +"\t\t# Compile main.k and write result into output.yaml\n" +"\t\tkusion compile main.k -o output.yaml" +msgstr "" +"\n" +"\t\t# Compile configuration in main.k into YAML format\n" +"\t\tkusion compile main.k\n" +"\n" +"\t\t# Compile main.k with arguments\n" +"\t\tkusion compile main.k -D name=test -D age=18\n" +"\n" +"\t\t# Compile main.k with arguments from settings.yaml\n" +"\t\tkusion compile main.k -Y settings.yaml\n" +"\n" +"\t\t# Compile main.k with work directory\n" +"\t\tkusion compile main.k -w appops/demo/dev\n" +"\n" +"\t\t# Compile with override\n" +"\t\tkusion compile -O __main__:appConfiguration.image=nginx:latest -a\n" +"\n" +"\t\t# Compile main.k and write result into output.yaml\n" +"\t\tkusion compile main.k -o output.yaml" -#: pkg/cmd/version/version.go:12 -msgid "Print the kusion version info" -msgstr "Print the kusion version info" +#: pkg/cmd/compile/compile.go:78 +msgid "Specify the top-level argument" +msgstr "Specify the top-level argument" -#: pkg/cmd/compile/compile.go:12 -msgid "Compile KCL into YAML" -msgstr "Compile KCL into YAML" +#: pkg/cmd/destroy/destroy.go:12 +msgid "Destroy a configuration stack to resource(s) by work directory" +msgstr "Destroy a configuration stack to resource(s) by work directory" #: pkg/cmd/compile/compile.go:14 msgid "" @@ -191,47 +329,87 @@ msgstr "" "in KCL,\n" "\t\tand output the compiled results to a file when using --output flag." -#: pkg/cmd/deps/deps.go:57 +#: pkg/cmd/compile/compile.go:74 +msgid "Specify the work directory" +msgstr "Specify the work directory" + +#: pkg/cmd/init/init.go:64 +msgid "Skip prompts and proceed with default values" +msgstr "Skip prompts and proceed with default values" + +#: pkg/cmd/preview/preview.go:64 +msgid "Automatically show all plan details, combined use with flag `--detail`" +msgstr "Automatically show all plan details, combined use with flag `--detail`" + +#: pkg/cmd/diff/diff.go:72 +msgid "Diff mode. One of noemal and . The default is normal ignore-added" +msgstr "Diff mode. One of noemal and . The default is normal ignore-added" + +#: pkg/cmd/init/init.go:55 msgid "" -"File paths to ignore when filtering the affected stacks/projects. Each path " -"needs to be a valid relative path from the workdir. If not set, no paths " -"will be ignored." +"Initialize with specified project name. If not specified, a prompt will " +"request it" msgstr "" -"File paths to ignore when filtering the affected stacks/projects. Each path " -"needs to be a valid relative path from the workdir. If not set, no paths " -"will be ignored." +"Initialize with specified project name. If not specified, a prompt will " +"request it" -#: pkg/cmd/diff/diff.go:23 -msgid "Compare differences between input files and " -msgstr "Compare differences between input files and " +#: pkg/cmd/destroy/destroy.go:52 +msgid "Automatically show plan details after previewing it" +msgstr "Automatically show plan details after previewing it" -#: pkg/cmd/version/version.go:42 -msgid "Print version info as YAML" -msgstr "Print version info as YAML" +#: pkg/cmd/env/env.go:25 +msgid "" +"\n" +"\t\t# Print Kusion environment information\n" +"\t\tkusion env\n" +"\n" +"\t\t# Print Kusion environment information as JSON format\n" +"\t\tkusion env --json" +msgstr "" +"\n" +"\t\t# Print Kusion environment information\n" +"\t\tkusion env\n" +"\n" +"\t\t# Print Kusion environment information as JSON format\n" +"\t\tkusion env --json" -#: pkg/cmd/version/version.go:44 -msgid "Print version info as versionShort string" -msgstr "Print version info as versionShort string" +#: pkg/cmd/init/init.go:67 +msgid "" +"Custom params in JSON. If specified, it will be used as the template default " +"value and skip prompts" +msgstr "" +"Custom params in JSON. If specified, it will be used as the template default " +"value and skip prompts" -#: pkg/cmd/apply/apply.go:58 pkg/cmd/destroy/destroy.go:50 -msgid "Automatically approve and perform the update after previewing it" -msgstr "Automatically approve and perform the update after previewing it" +#: pkg/cmd/init/init.go:111 +msgid "" +"Specify the output format of templates. If specified, only support json for " +"now; if not, template name and description is given" +msgstr "" +"Specify the output format of templates. If specified, only support json for " +"now; if not, template name and description is given" -#: pkg/cmd/deps/deps.go:12 -msgid "Show KCL file dependency information" -msgstr "Show KCL file dependency information" +#: pkg/cmd/compile/compile.go:12 +msgid "Compile KCL into YAML" +msgstr "Compile KCL into YAML" -#: pkg/cmd/diff/diff.go:78 -msgid "Omit the dyff summary header. The default is false" -msgstr "Omit the dyff summary header. The default is false" +#: pkg/cmd/compile/compile.go:76 +msgid "Specify the command line setting files" +msgstr "Specify the command line setting files" -#: pkg/cmd/diff/diff.go:80 +#: pkg/cmd/destroy/destroy.go:24 msgid "" -"Sort from and to by kubernetes resource order(non standard behavior). The " -"default is false" +"\n" +"\t\t# Delete the configuration of current stack\n" +"\t\tkusion destroy" msgstr "" -"Sort from and to by kubernetes resource order(non standard behavior). The " -"default is false" +"\n" +"\t\t# Delete the configuration of current stack\n" +"\t\tkusion destroy" + +#: pkg/cmd/destroy/destroy.go:48 pkg/cmd/preview/preview.go:60 +msgid "Specify the operator" +msgstr "Specify the operator" #: pkg/cmd/init/init.go:20 msgid "" @@ -261,17 +439,24 @@ msgstr "" "\t\t# Initialize a project from a specific local template\n" "\t\tkusion init /path/to/templates" -#: pkg/cmd/version/version.go:14 -msgid "" -"\n" -" Print the kusion version information for the current context." +#: pkg/cmd/version/version.go:13 +#, fuzzy +msgid "Print the Kusion version information for the current context" msgstr "" "\n" " Print the kusion version information for the current context." -#: pkg/cmd/apply/apply.go:12 -msgid "Apply a configuration stack to resource(s) by work directory" -msgstr "Apply a configuration stack to resource(s) by work directory" +#: pkg/cmd/apply/apply.go:60 +msgid "" +"Preview the execution effect (always successful) without actually applying " +"the changes" +msgstr "" +"Preview the execution effect (always successful) without actually applying " +"the changes" + +#: pkg/cmd/compile/compile.go:61 +msgid "Specify the output file" +msgstr "Specify the output file" #: pkg/cmd/deps/deps.go:51 msgid "" @@ -281,23 +466,35 @@ msgstr "" "Inspect direct of the dependency information. Valid values: up, down. " "Defaults to up" -#: pkg/cmd/init/init.go:58 +#: pkg/cmd/diff/diff.go:80 msgid "" -"Force generating the scaffolding files, even if it would change the existing " -"files" +"Sort from and to by kubernetes resource order(non standard behavior). The " +"default is false" msgstr "" -"Force generating the scaffolding files, even if it would change the existing " -"files" +"Sort from and to by kubernetes resource order(non standard behavior). The " +"default is false" -#: pkg/cmd/version/version.go:17 +#: pkg/cmd/deps/deps.go:57 msgid "" -"\n" -"\t\t# Print the kusion version\n" -"\t\tkusion version" +"File paths to ignore when filtering the affected stacks/projects. Each path " +"needs to be a valid relative path from the workdir. If not set, no paths " +"will be ignored." msgstr "" -"\n" -"\t\t# Print the kusion version\n" -"\t\tkusion version" +"File paths to ignore when filtering the affected stacks/projects. Each path " +"needs to be a valid relative path from the workdir. If not set, no paths " +"will be ignored." + +#: pkg/cmd/init/init.go:13 +msgid "Initialize the scaffolding for a project" +msgstr "Initialize the scaffolding for a project" + +#: pkg/cmd/ls/ls.go:62 +msgid "" +"Output format of the project information. valid values: json, yaml, tree, " +"human" +msgstr "" +"Output format of the project information. valid values: json, yaml, tree, " +"human" #: pkg/cmd/apply/apply.go:14 msgid "" @@ -323,37 +520,53 @@ msgstr "" "\t\tYou can check the plan details and then decide if the actions should be " "taken or aborted." -#: pkg/cmd/env/env.go:12 -msgid "Print Kusion environment information" -msgstr "Print Kusion environment information" +#: pkg/cmd/check/check.go:13 +msgid "Check if KCL configurations in current directory ok to compile" +msgstr "Check if KCL configurations in current directory ok to compile" -#: pkg/cmd/apply/apply.go:22 +#: pkg/cmd/compile/compile.go:80 +msgid "Specify the configuration override path and value" +msgstr "Specify the configuration override path and value" + +#: pkg/cmd/deps/deps.go:12 +msgid "Show KCL file dependency information" +msgstr "Show KCL file dependency information" + +#: pkg/cmd/preview/preview.go:20 msgid "" "\n" -"\t\t# Apply with specifying work directory\n" -"\t\tkusion apply -w /path/to/workdir\n" +"\t\t# Preview with specifying work directory\n" +"\t\tkusion preview -w /path/to/workdir\n" "\n" -"\t\t# Apply with specifying arguments\n" -"\t\tkusion apply -D name=test -D age=18\n" +"\t\t# Preview with specifying arguments\n" +"\t\tkusion preview -D name=test -D age=18\n" "\n" -"\t\t# Apply with specifying setting file\n" -"\t\tkusion apply -Y settings.yaml\n" +"\t\t# Preview with specifying setting file\n" +"\t\tkusion preview -Y settings.yaml\n" "\n" -"\t\t# Skip interactive approval of plan details before applying\n" -"\t\tkusion apply --yes" +"\t\t# Preview with ignored fields\n" +"\t\tkusion preview --ignore-fields=\"metadata.generation,metadata." +"managedFields" msgstr "" "\n" -"\t\t# Apply with specifying work directory\n" -"\t\tkusion apply -w /path/to/workdir\n" +"\t\t# Preview with specifying work directory\n" +"\t\tkusion preview -w /path/to/workdir\n" "\n" -"\t\t# Apply with specifying arguments\n" -"\t\tkusion apply -D name=test -D age=18\n" +"\t\t# Preview with specifying arguments\n" +"\t\tkusion preview -D name=test -D age=18\n" "\n" -"\t\t# Apply with specifying setting file\n" -"\t\tkusion apply -Y settings.yaml\n" +"\t\t# Preview with specifying setting file\n" +"\t\tkusion preview -Y settings.yaml\n" "\n" -"\t\t# Skip interactive approval of plan details before applying\n" -"\t\tkusion apply --yes" +"\t\t# Preview with ignored fields\n" +"\t\tkusion preview --ignore-fields=\"metadata.generation,metadata." +"managedFields" + +#: pkg/cmd/apply/apply.go:62 +msgid "" +"After creating/updating/deleting the requested object, watch for changes" +msgstr "" +"After creating/updating/deleting the requested object, watch for changes" #: pkg/cmd/deps/deps.go:14 msgid "" @@ -369,56 +582,6 @@ msgstr "" " By default, it will list all the KCL files that are dependent on the " "given package path." -#: pkg/cmd/destroy/destroy.go:14 -msgid "" -"\n" -"\t\tDelete resources by resource spec.\n" -"\n" -"\t\tOnly KCL files are accepted. Only one type of arguments may be " -"specified: filenames,\n" -"\t\tresources and names, or resources and label selector.\n" -"\n" -"\t\tNote that the destroy command does NOT do resource version checks, so if " -"someone submits an\n" -"\t\tupdate to a resource right when you submit a destroy, their update will " -"be lost along with the\n" -"\t\trest of the resource." -msgstr "" -"\n" -"\t\tDelete resources by resource spec.\n" -"\n" -"\t\tOnly KCL files are accepted. Only one type of arguments may be " -"specified: filenames,\n" -"\t\tresources and names, or resources and label selector.\n" -"\n" -"\t\tNote that the destroy command does NOT do resource version checks, so if " -"someone submits an\n" -"\t\tupdate to a resource right when you submit a destroy, their update will " -"be lost along with the\n" -"\t\trest of the resource." - -#: pkg/cmd/ls/ls.go:12 -msgid "List all project and stack information" -msgstr "List all project and stack information" - -#: pkg/cmd/preview/preview.go:14 -msgid "" -"\n" -"\t\tPreview a series of resource changes within the stack.\n" -"\n" -"\t\tCreate or update or delete resources according to the KCL files within a " -"stack. By default,\n" -" Kusion will generate an execution plan and present it for your approval " -"before taking any action." -msgstr "" -"\n" -"\t\tPreview a series of resource changes within the stack.\n" -"\n" -"\t\tCreate or update or delete resources according to the KCL files within a " -"stack. By default,\n" -" Kusion will generate an execution plan and present it for your approval " -"before taking any action." - #: pkg/cmd/init/init.go:52 msgid "" "Initialize with specified template. If not specified, a prompt will request " @@ -427,100 +590,6 @@ msgstr "" "Initialize with specified template. If not specified, a prompt will request " "it" -#: pkg/cmd/init/init.go:67 -msgid "" -"Custom params in JSON. If specified, it will be used as the template default " -"value and skip prompts" -msgstr "" -"Custom params in JSON. If specified, it will be used as the template default " -"value and skip prompts" - -#: pkg/cmd/ls/ls.go:20 -msgid "" -"\n" -"\t\t# List all project and stack information in the current directory\n" -"\t\tkusion ls\n" -"\n" -"\t\t# List all project and stack information in the specify directory\n" -"\t\tkusion ls ./path/to/project_dir\n" -"\n" -"\t\t# List all project and stack information in the specify directory,\n" -"\t\t# and output in a Tree format\n" -"\t\tkusion ls ./path/to/project_dir --format=tree\n" -"\n" -"\t\t# List all project and stack information in the specify directory,\n" -"\t\t# and output in a JSON format\n" -"\t\tkusion ls ./path/to/project_dir --format=json\n" -"\n" -"\t\t# List all project and stack information in the specify directory,\n" -"\t\t# and output in a YAML format\n" -"\t\tkusion ls ./path/to/project_dir --format=yaml\n" -"\n" -"\t\t# List all project and stack by level, and output in a Tree format\n" -"\t\tkusion ls ./path/to/project_dir --format=tree --level=1" -msgstr "" -"\n" -"\t\t# List all project and stack information in the current directory\n" -"\t\tkusion ls\n" -"\n" -"\t\t# List all project and stack information in the specify directory\n" -"\t\tkusion ls ./path/to/project_dir\n" -"\n" -"\t\t# List all project and stack information in the specify directory,\n" -"\t\t# and output in a Tree format\n" -"\t\tkusion ls ./path/to/project_dir --format=tree\n" -"\n" -"\t\t# List all project and stack information in the specify directory,\n" -"\t\t# and output in a JSON format\n" -"\t\tkusion ls ./path/to/project_dir --format=json\n" -"\n" -"\t\t# List all project and stack information in the specify directory,\n" -"\t\t# and output in a YAML format\n" -"\t\tkusion ls ./path/to/project_dir --format=yaml\n" -"\n" -"\t\t# List all project and stack by level, and output in a Tree format\n" -"\t\tkusion ls ./path/to/project_dir --format=tree --level=1" - -#: pkg/cmd/compile/compile.go:72 -msgid "Specify the work directory" -msgstr "Specify the work directory" - -#: pkg/cmd/env/env.go:50 -msgid "Print the environment in JSON format" -msgstr "Print the environment in JSON format" - -#: pkg/cmd/init/init.go:81 -msgid "" -"\n" -"\t\t# Get name and description of internal templates\n" -"\t\tkusion init templates\n" -"\n" -"\t\t# Get templates from specific templates repository\n" -"\t\tkusion init templates https://github.com// --online=true" -msgstr "" -"\n" -"\t\t# Get name and description of internal templates\n" -"\t\tkusion init templates\n" -"\n" -"\t\t# Get templates from specific templates repository\n" -"\t\tkusion init templates https://github.com// --online=true" - -#: pkg/cmd/preview/preview.go:62 -msgid "Automatically show plan details with interactive options" -msgstr "Automatically show plan details with interactive options" - -#: pkg/cmd/cmd.go:58 -msgid "Kusion manages the Kubernetes cluster by code" -msgstr "Kusion manages the Kubernetes cluster by code" - -#: pkg/cmd/diff/diff.go:70 -msgid "" -"Swap and for comparison. Note that it is invalid when is " -"stdin. The default is false" -msgstr "" -"Swap and for comparison. Note that it is invalid when is " -"stdin. The default is false" - #: pkg/cmd/ls/ls.go:14 msgid "" "\n" @@ -535,157 +604,166 @@ msgstr "" "\t\tThe default output is in a human friendly format, and it also supports\n" "\t\ta variety of formatted structure output." -#: pkg/cmd/preview/preview.go:66 -msgid "no-style sets to RawOutput mode and disables all of styling" -msgstr "no-style sets to RawOutput mode and disables all of styling" +#: pkg/cmd/ls/ls.go:64 +msgid "Max display depth of the project and stack tree. One of 0,1,2" +msgstr "Max display depth of the project and stack tree. One of 0,1,2" -#: pkg/cmd/diff/diff.go:76 -msgid "Ignore order changes in lists. The default is false" -msgstr "Ignore order changes in lists. The default is false" +#: pkg/cmd/preview/preview.go:68 +msgid "Ignore differences of target fields" +msgstr "Ignore differences of target fields" -#: pkg/cmd/env/env.go:25 -msgid "" -"\n" -"\t\t# Print Kusion environment information\n" -"\t\tkusion env\n" -"\n" -"\t\t# Print Kusion environment information as JSON format\n" -"\t\tkusion env --json" -msgstr "" -"\n" -"\t\t# Print Kusion environment information\n" -"\t\tkusion env\n" -"\n" -"\t\t# Print Kusion environment information as JSON format\n" -"\t\tkusion env --json" +#: pkg/cmd/preview/preview.go:70 +msgid "Specify the output format" +msgstr "Specify the output format" -#: pkg/cmd/init/init.go:61 +#: pkg/cmd/cmd.go:58 +msgid "Kusion manages the Kubernetes cluster by code" +msgstr "Kusion manages the Kubernetes cluster by code" + +#: pkg/cmd/deps/deps.go:53 msgid "" -"Use templates from online repository to initialize project, or use locally " -"cached templates" +"Paths to focus on to inspect. It cannot be empty and each path needs to be a " +"valid relative path from the workdir" msgstr "" -"Use templates from online repository to initialize project, or use locally " -"cached templates" +"Paths to focus on to inspect. It cannot be empty and each path needs to be a " +"valid relative path from the workdir" -#: pkg/cmd/preview/preview.go:68 -msgid "Ignore differences of target fields" -msgstr "Ignore differences of target fields" +#: pkg/cmd/diff/diff.go:76 +msgid "Ignore order changes in lists. The default is false" +msgstr "Ignore order changes in lists. The default is false" + +#: pkg/cmd/ls/ls.go:12 +msgid "List all project and stack information" +msgstr "List all project and stack information" -#: pkg/cmd/init/init.go:15 +#: pkg/cmd/version/version.go:14 +#, fuzzy msgid "" "\n" -"\t\tThis command initializes the scaffolding for a project, generating a " -"project from an appointed template with correct structure.\n" -"\n" -"\t\tThe scaffold templates can be retrieved from local or online. The built-" -"in templates are used by default, self-defined templates are also supported " -"by assigning the template repository path." +"\t\t# Print the Kusion version\n" +"\t\tkusion version" msgstr "" "\n" -"\t\tThis command initializes the scaffolding for a project, generating a " -"project from an appointed template with correct structure.\n" -"\n" -"\t\tThe scaffold templates can be retrieved from local or online. The built-" -"in templates are used by default, self-defined templates are also supported " -"by assigning the template repository path." - -#: pkg/cmd/version/version.go:40 -msgid "Print version info as JSON" -msgstr "Print version info as JSON" +"\t\t# Print the kusion version\n" +"\t\tkusion version" -#: pkg/cmd/check/check.go:15 +#: pkg/cmd/destroy/destroy.go:14 msgid "" "\n" -"\t\tCheck if KCL configurations in current directory ok to compile." -msgstr "" +"\t\tDelete resources by resource spec.\n" "\n" -"\t\tCheck if KCL configurations in current directory ok to compile." - -#: pkg/cmd/check/check.go:56 pkg/cmd/compile/compile.go:65 -msgid "Specify the override option" -msgstr "Specify the override option" - -#: pkg/cmd/compile/compile.go:21 -msgid "" +"\t\tOnly KCL files are accepted. Only one type of arguments may be " +"specified: filenames,\n" +"\t\tresources and names, or resources and label selector.\n" "\n" -"\t\t# Compile configuration in main.k into YAML format\n" -"\t\tkusion compile main.k\n" +"\t\tNote that the destroy command does NOT do resource version checks, so if " +"someone submits an\n" +"\t\tupdate to a resource right when you submit a destroy, their update will " +"be lost along with the\n" +"\t\trest of the resource." +msgstr "" "\n" -"\t\t# Compile main.k with arguments\n" -"\t\tkusion compile main.k -D name=test -D age=18\n" +"\t\tDelete resources by resource spec.\n" "\n" -"\t\t# Compile main.k with arguments from settings.yaml\n" -"\t\tkusion compile main.k -Y settings.yaml\n" +"\t\tOnly KCL files are accepted. Only one type of arguments may be " +"specified: filenames,\n" +"\t\tresources and names, or resources and label selector.\n" "\n" -"\t\t# Compile main.k with work directory\n" -"\t\tkusion compile main.k -w appops/demo/dev\n" +"\t\tNote that the destroy command does NOT do resource version checks, so if " +"someone submits an\n" +"\t\tupdate to a resource right when you submit a destroy, their update will " +"be lost along with the\n" +"\t\trest of the resource." + +#: pkg/cmd/env/env.go:14 +msgid "" "\n" -"\t\t# Compile with override\n" -"\t\tkusion compile -O __main__:appConfiguration.image=nginx:latest -a\n" +" Env prints Kusion environment information.\n" "\n" -"\t\t# Compile main.k and write result into output.yaml\n" -"\t\tkusion compile main.k -o output.yaml" -msgstr "" +" By default env prints information as a shell script (on Windows, a batch " +"file). If one\n" +" or more variable names is given as arguments, env prints the value of " +"each named variable\n" +" on its own line.\n" "\n" -"\t\t# Compile configuration in main.k into YAML format\n" -"\t\tkusion compile main.k\n" +" The --json flag prints the environment in JSON format instead of as a " +"shell script.\n" "\n" -"\t\t# Compile main.k with arguments\n" -"\t\tkusion compile main.k -D name=test -D age=18\n" +" For more about environment variables, see \"kusion env -h\"." +msgstr "" "\n" -"\t\t# Compile main.k with arguments from settings.yaml\n" -"\t\tkusion compile main.k -Y settings.yaml\n" +" Env prints Kusion environment information.\n" "\n" -"\t\t# Compile main.k with work directory\n" -"\t\tkusion compile main.k -w appops/demo/dev\n" +" By default env prints information as a shell script (on Windows, a batch " +"file). If one\n" +" or more variable names is given as arguments, env prints the value of " +"each named variable\n" +" on its own line.\n" "\n" -"\t\t# Compile with override\n" -"\t\tkusion compile -O __main__:appConfiguration.image=nginx:latest -a\n" +" The --json flag prints the environment in JSON format instead of as a " +"shell script.\n" "\n" -"\t\t# Compile main.k and write result into output.yaml\n" -"\t\tkusion compile main.k -o output.yaml" +" For more about environment variables, see \"kusion env -h\"." -#: pkg/cmd/compile/compile.go:74 -msgid "Specify the command line setting files" -msgstr "Specify the command line setting files" +#: pkg/cmd/env/env.go:50 +msgid "Print the environment in JSON format" +msgstr "Print the environment in JSON format" -#: pkg/cmd/diff/diff.go:25 +#: pkg/cmd/init/init.go:61 msgid "" -"\n" -"\t\tCompare files differences and display the delta.\n" -"\t\tSupport input file types are: YAML (http://yaml.org/) and JSON (http://" -"json.org/)." +"Use templates from online repository to initialize project, or use locally " +"cached templates" msgstr "" -"\n" -"\t\tCompare files differences and display the delta.\n" -"\t\tSupport input file types are: YAML (http://yaml.org/) and JSON (http://" -"json.org/)." +"Use templates from online repository to initialize project, or use locally " +"cached templates" -#: pkg/cmd/diff/diff.go:72 -msgid "Diff mode. One of noemal and . The default is normal ignore-added" -msgstr "Diff mode. One of noemal and . The default is normal ignore-added" +#: pkg/cmd/deps/deps.go:55 +msgid "" +"Direct is set to \"down\", \"only\" means only the downstream project/stack " +"list will be output. Valid values: project, stack. Defaults to project" +msgstr "" +"Direct is set to \"down\", \"only\" means only the downstream project/stack " +"list will be output. Valid values: project, stack. Defaults to project" -#: pkg/cmd/cmd.go:60 +#: pkg/cmd/init/init.go:76 +msgid "List templates used to initialize a project" +msgstr "List templates used to initialize a project" + +#: pkg/cmd/init/init.go:81 msgid "" "\n" -" Kusion is a cloud-native programmable technology stack, which manages " -"the Kubernetes cluster by code." +"\t\t# Get name and description of internal templates\n" +"\t\tkusion init templates\n" +"\n" +"\t\t# Get templates from specific templates repository\n" +"\t\tkusion init templates https://github.com// --online=true" msgstr "" "\n" -" Kusion is a cloud-native programmable technology stack, which manages " -"the Kubernetes cluster by code." - -#: pkg/cmd/check/check.go:13 -msgid "Check if KCL configurations in current directory ok to compile" -msgstr "Check if KCL configurations in current directory ok to compile" +"\t\t# Get name and description of internal templates\n" +"\t\tkusion init templates\n" +"\n" +"\t\t# Get templates from specific templates repository\n" +"\t\tkusion init templates https://github.com// --online=true" #: pkg/cmd/check/check.go:54 pkg/cmd/compile/compile.go:63 msgid "Disable dumping None values" msgstr "Disable dumping None values" -#: pkg/cmd/compile/compile.go:78 -msgid "Specify the configuration override path and value" -msgstr "Specify the configuration override path and value" +#: pkg/cmd/check/check.go:56 pkg/cmd/compile/compile.go:65 +msgid "Specify the override option" +msgstr "Specify the override option" + +#: pkg/cmd/diff/diff.go:23 +msgid "Compare differences between input files and " +msgstr "Compare differences between input files and " + +#: pkg/cmd/preview/preview.go:62 +msgid "Automatically show plan details with interactive options" +msgstr "Automatically show plan details with interactive options" + +#: pkg/cmd/env/env.go:12 +msgid "Print Kusion environment information" +msgstr "Print Kusion environment information" #: pkg/cmd/deps/deps.go:18 msgid "" @@ -721,92 +799,18 @@ msgstr "" "\t\tkusion deps --direct down --focus path/to/focus1 --focus path/to/focus2 " "--ignore path/to/ignore" -#: pkg/cmd/diff/diff.go:29 -msgid "" -"\n" -"\t\t# The comparison object comes from the files\n" -"\t\tkusion diff pod-1.yaml pod-2.yaml\n" -"\t\tkusion diff pod-1.yaml pod-2.yaml --swap=true\n" -"\n" -"\t\t# The comparison object comes from the stdin\n" -"\t\tcat pod-1.yaml > pod-full.yaml\n" -"\t\techo '---' >> pod-full.yaml\n" -"\t\tcat pod-2.yaml >> pod-full.yaml\n" -"\t\tcat pod-full.yaml | kusion diff -" -msgstr "" -"\n" -"\t\t# The comparison object comes from the files\n" -"\t\tkusion diff pod-1.yaml pod-2.yaml\n" -"\t\tkusion diff pod-1.yaml pod-2.yaml --swap=true\n" -"\n" -"\t\t# The comparison object comes from the stdin\n" -"\t\tcat pod-1.yaml > pod-full.yaml\n" -"\t\techo '---' >> pod-full.yaml\n" -"\t\tcat pod-2.yaml >> pod-full.yaml\n" -"\t\tcat pod-full.yaml | kusion diff -" - -#: pkg/cmd/compile/compile.go:61 -msgid "Specify the output file" -msgstr "Specify the output file" - -#: pkg/cmd/destroy/destroy.go:12 -msgid "Destroy a configuration stack to resource(s) by work directory" -msgstr "Destroy a configuration stack to resource(s) by work directory" - -#: pkg/cmd/init/init.go:64 -msgid "Skip prompts and proceed with default values" -msgstr "Skip prompts and proceed with default values" - -#: pkg/cmd/ls/ls.go:64 -msgid "Max display depth of the project and stack tree. One of 0,1,2" -msgstr "Max display depth of the project and stack tree. One of 0,1,2" - -#: pkg/cmd/preview/preview.go:70 -msgid "Specify the output format" -msgstr "Specify the output format" +#: pkg/cmd/diff/diff.go:74 +msgid "Specify the output style. One of human and raw. The default is human" +msgstr "Specify the output style. One of human and raw. The default is human" -#: pkg/cmd/apply/apply.go:60 -msgid "" -"Preview the execution effect (always successful) without actually applying " -"the changes" -msgstr "" -"Preview the execution effect (always successful) without actually applying " -"the changes" +#~ msgid "Print the kusion version info" +#~ msgstr "Print the kusion version info" -#: pkg/cmd/destroy/destroy.go:48 pkg/cmd/preview/preview.go:60 -msgid "Specify the operator" -msgstr "Specify the operator" +#~ msgid "Print version info as versionShort string" +#~ msgstr "Print version info as versionShort string" -#: pkg/cmd/preview/preview.go:20 -msgid "" -"\n" -"\t\t# Preview with specifying work directory\n" -"\t\tkusion preview -w /path/to/workdir\n" -"\n" -"\t\t# Preview with specifying arguments\n" -"\t\tkusion preview -D name=test -D age=18\n" -"\n" -"\t\t# Preview with specifying setting file\n" -"\t\tkusion preview -Y settings.yaml\n" -"\n" -"\t\t# Preview with ignored fields\n" -"\t\tkusion preview --ignore-fields=\"metadata.generation,metadata." -"managedFields" -msgstr "" -"\n" -"\t\t# Preview with specifying work directory\n" -"\t\tkusion preview -w /path/to/workdir\n" -"\n" -"\t\t# Preview with specifying arguments\n" -"\t\tkusion preview -D name=test -D age=18\n" -"\n" -"\t\t# Preview with specifying setting file\n" -"\t\tkusion preview -Y settings.yaml\n" -"\n" -"\t\t# Preview with ignored fields\n" -"\t\tkusion preview --ignore-fields=\"metadata.generation,metadata." -"managedFields" +#~ msgid "Print version info as JSON" +#~ msgstr "Print version info as JSON" -#: pkg/cmd/preview/preview.go:64 -msgid "Automatically show all plan details, combined use with flag `--detail`" -msgstr "Automatically show all plan details, combined use with flag `--detail`" +#~ msgid "Print version info as YAML" +#~ msgstr "Print version info as YAML" diff --git a/pkg/util/i18n/translations/kusion/template.pot b/pkg/util/i18n/translations/kusion/template.pot index 640b1163..6e85e038 100644 --- a/pkg/util/i18n/translations/kusion/template.pot +++ b/pkg/util/i18n/translations/kusion/template.pot @@ -7,7 +7,7 @@ msgid "" msgstr "Project-Id-Version: \n" "Report-Msgid-Bugs-To: EMAIL\n" - "POT-Creation-Date: 2023-07-11 22:23+0800\n" + "POT-Creation-Date: 2023-07-13 21:37+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,6 +16,10 @@ msgstr "Project-Id-Version: \n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" +#: pkg/cmd/preview/preview.go:12 +msgid "Preview a series of resource changes within the stack" +msgstr "" + #: pkg/cmd/check/check.go:18 msgid "\n" " # Check configuration in main.k\n" @@ -31,84 +35,153 @@ msgid "\n" " kusion check main.k -w appops/demo/dev" msgstr "" -#: pkg/cmd/destroy/destroy.go:52 -msgid "Automatically show plan details after previewing it" +#: pkg/cmd/diff/diff.go:78 +msgid "Omit the dyff summary header. The default is false" msgstr "" -#: pkg/cmd/env/env.go:14 +#: pkg/cmd/init/init.go:15 msgid "\n" - " Env prints Kusion environment information.\n" - "\n" - " By default env prints information as a shell script (on Windows, a batch file). If one\n" - " or more variable names is given as arguments, env prints the value of each named variable\n" - " on its own line.\n" - "\n" - " The --json flag prints the environment in JSON format instead of as a shell script.\n" + " This command initializes the scaffolding for a project, generating a project from an appointed template with correct structure.\n" "\n" - " For more about environment variables, see \"kusion env -h\"." + " The scaffold templates can be retrieved from local or online. The built-in templates are used by default, self-defined templates are also supported by assigning the template repository path." msgstr "" -#: pkg/cmd/init/init.go:55 -msgid "Initialize with specified project name. If not specified, a prompt will request it" +#: pkg/cmd/init/init.go:58 +msgid "Force generating the scaffolding files, even if it would change the existing files" msgstr "" -#: pkg/cmd/init/init.go:78 +#: pkg/cmd/version/version.go:35 +msgid "Output format. Only json format is supported for now" +msgstr "" + +#: pkg/cmd/cmd.go:60 msgid "\n" - " This command gets the descriptions and definitions of the templates which are used to initialize the project scaffolding." + " Kusion is a cloud-native programmable technology stack, which manages the Kubernetes cluster by code." msgstr "" -#: pkg/cmd/ls/ls.go:62 -msgid "Output format of the project information. valid values: json, yaml, tree, human" +#: pkg/cmd/apply/apply.go:12 +msgid "Apply a configuration stack to resource(s) by work directory" msgstr "" -#: pkg/cmd/compile/compile.go:76 -msgid "Specify the top-level argument" +#: pkg/cmd/apply/apply.go:22 +msgid "\n" + " # Apply with specifying work directory\n" + " kusion apply -w /path/to/workdir\n" + "\n" + " # Apply with specifying arguments\n" + " kusion apply -D name=test -D age=18\n" + "\n" + " # Apply with specifying setting file\n" + " kusion apply -Y settings.yaml\n" + "\n" + " # Skip interactive approval of plan details before applying\n" + " kusion apply --yes" msgstr "" -#: pkg/cmd/deps/deps.go:53 -msgid "Paths to focus on to inspect. It cannot be empty and each path needs to be a valid relative path from the workdir" +#: pkg/cmd/apply/apply.go:58 pkg/cmd/destroy/destroy.go:50 +msgid "Automatically approve and perform the update after previewing it" msgstr "" -#: pkg/cmd/deps/deps.go:55 -msgid "Direct is set to \"down\", \"only\" means only the downstream project/stack list will be output. Valid values: project, stack. Defaults to project" +#: pkg/cmd/compile/compile.go:67 +msgid "Disable the output style and color" msgstr "" -#: pkg/cmd/diff/diff.go:74 -msgid "Specify the output style. One of human and raw. The default is human" +#: pkg/cmd/diff/diff.go:29 +msgid "\n" + " # The comparison object comes from the files\n" + " kusion diff pod-1.yaml pod-2.yaml\n" + " kusion diff pod-1.yaml pod-2.yaml --swap=true\n" + "\n" + " # The comparison object comes from the stdin\n" + " cat pod-1.yaml > pod-full.yaml\n" + " echo '---' >> pod-full.yaml\n" + " cat pod-2.yaml >> pod-full.yaml\n" + " cat pod-full.yaml | kusion diff -" msgstr "" -#: pkg/cmd/init/init.go:76 -msgid "List templates used to initialize a project" +#: pkg/cmd/preview/preview.go:14 +msgid "\n" + " Preview a series of resource changes within the stack.\n" + "\n" + " Create or update or delete resources according to the KCL files within a stack. By default,\n" + " Kusion will generate an execution plan and present it for your approval before taking any action." msgstr "" -#: pkg/cmd/init/init.go:111 -msgid "Specify the output format of templates. If specified, only support json for now; if not, template name and description is given" +#: pkg/cmd/preview/preview.go:66 +msgid "no-style sets to RawOutput mode and disables all of styling" msgstr "" -#: pkg/cmd/apply/apply.go:62 -msgid "After creating/updating/deleting the requested object, watch for changes" +#: pkg/cmd/diff/diff.go:25 +msgid "\n" + " Compare files differences and display the delta.\n" + " Support input file types are: YAML (http://yaml.org/) and JSON (http://json.org/)." msgstr "" -#: pkg/cmd/destroy/destroy.go:24 +#: pkg/cmd/diff/diff.go:70 +msgid "Swap and for comparison. Note that it is invalid when is stdin. The default is false" +msgstr "" + +#: pkg/cmd/init/init.go:78 msgid "\n" - " # Delete the configuration of current stack\n" - " kusion destroy" + " This command gets the descriptions and definitions of the templates which are used to initialize the project scaffolding." msgstr "" -#: pkg/cmd/init/init.go:13 -msgid "Initialize the scaffolding for a project" +#: pkg/cmd/ls/ls.go:20 +msgid "\n" + " # List all project and stack information in the current directory\n" + " kusion ls\n" + "\n" + " # List all project and stack information in the specify directory\n" + " kusion ls ./path/to/project_dir\n" + "\n" + " # List all project and stack information in the specify directory,\n" + " # and output in a Tree format\n" + " kusion ls ./path/to/project_dir --format=tree\n" + "\n" + " # List all project and stack information in the specify directory,\n" + " # and output in a JSON format\n" + " kusion ls ./path/to/project_dir --format=json\n" + "\n" + " # List all project and stack information in the specify directory,\n" + " # and output in a YAML format\n" + " kusion ls ./path/to/project_dir --format=yaml\n" + "\n" + " # List all project and stack by level, and output in a Tree format\n" + " kusion ls ./path/to/project_dir --format=tree --level=1" msgstr "" -#: pkg/cmd/preview/preview.go:12 -msgid "Preview a series of resource changes within the stack" +#: pkg/cmd/check/check.go:15 +msgid "\n" + " Check if KCL configurations in current directory ok to compile." +msgstr "" + +#: pkg/cmd/compile/compile.go:21 +msgid "\n" + " # Compile configuration in main.k into YAML format\n" + " kusion compile main.k\n" + "\n" + " # Compile main.k with arguments\n" + " kusion compile main.k -D name=test -D age=18\n" + "\n" + " # Compile main.k with arguments from settings.yaml\n" + " kusion compile main.k -Y settings.yaml\n" + "\n" + " # Compile main.k with work directory\n" + " kusion compile main.k -w appops/demo/dev\n" + "\n" + " # Compile with override\n" + " kusion compile -O __main__:appConfiguration.image=nginx:latest -a\n" + "\n" + " # Compile main.k and write result into output.yaml\n" + " kusion compile main.k -o output.yaml" msgstr "" -#: pkg/cmd/version/version.go:12 -msgid "Print the kusion version info" +#: pkg/cmd/compile/compile.go:78 +msgid "Specify the top-level argument" msgstr "" -#: pkg/cmd/compile/compile.go:12 -msgid "Compile KCL into YAML" +#: pkg/cmd/destroy/destroy.go:12 +msgid "Destroy a configuration stack to resource(s) by work directory" msgstr "" #: pkg/cmd/compile/compile.go:14 @@ -120,36 +193,63 @@ msgid "\n" " and output the compiled results to a file when using --output flag." msgstr "" -#: pkg/cmd/deps/deps.go:57 -msgid "File paths to ignore when filtering the affected stacks/projects. Each path needs to be a valid relative path from the workdir. If not set, no paths will be ignored." +#: pkg/cmd/compile/compile.go:74 +msgid "Specify the work directory" msgstr "" -#: pkg/cmd/diff/diff.go:23 -msgid "Compare differences between input files and " +#: pkg/cmd/init/init.go:64 +msgid "Skip prompts and proceed with default values" +msgstr "" + +#: pkg/cmd/preview/preview.go:64 +msgid "Automatically show all plan details, combined use with flag `--detail`" msgstr "" -#: pkg/cmd/version/version.go:42 -msgid "Print version info as YAML" +#: pkg/cmd/diff/diff.go:72 +msgid "Diff mode. One of noemal and . The default is normal ignore-added" msgstr "" -#: pkg/cmd/version/version.go:44 -msgid "Print version info as versionShort string" +#: pkg/cmd/init/init.go:55 +msgid "Initialize with specified project name. If not specified, a prompt will request it" msgstr "" -#: pkg/cmd/apply/apply.go:58 pkg/cmd/destroy/destroy.go:50 -msgid "Automatically approve and perform the update after previewing it" +#: pkg/cmd/destroy/destroy.go:52 +msgid "Automatically show plan details after previewing it" msgstr "" -#: pkg/cmd/deps/deps.go:12 -msgid "Show KCL file dependency information" +#: pkg/cmd/env/env.go:25 +msgid "\n" + " # Print Kusion environment information\n" + " kusion env\n" + "\n" + " # Print Kusion environment information as JSON format\n" + " kusion env --json" msgstr "" -#: pkg/cmd/diff/diff.go:78 -msgid "Omit the dyff summary header. The default is false" +#: pkg/cmd/init/init.go:67 +msgid "Custom params in JSON. If specified, it will be used as the template default value and skip prompts" msgstr "" -#: pkg/cmd/diff/diff.go:80 -msgid "Sort from and to by kubernetes resource order(non standard behavior). The default is false" +#: pkg/cmd/init/init.go:111 +msgid "Specify the output format of templates. If specified, only support json for now; if not, template name and description is given" +msgstr "" + +#: pkg/cmd/compile/compile.go:12 +msgid "Compile KCL into YAML" +msgstr "" + +#: pkg/cmd/compile/compile.go:76 +msgid "Specify the command line setting files" +msgstr "" + +#: pkg/cmd/destroy/destroy.go:24 +msgid "\n" + " # Delete the configuration of current stack\n" + " kusion destroy" +msgstr "" + +#: pkg/cmd/destroy/destroy.go:48 pkg/cmd/preview/preview.go:60 +msgid "Specify the operator" msgstr "" #: pkg/cmd/init/init.go:20 @@ -167,27 +267,36 @@ msgid "\n" " kusion init /path/to/templates" msgstr "" -#: pkg/cmd/version/version.go:14 -msgid "\n" - " Print the kusion version information for the current context." +#: pkg/cmd/version/version.go:13 +msgid "Print the Kusion version information for the current context" msgstr "" -#: pkg/cmd/apply/apply.go:12 -msgid "Apply a configuration stack to resource(s) by work directory" +#: pkg/cmd/apply/apply.go:60 +msgid "Preview the execution effect (always successful) without actually applying the changes" +msgstr "" + +#: pkg/cmd/compile/compile.go:61 +msgid "Specify the output file" msgstr "" #: pkg/cmd/deps/deps.go:51 msgid "Inspect direct of the dependency information. Valid values: up, down. Defaults to up" msgstr "" -#: pkg/cmd/init/init.go:58 -msgid "Force generating the scaffolding files, even if it would change the existing files" +#: pkg/cmd/diff/diff.go:80 +msgid "Sort from and to by kubernetes resource order(non standard behavior). The default is false" msgstr "" -#: pkg/cmd/version/version.go:17 -msgid "\n" - " # Print the kusion version\n" - " kusion version" +#: pkg/cmd/deps/deps.go:57 +msgid "File paths to ignore when filtering the affected stacks/projects. Each path needs to be a valid relative path from the workdir. If not set, no paths will be ignored." +msgstr "" + +#: pkg/cmd/init/init.go:13 +msgid "Initialize the scaffolding for a project" +msgstr "" + +#: pkg/cmd/ls/ls.go:62 +msgid "Output format of the project information. valid values: json, yaml, tree, human" msgstr "" #: pkg/cmd/apply/apply.go:14 @@ -200,219 +309,157 @@ msgid "\n" " You can check the plan details and then decide if the actions should be taken or aborted." msgstr "" -#: pkg/cmd/env/env.go:12 -msgid "Print Kusion environment information" +#: pkg/cmd/check/check.go:13 +msgid "Check if KCL configurations in current directory ok to compile" msgstr "" -#: pkg/cmd/apply/apply.go:22 -msgid "\n" - " # Apply with specifying work directory\n" - " kusion apply -w /path/to/workdir\n" - "\n" - " # Apply with specifying arguments\n" - " kusion apply -D name=test -D age=18\n" - "\n" - " # Apply with specifying setting file\n" - " kusion apply -Y settings.yaml\n" - "\n" - " # Skip interactive approval of plan details before applying\n" - " kusion apply --yes" +#: pkg/cmd/compile/compile.go:80 +msgid "Specify the configuration override path and value" msgstr "" -#: pkg/cmd/deps/deps.go:14 -msgid "\n" - " Show the KCL file dependency information in the current directory or the specified workdir.\n" - " By default, it will list all the KCL files that are dependent on the given package path." +#: pkg/cmd/deps/deps.go:12 +msgid "Show KCL file dependency information" msgstr "" -#: pkg/cmd/destroy/destroy.go:14 +#: pkg/cmd/preview/preview.go:20 msgid "\n" - " Delete resources by resource spec.\n" + " # Preview with specifying work directory\n" + " kusion preview -w /path/to/workdir\n" "\n" - " Only KCL files are accepted. Only one type of arguments may be specified: filenames,\n" - " resources and names, or resources and label selector.\n" + " # Preview with specifying arguments\n" + " kusion preview -D name=test -D age=18\n" "\n" - " Note that the destroy command does NOT do resource version checks, so if someone submits an\n" - " update to a resource right when you submit a destroy, their update will be lost along with the\n" - " rest of the resource." + " # Preview with specifying setting file\n" + " kusion preview -Y settings.yaml\n" + "\n" + " # Preview with ignored fields\n" + " kusion preview --ignore-fields=\"metadata.generation,metadata.managedFields" msgstr "" -#: pkg/cmd/ls/ls.go:12 -msgid "List all project and stack information" +#: pkg/cmd/apply/apply.go:62 +msgid "After creating/updating/deleting the requested object, watch for changes" msgstr "" -#: pkg/cmd/preview/preview.go:14 +#: pkg/cmd/deps/deps.go:14 msgid "\n" - " Preview a series of resource changes within the stack.\n" - "\n" - " Create or update or delete resources according to the KCL files within a stack. By default,\n" - " Kusion will generate an execution plan and present it for your approval before taking any action." + " Show the KCL file dependency information in the current directory or the specified workdir.\n" + " By default, it will list all the KCL files that are dependent on the given package path." msgstr "" #: pkg/cmd/init/init.go:52 msgid "Initialize with specified template. If not specified, a prompt will request it" msgstr "" -#: pkg/cmd/init/init.go:67 -msgid "Custom params in JSON. If specified, it will be used as the template default value and skip prompts" -msgstr "" - -#: pkg/cmd/ls/ls.go:20 +#: pkg/cmd/ls/ls.go:14 msgid "\n" - " # List all project and stack information in the current directory\n" - " kusion ls\n" - "\n" - " # List all project and stack information in the specify directory\n" - " kusion ls ./path/to/project_dir\n" - "\n" - " # List all project and stack information in the specify directory,\n" - " # and output in a Tree format\n" - " kusion ls ./path/to/project_dir --format=tree\n" - "\n" - " # List all project and stack information in the specify directory,\n" - " # and output in a JSON format\n" - " kusion ls ./path/to/project_dir --format=json\n" - "\n" - " # List all project and stack information in the specify directory,\n" - " # and output in a YAML format\n" - " kusion ls ./path/to/project_dir --format=yaml\n" - "\n" - " # List all project and stack by level, and output in a Tree format\n" - " kusion ls ./path/to/project_dir --format=tree --level=1" -msgstr "" - -#: pkg/cmd/compile/compile.go:72 -msgid "Specify the work directory" + " List all project and stack information in the current directory or the\n" + " specify directory.\n" + " The default output is in a human friendly format, and it also supports\n" + " a variety of formatted structure output." msgstr "" -#: pkg/cmd/env/env.go:50 -msgid "Print the environment in JSON format" +#: pkg/cmd/ls/ls.go:64 +msgid "Max display depth of the project and stack tree. One of 0,1,2" msgstr "" -#: pkg/cmd/init/init.go:81 -msgid "\n" - " # Get name and description of internal templates\n" - " kusion init templates\n" - "\n" - " # Get templates from specific templates repository\n" - " kusion init templates https://github.com// --online=true" +#: pkg/cmd/preview/preview.go:68 +msgid "Ignore differences of target fields" msgstr "" -#: pkg/cmd/preview/preview.go:62 -msgid "Automatically show plan details with interactive options" +#: pkg/cmd/preview/preview.go:70 +msgid "Specify the output format" msgstr "" #: pkg/cmd/cmd.go:58 msgid "Kusion manages the Kubernetes cluster by code" msgstr "" -#: pkg/cmd/diff/diff.go:70 -msgid "Swap and for comparison. Note that it is invalid when is stdin. The default is false" -msgstr "" - -#: pkg/cmd/ls/ls.go:14 -msgid "\n" - " List all project and stack information in the current directory or the\n" - " specify directory.\n" - " The default output is in a human friendly format, and it also supports\n" - " a variety of formatted structure output." -msgstr "" - -#: pkg/cmd/preview/preview.go:66 -msgid "no-style sets to RawOutput mode and disables all of styling" +#: pkg/cmd/deps/deps.go:53 +msgid "Paths to focus on to inspect. It cannot be empty and each path needs to be a valid relative path from the workdir" msgstr "" #: pkg/cmd/diff/diff.go:76 msgid "Ignore order changes in lists. The default is false" msgstr "" -#: pkg/cmd/env/env.go:25 -msgid "\n" - " # Print Kusion environment information\n" - " kusion env\n" - "\n" - " # Print Kusion environment information as JSON format\n" - " kusion env --json" -msgstr "" - -#: pkg/cmd/init/init.go:61 -msgid "Use templates from online repository to initialize project, or use locally cached templates" +#: pkg/cmd/ls/ls.go:12 +msgid "List all project and stack information" msgstr "" -#: pkg/cmd/preview/preview.go:68 -msgid "Ignore differences of target fields" +#: pkg/cmd/version/version.go:14 +msgid "\n" + " # Print the Kusion version\n" + " kusion version" msgstr "" -#: pkg/cmd/init/init.go:15 +#: pkg/cmd/destroy/destroy.go:14 msgid "\n" - " This command initializes the scaffolding for a project, generating a project from an appointed template with correct structure.\n" + " Delete resources by resource spec.\n" "\n" - " The scaffold templates can be retrieved from local or online. The built-in templates are used by default, self-defined templates are also supported by assigning the template repository path." + " Only KCL files are accepted. Only one type of arguments may be specified: filenames,\n" + " resources and names, or resources and label selector.\n" + "\n" + " Note that the destroy command does NOT do resource version checks, so if someone submits an\n" + " update to a resource right when you submit a destroy, their update will be lost along with the\n" + " rest of the resource." msgstr "" -#: pkg/cmd/version/version.go:40 -msgid "Print version info as JSON" +#: pkg/cmd/env/env.go:14 +msgid "\n" + " Env prints Kusion environment information.\n" + "\n" + " By default env prints information as a shell script (on Windows, a batch file). If one\n" + " or more variable names is given as arguments, env prints the value of each named variable\n" + " on its own line.\n" + "\n" + " The --json flag prints the environment in JSON format instead of as a shell script.\n" + "\n" + " For more about environment variables, see \"kusion env -h\"." msgstr "" -#: pkg/cmd/check/check.go:15 -msgid "\n" - " Check if KCL configurations in current directory ok to compile." +#: pkg/cmd/env/env.go:50 +msgid "Print the environment in JSON format" msgstr "" -#: pkg/cmd/check/check.go:56 pkg/cmd/compile/compile.go:65 -msgid "Specify the override option" +#: pkg/cmd/init/init.go:61 +msgid "Use templates from online repository to initialize project, or use locally cached templates" msgstr "" -#: pkg/cmd/compile/compile.go:21 -msgid "\n" - " # Compile configuration in main.k into YAML format\n" - " kusion compile main.k\n" - "\n" - " # Compile main.k with arguments\n" - " kusion compile main.k -D name=test -D age=18\n" - "\n" - " # Compile main.k with arguments from settings.yaml\n" - " kusion compile main.k -Y settings.yaml\n" - "\n" - " # Compile main.k with work directory\n" - " kusion compile main.k -w appops/demo/dev\n" - "\n" - " # Compile with override\n" - " kusion compile -O __main__:appConfiguration.image=nginx:latest -a\n" - "\n" - " # Compile main.k and write result into output.yaml\n" - " kusion compile main.k -o output.yaml" +#: pkg/cmd/deps/deps.go:55 +msgid "Direct is set to \"down\", \"only\" means only the downstream project/stack list will be output. Valid values: project, stack. Defaults to project" msgstr "" -#: pkg/cmd/compile/compile.go:74 -msgid "Specify the command line setting files" +#: pkg/cmd/init/init.go:76 +msgid "List templates used to initialize a project" msgstr "" -#: pkg/cmd/diff/diff.go:25 +#: pkg/cmd/init/init.go:81 msgid "\n" - " Compare files differences and display the delta.\n" - " Support input file types are: YAML (http://yaml.org/) and JSON (http://json.org/)." + " # Get name and description of internal templates\n" + " kusion init templates\n" + "\n" + " # Get templates from specific templates repository\n" + " kusion init templates https://github.com// --online=true" msgstr "" -#: pkg/cmd/diff/diff.go:72 -msgid "Diff mode. One of noemal and . The default is normal ignore-added" +#: pkg/cmd/check/check.go:54 pkg/cmd/compile/compile.go:63 +msgid "Disable dumping None values" msgstr "" -#: pkg/cmd/cmd.go:60 -msgid "\n" - " Kusion is a cloud-native programmable technology stack, which manages the Kubernetes cluster by code." +#: pkg/cmd/check/check.go:56 pkg/cmd/compile/compile.go:65 +msgid "Specify the override option" msgstr "" -#: pkg/cmd/check/check.go:13 -msgid "Check if KCL configurations in current directory ok to compile" +#: pkg/cmd/diff/diff.go:23 +msgid "Compare differences between input files and " msgstr "" -#: pkg/cmd/check/check.go:54 pkg/cmd/compile/compile.go:63 -msgid "Disable dumping None values" +#: pkg/cmd/preview/preview.go:62 +msgid "Automatically show plan details with interactive options" msgstr "" -#: pkg/cmd/compile/compile.go:78 -msgid "Specify the configuration override path and value" +#: pkg/cmd/env/env.go:12 +msgid "Print Kusion environment information" msgstr "" #: pkg/cmd/deps/deps.go:18 @@ -430,63 +477,7 @@ msgid "\n" " kusion deps --direct down --focus path/to/focus1 --focus path/to/focus2 --ignore path/to/ignore" msgstr "" -#: pkg/cmd/diff/diff.go:29 -msgid "\n" - " # The comparison object comes from the files\n" - " kusion diff pod-1.yaml pod-2.yaml\n" - " kusion diff pod-1.yaml pod-2.yaml --swap=true\n" - "\n" - " # The comparison object comes from the stdin\n" - " cat pod-1.yaml > pod-full.yaml\n" - " echo '---' >> pod-full.yaml\n" - " cat pod-2.yaml >> pod-full.yaml\n" - " cat pod-full.yaml | kusion diff -" -msgstr "" - -#: pkg/cmd/compile/compile.go:61 -msgid "Specify the output file" -msgstr "" - -#: pkg/cmd/destroy/destroy.go:12 -msgid "Destroy a configuration stack to resource(s) by work directory" -msgstr "" - -#: pkg/cmd/init/init.go:64 -msgid "Skip prompts and proceed with default values" -msgstr "" - -#: pkg/cmd/ls/ls.go:64 -msgid "Max display depth of the project and stack tree. One of 0,1,2" -msgstr "" - -#: pkg/cmd/preview/preview.go:70 -msgid "Specify the output format" -msgstr "" - -#: pkg/cmd/apply/apply.go:60 -msgid "Preview the execution effect (always successful) without actually applying the changes" -msgstr "" - -#: pkg/cmd/destroy/destroy.go:48 pkg/cmd/preview/preview.go:60 -msgid "Specify the operator" -msgstr "" - -#: pkg/cmd/preview/preview.go:20 -msgid "\n" - " # Preview with specifying work directory\n" - " kusion preview -w /path/to/workdir\n" - "\n" - " # Preview with specifying arguments\n" - " kusion preview -D name=test -D age=18\n" - "\n" - " # Preview with specifying setting file\n" - " kusion preview -Y settings.yaml\n" - "\n" - " # Preview with ignored fields\n" - " kusion preview --ignore-fields=\"metadata.generation,metadata.managedFields" -msgstr "" - -#: pkg/cmd/preview/preview.go:64 -msgid "Automatically show all plan details, combined use with flag `--detail`" +#: pkg/cmd/diff/diff.go:74 +msgid "Specify the output style. One of human and raw. The default is human" msgstr "" diff --git a/pkg/util/i18n/translations/kusion/zh_CN/LC_MESSAGES/kusion.mo b/pkg/util/i18n/translations/kusion/zh_CN/LC_MESSAGES/kusion.mo index 58d6a25a4067c978e9cd9a130d4f923492d712d1..b5245a2d4486a4a9cf0987e3252e83a9cdb5cde2 100644 GIT binary patch delta 1279 zcmXZbOKenC9LMor+Y#DY3oU)fRGnLdVxpB% zk}8_m8k#PyvH$}lENCEMLMCB>ts5~C7bMk17flEWnJLu7g)R(<3g7?C+~m&Zp8q*> z9{+RBY&@NqyjSb{PCPq!U*Nr6BJIcFGJbfbd{UU$G;YU*XQby!r9an5cc}ljTslVl z=L+dD@mHUfz9hc6TI#?#+)4cset_%OOS_2=*3h>!scU@PClINXW@u2qLHdpIu%t~PiYW?*oEiN_HYq*;R-UAn%QvcuorEM zT-=L4VKY{+FI#b2(f5!loh+8qXqjBXm+`L%d1umUU|QDEK4jZ;2Fa@Ca2@`FwYY@i zxQdpUkC?5+FBH8|^fn&0_Gnug=4A4z<4A(U5fc|k_1uR1VX)QNL_*#~S!b&qH#RB% z*gdr5*)aClM%D1zKij;;vPN6DINbS6l6h5HfX7zIHmk*}@HLfe^|tr|?UoI0YW`|M z{vflK{KE|uJFhBU%W^RDnXjv|q$e|1{eD%XH|36`TxTGW{IuWgaC+mz6V4~2iFh&M z42?RYsgaRH(v2Onm=jNod;j?dLOrR`A)1ZFl6i;Xg)S^+&D_D56HO(PvAF9*6LB|o z+|7(N&6ceVJE7of;cl-g@JDG!DDzL?bOm!c(R#iz{P0IF`}M8drTOgq?1RrwXBWKe m^h|d4YVO-~?#vg3X%%W$&V5yA?A1jMlouL0J(<2py7VdM;MFSt delta 1116 zcmX}rOGs2v9LMpW&S+{jH9j((%F#@n%*W`AW?4j8kwH{YS!SDjB5D-*h+wi1Y7s6j zh2SEgu$4$nK~akcqCg005#d6NR*`K31GDdc8am9K&pH2d?mg%H&%HDKV||hN4EJ48 zLR=fUUL{C}@SKZ3%8*;CAvTOvIGrS|NtEW3rT6qNrbunXpQTDm#Pe25H;HF?qzW9z z9rVA$)2MaQK4|tzx1@+Bs4NgD%8>3bASqM&MBB-du3<;E)JXgrHqb83k@jLc*5DNG z!8xqM+zk>#bsR5XCtCk3`YFo?yZmp!Q&S*v<6!u%Sg(uhesg|TYF&Dep=p;7F_No>Is zI(K0kHj|l2T%o;`FO}0?@=IQhqNI@HBwo)d&lCTJkBFaSRsF=5*>z+amEHgoF<=}I zVw9jw@SAO4#ag!Y0UzTr`mdKu_h^5tpp9LXQZn%u*g*Sr)xXRvqh+>`?OVoou*Jrs9i@Z(^o2hX zBVH--!NfL~h4!A1JO!QGuF8O&0iRE-*k@;3v8P(GZF{-+Y7>UaRnZZ5ZCXN4^ttC$y0hQc zp4oHda(929f1v$R%!s15SU1FW\n" "Language-Team: \n" "Language: zh\n" @@ -16,7 +16,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.3\n" +"X-Generator: Poedit 3.3.2\n" + +#: pkg/cmd/preview/preview.go:12 +msgid "Preview a series of resource changes within the stack" +msgstr "预览堆栈中的一系列资源更改" #: pkg/cmd/check/check.go:18 msgid "" @@ -46,224 +50,26 @@ msgstr "" "\t\t# 使用工作目录验证 main.k\n" "\t\tkusion check main.k -w appops/demo/dev" -#: pkg/cmd/destroy/destroy.go:52 -msgid "Automatically show plan details after previewing it" -msgstr "预览后自动展示 apply 计划细节" - -#: pkg/cmd/env/env.go:14 -#, fuzzy -msgid "" -"\n" -" Env prints Kusion environment information.\n" -"\n" -" By default env prints information as a shell script (on Windows, a batch " -"file). If one\n" -" or more variable names is given as arguments, env prints the value of " -"each named variable\n" -" on its own line.\n" -"\n" -" The --json flag prints the environment in JSON format instead of as a " -"shell script.\n" -"\n" -" For more about environment variables, see \"kusion env -h\"." -msgstr "" -"\n" -"Env 打印 Kusion 环境信息。\n" -"\n" -"默认情况下,env 将信息打印为 shell 脚本(在 Windows,是 bat 文件)。\n" -"如果一个或多个变量名作为参数给出,env 将每个变量的名和值打印在单独一行上。\n" -"\n" -"--json 标志以 JSON 格式而不是 shell 脚本打印环境变量。\n" -"\n" -"有关环境变量的更多信息,请参阅 `kusion env -h`。" - -#: pkg/cmd/init/init.go:55 -msgid "" -"Initialize with specified project name. If not specified, a prompt will " -"request it" -msgstr "用指定的 Project 名称初始化。若不指定,将有提示请求获取" - -#: pkg/cmd/init/init.go:78 -msgid "" -"\n" -"\t\tThis command gets the descriptions and definitions of the templates " -"which are used to initialize the project scaffolding." -msgstr "" -"\n" -"\t\t该指令获取用于初始化Project 脚手架的模板的描述和定义。" - -#: pkg/cmd/ls/ls.go:62 -#, fuzzy -msgid "" -"Output format of the project information. valid values: json, yaml, tree, " -"human" -msgstr "项目信息的输出格式。可选值:json、yaml、tree、human" - -#: pkg/cmd/compile/compile.go:76 -msgid "Specify the top-level argument" -msgstr "指定顶级参数" - -#: pkg/cmd/deps/deps.go:53 -msgid "" -"Paths to focus on to inspect. It cannot be empty and each path needs to be a " -"valid relative path from the workdir" -msgstr "" - -#: pkg/cmd/deps/deps.go:55 -msgid "" -"Direct is set to \"down\", \"only\" means only the downstream project/stack " -"list will be output. Valid values: project, stack. Defaults to project" -msgstr "" - -#: pkg/cmd/diff/diff.go:74 -msgid "Specify the output style. One of human and raw. The default is human" -msgstr "指定输出风格,human 和 raw 之一,默认值 human" - -#: pkg/cmd/init/init.go:76 -msgid "List templates used to initialize a project" -msgstr "列出用于初始化 Project 的模板" - -#: pkg/cmd/init/init.go:111 -msgid "" -"Specify the output format of templates. If specified, only support json for " -"now; if not, template name and description is given" -msgstr "" -"指定模板的输出格式。若指定,现在仅支持 json;若不指定,那么将打印模板的名称和" -"描述" - -#: pkg/cmd/apply/apply.go:62 -msgid "" -"After creating/updating/deleting the requested object, watch for changes" -msgstr "" - -#: pkg/cmd/destroy/destroy.go:24 -#, fuzzy -msgid "" -"\n" -"\t\t# Delete the configuration of current stack\n" -"\t\tkusion destroy" -msgstr "" -"\n" -"\t\t# 删除 pod.k 中的配置\n" -"\t\tkusion destroy -f ./pod.k" - -#: pkg/cmd/init/init.go:13 -msgid "Initialize the scaffolding for a project" -msgstr "初始化一个 Project 的脚手架" - -#: pkg/cmd/preview/preview.go:12 -msgid "Preview a series of resource changes within the stack" -msgstr "预览堆栈中的一系列资源更改" - -#: pkg/cmd/version/version.go:12 -msgid "Print the kusion version info" -msgstr "打印 kusion 的版本信息" - -#: pkg/cmd/compile/compile.go:12 -msgid "Compile KCL into YAML" -msgstr "将 KCL 编译成 YAML" - -#: pkg/cmd/compile/compile.go:14 -msgid "" -"\n" -"\t\tCompile one or more KCL files.\n" -"\n" -"\t\tThe KCL filename must be specified.\n" -"\t\tYou can specify a list of arguments to replace the placeholders defined " -"in KCL,\n" -"\t\tand output the compiled results to a file when using --output flag." -msgstr "" -"\n" -"\t\t编译一个或多个 KCL 文件。\n" -"\n" -"\t\t必须指定 KCL 文件名。\n" -"\t\t你可以指定参数列表来替换 KCL 中定义的占位符,\n" -"\t\t并在使用 --output 标志时将编译结果输出到文件。" - -#: pkg/cmd/deps/deps.go:57 -msgid "" -"File paths to ignore when filtering the affected stacks/projects. Each path " -"needs to be a valid relative path from the workdir. If not set, no paths " -"will be ignored." -msgstr "" - -#: pkg/cmd/diff/diff.go:23 -msgid "Compare differences between input files and " -msgstr "比较输入文件 之间的差异" - -#: pkg/cmd/version/version.go:42 -#, fuzzy -msgid "Print version info as YAML" -msgstr "将版本信息打印成 YAML 格式" - -#: pkg/cmd/version/version.go:44 -#, fuzzy -msgid "Print version info as versionShort string" -msgstr "将版本信息打印成短版本字符串" - -#: pkg/cmd/apply/apply.go:58 pkg/cmd/destroy/destroy.go:50 -msgid "Automatically approve and perform the update after previewing it" -msgstr "预览后自动审批并应用更新" - -#: pkg/cmd/deps/deps.go:12 -msgid "Show KCL file dependency information" -msgstr "" - #: pkg/cmd/diff/diff.go:78 msgid "Omit the dyff summary header. The default is false" msgstr "省略 dyff 摘要标题,默认为否" -#: pkg/cmd/diff/diff.go:80 -msgid "" -"Sort from and to by kubernetes resource order(non standard behavior). The " -"default is false" -msgstr "按 kubernetes 资源顺序排序(非标准行为)。默认为否" - -#: pkg/cmd/init/init.go:20 +#: pkg/cmd/init/init.go:15 msgid "" "\n" -"\t\t# Initialize a project from internal templates\n" -"\t\tkusion init\n" -"\n" -"\t\t# Initialize a project from default online templates\n" -"\t\tkusion init --online=true\n" -"\n" -"\t\t# Initialize a project from a specific online template\n" -"\t\tkusion init https://github.com// --online=true\n" +"\t\tThis command initializes the scaffolding for a project, generating a " +"project from an appointed template with correct structure.\n" "\n" -"\t\t# Initialize a project from a specific local template\n" -"\t\tkusion init /path/to/templates" +"\t\tThe scaffold templates can be retrieved from local or online. The built-" +"in templates are used by default, self-defined templates are also supported " +"by assigning the template repository path." msgstr "" "\n" -"\t\t# 从本地内置模板中初始化一个 Project\n" -"\t\tkusion init\n" -"\n" -"\t\t# 从默认的在线模板中初始化一个 Project\n" -"\t\tkusion init --online=true\n" -"\n" -"\t\t# 从指定的在线模板初始化一个 Project\n" -"\t\tkusion init https://github.com// --online=true\n" -"\n" -"\t\t# 从指定的本地模板初始化一个 Project\n" -"\t\tkusion init /path/to/templates" - -#: pkg/cmd/version/version.go:14 -#, fuzzy -msgid "" +"\t\t该指令用于初始化一个 Project 脚手架,从选定的模板生成具备正确结构的 " +"Project.\n" "\n" -" Print the kusion version information for the current context." -msgstr "打印当前会话 kusion 的版本信息。" - -#: pkg/cmd/apply/apply.go:12 -msgid "Apply a configuration stack to resource(s) by work directory" -msgstr "通过工作目录将配置栈应用到一个或多个资源" - -#: pkg/cmd/deps/deps.go:51 -#, fuzzy -msgid "" -"Inspect direct of the dependency information. Valid values: up, down. " -"Defaults to up" -msgstr "项目信息的输出格式。可选值:json、yaml、tree、human" +"\t\t脚手架模板可以从本地或者线上获取。默认使用内置模板;若需要使用自定义的模" +"板,需要指定模板仓库的地址。" #: pkg/cmd/init/init.go:58 msgid "" @@ -271,41 +77,21 @@ msgid "" "files" msgstr "强制生成脚手架文件,即使会更改现有文件" -#: pkg/cmd/version/version.go:17 -msgid "" -"\n" -"\t\t# Print the kusion version\n" -"\t\tkusion version" -msgstr "" -"\n" -"\t\t# 打印 kusion 版本\n" -"\t\tkusion version" +#: pkg/cmd/version/version.go:35 +msgid "Output format. Only json format is supported for now" +msgstr "输出格式。当前只支持 json 格式的输出" -#: pkg/cmd/apply/apply.go:14 +#: pkg/cmd/cmd.go:60 +#, fuzzy msgid "" "\n" -"\t\tApply a series of resource changes within the stack.\n" -"\n" -"\t\tCreate or update or delete resources according to the KCL files within a " -"stack.\n" -"\t\tBy default, Kusion will generate an execution plan and present it for " -"your approval before taking any action.\n" -"\n" -"\t\tYou can check the plan details and then decide if the actions should be " -"taken or aborted." -msgstr "" -"\n" -"\t\t将一系列资源变更应用到当前栈中。\n" -"\n" -"\t\t在当前 Stack 中根据 KCL 文件创建、更新、删除资源。\n" -"\t\t默认情况下,在采取任何行动之前,kusion会生成一个执行计划,并提交给你批" -"准。\n" -"\n" -"\t\t你可以检查计划详细信息,然后决定是否应采取或中止这些操作。" +" Kusion is a cloud-native programmable technology stack, which manages " +"the Kubernetes cluster by code." +msgstr "kusion 作为云原生可编程技术栈,通过代码管理 kubernetes 集群。" -#: pkg/cmd/env/env.go:12 -msgid "Print Kusion environment information" -msgstr "打印 Kusion 环境信息" +#: pkg/cmd/apply/apply.go:12 +msgid "Apply a configuration stack to resource(s) by work directory" +msgstr "通过工作目录将配置栈应用到一个或多个资源" #: pkg/cmd/apply/apply.go:22 msgid "" @@ -335,43 +121,37 @@ msgstr "" "\t\t# 应用前跳过计划的交互式审批\n" "\t\tkusion apply —yes" -#: pkg/cmd/deps/deps.go:14 +#: pkg/cmd/apply/apply.go:58 pkg/cmd/destroy/destroy.go:50 +msgid "Automatically approve and perform the update after previewing it" +msgstr "预览后自动审批并应用更新" + +#: pkg/cmd/compile/compile.go:67 +msgid "Disable the output style and color" +msgstr "" + +#: pkg/cmd/diff/diff.go:29 msgid "" "\n" -"\t\tShow the KCL file dependency information in the current directory or the " -"specified workdir.\n" -" By default, it will list all the KCL files that are dependent on the " -"given package path." -msgstr "" - -#: pkg/cmd/destroy/destroy.go:14 -msgid "" -"\n" -"\t\tDelete resources by resource spec.\n" -"\n" -"\t\tOnly KCL files are accepted. Only one type of arguments may be " -"specified: filenames,\n" -"\t\tresources and names, or resources and label selector.\n" +"\t\t# The comparison object comes from the files\n" +"\t\tkusion diff pod-1.yaml pod-2.yaml\n" +"\t\tkusion diff pod-1.yaml pod-2.yaml --swap=true\n" "\n" -"\t\tNote that the destroy command does NOT do resource version checks, so if " -"someone submits an\n" -"\t\tupdate to a resource right when you submit a destroy, their update will " -"be lost along with the\n" -"\t\trest of the resource." +"\t\t# The comparison object comes from the stdin\n" +"\t\tcat pod-1.yaml > pod-full.yaml\n" +"\t\techo '---' >> pod-full.yaml\n" +"\t\tcat pod-2.yaml >> pod-full.yaml\n" +"\t\tcat pod-full.yaml | kusion diff -" msgstr "" "\n" -"\t\t通过资源规约删除资源。\n" -"\n" -"\t\t只接受 KCL 文件。只能指定一种类型的参数:文件名、资源、名称、资源或标签选" -"择器。\n" +"\t\t# 比较对象来自文件\n" +"\t\tkusion diff pod-1.yaml pod-2.yaml\n" +"\t\tkusion diff pod-1.yaml pod-2.yaml --swap=true\n" "\n" -"\t\t请注意,destroy 命令不会进行资源版本检查,\n" -"\t\t因此如果有人在你提交销毁时提交了对资源的更新,\n" -"\t\t他们的更新将与资源一起丢失。" - -#: pkg/cmd/ls/ls.go:12 -msgid "List all project and stack information" -msgstr "列出所有项目和堆栈信息" +"\t\t# 比较对象来自标准输入\n" +"\t\tcat pod-1.yaml > pod-full.yaml\n" +"\t\techo '---' >> pod-full.yaml\n" +"\t\tcat pod-2.yaml >> pod-full.yaml\n" +"\t\tcat pod-full.yaml | kusion diff -" #: pkg/cmd/preview/preview.go:14 #, fuzzy @@ -391,18 +171,35 @@ msgstr "" "\t\t默认情况下,Kusion 会生成一个执行计划并在采取任何行动之前将其提交给您批" "准。" -#: pkg/cmd/init/init.go:52 +#: pkg/cmd/preview/preview.go:66 +msgid "no-style sets to RawOutput mode and disables all of styling" +msgstr "no-style 设置原始输出模式并禁用所有样式" + +#: pkg/cmd/diff/diff.go:25 msgid "" -"Initialize with specified template. If not specified, a prompt will request " -"it" -msgstr "用指定的模板初始化。若不指定,将有提示请求获取" +"\n" +"\t\tCompare files differences and display the delta.\n" +"\t\tSupport input file types are: YAML (http://yaml.org/) and JSON (http://" +"json.org/)." +msgstr "" +"\n" +"\t\t比较文件差异并显示增量。\n" +"\t\t支持的文件类型有: YAML (http://yaml.org/) 和 JSON (http://json.org/)。" -#: pkg/cmd/init/init.go:67 +#: pkg/cmd/diff/diff.go:70 msgid "" -"Custom params in JSON. If specified, it will be used as the template default " -"value and skip prompts" +"Swap and for comparison. Note that it is invalid when is " +"stdin. The default is false" +msgstr "交换 进行比较。注意 为标准输入时无效。默认为否" + +#: pkg/cmd/init/init.go:78 +msgid "" +"\n" +"\t\tThis command gets the descriptions and definitions of the templates " +"which are used to initialize the project scaffolding." msgstr "" -"JSON 格式的自定义参数。若指定,那么会用其作为默认的模板参数,并跳过提示" +"\n" +"\t\t该指令获取用于初始化Project 脚手架的模板的描述和定义。" #: pkg/cmd/ls/ls.go:20 msgid "" @@ -447,115 +244,6 @@ msgstr "" "\t\t# 逐级列出所有项目和堆栈,并以 Tree 格式输出\n" "\t\tkusion ls ./path/to/project_dir --format=tree --level=1" -#: pkg/cmd/compile/compile.go:72 -msgid "Specify the work directory" -msgstr "指定工作目录" - -#: pkg/cmd/env/env.go:50 -#, fuzzy -msgid "Print the environment in JSON format" -msgstr "以 JSON 格式打印环境信息" - -#: pkg/cmd/init/init.go:81 -msgid "" -"\n" -"\t\t# Get name and description of internal templates\n" -"\t\tkusion init templates\n" -"\n" -"\t\t# Get templates from specific templates repository\n" -"\t\tkusion init templates https://github.com// --online=true" -msgstr "" -"\n" -"\t\t# 获取内置模板的名称和描述\n" -"\t\tkusion init templates\n" -"\n" -"\t\t# 获取指定的在线仓库中的模板列表\n" -"\t\tkusion init templates https://github.com// —online=true" - -#: pkg/cmd/preview/preview.go:62 -#, fuzzy -msgid "Automatically show plan details with interactive options" -msgstr "预览后自动展示 apply 计划细节" - -#: pkg/cmd/cmd.go:58 -#, fuzzy -msgid "Kusion manages the Kubernetes cluster by code" -msgstr "kusion 通过代码管理 Kubernetes 集群" - -#: pkg/cmd/diff/diff.go:70 -msgid "" -"Swap and for comparison. Note that it is invalid when is " -"stdin. The default is false" -msgstr "交换 进行比较。注意 为标准输入时无效。默认为否" - -#: pkg/cmd/ls/ls.go:14 -msgid "" -"\n" -"\t\tList all project and stack information in the current directory or the\n" -"\t\tspecify directory.\n" -"\t\tThe default output is in a human friendly format, and it also supports\n" -"\t\ta variety of formatted structure output." -msgstr "" -"\n" -"\t\t列出当前目录或指定目录中的所有项目和堆栈信息。\n" -"\t\t默认输出是人性化的格式,也支持多种格式的结构输出。" - -#: pkg/cmd/preview/preview.go:66 -msgid "no-style sets to RawOutput mode and disables all of styling" -msgstr "no-style 设置原始输出模式并禁用所有样式" - -#: pkg/cmd/diff/diff.go:76 -msgid "Ignore order changes in lists. The default is false" -msgstr "忽略列表中的顺序变化,默认为否" - -#: pkg/cmd/env/env.go:25 -msgid "" -"\n" -"\t\t# Print Kusion environment information\n" -"\t\tkusion env\n" -"\n" -"\t\t# Print Kusion environment information as JSON format\n" -"\t\tkusion env --json" -msgstr "" -"\n" -"\t\t# 打印 Kusion 环境信息\n" -"\t\tkusion env\n" -"\n" -"\t\t# 以 JSON 格式打印 Kusion 环境信息\n" -"\t\tkusion env --json" - -#: pkg/cmd/init/init.go:61 -msgid "" -"Use templates from online repository to initialize project, or use locally " -"cached templates" -msgstr "使用线上模板初始化 Project,否则使用本地缓存模板" - -#: pkg/cmd/preview/preview.go:68 -msgid "Ignore differences of target fields" -msgstr "" - -#: pkg/cmd/init/init.go:15 -msgid "" -"\n" -"\t\tThis command initializes the scaffolding for a project, generating a " -"project from an appointed template with correct structure.\n" -"\n" -"\t\tThe scaffold templates can be retrieved from local or online. The built-" -"in templates are used by default, self-defined templates are also supported " -"by assigning the template repository path." -msgstr "" -"\n" -"\t\t该指令用于初始化一个 Project 脚手架,从选定的模板生成具备正确结构的 " -"Project.\n" -"\n" -"\t\t脚手架模板可以从本地或者线上获取。默认使用内置模板;若需要使用自定义的模" -"板,需要指定模板仓库的地址。" - -#: pkg/cmd/version/version.go:40 -#, fuzzy -msgid "Print version info as JSON" -msgstr "将版本信息打印成 JSON 格式" - #: pkg/cmd/check/check.go:15 msgid "" "\n" @@ -564,10 +252,6 @@ msgstr "" "\n" "\t\t检查当前目录中的 KCL 配置是否可以编译。" -#: pkg/cmd/check/check.go:56 pkg/cmd/compile/compile.go:65 -msgid "Specify the override option" -msgstr "指定覆盖选项" - #: pkg/cmd/compile/compile.go:21 msgid "" "\n" @@ -608,121 +292,220 @@ msgstr "" "\t\t# 编译 main.k 并将结果写入 output.yaml\n" "\t\tkusion compile main.k -o output.yaml" -#: pkg/cmd/compile/compile.go:74 -msgid "Specify the command line setting files" -msgstr "指定命令行配置文件" +#: pkg/cmd/compile/compile.go:78 +msgid "Specify the top-level argument" +msgstr "指定顶级参数" -#: pkg/cmd/diff/diff.go:25 +#: pkg/cmd/destroy/destroy.go:12 +msgid "Destroy a configuration stack to resource(s) by work directory" +msgstr "通过工作目录销毁已应用到资源的配置栈" + +#: pkg/cmd/compile/compile.go:14 msgid "" "\n" -"\t\tCompare files differences and display the delta.\n" -"\t\tSupport input file types are: YAML (http://yaml.org/) and JSON (http://" -"json.org/)." +"\t\tCompile one or more KCL files.\n" +"\n" +"\t\tThe KCL filename must be specified.\n" +"\t\tYou can specify a list of arguments to replace the placeholders defined " +"in KCL,\n" +"\t\tand output the compiled results to a file when using --output flag." msgstr "" "\n" -"\t\t比较文件差异并显示增量。\n" -"\t\t支持的文件类型有: YAML (http://yaml.org/) 和 JSON (http://json.org/)。" +"\t\t编译一个或多个 KCL 文件。\n" +"\n" +"\t\t必须指定 KCL 文件名。\n" +"\t\t你可以指定参数列表来替换 KCL 中定义的占位符,\n" +"\t\t并在使用 --output 标志时将编译结果输出到文件。" + +#: pkg/cmd/compile/compile.go:74 +msgid "Specify the work directory" +msgstr "指定工作目录" + +#: pkg/cmd/init/init.go:64 +msgid "Skip prompts and proceed with default values" +msgstr "跳过提示,使用默认值初始化 Project" + +#: pkg/cmd/preview/preview.go:64 +#, fuzzy +msgid "Automatically show all plan details, combined use with flag `--detail`" +msgstr "预览后自动展示 apply 计划细节" #: pkg/cmd/diff/diff.go:72 #, fuzzy msgid "Diff mode. One of noemal and . The default is normal ignore-added" msgstr "差异模式。normal 和 ignore-added 之一。默认值 normal" -#: pkg/cmd/cmd.go:60 -#, fuzzy +#: pkg/cmd/init/init.go:55 msgid "" -"\n" -" Kusion is a cloud-native programmable technology stack, which manages " -"the Kubernetes cluster by code." -msgstr "kusion 作为云原生可编程技术栈,通过代码管理 kubernetes 集群。" - -#: pkg/cmd/check/check.go:13 -msgid "Check if KCL configurations in current directory ok to compile" -msgstr "检查当前目录中的 KCL 配置是否可以编译" - -#: pkg/cmd/check/check.go:54 pkg/cmd/compile/compile.go:63 -msgid "Disable dumping None values" -msgstr "禁用转储 None 值" +"Initialize with specified project name. If not specified, a prompt will " +"request it" +msgstr "用指定的 Project 名称初始化。若不指定,将有提示请求获取" -#: pkg/cmd/compile/compile.go:78 -msgid "Specify the configuration override path and value" -msgstr "指定配置覆盖路径和值" +#: pkg/cmd/destroy/destroy.go:52 +msgid "Automatically show plan details after previewing it" +msgstr "预览后自动展示 apply 计划细节" -#: pkg/cmd/deps/deps.go:18 +#: pkg/cmd/env/env.go:25 msgid "" "\n" -"\t\t# List all the KCL files that are dependent by the given focus paths\n" -" kusion deps --focus path/to/focus1 --focus path/to/focus2\n" +"\t\t# Print Kusion environment information\n" +"\t\tkusion env\n" "\n" -"\t\t# List all the projects that depend on the given focus paths\n" -"\t\tkusion deps --direct down --focus path/to/focus1 --focus path/to/focus2\n" +"\t\t# Print Kusion environment information as JSON format\n" +"\t\tkusion env --json" +msgstr "" "\n" -"\t\t# List all the stacks that depend on the given focus paths\n" -"\t\tkusion deps --direct down --focus path/to/focus1 --focus path/to/focus2 " -"--only stack\n" +"\t\t# 打印 Kusion 环境信息\n" +"\t\tkusion env\n" "\n" -"\t\t# List all the projects that depend on the given focus paths, ignoring " -"some paths from entrance files in each stack\n" -"\t\tkusion deps --direct down --focus path/to/focus1 --focus path/to/focus2 " -"--ignore path/to/ignore" +"\t\t# 以 JSON 格式打印 Kusion 环境信息\n" +"\t\tkusion env --json" + +#: pkg/cmd/init/init.go:67 +msgid "" +"Custom params in JSON. If specified, it will be used as the template default " +"value and skip prompts" msgstr "" +"JSON 格式的自定义参数。若指定,那么会用其作为默认的模板参数,并跳过提示" -#: pkg/cmd/diff/diff.go:29 +#: pkg/cmd/init/init.go:111 +msgid "" +"Specify the output format of templates. If specified, only support json for " +"now; if not, template name and description is given" +msgstr "" +"指定模板的输出格式。若指定,现在仅支持 json;若不指定,那么将打印模板的名称和" +"描述" + +#: pkg/cmd/compile/compile.go:12 +msgid "Compile KCL into YAML" +msgstr "将 KCL 编译成 YAML" + +#: pkg/cmd/compile/compile.go:76 +msgid "Specify the command line setting files" +msgstr "指定命令行配置文件" + +#: pkg/cmd/destroy/destroy.go:24 +#, fuzzy msgid "" "\n" -"\t\t# The comparison object comes from the files\n" -"\t\tkusion diff pod-1.yaml pod-2.yaml\n" -"\t\tkusion diff pod-1.yaml pod-2.yaml --swap=true\n" +"\t\t# Delete the configuration of current stack\n" +"\t\tkusion destroy" +msgstr "" "\n" -"\t\t# The comparison object comes from the stdin\n" -"\t\tcat pod-1.yaml > pod-full.yaml\n" -"\t\techo '---' >> pod-full.yaml\n" -"\t\tcat pod-2.yaml >> pod-full.yaml\n" -"\t\tcat pod-full.yaml | kusion diff -" +"\t\t# 删除 pod.k 中的配置\n" +"\t\tkusion destroy -f ./pod.k" + +#: pkg/cmd/destroy/destroy.go:48 pkg/cmd/preview/preview.go:60 +msgid "Specify the operator" +msgstr "指定操作人" + +#: pkg/cmd/init/init.go:20 +msgid "" +"\n" +"\t\t# Initialize a project from internal templates\n" +"\t\tkusion init\n" +"\n" +"\t\t# Initialize a project from default online templates\n" +"\t\tkusion init --online=true\n" +"\n" +"\t\t# Initialize a project from a specific online template\n" +"\t\tkusion init https://github.com// --online=true\n" +"\n" +"\t\t# Initialize a project from a specific local template\n" +"\t\tkusion init /path/to/templates" msgstr "" "\n" -"\t\t# 比较对象来自文件\n" -"\t\tkusion diff pod-1.yaml pod-2.yaml\n" -"\t\tkusion diff pod-1.yaml pod-2.yaml --swap=true\n" +"\t\t# 从本地内置模板中初始化一个 Project\n" +"\t\tkusion init\n" "\n" -"\t\t# 比较对象来自标准输入\n" -"\t\tcat pod-1.yaml > pod-full.yaml\n" -"\t\techo '---' >> pod-full.yaml\n" -"\t\tcat pod-2.yaml >> pod-full.yaml\n" -"\t\tcat pod-full.yaml | kusion diff -" +"\t\t# 从默认的在线模板中初始化一个 Project\n" +"\t\tkusion init --online=true\n" +"\n" +"\t\t# 从指定的在线模板初始化一个 Project\n" +"\t\tkusion init https://github.com// --online=true\n" +"\n" +"\t\t# 从指定的本地模板初始化一个 Project\n" +"\t\tkusion init /path/to/templates" + +#: pkg/cmd/version/version.go:13 +msgid "Print the Kusion version information for the current context" +msgstr "打印当前 Kusion 的版本信息" + +#: pkg/cmd/apply/apply.go:60 +#, fuzzy +msgid "" +"Preview the execution effect (always successful) without actually applying " +"the changes" +msgstr "dry-run 预览执行效果(总是成功)而不实际应用更改" #: pkg/cmd/compile/compile.go:61 msgid "Specify the output file" msgstr "指定输出文件" -#: pkg/cmd/destroy/destroy.go:12 -msgid "Destroy a configuration stack to resource(s) by work directory" -msgstr "通过工作目录销毁已应用到资源的配置栈" +#: pkg/cmd/deps/deps.go:51 +#, fuzzy +msgid "" +"Inspect direct of the dependency information. Valid values: up, down. " +"Defaults to up" +msgstr "项目信息的输出格式。可选值:json、yaml、tree、human" -#: pkg/cmd/init/init.go:64 -msgid "Skip prompts and proceed with default values" -msgstr "跳过提示,使用默认值初始化 Project" +#: pkg/cmd/diff/diff.go:80 +msgid "" +"Sort from and to by kubernetes resource order(non standard behavior). The " +"default is false" +msgstr "按 kubernetes 资源顺序排序(非标准行为)。默认为否" -#: pkg/cmd/ls/ls.go:64 -#, fuzzy -msgid "Max display depth of the project and stack tree. One of 0,1,2" -msgstr "项目和堆栈树的最大显示深度。可选值:0、1、2" +#: pkg/cmd/deps/deps.go:57 +msgid "" +"File paths to ignore when filtering the affected stacks/projects. Each path " +"needs to be a valid relative path from the workdir. If not set, no paths " +"will be ignored." +msgstr "" -#: pkg/cmd/preview/preview.go:70 -#, fuzzy -msgid "Specify the output format" -msgstr "指定输出文件" +#: pkg/cmd/init/init.go:13 +msgid "Initialize the scaffolding for a project" +msgstr "初始化一个 Project 的脚手架" -#: pkg/cmd/apply/apply.go:60 +#: pkg/cmd/ls/ls.go:62 #, fuzzy msgid "" -"Preview the execution effect (always successful) without actually applying " -"the changes" -msgstr "dry-run 预览执行效果(总是成功)而不实际应用更改" +"Output format of the project information. valid values: json, yaml, tree, " +"human" +msgstr "项目信息的输出格式。可选值:json、yaml、tree、human" -#: pkg/cmd/destroy/destroy.go:48 pkg/cmd/preview/preview.go:60 -msgid "Specify the operator" -msgstr "指定操作人" +#: pkg/cmd/apply/apply.go:14 +msgid "" +"\n" +"\t\tApply a series of resource changes within the stack.\n" +"\n" +"\t\tCreate or update or delete resources according to the KCL files within a " +"stack.\n" +"\t\tBy default, Kusion will generate an execution plan and present it for " +"your approval before taking any action.\n" +"\n" +"\t\tYou can check the plan details and then decide if the actions should be " +"taken or aborted." +msgstr "" +"\n" +"\t\t将一系列资源变更应用到当前栈中。\n" +"\n" +"\t\t在当前 Stack 中根据 KCL 文件创建、更新、删除资源。\n" +"\t\t默认情况下,在采取任何行动之前,kusion会生成一个执行计划,并提交给你批" +"准。\n" +"\n" +"\t\t你可以检查计划详细信息,然后决定是否应采取或中止这些操作。" + +#: pkg/cmd/check/check.go:13 +msgid "Check if KCL configurations in current directory ok to compile" +msgstr "检查当前目录中的 KCL 配置是否可以编译" + +#: pkg/cmd/compile/compile.go:80 +msgid "Specify the configuration override path and value" +msgstr "指定配置覆盖路径和值" + +#: pkg/cmd/deps/deps.go:12 +msgid "Show KCL file dependency information" +msgstr "" #: pkg/cmd/preview/preview.go:20 #, fuzzy @@ -751,11 +534,229 @@ msgstr "" "\t\t# 指定设置文件预览\n" "\t\tkusion preview -Y settings.yaml" -#: pkg/cmd/preview/preview.go:64 +#: pkg/cmd/apply/apply.go:62 +msgid "" +"After creating/updating/deleting the requested object, watch for changes" +msgstr "" + +#: pkg/cmd/deps/deps.go:14 +msgid "" +"\n" +"\t\tShow the KCL file dependency information in the current directory or the " +"specified workdir.\n" +" By default, it will list all the KCL files that are dependent on the " +"given package path." +msgstr "" + +#: pkg/cmd/init/init.go:52 +msgid "" +"Initialize with specified template. If not specified, a prompt will request " +"it" +msgstr "用指定的模板初始化。若不指定,将有提示请求获取" + +#: pkg/cmd/ls/ls.go:14 +msgid "" +"\n" +"\t\tList all project and stack information in the current directory or the\n" +"\t\tspecify directory.\n" +"\t\tThe default output is in a human friendly format, and it also supports\n" +"\t\ta variety of formatted structure output." +msgstr "" +"\n" +"\t\t列出当前目录或指定目录中的所有项目和堆栈信息。\n" +"\t\t默认输出是人性化的格式,也支持多种格式的结构输出。" + +#: pkg/cmd/ls/ls.go:64 #, fuzzy -msgid "Automatically show all plan details, combined use with flag `--detail`" +msgid "Max display depth of the project and stack tree. One of 0,1,2" +msgstr "项目和堆栈树的最大显示深度。可选值:0、1、2" + +#: pkg/cmd/preview/preview.go:68 +msgid "Ignore differences of target fields" +msgstr "" + +#: pkg/cmd/preview/preview.go:70 +#, fuzzy +msgid "Specify the output format" +msgstr "指定输出文件" + +#: pkg/cmd/cmd.go:58 +#, fuzzy +msgid "Kusion manages the Kubernetes cluster by code" +msgstr "kusion 通过代码管理 Kubernetes 集群" + +#: pkg/cmd/deps/deps.go:53 +msgid "" +"Paths to focus on to inspect. It cannot be empty and each path needs to be a " +"valid relative path from the workdir" +msgstr "" + +#: pkg/cmd/diff/diff.go:76 +msgid "Ignore order changes in lists. The default is false" +msgstr "忽略列表中的顺序变化,默认为否" + +#: pkg/cmd/ls/ls.go:12 +msgid "List all project and stack information" +msgstr "列出所有项目和堆栈信息" + +#: pkg/cmd/version/version.go:14 +msgid "" +"\n" +"\t\t# Print the Kusion version\n" +"\t\tkusion version" +msgstr "" +"\n" +"\t\t# 打印 Kusion 版本\n" +"\t\tkusion version" + +#: pkg/cmd/destroy/destroy.go:14 +msgid "" +"\n" +"\t\tDelete resources by resource spec.\n" +"\n" +"\t\tOnly KCL files are accepted. Only one type of arguments may be " +"specified: filenames,\n" +"\t\tresources and names, or resources and label selector.\n" +"\n" +"\t\tNote that the destroy command does NOT do resource version checks, so if " +"someone submits an\n" +"\t\tupdate to a resource right when you submit a destroy, their update will " +"be lost along with the\n" +"\t\trest of the resource." +msgstr "" +"\n" +"\t\t通过资源规约删除资源。\n" +"\n" +"\t\t只接受 KCL 文件。只能指定一种类型的参数:文件名、资源、名称、资源或标签选" +"择器。\n" +"\n" +"\t\t请注意,destroy 命令不会进行资源版本检查,\n" +"\t\t因此如果有人在你提交销毁时提交了对资源的更新,\n" +"\t\t他们的更新将与资源一起丢失。" + +#: pkg/cmd/env/env.go:14 +#, fuzzy +msgid "" +"\n" +" Env prints Kusion environment information.\n" +"\n" +" By default env prints information as a shell script (on Windows, a batch " +"file). If one\n" +" or more variable names is given as arguments, env prints the value of " +"each named variable\n" +" on its own line.\n" +"\n" +" The --json flag prints the environment in JSON format instead of as a " +"shell script.\n" +"\n" +" For more about environment variables, see \"kusion env -h\"." +msgstr "" +"\n" +"Env 打印 Kusion 环境信息。\n" +"\n" +"默认情况下,env 将信息打印为 shell 脚本(在 Windows,是 bat 文件)。\n" +"如果一个或多个变量名作为参数给出,env 将每个变量的名和值打印在单独一行上。\n" +"\n" +"--json 标志以 JSON 格式而不是 shell 脚本打印环境变量。\n" +"\n" +"有关环境变量的更多信息,请参阅 `kusion env -h`。" + +#: pkg/cmd/env/env.go:50 +#, fuzzy +msgid "Print the environment in JSON format" +msgstr "以 JSON 格式打印环境信息" + +#: pkg/cmd/init/init.go:61 +msgid "" +"Use templates from online repository to initialize project, or use locally " +"cached templates" +msgstr "使用线上模板初始化 Project,否则使用本地缓存模板" + +#: pkg/cmd/deps/deps.go:55 +msgid "" +"Direct is set to \"down\", \"only\" means only the downstream project/stack " +"list will be output. Valid values: project, stack. Defaults to project" +msgstr "" + +#: pkg/cmd/init/init.go:76 +msgid "List templates used to initialize a project" +msgstr "列出用于初始化 Project 的模板" + +#: pkg/cmd/init/init.go:81 +msgid "" +"\n" +"\t\t# Get name and description of internal templates\n" +"\t\tkusion init templates\n" +"\n" +"\t\t# Get templates from specific templates repository\n" +"\t\tkusion init templates https://github.com// --online=true" +msgstr "" +"\n" +"\t\t# 获取内置模板的名称和描述\n" +"\t\tkusion init templates\n" +"\n" +"\t\t# 获取指定的在线仓库中的模板列表\n" +"\t\tkusion init templates https://github.com// —online=true" + +#: pkg/cmd/check/check.go:54 pkg/cmd/compile/compile.go:63 +msgid "Disable dumping None values" +msgstr "禁用转储 None 值" + +#: pkg/cmd/check/check.go:56 pkg/cmd/compile/compile.go:65 +msgid "Specify the override option" +msgstr "指定覆盖选项" + +#: pkg/cmd/diff/diff.go:23 +msgid "Compare differences between input files and " +msgstr "比较输入文件 之间的差异" + +#: pkg/cmd/preview/preview.go:62 +#, fuzzy +msgid "Automatically show plan details with interactive options" msgstr "预览后自动展示 apply 计划细节" +#: pkg/cmd/env/env.go:12 +msgid "Print Kusion environment information" +msgstr "打印 Kusion 环境信息" + +#: pkg/cmd/deps/deps.go:18 +msgid "" +"\n" +"\t\t# List all the KCL files that are dependent by the given focus paths\n" +" kusion deps --focus path/to/focus1 --focus path/to/focus2\n" +"\n" +"\t\t# List all the projects that depend on the given focus paths\n" +"\t\tkusion deps --direct down --focus path/to/focus1 --focus path/to/focus2\n" +"\n" +"\t\t# List all the stacks that depend on the given focus paths\n" +"\t\tkusion deps --direct down --focus path/to/focus1 --focus path/to/focus2 " +"--only stack\n" +"\n" +"\t\t# List all the projects that depend on the given focus paths, ignoring " +"some paths from entrance files in each stack\n" +"\t\tkusion deps --direct down --focus path/to/focus1 --focus path/to/focus2 " +"--ignore path/to/ignore" +msgstr "" + +#: pkg/cmd/diff/diff.go:74 +msgid "Specify the output style. One of human and raw. The default is human" +msgstr "指定输出风格,human 和 raw 之一,默认值 human" + +#~ msgid "Print the kusion version info" +#~ msgstr "打印 kusion 的版本信息" + +#, fuzzy +#~ msgid "Print version info as versionShort string" +#~ msgstr "将版本信息打印成短版本字符串" + +#, fuzzy +#~ msgid "Print version info as JSON" +#~ msgstr "将版本信息打印成 JSON 格式" + +#, fuzzy +#~ msgid "Print version info as YAML" +#~ msgstr "将版本信息打印成 YAML 格式" + #, fuzzy #~ msgid "" #~ "\n" diff --git a/pkg/version/api.go b/pkg/version/api.go index 6aac5106..b0522c2a 100644 --- a/pkg/version/api.go +++ b/pkg/version/api.go @@ -8,14 +8,6 @@ func String() string { return info.String() } -func ShortString() string { - return info.ShortString() -} - func JSON() string { return info.JSON() } - -func YAML() string { - return info.YAML() -} diff --git a/pkg/version/types.go b/pkg/version/types.go index 45cf5cb3..0fd3b684 100644 --- a/pkg/version/types.go +++ b/pkg/version/types.go @@ -200,10 +200,6 @@ func (v *Info) String() string { return v.YAML() } -func (v *Info) ShortString() string { - return fmt.Sprintf("%s; git: %s; build time: %s", v.ReleaseVersion, v.GitInfo.Commit, v.BuildInfo.BuildTime) -} - func (v *Info) JSON() string { data, err := json.MarshalIndent(v, "", " ") if err != nil { diff --git a/pkg/version/types_test.go b/pkg/version/types_test.go index b404d89d..7130f6ff 100644 --- a/pkg/version/types_test.go +++ b/pkg/version/types_test.go @@ -58,7 +58,6 @@ func TestKusionVersionNormal(t *testing.T) { assert.Equal(t, want.JSON(), version.JSON()) assert.Equal(t, want.YAML(), version.YAML()) assert.Equal(t, want.String(), version.String()) - assert.Equal(t, want.ShortString(), version.ShortString()) } func TestKusionVersionReturnError(t *testing.T) { @@ -177,7 +176,6 @@ func TestKusionVersionNotHeadTag(t *testing.T) { assert.Equal(t, want.JSON(), version.JSON()) assert.Equal(t, want.YAML(), version.YAML()) assert.Equal(t, want.String(), version.String()) - assert.Equal(t, want.ShortString(), version.ShortString()) } func mockGit() {