From 4f4ec094066f6f21641c25994dc668cf971ed28c Mon Sep 17 00:00:00 2001 From: luoxin Date: Thu, 4 Jul 2024 00:03:20 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codegen/generate_i18n.go | 3 + i18n/tran.go | 115 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) diff --git a/codegen/generate_i18n.go b/codegen/generate_i18n.go index 8162565..1cc5dcd 100644 --- a/codegen/generate_i18n.go +++ b/codegen/generate_i18n.go @@ -32,6 +32,9 @@ func GenerateI18nConst(dstLocalize map[string]any, path string) (err error) { case []byte: localize[key] = string(x) + case int: + localize[key] = strconv.Itoa(x) + case map[string]any: deepKeys(append(slices.Clone(ps), k), x) diff --git a/i18n/tran.go b/i18n/tran.go index bd5254e..de48550 100644 --- a/i18n/tran.go +++ b/i18n/tran.go @@ -63,6 +63,8 @@ func translate(parent string, srcLocalize map[string]any, dstLang *Language, dst toDstSub := func(k string) map[string]any { sub := make(map[string]any) if v, ok := dstLocalize[k]; ok { + log.Infof("try cover dst sub localize %s from %s to %s", parent+"."+k, c.SrcLang, dstLang) + switch x := v.(type) { case map[string]any: sub = x @@ -72,11 +74,21 @@ func translate(parent string, srcLocalize map[string]any, dstLang *Language, dst sub[k] = v } + case map[string]int: + for k, v := range x { + sub[k] = v + } + case map[any]any: for k, v := range x { sub[anyx.ToString(k)] = v } + case map[any]int: + for k, v := range x { + sub[anyx.ToString(k)] = v + } + case map[int64]any: for k, v := range x { sub[strconv.FormatInt(k, 10)] = v @@ -87,6 +99,11 @@ func translate(parent string, srcLocalize map[string]any, dstLang *Language, dst sub[strconv.FormatInt(k, 10)] = v } + case map[int64]int: + for k, v := range x { + sub[strconv.FormatInt(k, 10)] = v + } + case map[float64]any: sub = map[string]any{} for k, v := range x { @@ -98,6 +115,11 @@ func translate(parent string, srcLocalize map[string]any, dstLang *Language, dst sub[strconv.FormatFloat(k, 'f', -1, 64)] = v } + case map[int]int: + for k, v := range x { + sub[strconv.Itoa(k)] = v + } + default: log.Errorf("data:%v", x) log.Panicf("unknown type %T", x) @@ -155,6 +177,99 @@ func translate(parent string, srcLocalize map[string]any, dstLang *Language, dst } } + case int: + tran := func() { + log.Infof("try translate [%s]%d from %s to %s", parent+"."+k, x, c.SrcLang, dstLang) + + pterm.Success.Printfln("key:%s\nfrom(%s) %d\nto(%s) %d", + parent+"."+k, + + c.SrcLang, + x, + + dstLang, + x, + ) + + dstLocalize[k] = strconv.Itoa(x) + } + + if _, ok := dstLocalize[k]; !ok { + tran() + } else if c.Overwrite { + tran() + } else { + for _, prefix := range c.OverwriteKeyPrefix { + if !strings.HasPrefix(parent+"."+k, prefix) { + continue + } + tran() + break + } + } + + case int64: + tran := func() { + log.Infof("try translate [%s]%d from %s to %s", parent+"."+k, x, c.SrcLang, dstLang) + + pterm.Success.Printfln("key:%s\nfrom(%s) %d\nto(%s) %d", + parent+"."+k, + + c.SrcLang, + x, + + dstLang, + x, + ) + + dstLocalize[k] = strconv.FormatInt(x, 10) + } + + if _, ok := dstLocalize[k]; !ok { + tran() + } else if c.Overwrite { + tran() + } else { + for _, prefix := range c.OverwriteKeyPrefix { + if !strings.HasPrefix(parent+"."+k, prefix) { + continue + } + tran() + break + } + } + + case float64: + tran := func() { + log.Infof("try translate [%s]%f from %s to %s", parent+"."+k, x, c.SrcLang, dstLang) + + pterm.Success.Printfln("key:%s\nfrom(%s) %f\nto(%s) %f", + parent+"."+k, + + c.SrcLang, + x, + + dstLang, + x, + ) + + dstLocalize[k] = strconv.FormatFloat(x, 'f', -1, 10) + } + + if _, ok := dstLocalize[k]; !ok { + tran() + } else if c.Overwrite { + tran() + } else { + for _, prefix := range c.OverwriteKeyPrefix { + if !strings.HasPrefix(parent+"."+k, prefix) { + continue + } + tran() + break + } + } + case map[string]any: dstSub := toDstSub(k) From bdcadf6792a19f1c1ae69eede217622fab1cf127 Mon Sep 17 00:00:00 2001 From: luoxin Date: Sat, 20 Jul 2024 19:25:25 +0800 Subject: [PATCH 2/5] update --- codegen/template/impl/list.rpc.gtpl | 50 +++++++++++------------ codegen/template/proto/list.req.rpc.gtpl | 2 +- codegen/template/proto/list.resp.rpc.gtpl | 2 +- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/codegen/template/impl/list.rpc.gtpl b/codegen/template/impl/list.rpc.gtpl index 4a07277..da64df0 100644 --- a/codegen/template/impl/list.rpc.gtpl +++ b/codegen/template/impl/list.rpc.gtpl @@ -24,103 +24,103 @@ func {{ .RpcName }}(ctx *lrpc.Ctx, req *{{ .PB.GoPackageName }}.{{ .RequestType scoop.RightLike({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "int" }} - Int(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Int(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value int) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "int8" }} - Int8(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Int8(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value int8) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "int16" }} - Int16(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Int16(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value int16) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "int32" }} - Int32(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Int32(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value int32) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "int64" }} - Int64(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Int64(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value int64) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "uint" }} - Uint(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Uint(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value uint) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "uint8" }} - Uint8(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Uint8(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value uint8) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "uint16" }} - Uint16(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Uint16(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value uint16) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "uint32" }} - Uint32(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Uint32(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value uint32) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "uint64" }} - Uint64(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Uint64(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value uint64) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "float32" }} - Float32(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Float32(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value float32) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "float64" }} - Float64(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Float64(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value float64) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "bool" }} - Bool(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Bool(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value bool) error { scoop.Where({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "int-slice" }} - IntSlice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + IntSlice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value []int) error { scoop.In({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "int8-slice" }} - Int8Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Int8Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value []int8]) error { scoop.In({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "int16-slice" }} - Int16Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Int16Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value []int16]) error { scoop.In({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "int32-slice" }} - Int32Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Int32Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value []int32]) error { scoop.In({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "int64-slice" }} - Int64Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Int64Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value []int64]) error { scoop.In({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "uint-slice" }} - UintSlice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + UintSlice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value []uint) error { scoop.In({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "uint16-slice" }} - Uint16Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Uint16Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value []uint16]) error { scoop.In({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "uint32-slice" }} - Uint32Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Uint32Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value []uint32]) error { scoop.In({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "uint64-slice" }} - Uint64Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Uint64Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value []uint64]) error { scoop.In({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "float32-slice" }} - Float32Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Float32Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value []float32]) error { scoop.In({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "float64-slice" }} - Float64Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + Float64Slice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value []float64]) error { scoop.In({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ else if eq $value.FieldType "bool-slice" }} - BoolSlice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value string) error { + BoolSlice(int32({{ $.PB.GoPackageName }}.{{ $value.KeyField }}), func(value []bool]) error { scoop.In({{ $.PB.GoPackageName }}.Db{{ $value.FieldName }}, value) return nil }).{{ end }}{{ end }} diff --git a/codegen/template/proto/list.req.rpc.gtpl b/codegen/template/proto/list.req.rpc.gtpl index 0447b93..23e403b 100644 --- a/codegen/template/proto/list.req.rpc.gtpl +++ b/codegen/template/proto/list.req.rpc.gtpl @@ -6,5 +6,5 @@ message {{ .RequestType }} { } // @validate: required - core.ListOption list_option = 1; + lazygophers.lrpc.core.ListOption list_option = 1; } diff --git a/codegen/template/proto/list.resp.rpc.gtpl b/codegen/template/proto/list.resp.rpc.gtpl index 92941bc..7b71d72 100644 --- a/codegen/template/proto/list.resp.rpc.gtpl +++ b/codegen/template/proto/list.resp.rpc.gtpl @@ -1,4 +1,4 @@ message {{ .ResponseType }} { - core.Paginate paginate = 1; + lazygophers.lrpc.core.Paginate paginate = 1; repeated {{ .Model }} list = 2; } From 1b6ca796816bdaf9be7eafc797289416cc91b9a4 Mon Sep 17 00:00:00 2001 From: luoxin Date: Fri, 2 Aug 2024 21:48:19 +0800 Subject: [PATCH 3/5] update --- cli/i18n/tran.go | 1 + codegen/template/table_field.gen.gtpl | 2 +- i18n/language.go | 2 +- i18n/tran.go | 58 +++-- i18n/translater.go | 4 +- state/i18n.gen.go | 4 +- state/localize/pt-br.yaml | 295 ++++++++++++++++++++++++++ 7 files changed, 339 insertions(+), 27 deletions(-) create mode 100644 state/localize/pt-br.yaml diff --git a/cli/i18n/tran.go b/cli/i18n/tran.go index 389708c..57dc29e 100644 --- a/cli/i18n/tran.go +++ b/cli/i18n/tran.go @@ -152,6 +152,7 @@ var allLanguage = candy.Map([]string{ "zh-cn", "zh-tw", "zh-chs", + "zh-hans", "zh-hk", "zh-mo", "zh-sg", diff --git a/codegen/template/table_field.gen.gtpl b/codegen/template/table_field.gen.gtpl index 2ae6f6a..3182a5a 100644 --- a/codegen/template/table_field.gen.gtpl +++ b/codegen/template/table_field.gen.gtpl @@ -1,5 +1,5 @@ package {{ .PB.GoPackageName }} const ({{range $key, $value := .FieldMap }} - Db{{ ToCamel $key }} = "{{ $key }}"{{ end }} + Db{{ ToCamel $key }} = "`{{ $key }}`"{{ end }} ) diff --git a/i18n/language.go b/i18n/language.go index e91c9bb..90e3fc1 100644 --- a/i18n/language.go +++ b/i18n/language.go @@ -32,7 +32,7 @@ func ParseLanguage(lang string) (*Language, error) { lang = strings.ToLower(lang) switch lang { - case "zh-cn", "zh-chs": + case "zh-cn", "zh-chs", "zh-hans": return &Language{ Lang: lang, Tag: language.Chinese, diff --git a/i18n/tran.go b/i18n/tran.go index de48550..1da4a68 100644 --- a/i18n/tran.go +++ b/i18n/tran.go @@ -138,27 +138,43 @@ func translate(parent string, srcLocalize map[string]any, dstLang *Language, dst tran := func() { log.Infof("try translate [%s]%s from %s to %s", parent+"."+k, x, c.SrcLang, dstLang) - traget, err := c.Translator.Translate(c.SrcLang.Tag, dstLang.Tag, x) - if err != nil { - log.Errorf("err:%v", err) - pterm.Warning.Printfln("translate fail\nkey:%s\nfrom %s\nto %s\n%s", - parent+"."+k, - c.SrcLang, - dstLang, - x, - ) - } else { - pterm.Success.Printfln("key:%s\nfrom(%s) %s\nto(%s) %s", - parent+"."+k, - - c.SrcLang, - x, - - dstLang, - traget, - ) - - dstLocalize[k] = traget + var tragetList []string + var hasError bool + + for _, s := range strings.Split(x, "\n") { + if s == "" { + tragetList = append(tragetList, s) + continue + } + + traget, err := c.Translator.Translate(c.SrcLang.Tag, dstLang.Tag, s) + if err != nil { + log.Errorf("err:%v", err) + pterm.Warning.Printfln("translate fail\nkey:%s\nfrom %s\nto %s\n%s", + parent+"."+k, + c.SrcLang, + dstLang, + s, + ) + hasError = true + break + } else { + pterm.Success.Printfln("key:%s\nfrom(%s) %s\nto(%s) %s", + parent+"."+k, + + c.SrcLang, + s, + + dstLang, + traget, + ) + + tragetList = append(tragetList, traget) + } + } + + if !hasError { + dstLocalize[k] = strings.Join(tragetList, "\n") } } diff --git a/i18n/translater.go b/i18n/translater.go index a7020e7..1655d53 100644 --- a/i18n/translater.go +++ b/i18n/translater.go @@ -85,7 +85,7 @@ func (p *TransacterGoogleFree) Translate(srcLang, dstLang language.Tag, key stri SetQueryParams(map[string]string{ "sl": srcLang.String(), "tl": dstLang.String(), - "q": strings.ReplaceAll(key, "\n", "\\n"), + "q": key, }). SetResult(&rsp). Get("") @@ -111,7 +111,7 @@ func (p *TransacterGoogleFree) Translate(srcLang, dstLang language.Tag, key stri return "", errors.New("not get translations") } - return strings.ReplaceAll(trans.Trans, "\\n", "\n"), nil + return trans.Trans, nil } func NewTransacterGoogleFree() *TransacterGoogleFree { diff --git a/state/i18n.gen.go b/state/i18n.gen.go index 1945d59..21cddfb 100644 --- a/state/i18n.gen.go +++ b/state/i18n.gen.go @@ -1,8 +1,8 @@ // Code generated by codegen. DO NOT EDIT. // versions: -// codegen v0.0.0-SNAPSHOT-d72f800 +// codegen v0.0.0-SNAPSHOT-bdcadf6 // go go1.22.3 -// update: 1719375397 +// update: 1722606440 package state diff --git a/state/localize/pt-br.yaml b/state/localize/pt-br.yaml new file mode 100644 index 0000000..fc83ecd --- /dev/null +++ b/state/localize/pt-br.yaml @@ -0,0 +1,295 @@ +cli: + completion: + flags: + no-descriptions: Desativar instruções de conclusão + long: |- + Gera um script de preenchimento automático para {{.RootName}} para o shell especificado. + Para obter detalhes sobre como usar o script de construção, consulte a ajuda de cada subcomando + Você pode salvar o comando no complemento .profile para implementar operações de conclusão automática (Observação: após a conclusão do salvamento ou a atualização da ferramenta, as funções relacionadas à conclusão não serão atualizadas automaticamente e precisarão ser atualizadas manualmente) + short: Gere um script de preenchimento automático para o shell especificado + subcommand: + short: Gerar script de preenchimento automático para {{.Command}} + flags: + debug: Log detalhado de saída + gen: + add-rpc: + flags: + action: Comportamentos que precisam ser adicionados em lotes, consulte a documentação de uso para obter detalhes + default-role: A função padrão da interface gerada em lote Consulte a documentação de uso para obter detalhes. + gen-to: Especifique o local de saída dos arquivos .go gerados + list-option: A lista também pode ser filtrada; consulte a documentação de uso para obter detalhes. + model: Especifique o nome do modelo, suportando a omissão do prefixo `model` + long: Gere interfaces em lotes e adicione uma interface para um determinado modelo no arquivo .proto + short: Interface de geração de lote + all: + long: Gere todo o código suportado por esta ferramenta + short: Gerar todo o código + cache: + long: Gerar arquivos de cache para SDKs relacionados ao cache de chamadas comerciais + short: Gerar arquivo de cache + cmd: + long: Gere arquivos de entrada para serviços empresariais + short: Gerar arquivo de entrada + conf: + long: Gerar modelo de arquivo de configuração + short: Gerar arquivo de configuração + dockerignore: + long: Gere o arquivo .dockerignore para construção de imagem Docker para ignorar o gerenciamento de arquivos + short: Gerar arquivo .dockerignore + editorconfig: + long: Gere arquivo .editorconfig para configuração do editor + short: Gerar arquivo .editorconfig + flags: + add-proto-files: Para outros caminhos de arquivo/pasta .proto que precisam ser importados e não estão na mesma pasta que o arquivo .proto especificado, esta operação anexará (não substituirá) o caminho configurado no arquivo de configuração. + go-module-prefix: Para o caminho do go_package configurado no arquivo .proto e o real, você pode configurar esta opção + input: Especifique o arquivo de origem .proto a ser gerado + output-path: Esta opção pode ser configurada quando o caminho do go_package configurado no arquivo .proto é inconsistente com o roadbed que realmente precisa ser gerado. + overwrite: Para conteúdo que não será regenerado, force a substituição do conteúdo existente + proto-files: Para importar outros arquivos .proto/caminhos de pasta que não estejam na mesma pasta do arquivo .proto especificado, esta operação é uma opção para substituir o campo de configuração no arquivo de configuração. + protoc: caminho de arquivo personalizável `protoc` + protoc-gen-go: Caminho do plugin `protoc-gen-go` + tables-enable_field_created_at: Se deve ativar a geração de configuração padrão do campo criado_at do banco de dados + tables-enable_field_deleted_at: Se a configuração padrão do campo deletado_at deve ser habilitada no banco de dados + tables-enable_field_id: Habilitar geração de configuração padrão para campos relacionados ao banco de dados + tables-enable_field_updated_at: Se deve ativar o valor padrão do campo atualizado_at no banco de dados + tables-enable_gorm_tag_column: Se deve ser habilitada a geração de gorms relacionados ao banco de dados + gitignote: + long: Gere arquivos .gitignore para gerenciamento de arquivos ignorados no controle de versão + short: Gerar arquivo .gitignore + golang-lint: + long: Gere o arquivo .golangci.yml para inspeção de qualidade do código + short: Gerar arquivo .golangci.yml + goreleaser: + long: Gere o arquivo .goreleaser.yml para configuração das ferramentas de lançamento + short: Gerar arquivo .goreleaser.yml + impl: + flags: + template-impl-path: O arquivo ./rpc_path.gen.go gera o caminho do modelo + template-impl-route: O arquivo ./cmd/route.gen.go gera o caminho do modelo + long: Gerar arquivos de implementação para a implementação de serviços de negócios + short: Gerar arquivos de implementação + long: Gerador de código, suporta vários modelos + makefile: + long: Gere arquivos Makefile para ferramentas de construção e outros comandos relacionados + short: Gerar Makefile + mod: + long: Gere o arquivo go.mod para gerenciamento de dependências + short: Gerar arquivo go.mod + pb: + long: Gere arquivos .pb.go, que são usados ​​para gerar arquivos .proto. Os rótulos de campo relevantes x serão adicionados automaticamente de acordo com a configuração. + short: Gerar arquivo .pb.go + short: Gerador de código + state: + conf: + long: Gerar código de leitura de arquivo de configuração para leitura de configuração de serviço de negócios + short: Gerar código de leitura do arquivo de configuração + flags: + cache: Se deve ativar a geração relacionada ao cache + config: Se deve gerar código relacionado à configuração + i18n: Se deseja ativar a geração relacionada a vários idiomas (a geração inclui apenas inicialização de estado e outros conteúdos, e não inclui tradução automática de vários idiomas. Se precisar de tradução automática, use {{.Command}} para visualizar detalhes) + table: Se deve ativar a geração de banco de dados relacionada ao banco de dados + i18n: + long: Gere código relacionado ao i18n para chamadas internacionais em vários idiomas + short: Gerar código relacionado ao i18n + long: Gere todas as funções de estado relacionadas para recursos com estado ou gerenciamento de recursos estáticos de serviços de negócios + short: Todas as funções relevantes para gerar estado + table: + long: Gere código relacionado a state.table, usado para conexão de banco de dados e inicialização de tabela quando o serviço é iniciado. + short: Gerar código relacionado a state.table + table: + long: Todas as funções relacionadas à geração de tabelas para recursos com estado ou gerenciamento de recursos estáticos de serviços de negócios + short: Todas as funções relacionadas para geração de tabelas + group: + gen: geração de código + help: + additional_commands: Comandos adicionais + aliases: apelido de comando + available_commands: Comandos suportados + command: Ordem + flags: parâmetro + get_info: para obter informações mais detalhadas + global_flags: parâmetros globais + long: 'Forneça instruções de uso para qualquer comando no aplicativo. ' + short: Instruções para usar qualquer comando + usage: Instruções para usar {{.Name}} + use: usar + i18n: + long: Kit de ferramentas multilíngue relacionado à internacionalização + short: Kit de ferramentas multilíngue relacionado à internacionalização + support: + flags: + language: Especifique o idioma a ser exibido, caso contrário, o código do idioma será usado para exibir o idioma + long: Listar todos os idiomas suportados + short: Lista de idiomas suportados + tran: + flags: + all-language: Traduza todos os idiomas suportados (se for verdade, a sinalização de idiomas está desativada) + force: Substituir traduções existentes + force-key-prefix: chaves que precisam ser forçadas a serem substituídas + generate-const: Gere valores de enumeração para facilitar a chamada + languages: Especifique o idioma de destino para tradução + src-file: Arquivo fonte a ser traduzido (obrigatório) + src-language: O idioma do arquivo de origem (se não for especificado, a ferramenta determinará automaticamente o arquivo de origem) + translator: + google-free: Google Web Tradutor + usage: 'Canal de tradução: Tipo de suporte {{range $key,$value := .Type}}{{$key}}:{{$value}}{{end}}' + long: Arquivos multilíngues de uma determinada fonte são convertidos em arquivos do mesmo formato em outros idiomas. + short: traduzir + long: Um conjunto de ferramentas para pessoas preguiçosas, incluindo estrutura de back-end baseada em 'proto', modelos comumente usados ​​e tradução multilíngue + short: Um conjunto de ferramentas para pessoas preguiçosas + sync: + flags: + password: Senha usada para solicitar verificação + template-path: Caminho de sincronização do modelo + username: Nome de usuário usado para solicitar verificação + long: Sincronize a configuração da extremidade remota e mescle-a na configuração local O arquivo de modelo é suportado ao mesmo tempo durante a sincronização (se configurado). + short: Sincronizar configuração remotamente + up-mod: + flags: + goproxy: Especifique o endereço goproxy, caso contrário, o primeiro na variável de ambiente será usado + long: Atualize a versão de dependência do arquivo go.mod + short: Atualizar arquivo go.mod +lang: + af: afrikaans + ak: Twi (Akan) + am: amárico + ar: árabe + as: Assamês + ay: aimará + az: Azerbaijano + be: Bielorrusso + bg: búlgaro + bho: Bhojpuri + bm: Bambará + bn: bengali + bs: Bósnio + ca: catalão + ceb: Cebuano + ckb: Curdo (Sorani) + co: Córsega + cs: Tcheco + cy: galês + da: dinamarquês + de: Alemão + doi: Dogglai + dv: Divehi + ee: Ovelha + el: grego + en: Inglês + eo: esperanto + es: espanhol + et: estoniano + eu: basco + fa: persa + fi: finlandês + fil: Filipino (tagalo) + fr: Francês + fy: Frísio + ga: irlandês + gd: gaélico escocês + gl: Galego + gn: guarani + gom: língua gonggan + gu: guzerate + ha: Hauçá + haw: havaiano + he: hebraico + hi: hindi + hmn: Hmong + hr: croata + ht: crioulo haitiano + hu: húngaro + hy: Armênio + id: indonésio + ig: Ibo + ilo: Ilocano + is: islandês + it: italiano + iw: hebraico + ja: japonês + jv: javanês + jw: javanês + ka: Georgiano + kk: Cazaque + km: Cambojano + kn: Kannada + ko: coreano + kri: crioulo + ku: curdo + ky: Quirguistão + la: Latim + lb: Luxemburguês + lg: Luganda + ln: Lingala + lo: Laos + lt: lituano + lus: Mizo + lv: letão + mai: Maithili + mg: malgaxe + mi: maori + mk: Macedônio + ml: Malaiala + mn: mongol + mni-mtei: Meitei (Manipuri) + mr: marata + ms: malaio + mt: maltês + my: birmanês + ne: nepalês + nl: Holandês + "no": norueguês + nso: Sepeti + ny: Nyanza (Chichewa) + om: Oromo + or: Oriya (Odia) + pa: punjabi + pl: polonês + ps: pashto + pt: Português (Brasil) + pt-br: Português (Brasil) + qu: Quéchua + ro: romena + ru: russo + rw: Kinyarwanda + sa: sânscrito + sd: sindi + si: cingalês + sk: Eslovaco + sl: esloveno + sm: samoano + sn: Shona + so: somali + sq: albanês + sr: sérvio + st: Sesoto + su: Sudanês + sv: sueco + sw: suaíli + ta: tâmil + te: télugo + tg: tadjique + th: tailandês + ti: Tignan + tk: turcomano + tl: Tagalo (filipino) + tr: turco + ts: Dzonga + tt: tártaro + ug: Uigur + uk: ucraniano + ur: urdu + uz: Usbeque + vi: vietnamita + xh: língua bantu + yi: iídiche + yo: iorubá + zh: chinês + zh-chs: Chinês simplificado) + zh-cht: Chinês simplificado) + zh-cn: Chinês simplificado) + zh-hk: Chinês (Hong Kong) + zh-mo: Chinês (Macau) + zh-sg: Chinês (Singapura) + zh-tw: Chinês (Taiwan) + zu: zulu From e90a52b8a2f424ef526b35bccf9fdc3929bc03b4 Mon Sep 17 00:00:00 2001 From: luoxin Date: Mon, 5 Aug 2024 15:12:26 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E7=94=9F=E6=88=90=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E7=9A=84i18n=20=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli/i18n/tran.go | 27 ++- codegen/generate_i18n.go | 330 +++++++++++++++++++++++++++++++++++ codegen/resource.go | 4 + state/config.go | 1 + state/i18n.gen.go | 3 +- state/localize/af.yaml | 1 + state/localize/ak.yaml | 1 + state/localize/am.yaml | 1 + state/localize/ar.yaml | 1 + state/localize/as.yaml | 1 + state/localize/ay.yaml | 1 + state/localize/az.yaml | 1 + state/localize/be.yaml | 1 + state/localize/bg.yaml | 1 + state/localize/bho.yaml | 1 + state/localize/bm.yaml | 1 + state/localize/bn.yaml | 1 + state/localize/bs.yaml | 1 + state/localize/ca.yaml | 1 + state/localize/ceb.yaml | 1 + state/localize/ckb.yaml | 1 + state/localize/co.yaml | 1 + state/localize/cs.yaml | 1 + state/localize/cy.yaml | 1 + state/localize/da.yaml | 1 + state/localize/de.yaml | 1 + state/localize/doi.yaml | 1 + state/localize/dv.yaml | 1 + state/localize/ee.yaml | 1 + state/localize/el.yaml | 1 + state/localize/en.yaml | 1 + state/localize/eo.yaml | 1 + state/localize/es.yaml | 1 + state/localize/et.yaml | 1 + state/localize/eu.yaml | 1 + state/localize/fa.yaml | 1 + state/localize/fi.yaml | 1 + state/localize/fr.yaml | 1 + state/localize/fy.yaml | 1 + state/localize/ga.yaml | 1 + state/localize/gd.yaml | 1 + state/localize/gl.yaml | 1 + state/localize/gn.yaml | 1 + state/localize/gom.yaml | 1 + state/localize/gu.yaml | 1 + state/localize/ha.yaml | 1 + state/localize/haw.yaml | 1 + state/localize/he.yaml | 1 + state/localize/hi.yaml | 1 + state/localize/hmn.yaml | 1 + state/localize/hr.yaml | 1 + state/localize/ht.yaml | 1 + state/localize/hu.yaml | 1 + state/localize/hy.yaml | 1 + state/localize/id.yaml | 1 + state/localize/ig.yaml | 1 + state/localize/ilo.yaml | 1 + state/localize/is.yaml | 1 + state/localize/it.yaml | 1 + state/localize/iw.yaml | 1 + state/localize/ja.yaml | 1 + state/localize/jv.yaml | 1 + state/localize/jw.yaml | 1 + state/localize/ka.yaml | 1 + state/localize/kk.yaml | 1 + state/localize/km.yaml | 1 + state/localize/kn.yaml | 1 + state/localize/ko.yaml | 1 + state/localize/kri.yaml | 1 + state/localize/ku.yaml | 1 + state/localize/ky.yaml | 1 + state/localize/la.yaml | 1 + state/localize/lb.yaml | 1 + state/localize/lg.yaml | 1 + state/localize/ln.yaml | 1 + state/localize/lo.yaml | 1 + state/localize/lt.yaml | 1 + state/localize/lus.yaml | 1 + state/localize/lv.yaml | 1 + state/localize/mai.yaml | 1 + state/localize/mg.yaml | 1 + state/localize/mi.yaml | 1 + state/localize/mk.yaml | 1 + state/localize/ml.yaml | 1 + state/localize/mn.yaml | 1 + state/localize/mni-mtei.yaml | 1 + state/localize/mr.yaml | 1 + state/localize/ms.yaml | 1 + state/localize/mt.yaml | 1 + state/localize/my.yaml | 1 + state/localize/ne.yaml | 1 + state/localize/nl.yaml | 1 + state/localize/no.yaml | 1 + state/localize/nso.yaml | 1 + state/localize/ny.yaml | 1 + state/localize/om.yaml | 1 + state/localize/or.yaml | 1 + state/localize/pa.yaml | 1 + state/localize/pl.yaml | 1 + state/localize/ps.yaml | 1 + state/localize/pt-br.yaml | 1 + state/localize/pt.yaml | 1 + state/localize/qu.yaml | 1 + state/localize/ro.yaml | 1 + state/localize/ru.yaml | 1 + state/localize/rw.yaml | 1 + state/localize/sa.yaml | 1 + state/localize/sd.yaml | 1 + state/localize/si.yaml | 1 + state/localize/sk.yaml | 1 + state/localize/sl.yaml | 1 + state/localize/sm.yaml | 1 + state/localize/sn.yaml | 1 + state/localize/so.yaml | 1 + state/localize/sq.yaml | 1 + state/localize/sr.yaml | 1 + state/localize/st.yaml | 1 + state/localize/su.yaml | 1 + state/localize/sv.yaml | 1 + state/localize/sw.yaml | 1 + state/localize/ta.yaml | 1 + state/localize/te.yaml | 1 + state/localize/tg.yaml | 1 + state/localize/th.yaml | 1 + state/localize/ti.yaml | 1 + state/localize/tk.yaml | 1 + state/localize/tl.yaml | 1 + state/localize/tr.yaml | 1 + state/localize/ts.yaml | 1 + state/localize/tt.yaml | 1 + state/localize/ug.yaml | 1 + state/localize/uk.yaml | 1 + state/localize/ur.yaml | 1 + state/localize/uz.yaml | 1 + state/localize/vi.yaml | 1 + state/localize/xh.yaml | 1 + state/localize/yi.yaml | 1 + state/localize/yo.yaml | 1 + state/localize/zh-chs.yaml | 1 + state/localize/zh-cht.yaml | 1 + state/localize/zh-cn.yaml | 1 + state/localize/zh-hans.yaml | 296 +++++++++++++++++++++++++++++++ state/localize/zh-hk.yaml | 1 + state/localize/zh-mo.yaml | 1 + state/localize/zh-sg.yaml | 1 + state/localize/zh-tw.yaml | 1 + state/localize/zh.yaml | 1 + state/localize/zu.yaml | 1 + 148 files changed, 801 insertions(+), 2 deletions(-) create mode 100644 state/localize/zh-hans.yaml diff --git a/cli/i18n/tran.go b/cli/i18n/tran.go index 57dc29e..d05fbdb 100644 --- a/cli/i18n/tran.go +++ b/cli/i18n/tran.go @@ -253,7 +253,26 @@ var tranCmd = &cobra.Command{ dstLocalize, filepath.Join( filepath.Dir(filepath.Dir(c.SrcFile)), - "i18n.gen.go"), + "i18n_const.gen.go"), + ) + if err != nil { + log.Errorf("err:%v", err) + return err + } + } + + if state.Config.I18n.GenerateField { + dstLocalize, err := i18n.LoadLocalize(c.SrcFile, c.Localizer) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + err = codegen.GenerateI18nField( + dstLocalize, + filepath.Join( + filepath.Dir(filepath.Dir(c.SrcFile)), + "i18n_field.gen.go"), ) if err != nil { log.Errorf("err:%v", err) @@ -269,6 +288,11 @@ func mergeTranCmdFlags(cmd *cobra.Command) { if cmd.Flag("generate-const").Changed { state.Config.I18n.GenerateConst = utils.GetBool("generate-const", cmd) } + + if cmd.Flag("generate-field").Changed { + state.Config.I18n.GenerateField = utils.GetBool("generate-field", cmd) + } + if cmd.Flag("translator").Changed { state.Config.I18n.Translator = utils.GetString("translator", cmd) } @@ -298,6 +322,7 @@ func initTran() { tranCmd.Flags().StringSliceP("languages", "l", state.Config.I18n.Languages, state.Localize(state.I18nTagCliI18nTranFlagsLanguages)) tranCmd.Flags().Bool("generate-const", state.Config.I18n.GenerateConst, state.Localize(state.I18nTagCliI18nTranFlagsGenerateConst)) + tranCmd.Flags().Bool("generate-field", state.Config.I18n.GenerateField, state.Localize(state.I18nTagCliI18nTranFlagsGenerateField)) tranCmd.Flags().String("translator", state.Config.I18n.Translator, state.Localize(state.I18nTagCliI18nTranFlagsTranslatorUsage, map[string]any{ "Type": map[i18n.TransacteType]string{ i18n.TransacteTypeGoogleFree: state.Localize(state.I18nTagCliI18nTranFlagsTranslatorGoogleFree), diff --git a/codegen/generate_i18n.go b/codegen/generate_i18n.go index 1cc5dcd..e49978e 100644 --- a/codegen/generate_i18n.go +++ b/codegen/generate_i18n.go @@ -12,6 +12,7 @@ import ( "slices" "strconv" "strings" + "text/template" ) func GenerateI18nConst(dstLocalize map[string]any, path string) (err error) { @@ -141,6 +142,325 @@ func GenerateI18nConst(dstLocalize map[string]any, path string) (err error) { return nil } +// GenerateI18nField +// 这里是一个比较特殊的东西,我还没有搞明白这么用 go-template 实现,就现用 golang 的方式实现一个 +func GenerateI18nField(dstLocalize map[string]any, path string) (err error) { + pterm.Info.Printfln("try gen i18n field to %s", path) + + file, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, fs.FileMode(0666)) + if err != nil { + log.Errorf("err:%v", err) + return err + } + defer file.Close() + + _, err = file.Write(getFileHeader(nil)) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + // 写一下 package + _, err = file.WriteString("package ") + if err != nil { + log.Errorf("err:%v", err) + return err + } + _, err = file.WriteString(filepath.Base(filepath.Dir(path))) + if err != nil { + log.Errorf("err:%v", err) + return err + } + _, err = file.WriteString("\n\n") + if err != nil { + log.Errorf("err:%v", err) + return err + } + + _, err = file.WriteString("// Tran Translation function to facilitate the call of generated code\n// NOTE: Need replace\nvar Tran = func(lang string, key string, args ...any) string {\n\tpanic(\"Undefined translation function, please use it after initialization\")\n}\n\n") + if err != nil { + log.Errorf("err:%v", err) + return err + } + + writeLast := func(key string) (err error) { + err = template.Must(template.New("").Funcs(DefaultTemplateFunc).Parse(I18nFieldLastTemplate)). + Execute(file, map[string]any{ + "Keys": key, + }) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + _, err = file.WriteString("\n") + if err != nil { + log.Errorf("err:%v", err) + return err + } + + return nil + } + + writeMiddle := func(key string, subs []string) (err error) { + err = template.Must(template.New("").Funcs(DefaultTemplateFunc).Parse(I18NFieldMiddleTemplate)). + Execute(file, map[string]any{ + "Keys": key, + "Subs": subs, + }) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + _, err = file.WriteString("\n") + if err != nil { + log.Errorf("err:%v", err) + return err + } + + return nil + } + + writeFirst := func(key string, subs []string) (err error) { + err = template.Must(template.New("").Funcs(DefaultTemplateFunc).Parse(I18NFieldFirstTemplate)). + Execute(file, map[string]any{ + "Keys": key, + "Subs": subs, + }) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + _, err = file.WriteString("\n") + if err != nil { + log.Errorf("err:%v", err) + return err + } + + return nil + } + + // 递归一下 + var deepKeys func(ps []string, m map[string]interface{}) (err error) + deepKeys = func(ps []string, m map[string]interface{}) (err error) { + for k, v := range m { + key := strings.Join(append(slices.Clone(ps), k), ".") + + switch x := v.(type) { + case string: + err = writeLast(key) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + case []byte: + err = writeLast(key) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + case int: + err = writeLast(key) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + case map[string]any: + err = writeMiddle(key, anyx.MapKeysString(x)) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + err = deepKeys(append(slices.Clone(ps), k), x) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + case map[string]string: + sub := make(map[string]any, len(x)) + for k, v := range x { + sub[k] = v + } + + err = writeMiddle(key, anyx.MapKeysString(sub)) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + err = deepKeys(append(slices.Clone(ps), k), sub) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + case map[string][]byte: + sub := make(map[string]any, len(x)) + for k, v := range x { + sub[k] = string(v) + } + + err = writeMiddle(key, anyx.MapKeysString(sub)) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + err = deepKeys(append(slices.Clone(ps), k), sub) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + case map[int64]any: + sub := make(map[string]any, len(x)) + for k, v := range x { + sub[strconv.FormatInt(k, 10)] = v + } + + err = writeMiddle(key, anyx.MapKeysString(sub)) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + err = deepKeys(append(slices.Clone(ps), k), sub) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + case map[int64]string: + sub := make(map[string]any, len(x)) + for k, v := range x { + sub[strconv.FormatInt(k, 10)] = v + } + + err = writeMiddle(key, anyx.MapKeysString(sub)) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + err = deepKeys(append(slices.Clone(ps), k), sub) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + case map[int64][]byte: + sub := make(map[string]any, len(x)) + for k, v := range x { + sub[strconv.FormatInt(k, 10)] = string(v) + } + + err = writeMiddle(key, anyx.MapKeysString(sub)) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + err = deepKeys(append(slices.Clone(ps), k), sub) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + case map[float64]any: + sub := make(map[string]any, len(x)) + for k, v := range x { + sub[strconv.FormatFloat(k, 'f', -1, 64)] = v + } + + err = writeMiddle(key, anyx.MapKeysString(sub)) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + err = deepKeys(append(slices.Clone(ps), k), sub) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + case map[float64]string: + sub := make(map[string]any, len(x)) + for k, v := range x { + sub[strconv.FormatFloat(k, 'f', -1, 64)] = v + } + err = deepKeys(append(slices.Clone(ps), k), sub) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + case map[float64][]byte: + sub := make(map[string]any, len(x)) + for k, v := range x { + sub[strconv.FormatFloat(k, 'f', -1, 64)] = string(v) + } + + err = writeMiddle(key, anyx.MapKeysString(sub)) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + err = deepKeys(append(slices.Clone(ps), k), sub) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + case map[any]any: + sub := make(map[string]any, len(x)) + for k, v := range x { + sub[anyx.ToString(k)] = v + } + + err = writeMiddle(key, anyx.MapKeysString(sub)) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + err = deepKeys(append(slices.Clone(ps), k), sub) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + default: + log.Panicf("unsupported type:%T", x) + } + } + + return nil + } + + err = deepKeys([]string{}, dstLocalize) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + err = writeFirst("", anyx.MapKeysString(dstLocalize)) + if err != nil { + log.Errorf("err:%v", err) + return err + } + + return nil +} + func GenerateI18n(pb *PbPackage) (err error) { pterm.Info.Printfln("try generate state.i18nL") @@ -188,3 +508,13 @@ func GenerateI18n(pb *PbPackage) (err error) { return nil } + +var I18nFieldLastTemplate = "type i8nTag{{ ToCamel .Keys }} string\n\nfunc (p i8nTag{{ ToCamel .Keys }}) Key() string {\n return `{{ .Keys }}`\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) String() string {\n return `{{ .Keys }}`\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) GoString() string {\n return `{{ .Keys }}`\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) Tran(lang string, args ...any) string {\n return Tran(lang, `{{ .Keys }}`, args...)\n}\n" + +var I18NFieldMiddleTemplate = "type i8nTag{{ ToCamel .Keys }} struct { {{ range $key, $value := .Subs}}\n\t// {{ $.Keys }}.{{ $value }}\n\t{{ ToCamel $value }}\ti8nTag{{ ToCamel $.Keys }}{{ ToCamel $value }}{{end}}\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) Key() string {\n return `{{ .Keys }}`\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) String() string {\n return `{{ .Keys }}`\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) Tran(lang string, args ...any) string {\n return Tran(lang, `{{ .Keys }}`, args...)\n}\n" + +var I18NFieldFirstTemplate = `var I18nTag{{ ToCamel .Keys }} struct { {{ range $key, $value := .Subs}} + // {{ $value }} + {{ ToCamel $value }} i8nTag{{ ToCamel $.Keys }}{{ ToCamel $value }}{{end}} +} +` diff --git a/codegen/resource.go b/codegen/resource.go index a3e1f1c..b77ecf9 100644 --- a/codegen/resource.go +++ b/codegen/resource.go @@ -277,6 +277,10 @@ var DefaultTemplateFunc = template.FuncMap{ "ToLower": strings.ToLower, "ToUpper": strings.ToUpper, "ToTitle": strings.ToTitle, + "ReplaceAll": strings.ReplaceAll, + + "Snake2Camel": stringx.Snake2Camel, + "Snake2SmallCamel": stringx.Snake2SmallCamel, "TrimPrefix": strings.TrimPrefix, "TrimSuffix": strings.TrimSuffix, diff --git a/state/config.go b/state/config.go index 3fb4998..43abf94 100644 --- a/state/config.go +++ b/state/config.go @@ -206,6 +206,7 @@ func (p *CfgTables) apply() { type CfgI18n struct { GenerateConst bool `json:"generate-const,omitempty" yaml:"generate-const,omitempty" toml:"generate-const,omitempty"` + GenerateField bool `json:"generate-field,omitempty" yaml:"generate-field,omitempty" toml:"generate-field,omitempty"` Languages []string `json:"languages,omitempty" yaml:"languages,omitempty" toml:"languages,omitempty"` AllLanguages bool `json:"all-languages,omitempty" yaml:"all-languages,omitempty" toml:"all-languages,omitempty"` diff --git a/state/i18n.gen.go b/state/i18n.gen.go index 21cddfb..d47eabd 100644 --- a/state/i18n.gen.go +++ b/state/i18n.gen.go @@ -2,7 +2,7 @@ // versions: // codegen v0.0.0-SNAPSHOT-bdcadf6 // go go1.22.3 -// update: 1722606440 +// update: 1722832659 package state @@ -133,6 +133,7 @@ const ( I18nTagCliI18nTranFlagsForce = `cli.i18n.tran.flags.force` I18nTagCliI18nTranFlagsForceKeyPrefix = `cli.i18n.tran.flags.force-key-prefix` I18nTagCliI18nTranFlagsGenerateConst = `cli.i18n.tran.flags.generate-const` + I18nTagCliI18nTranFlagsGenerateField = `cli.i18n.tran.flags.generate-field` I18nTagCliI18nTranFlagsLanguages = `cli.i18n.tran.flags.languages` I18nTagCliI18nTranFlagsSrcFile = `cli.i18n.tran.flags.src-file` I18nTagCliI18nTranFlagsSrcLanguage = `cli.i18n.tran.flags.src-language` diff --git a/state/localize/af.yaml b/state/localize/af.yaml index ca5fb75..0292a10 100644 --- a/state/localize/af.yaml +++ b/state/localize/af.yaml @@ -125,6 +125,7 @@ cli: force: Oorskryf bestaande vertalings force-key-prefix: sleutels wat gedwing moet word om oorskryf te word generate-const: Genereer opsommingswaardes vir maklike oproepe + generate-field: Genereer veldtipe opsommingswaardes vir maklike oproepe languages: Spesifiseer die doeltaal vir vertaling src-file: Bronlêer wat vertaal moet word (vereis) src-language: Die taal van die bronlêer (indien nie gespesifiseer nie, sal die instrument outomaties die bronlêer bepaal) diff --git a/state/localize/ak.yaml b/state/localize/ak.yaml index 984e286..35081c6 100644 --- a/state/localize/ak.yaml +++ b/state/localize/ak.yaml @@ -125,6 +125,7 @@ cli: force: Kyerɛw nkyerɛase ahorow a ɛwɔ hɔ dedaw no so force-key-prefix: nsafe a ɛsɛ sɛ wɔhyɛ ma wɔkyerɛw so generate-const: Yɛ enumeration values ​​ma frɛ a ɛnyɛ den + generate-field: Yɛ field type enumeration values ​​ma frɛ a ɛnyɛ den languages: Kyerɛ kasa a wopɛ sɛ wokyerɛ ase src-file: Source file a wɔbɛkyerɛ ase (ɛhwehwɛ) . src-language: Kasa a wɔde fa fael no fibea (sɛ wɔankyerɛ a, adwinnade no ankasa bɛkyerɛ fael a efi mu ba) . diff --git a/state/localize/am.yaml b/state/localize/am.yaml index 2dcffbf..12b6525 100644 --- a/state/localize/am.yaml +++ b/state/localize/am.yaml @@ -125,6 +125,7 @@ cli: force: ያሉትን ትርጉሞች ገልብጥ force-key-prefix: እንዲገለበጡ ማስገደድ የሚያስፈልጋቸው ቁልፎች generate-const: ለቀላል ጥሪ የመቁጠሪያ ዋጋዎችን ይፍጠሩ + generate-field: ለቀላል ጥሪ የመስክ አይነት መቁጠርያ ዋጋዎችን ይፍጠሩ languages: ለትርጉም የዒላማ ቋንቋ ይግለጹ src-file: የምንጭ ፋይል ሊተረጎም (አስፈላጊ) src-language: የምንጭ ፋይሉ ቋንቋ (ካልተገለጸ መሣሪያው በራስ-ሰር የምንጭ ፋይሉን ይወስናል) diff --git a/state/localize/ar.yaml b/state/localize/ar.yaml index d814bc1..0b7409b 100644 --- a/state/localize/ar.yaml +++ b/state/localize/ar.yaml @@ -125,6 +125,7 @@ cli: force: الكتابة فوق الترجمات الموجودة force-key-prefix: المفاتيح التي يجب إجبارها على الكتابة فوقها generate-const: توليد قيم التعداد لسهولة الاتصال + generate-field: قم بإنشاء قيم تعداد نوع الحقل لسهولة الاتصال languages: حدد اللغة المستهدفة للترجمة src-file: الملف المصدر للترجمة (مطلوب) src-language: لغة الملف المصدر (إذا لم يتم تحديدها، ستقوم الأداة تلقائيًا بتحديد الملف المصدر) diff --git a/state/localize/as.yaml b/state/localize/as.yaml index 7d33420..801b2f6 100644 --- a/state/localize/as.yaml +++ b/state/localize/as.yaml @@ -125,6 +125,7 @@ cli: force: বৰ্তমানৰ অনুবাদসমূহ অভাৰৰাইট কৰক force-key-prefix: কি'সমূহ যিবোৰক অভাৰৰাইট কৰিবলৈ বাধ্য কৰিব লাগিব generate-const: সহজ কলিঙৰ বাবে গণনা মান সৃষ্টি কৰক + generate-field: সহজ কলিঙৰ বাবে ক্ষেত্ৰ ধৰণ গণনা মান সৃষ্টি কৰক languages: অনুবাদৰ বাবে লক্ষ্য ভাষা ধাৰ্য্য কৰক src-file: অনুবাদ কৰিবলগীয়া উৎস ফাইল (প্ৰয়োজনীয়) src-language: উৎস নথিপত্ৰৰ ভাষা (যদি ধাৰ্য্য কৰা হোৱা নাই, সঁজুলিয়ে স্বয়ংক্ৰিয়ভাৱে উৎস নথিপত্ৰ নিৰ্ধাৰণ কৰিব) diff --git a/state/localize/ay.yaml b/state/localize/ay.yaml index a687a98..47f2cd1 100644 --- a/state/localize/ay.yaml +++ b/state/localize/ay.yaml @@ -125,6 +125,7 @@ cli: force: Jichhax utjki uka jaqukipäwinakat qillqt’aña force-key-prefix: llaves ukax forzado ukhamaw qillqt’atäñapa generate-const: Jasaki jawsañataki jakthapiwi chimpunaka luraña + generate-field: Jasaki jawsañataki yapu kasta jakhthapiwi chimpunaka luraña languages: Jaqukipañatakixa kuna arusa uñt’ayaña src-file: Jaqukipañataki phuqhat qillqata (wakisiwa) . src-language: Uka phunchhawi qillqatan arupa (janiwa qhananchatäkiti, uka yänakax phunchhawi qillqat uñt’ayañapawa) . diff --git a/state/localize/az.yaml b/state/localize/az.yaml index eebce1c..6f9f505 100644 --- a/state/localize/az.yaml +++ b/state/localize/az.yaml @@ -125,6 +125,7 @@ cli: force: Mövcud tərcümələrin üzərinə yazın force-key-prefix: üzərinə yazılmağa məcbur edilməli olan açarlar generate-const: Asan zəng üçün siyahı dəyərləri yaradın + generate-field: Asan zəng üçün sahə tipli siyahı dəyərləri yaradın languages: Tərcümə üçün hədəf dili göstərin src-file: Tərcümə ediləcək mənbə fayl (tələb olunur) src-language: Mənbə faylının dili (müəyyən edilmədikdə, alət mənbə faylı avtomatik müəyyən edəcək) diff --git a/state/localize/be.yaml b/state/localize/be.yaml index ffa8525..d642667 100644 --- a/state/localize/be.yaml +++ b/state/localize/be.yaml @@ -125,6 +125,7 @@ cli: force: Перазапісаць існуючыя пераклады force-key-prefix: ключы, якія неабходна прымусова перазапісаць generate-const: Стварыце значэнні пераліку для зручнага выкліку + generate-field: Стварыце значэнні пералічэння тыпу поля для зручнага выкліку languages: Укажыце мову перакладу src-file: Зыходны файл для перакладу (абавязкова) src-language: Мова зыходнага файла (калі не ўказана, інструмент аўтаматычна вызначыць зыходны файл) diff --git a/state/localize/bg.yaml b/state/localize/bg.yaml index 4123d2d..698b7d2 100644 --- a/state/localize/bg.yaml +++ b/state/localize/bg.yaml @@ -125,6 +125,7 @@ cli: force: Заменете съществуващите преводи force-key-prefix: ключове, които трябва да бъдат принудени да бъдат презаписани generate-const: Генерирайте изброени стойности за лесно повикване + generate-field: Генерирайте стойности за изброяване на тип поле за лесно извикване languages: Посочете целевия език за превод src-file: Изходен файл за превод (задължително) src-language: Езикът на изходния файл (ако не е посочен, инструментът автоматично ще определи изходния файл) diff --git a/state/localize/bho.yaml b/state/localize/bho.yaml index edf8582..320c246 100644 --- a/state/localize/bho.yaml +++ b/state/localize/bho.yaml @@ -125,6 +125,7 @@ cli: force: मौजूदा अनुवादन के ओवरराइट कर लीं force-key-prefix: कुंजी जवना के ओवरराइट करे खातिर मजबूर करे के जरूरत बा generate-const: आसान कॉलिंग खातिर गणना मान जनरेट करीं + generate-field: आसान कॉलिंग खातिर फील्ड प्रकार गणना मान जनरेट करीं languages: अनुवाद खातिर लक्ष्य भाषा निर्दिष्ट करीं src-file: अनुवाद करे खातिर स्रोत फाइल (आवश्यक) src-language: स्रोत फाइल के भाषा (अगर निर्दिष्ट ना कइल गइल होखे तब टूल स्वचालित रूप से स्रोत फाइल के निर्धारण करी) diff --git a/state/localize/bm.yaml b/state/localize/bm.yaml index 8c09c51..abf0e90 100644 --- a/state/localize/bm.yaml +++ b/state/localize/bm.yaml @@ -125,6 +125,7 @@ cli: force: Bamanankan bayɛlɛmani minnu bɛ yen, olu sɛbɛn u kan force-key-prefix: kilisi minnu ka kan ka wajibiya ka sɛbɛn u kan generate-const: Jatebla nafaw labɔ walasa weleli ka nɔgɔn + generate-field: Foro suguya jatebɔ nafaw labɛn walasa weleli ka nɔgɔn languages: Bamanankan baarakɛcogo kan min bɛna kɛ, o fɔ src-file: Source file min ka kan ka baara (a wajibiyalen don) . src-language: Soso filen kan (ni a ma fɔ, baarakɛminɛn bɛna source file dantigɛ a yɛrɛma) . diff --git a/state/localize/bn.yaml b/state/localize/bn.yaml index 36a2262..b709e05 100644 --- a/state/localize/bn.yaml +++ b/state/localize/bn.yaml @@ -125,6 +125,7 @@ cli: force: বিদ্যমান অনুবাদগুলি ওভাররাইট করুন force-key-prefix: কী যা জোর করে ওভাররাইট করতে হবে generate-const: সহজে কল করার জন্য গণনার মান তৈরি করুন + generate-field: সহজে কল করার জন্য ফিল্ড টাইপ গণনার মান তৈরি করুন languages: অনুবাদের জন্য লক্ষ্য ভাষা নির্দিষ্ট করুন src-file: উৎস ফাইল অনুবাদ করতে হবে (প্রয়োজনীয়) src-language: সোর্স ফাইলের ভাষা (যদি নির্দিষ্ট না করা হয়, টুলটি স্বয়ংক্রিয়ভাবে সোর্স ফাইল নির্ধারণ করবে) diff --git a/state/localize/bs.yaml b/state/localize/bs.yaml index 7b6a28d..ab26528 100644 --- a/state/localize/bs.yaml +++ b/state/localize/bs.yaml @@ -125,6 +125,7 @@ cli: force: Zamijenite postojeće prijevode force-key-prefix: ključeve koje je potrebno prisilno prepisati generate-const: Generirajte vrijednosti nabrajanja za jednostavno pozivanje + generate-field: Generirajte vrijednosti nabrajanja tipa polja za jednostavno pozivanje languages: Navedite ciljni jezik za prijevod src-file: Izvorni fajl za prevod (obavezno) src-language: Jezik izvorne datoteke (ako nije naveden, alat će automatski odrediti izvorni fajl) diff --git a/state/localize/ca.yaml b/state/localize/ca.yaml index c1c924a..f269663 100644 --- a/state/localize/ca.yaml +++ b/state/localize/ca.yaml @@ -125,6 +125,7 @@ cli: force: Sobreescriu les traduccions existents force-key-prefix: claus que s'han de forçar a sobreescriure generate-const: Genereu valors d'enumeració per fer trucades fàcils + generate-field: Genereu valors d'enumeració de tipus de camp per fer trucades fàcils languages: Especifiqueu l'idioma de destinació per a la traducció src-file: Fitxer font que s'ha de traduir (obligatori) src-language: L'idioma del fitxer font (si no s'especifica, l'eina determinarà automàticament el fitxer font) diff --git a/state/localize/ceb.yaml b/state/localize/ceb.yaml index 1dfb5e5..59c7b4e 100644 --- a/state/localize/ceb.yaml +++ b/state/localize/ceb.yaml @@ -125,6 +125,7 @@ cli: force: I-overwrite ang kasamtangan nga mga hubad force-key-prefix: mga yawe nga kinahanglang pugson nga ma-overwrite generate-const: Paghimo mga kantidad sa enumeration alang sa dali nga pagtawag + generate-field: Paghimo mga kantidad sa pag-ihap sa tipo sa uma alang sa dali nga pagtawag languages: Ipiho ang target nga lengguwahe para sa paghubad src-file: Source file nga hubaron (gikinahanglan) src-language: Ang lengguwahe sa tinubdan nga payl (kung wala gipiho, ang himan awtomatik nga magtino sa tinubdan nga payl) diff --git a/state/localize/ckb.yaml b/state/localize/ckb.yaml index 66ae3a0..1c0f1fc 100644 --- a/state/localize/ckb.yaml +++ b/state/localize/ckb.yaml @@ -125,6 +125,7 @@ cli: force: وەرگێڕانەکانی ئێستا بنووسە force-key-prefix: کلیلەکان کە پێویستە ناچار بکرێن لەسەری بنووسرێن generate-const: بەهاکانی ژماردن دروست بکە بۆ پەیوەندیکردن بە ئاسانی + generate-field: دروستکردنی بەهاکانی ژماردنی جۆری مەیدان بۆ بانگکردنی ئاسان languages: زمانی ئامانج بۆ وەرگێڕان دیاری بکە src-file: فایلێکی سەرچاوەی وەرگێڕان (پێویستە) src-language: زمانی پەڕگەی سەرچاوە (ئەگەر دیاری نەکرابێت، ئامرازەکە بە شێوەیەکی ئۆتۆماتیکی پەڕگەی سەرچاوە دیاری دەکات) diff --git a/state/localize/co.yaml b/state/localize/co.yaml index a313fef..071cbdb 100644 --- a/state/localize/co.yaml +++ b/state/localize/co.yaml @@ -125,6 +125,7 @@ cli: force: Sovrascrivi traduzioni esistenti force-key-prefix: chjavi chì deve esse furzati per esse sovrascritti generate-const: Generate valori di enumerazione per chjamà faciule + generate-field: Generate valori di enumerazione di tipu di campu per chjamà faciule languages: Specificate a lingua di destinazione per a traduzzione src-file: U schedariu di origine da esse traduttu (necessariu) src-language: A lingua di u schedariu fonte (se ùn hè micca specificatu, l'uttellu determina automaticamente u schedariu fonte) diff --git a/state/localize/cs.yaml b/state/localize/cs.yaml index 8607512..0f05d07 100644 --- a/state/localize/cs.yaml +++ b/state/localize/cs.yaml @@ -125,6 +125,7 @@ cli: force: Přepsat existující překlady force-key-prefix: klíče, které je třeba vynutit k přepsání generate-const: Generujte hodnoty výčtu pro snadné volání + generate-field: Generujte hodnoty výčtu typu pole pro snadné volání languages: Zadejte cílový jazyk překladu src-file: Zdrojový soubor k překladu (vyžadováno) src-language: Jazyk zdrojového souboru (pokud není zadán, nástroj automaticky určí zdrojový soubor) diff --git a/state/localize/cy.yaml b/state/localize/cy.yaml index 6b955ed..9876d0c 100644 --- a/state/localize/cy.yaml +++ b/state/localize/cy.yaml @@ -125,6 +125,7 @@ cli: force: Trosysgrifo cyfieithiadau presennol force-key-prefix: allweddi y mae angen eu gorfodi i gael eu trosysgrifo generate-const: Cynhyrchu gwerthoedd cyfrifo ar gyfer galw hawdd + generate-field: Cynhyrchu gwerthoedd cyfrifo math maes ar gyfer galw hawdd languages: Nodwch yr iaith darged ar gyfer cyfieithu src-file: Ffeil ffynhonnell i'w chyfieithu (gofynnol) src-language: Iaith y ffeil ffynhonnell (os na chaiff ei nodi, bydd yr offeryn yn pennu'r ffeil ffynhonnell yn awtomatig) diff --git a/state/localize/da.yaml b/state/localize/da.yaml index fbb94a6..428bd49 100644 --- a/state/localize/da.yaml +++ b/state/localize/da.yaml @@ -125,6 +125,7 @@ cli: force: Overskriv eksisterende oversættelser force-key-prefix: nøgler, der skal tvinges til at blive overskrevet generate-const: Generer opregningsværdier for nemt at ringe + generate-field: Generer felttypeopregningsværdier for nemt at ringe languages: Angiv målsproget for oversættelsen src-file: Kildefil, der skal oversættes (påkrævet) src-language: Sproget for kildefilen (hvis ikke angivet, vil værktøjet automatisk bestemme kildefilen) diff --git a/state/localize/de.yaml b/state/localize/de.yaml index e22db07..d090f66 100644 --- a/state/localize/de.yaml +++ b/state/localize/de.yaml @@ -125,6 +125,7 @@ cli: force: Vorhandene Übersetzungen überschreiben force-key-prefix: Schlüssel, deren Überschreiben erzwungen werden muss generate-const: Generieren Sie Aufzählungswerte für einen einfachen Aufruf + generate-field: Generieren Sie Feldtyp-Aufzählungswerte für einen einfachen Aufruf languages: Geben Sie die Zielsprache für die Übersetzung an src-file: Zu übersetzende Quelldatei (erforderlich) src-language: Die Sprache der Quelldatei (falls nicht angegeben, ermittelt das Tool die Quelldatei automatisch) diff --git a/state/localize/doi.yaml b/state/localize/doi.yaml index dd79fee..6f84f54 100644 --- a/state/localize/doi.yaml +++ b/state/localize/doi.yaml @@ -125,6 +125,7 @@ cli: force: मौजूदा अनुवादें गी ओवरराइट करो force-key-prefix: कुंजी जिनेंगी ओवरराइट करने लेई मजबूर करने दी लोड़ ऐ generate-const: आसान कॉलिंग आस्तै गणना मूल्य पैदा करो + generate-field: आसान कॉलिंग आस्तै फील्ड टाइप गणना मूल्य पैदा करो languages: अनुवाद आस्तै लक्ष्य भाशा निर्दिश्ट करो src-file: अनुवाद करने आह् ली स्रोत फाइल (जरूरी) src-language: स्रोत फाइल दी भाशा (जेकर निर्दिश्ट नेईं ऐ तां टूल अपने आप गै स्रोत फाइल गी निर्धारत करग) diff --git a/state/localize/dv.yaml b/state/localize/dv.yaml index 902e346..2dcb766 100644 --- a/state/localize/dv.yaml +++ b/state/localize/dv.yaml @@ -125,6 +125,7 @@ cli: force: މިހާރު ހުރި ތަރުޖަމާތައް އޯވަރރައިޓްކުރުން force-key-prefix: މަޖުބޫރުކޮށްގެން އޯވަރރައިޓް ކުރަން ޖެހޭ ތަޅުދަނޑިތަކެވެ generate-const: ފަސޭހައިން ކޯލް ކުރުމަށް އެނިއުމަރޭޝަން ވެލިއުތައް ޖެނެރޭޓް ކުރުން + generate-field: ފަސޭހައިން ކޯލް ކުރުމަށްޓަކައި ފީލްޑް ޓައިޕް އެނިއުމަރޭޝަން ވެލިއުސް ޖެނެރޭޓް ކުރުން languages: ތަރުޖަމާ ކުރުމަށް ޓާގެޓް ލޭންގުއޭޖް ކަނޑައެޅުން src-file: ތަރުޖަމާކުރަންޖެހޭ ސޯސް ފައިލް (ކޮންމެހެން ބޭނުންވާ) src-language: ސޯސް ފައިލްގެ ބަސް (ކަނޑައެޅިފައި ނުވާނަމަ، ޓޫލް އިން އޮޓޮމެޓިކުން ސޯސް ފައިލް ކަނޑައަޅާނެ) diff --git a/state/localize/ee.yaml b/state/localize/ee.yaml index 33dcb5a..6413218 100644 --- a/state/localize/ee.yaml +++ b/state/localize/ee.yaml @@ -125,6 +125,7 @@ cli: force: Ŋlɔ gɔmeɖeɖe siwo li xoxo la ɖe edzi force-key-prefix: safui siwo wòle be woazi dzi be woaŋlɔ ɖe wo dzi generate-const: Wɔ xexlẽdzesiwo ƒe asixɔxɔwo hena yɔyɔ bɔbɔe + generate-field: Wɔ agble ƒomevi ƒe xexlẽdzesiwo hena yɔyɔ bɔbɔe languages: Tsɔ gbe si gɔme nèdi be yeaɖe gɔme src-file: Dzɔtsoƒe faɛl si gɔme woaɖe (ehiã) . src-language: Gbe si me faɛl si tso dzɔtsoƒe le (ne womegblɔe o la, dɔwɔnua atso nya me le eɖokui si) diff --git a/state/localize/el.yaml b/state/localize/el.yaml index 14a1c60..b4ead58 100644 --- a/state/localize/el.yaml +++ b/state/localize/el.yaml @@ -125,6 +125,7 @@ cli: force: Αντικαταστήστε τις υπάρχουσες μεταφράσεις force-key-prefix: κλειδιά που πρέπει να αναγκαστούν να αντικατασταθούν generate-const: Δημιουργήστε τιμές απαρίθμησης για εύκολη κλήση + generate-field: Δημιουργήστε τιμές απαρίθμησης τύπου πεδίου για εύκολη κλήση languages: Καθορίστε τη γλώσσα-στόχο για μετάφραση src-file: Αρχείο πηγής προς μετάφραση (απαιτείται) src-language: Η γλώσσα του αρχείου προέλευσης (αν δεν έχει καθοριστεί, το εργαλείο θα καθορίσει αυτόματα το αρχείο προέλευσης) diff --git a/state/localize/en.yaml b/state/localize/en.yaml index 19b83e4..cea532e 100644 --- a/state/localize/en.yaml +++ b/state/localize/en.yaml @@ -125,6 +125,7 @@ cli: force: Overwrite existing translations force-key-prefix: keys that need to be forced to be overwritten generate-const: Generate enumeration values ​​for easy calling + generate-field: Generate field type enumeration values ​​for easy calling languages: Specify the target language for translation src-file: Source file to be translated (required) src-language: The language of the source file (if not specified, the tool will automatically determine the source file) diff --git a/state/localize/eo.yaml b/state/localize/eo.yaml index d3801ed..7c6651c 100644 --- a/state/localize/eo.yaml +++ b/state/localize/eo.yaml @@ -125,6 +125,7 @@ cli: force: Anstataŭigu ekzistantajn tradukojn force-key-prefix: ŝlosiloj kiuj devas esti devigitaj esti anstataŭitaj generate-const: Generu enumerajn valorojn por facila vokado + generate-field: Generu kampaspecajn listvalorojn por facila vokado languages: Indiku la cellingvon por tradukado src-file: Fontdosiero tradukenda (postulata) src-language: La lingvo de la fontdosiero (se ne specifita, la ilo aŭtomate determinos la fontdosieron) diff --git a/state/localize/es.yaml b/state/localize/es.yaml index b14cee7..872aa45 100644 --- a/state/localize/es.yaml +++ b/state/localize/es.yaml @@ -125,6 +125,7 @@ cli: force: Sobrescribir traducciones existentes force-key-prefix: claves que deben forzarse a sobrescribirse generate-const: Genere valores de enumeración para facilitar las llamadas + generate-field: Genere valores de enumeración de tipos de campos para facilitar las llamadas languages: Especificar el idioma de destino para la traducción src-file: Archivo fuente a traducir (obligatorio) src-language: El idioma del archivo fuente (si no se especifica, la herramienta determinará automáticamente el archivo fuente) diff --git a/state/localize/et.yaml b/state/localize/et.yaml index 5d638f4..3a2e06c 100644 --- a/state/localize/et.yaml +++ b/state/localize/et.yaml @@ -125,6 +125,7 @@ cli: force: Olemasolevate tõlgete ülekirjutamine force-key-prefix: võtmed, mis tuleb sundida üle kirjutama generate-const: Looge loendusväärtusi helistamise hõlbustamiseks + generate-field: Lihtsaks helistamiseks genereerige väljatüüpide loendiväärtusi languages: Määrake tõlke sihtkeel src-file: Tõlgitav lähtefail (nõutav) src-language: Lähtefaili keel (kui pole määratud, määrab tööriist lähtefaili automaatselt) diff --git a/state/localize/eu.yaml b/state/localize/eu.yaml index 556439e..269fb37 100644 --- a/state/localize/eu.yaml +++ b/state/localize/eu.yaml @@ -125,6 +125,7 @@ cli: force: Gainidatzi lehendik dauden itzulpenak force-key-prefix: gainidatzi behar diren gakoak generate-const: Sortu zenbazio-balioak erraz deitzeko + generate-field: Sortu eremu motako zenbaketa-balioak deitzeko errazak egiteko languages: Zehaztu itzulpenerako xede-hizkuntza src-file: Itzuli beharreko iturburu-fitxategia (beharrezkoa) src-language: Iturburu-fitxategiaren hizkuntza (zehazten ez bada, tresnak automatikoki zehaztuko du iturburu-fitxategia) diff --git a/state/localize/fa.yaml b/state/localize/fa.yaml index 8d5ce22..26aed79 100644 --- a/state/localize/fa.yaml +++ b/state/localize/fa.yaml @@ -125,6 +125,7 @@ cli: force: بازنویسی ترجمه های موجود force-key-prefix: کلیدهایی که باید مجبور به بازنویسی شوند generate-const: مقادیر شمارش را برای تماس آسان ایجاد کنید + generate-field: مقادیر شمارش نوع فیلد را برای تماس آسان ایجاد کنید languages: زبان مقصد را برای ترجمه مشخص کنید src-file: فایل منبع برای ترجمه (الزامی) src-language: زبان فایل منبع (اگر مشخص نشده باشد، ابزار به طور خودکار فایل منبع را تعیین می کند) diff --git a/state/localize/fi.yaml b/state/localize/fi.yaml index 7770e24..d787b30 100644 --- a/state/localize/fi.yaml +++ b/state/localize/fi.yaml @@ -125,6 +125,7 @@ cli: force: Korvaa olemassa olevat käännökset force-key-prefix: avaimet, jotka on pakko kirjoittaa päälle generate-const: Luo luetteloarvoja helpottaaksesi soittamista + generate-field: Luo kenttätyyppiset luetteloarvot helpottamaan kutsumista languages: Määritä käännöksen kohdekieli src-file: Käännettävä lähdetiedosto (pakollinen) src-language: Lähdetiedoston kieli (jos sitä ei ole määritetty, työkalu määrittää lähdetiedoston automaattisesti) diff --git a/state/localize/fr.yaml b/state/localize/fr.yaml index db53a1e..949ea4e 100644 --- a/state/localize/fr.yaml +++ b/state/localize/fr.yaml @@ -125,6 +125,7 @@ cli: force: Écraser les traductions existantes force-key-prefix: les clés qui doivent être forcées à être écrasées generate-const: Générez des valeurs d'énumération pour un appel facile + generate-field: Générez des valeurs d'énumération de type de champ pour un appel facile languages: Spécifiez la langue cible pour la traduction src-file: Fichier source à traduire (obligatoire) src-language: La langue du fichier source (si elle n'est pas précisée, l'outil déterminera automatiquement le fichier source) diff --git a/state/localize/fy.yaml b/state/localize/fy.yaml index 057705f..3c2c6b1 100644 --- a/state/localize/fy.yaml +++ b/state/localize/fy.yaml @@ -125,6 +125,7 @@ cli: force: Oerskriuwe besteande oersettingen force-key-prefix: kaaien dy't twongen wurde moatte wurde oerskreaun generate-const: Generearje enumeraasjewearden foar maklik skiljen + generate-field: Generearje fjildtype enumeraasjewearden foar maklik skiljen languages: Spesifisearje de doeltaal foar oersetting src-file: Boarnebestân om te oersetten (ferplicht) src-language: De taal fan it boarnebestân (as net oantsjutte, sil it ark automatysk it boarnebestân bepale) diff --git a/state/localize/ga.yaml b/state/localize/ga.yaml index ef2cf1c..fe9d8be 100644 --- a/state/localize/ga.yaml +++ b/state/localize/ga.yaml @@ -125,6 +125,7 @@ cli: force: Forscríobh aistriúcháin atá ann cheana féin force-key-prefix: eochracha nach mór a éigean a fhorscríobh generate-const: Gin luachanna áirimh le haghaidh glaoch éasca + generate-field: Gin luachanna ríomh cineál réimse le haghaidh glaoch éasca languages: Sonraigh an sprioctheanga atá le haistriú src-file: Comhad foinseach le haistriú (riachtanach) src-language: Teanga an chomhaid foinse (mura bhfuil sé sonraithe, cinnfidh an uirlis an comhad foinse go huathoibríoch) diff --git a/state/localize/gd.yaml b/state/localize/gd.yaml index f7993a5..2bc0955 100644 --- a/state/localize/gd.yaml +++ b/state/localize/gd.yaml @@ -125,6 +125,7 @@ cli: force: Sgrìobh thairis air eadar-theangachaidhean gnàthaichte force-key-prefix: iuchraichean a dh'fheumas a bhith air an èigneachadh a bhith air an sgrìobhadh thairis generate-const: Cruthaich luachan àireamhachd airson gairm furasta + generate-field: Cruthaich luachan àireamhachd seòrsa achaidh airson gairm furasta languages: Sònraich an cànan targaid airson eadar-theangachadh src-file: Faidhle stòr ri eadar-theangachadh (riatanach) src-language: Cànan an fhaidhle stòr (mura h-eil e air a shònrachadh, dearbhaidh an inneal am faidhle tùsail gu fèin-ghluasadach) diff --git a/state/localize/gl.yaml b/state/localize/gl.yaml index 7513722..0500996 100644 --- a/state/localize/gl.yaml +++ b/state/localize/gl.yaml @@ -125,6 +125,7 @@ cli: force: Sobrescribir as traducións existentes force-key-prefix: claves que deben ser forzadas a sobrescribirlas generate-const: Xera valores de enumeración para facilitar as chamadas + generate-field: Xera valores de enumeración de tipo de campo para facilitar as chamadas languages: Especifique o idioma de destino para a tradución src-file: Ficheiro fonte a traducir (obrigatorio) src-language: O idioma do ficheiro de orixe (se non se especifica, a ferramenta determinará automaticamente o ficheiro de orixe) diff --git a/state/localize/gn.yaml b/state/localize/gn.yaml index afd7265..c2887e7 100644 --- a/state/localize/gn.yaml +++ b/state/localize/gn.yaml @@ -125,6 +125,7 @@ cli: force: Ehai umi ñe’ẽasa oĩmava ári force-key-prefix: umi clave tekotevẽva ojeforsa ojehai hag̃ua hese generate-const: Emoheñói valor enumeración rehegua oñehenói hag̃ua ndahasýiva + generate-field: Emoheñói umi valor enumeración tipo campo rehegua oñehenói hag̃ua ndahasýiva languages: Emombe’u ñe’ẽ ojehekahápe oñembohasa hag̃ua src-file: Archivo ypykue oñembohasava’erã (oñeikotevẽva) . src-language: Ñe’ẽ vore ypykue rehegua (noñemombe’úiramo, tembipuru ohechakuaáta ijeheguiete vore ypykue) . diff --git a/state/localize/gom.yaml b/state/localize/gom.yaml index beaaa43..b419d24 100644 --- a/state/localize/gom.yaml +++ b/state/localize/gom.yaml @@ -125,6 +125,7 @@ cli: force: सद्याचे अणकार परतून बरयात force-key-prefix: सक्तीन ओव्हररायट करपाक जाय आशिल्लीं कळाशी generate-const: सोंपें कॉल करपा खातीर गणना मोलां तयार करात + generate-field: सोंपें कॉल करपा खातीर क्षेत्र प्रकार गणना मोलां तयार करात languages: अणकारा खातीर लक्ष्य भास स्पश्ट करात src-file: अणकारपाची स्त्रोत फायल (गरज आसा) src-language: स्त्रोत फायलीन भास (निर्दिश्ट केल्ली ना जाल्यार, साधन आपोआप स्त्रोत फायल थारायतलें) diff --git a/state/localize/gu.yaml b/state/localize/gu.yaml index aff04c9..6fea127 100644 --- a/state/localize/gu.yaml +++ b/state/localize/gu.yaml @@ -125,6 +125,7 @@ cli: force: હાલના અનુવાદોને ઓવરરાઈટ કરો force-key-prefix: કીઓ કે જેને ઓવરરાઇટ કરવા માટે દબાણ કરવાની જરૂર છે generate-const: સરળ કૉલિંગ માટે ગણતરી મૂલ્યો બનાવો + generate-field: સરળ કૉલિંગ માટે ફીલ્ડ પ્રકાર ગણતરી મૂલ્યો બનાવો languages: અનુવાદ માટે લક્ષ્ય ભાષાનો ઉલ્લેખ કરો src-file: સ્રોત ફાઇલનો અનુવાદ કરવાની છે (જરૂરી) src-language: સ્રોત ફાઇલની ભાષા (જો ઉલ્લેખિત ન હોય, તો સાધન આપમેળે સ્રોત ફાઇલ નક્કી કરશે) diff --git a/state/localize/ha.yaml b/state/localize/ha.yaml index 16e3315..4b92009 100644 --- a/state/localize/ha.yaml +++ b/state/localize/ha.yaml @@ -125,6 +125,7 @@ cli: force: Rubuta fassarorin da ke akwai force-key-prefix: makullin da ake buƙatar tilastawa a sake rubuta su generate-const: Ƙirƙirar ƙididdiga ƙididdiga don sauƙin kira + generate-field: Ƙirƙirar ƙididdiga nau'in filin don sauƙin kira languages: Ƙayyade harshen manufa don fassara src-file: Fayil ɗin tushen da za a fassara (an buƙata) src-language: Harshen fayil ɗin tushen (idan ba a ƙayyade ba, kayan aiki zai ƙayyade fayil ɗin tushen ta atomatik) diff --git a/state/localize/haw.yaml b/state/localize/haw.yaml index bd786b2..5f1fa93 100644 --- a/state/localize/haw.yaml +++ b/state/localize/haw.yaml @@ -125,6 +125,7 @@ cli: force: Kāohi i nā unuhi i loaʻa force-key-prefix: nā kī pono e koi ʻia e kākau hou ʻia generate-const: E hana i nā waiwai helu no ke kelepona maʻalahi + generate-field: E hoʻokumu i nā waiwai helu helu ʻana no ke kelepona maʻalahi languages: E wehewehe i ka ʻōlelo i makemake ʻia no ka unuhi src-file: E unuhi ʻia ka waihona kumu (pono) src-language: ʻO ka ʻōlelo o ka waihona kumu (inā ʻaʻole i kuhikuhi ʻia, e hoʻoholo ʻokoʻa ka mea hana i ka faila kumu) diff --git a/state/localize/he.yaml b/state/localize/he.yaml index bf72bee..9dbe81e 100644 --- a/state/localize/he.yaml +++ b/state/localize/he.yaml @@ -125,6 +125,7 @@ cli: force: החלף תרגומים קיימים force-key-prefix: מפתחות שצריך לאלץ להחליפם generate-const: צור ערכי ספירה להתקשרות קלה + generate-field: צור ערכי ספירת סוג שדה להתקשרות קלה languages: ציין את שפת היעד לתרגום src-file: קובץ המקור לתרגום (חובה) src-language: שפת קובץ המקור (אם לא צוין, הכלי יקבע אוטומטית את קובץ המקור) diff --git a/state/localize/hi.yaml b/state/localize/hi.yaml index 7c82a4e..eaa8a4b 100644 --- a/state/localize/hi.yaml +++ b/state/localize/hi.yaml @@ -125,6 +125,7 @@ cli: force: मौजूदा अनुवादों को अधिलेखित करें force-key-prefix: कुंजियाँ जिन्हें जबरदस्ती ओवरराइट करने की आवश्यकता है generate-const: आसान कॉलिंग के लिए गणना मान उत्पन्न करें + generate-field: आसान कॉलिंग के लिए फ़ील्ड प्रकार गणना मान उत्पन्न करें languages: अनुवाद के लिए लक्ष्य भाषा निर्दिष्ट करें src-file: अनुवादित की जाने वाली स्रोत फ़ाइल (आवश्यक) src-language: स्रोत फ़ाइल की भाषा (यदि निर्दिष्ट नहीं है, तो उपकरण स्वचालित रूप से स्रोत फ़ाइल निर्धारित करेगा) diff --git a/state/localize/hmn.yaml b/state/localize/hmn.yaml index 9b1905a..0ae96e6 100644 --- a/state/localize/hmn.yaml +++ b/state/localize/hmn.yaml @@ -125,6 +125,7 @@ cli: force: Overwrite cov lus txhais uas twb muaj lawm force-key-prefix: cov yuam sij uas yuav tsum tau yuam kom overwritten generate-const: Tsim kom muaj nuj nqis rau kev hu tau yooj yim + generate-field: Tsim teb hom enumeration qhov tseem ceeb rau kev hu tau yooj yim languages: Qhia meej hom lus rau kev txhais lus src-file: Cov ntaub ntawv los muab txhais (yuav tsum tau) src-language: Cov lus ntawm cov ntaub ntawv qhov chaw (yog tias tsis tau teev tseg, lub cuab yeej yuav txiav txim siab cov ntaub ntawv qhov chaw) diff --git a/state/localize/hr.yaml b/state/localize/hr.yaml index 8f28b52..fee1dcb 100644 --- a/state/localize/hr.yaml +++ b/state/localize/hr.yaml @@ -125,6 +125,7 @@ cli: force: Prebrišite postojeće prijevode force-key-prefix: ključeve koje treba prisilno prebrisati generate-const: Generirajte vrijednosti nabrajanja za jednostavno pozivanje + generate-field: Generirajte vrijednosti nabrajanja vrste polja za jednostavno pozivanje languages: Navedite ciljni jezik za prijevod src-file: Izvorna datoteka za prijevod (obavezno) src-language: Jezik izvorne datoteke (ako nije naveden, alat će automatski odrediti izvornu datoteku) diff --git a/state/localize/ht.yaml b/state/localize/ht.yaml index 43afc0e..d094bfc 100644 --- a/state/localize/ht.yaml +++ b/state/localize/ht.yaml @@ -125,6 +125,7 @@ cli: force: Ranplase tradiksyon ki egziste deja yo force-key-prefix: kle ki bezwen fòse yo dwe ranplase generate-const: Jenere valè enimerasyon pou rele fasil + generate-field: Jenere valè enimasyon kalite jaden pou rele fasil languages: Espesifye lang sib pou tradiksyon an src-file: Fichye sous yo dwe tradui (obligatwa) src-language: Lang nan fichye sous la (si yo pa espesifye, zouti a pral otomatikman detèmine dosye sous la) diff --git a/state/localize/hu.yaml b/state/localize/hu.yaml index 98626c7..f023358 100644 --- a/state/localize/hu.yaml +++ b/state/localize/hu.yaml @@ -125,6 +125,7 @@ cli: force: A meglévő fordítások felülírása force-key-prefix: olyan kulcsok, amelyeket kényszeríteni kell felülírni generate-const: Számolási értékek generálása az egyszerű hívás érdekében + generate-field: Generáljon mező típusú felsorolási értékeket az egyszerű hívás érdekében languages: Adja meg a fordítás célnyelvét src-file: Lefordítandó forrásfájl (kötelező) src-language: A forrásfájl nyelve (ha nincs megadva, az eszköz automatikusan meghatározza a forrásfájlt) diff --git a/state/localize/hy.yaml b/state/localize/hy.yaml index 3687f0f..23c46a9 100644 --- a/state/localize/hy.yaml +++ b/state/localize/hy.yaml @@ -125,6 +125,7 @@ cli: force: Վերագրեք գոյություն ունեցող թարգմանությունները force-key-prefix: բանալիներ, որոնք պետք է ստիպել վերագրվել generate-const: Ստեղծեք թվային արժեքներ՝ հեշտ զանգելու համար + generate-field: Ստեղծեք դաշտի տիպի թվային արժեքներ՝ հեշտ զանգելու համար languages: Նշեք թարգմանության նպատակային լեզուն src-file: Աղբյուրի ֆայլը պետք է թարգմանվի (պարտադիր է) src-language: Աղբյուրի ֆայլի լեզուն (եթե նշված չէ, գործիքը ինքնաբերաբար կորոշի աղբյուրի ֆայլը) diff --git a/state/localize/id.yaml b/state/localize/id.yaml index add55a1..5c18713 100644 --- a/state/localize/id.yaml +++ b/state/localize/id.yaml @@ -125,6 +125,7 @@ cli: force: Timpa terjemahan yang sudah ada force-key-prefix: kunci yang perlu dipaksa untuk ditimpa generate-const: Hasilkan nilai enumerasi untuk memudahkan panggilan + generate-field: Hasilkan nilai enumerasi tipe bidang untuk memudahkan panggilan languages: Tentukan bahasa target untuk terjemahan src-file: File sumber yang akan diterjemahkan (wajib) src-language: Bahasa file sumber (jika tidak ditentukan, alat akan secara otomatis menentukan file sumber) diff --git a/state/localize/ig.yaml b/state/localize/ig.yaml index 2866e19..7f973e4 100644 --- a/state/localize/ig.yaml +++ b/state/localize/ig.yaml @@ -125,6 +125,7 @@ cli: force: Degharịa ntụgharị asụsụ ndị dị ugbu a force-key-prefix: igodo ndị kwesịrị ịmanye ka edegharịa generate-const: Mepụta ụkpụrụ ngụkọ maka ịkpọ oku dị mfe + generate-field: Mepụta ụkpụrụ ngụkọ ụdị ubi maka ịkpọ oku dị mfe languages: Ezipụta asụsụ ebumnuche maka ntụgharị asụsụ src-file: A ga-atụgharị asụsụ isi mmalite (chọrọ) src-language: Asụsụ nke faịlụ isi mmalite (ọ bụrụ na akọwaghị ya, ngwa ahụ ga-ekpebi faịlụ isi mmalite na-akpaghị aka) diff --git a/state/localize/ilo.yaml b/state/localize/ilo.yaml index e46d79c..e2b8996 100644 --- a/state/localize/ilo.yaml +++ b/state/localize/ilo.yaml @@ -125,6 +125,7 @@ cli: force: Isurat iti rabaw dagiti addan a patarus force-key-prefix: dagiti tulbek a kasapulan a mapilit a maisurat generate-const: Mangpataud kadagiti pateg ti panagibilang para iti nalaka a panagayab + generate-field: Mangpataud kadagiti pateg ti panagibilang ti kita ti tay-ak para iti nalaka a panagayab languages: Ibaga ti target language para iti panagipatarus src-file: Gubuayan a file a maipatarus (kasapulan) . src-language: Ti pagsasao ti taudan a papeles (no saan a naikeddeng, ti ramit ket automatiko a mangikeddeng ti taudan a papeles) . diff --git a/state/localize/is.yaml b/state/localize/is.yaml index dd8a7b8..1b97714 100644 --- a/state/localize/is.yaml +++ b/state/localize/is.yaml @@ -125,6 +125,7 @@ cli: force: Skrifaðu yfir núverandi þýðingar force-key-prefix: lykla sem þarf að neyða til að skrifa yfir generate-const: Búðu til upptalningargildi til að auðvelda hringingu + generate-field: Búðu til talningargildi fyrir svæðisgerð til að auðvelda hringingu languages: Tilgreindu marktungumálið fyrir þýðingar src-file: Upprunaskrá sem á að þýða (krafist) src-language: Tungumál frumskrárinnar (ef ekki tilgreint mun tólið sjálfkrafa ákvarða upprunaskrána) diff --git a/state/localize/it.yaml b/state/localize/it.yaml index d5cdebb..7f51704 100644 --- a/state/localize/it.yaml +++ b/state/localize/it.yaml @@ -125,6 +125,7 @@ cli: force: Sovrascrivi le traduzioni esistenti force-key-prefix: chiavi che devono essere forzate per essere sovrascritte generate-const: Genera valori di enumerazione per chiamate facili + generate-field: Genera valori di enumerazione del tipo di campo per una facile chiamata languages: Specificare la lingua di destinazione per la traduzione src-file: File sorgente da tradurre (richiesto) src-language: La lingua del file sorgente (se non specificata, lo strumento determinerà automaticamente il file sorgente) diff --git a/state/localize/iw.yaml b/state/localize/iw.yaml index bf72bee..9dbe81e 100644 --- a/state/localize/iw.yaml +++ b/state/localize/iw.yaml @@ -125,6 +125,7 @@ cli: force: החלף תרגומים קיימים force-key-prefix: מפתחות שצריך לאלץ להחליפם generate-const: צור ערכי ספירה להתקשרות קלה + generate-field: צור ערכי ספירת סוג שדה להתקשרות קלה languages: ציין את שפת היעד לתרגום src-file: קובץ המקור לתרגום (חובה) src-language: שפת קובץ המקור (אם לא צוין, הכלי יקבע אוטומטית את קובץ המקור) diff --git a/state/localize/ja.yaml b/state/localize/ja.yaml index f0e7ea1..9ff45cb 100644 --- a/state/localize/ja.yaml +++ b/state/localize/ja.yaml @@ -125,6 +125,7 @@ cli: force: 既存の翻訳を上書きする force-key-prefix: 強制的に上書きする必要があるキー generate-const: 列挙値を生成して簡単に呼び出すことができます + generate-field: 簡単に呼び出せるようにフィールド タイプの列挙値を生成します languages: 翻訳対象言語を指定します src-file: 翻訳対象のソースファイル(必須) src-language: ソース ファイルの言語 (指定しない場合、ツールが自動的にソース ファイルを決定します) diff --git a/state/localize/jv.yaml b/state/localize/jv.yaml index 97c6c1d..a2c9b0e 100644 --- a/state/localize/jv.yaml +++ b/state/localize/jv.yaml @@ -125,6 +125,7 @@ cli: force: Nimpa terjemahan sing wis ana force-key-prefix: tombol sing kudu dipeksa kanggo ditindhes generate-const: Gawe nilai enumerasi supaya gampang ditelpon + generate-field: Gawe nilai enumerasi jinis lapangan supaya gampang ditelpon languages: Nemtokake basa target kanggo terjemahan src-file: File sumber sing arep diterjemahake (dibutuhake) src-language: Basa file sumber (yen ora ditemtokake, alat kasebut bakal nemtokake file sumber kanthi otomatis) diff --git a/state/localize/jw.yaml b/state/localize/jw.yaml index 97c6c1d..a2c9b0e 100644 --- a/state/localize/jw.yaml +++ b/state/localize/jw.yaml @@ -125,6 +125,7 @@ cli: force: Nimpa terjemahan sing wis ana force-key-prefix: tombol sing kudu dipeksa kanggo ditindhes generate-const: Gawe nilai enumerasi supaya gampang ditelpon + generate-field: Gawe nilai enumerasi jinis lapangan supaya gampang ditelpon languages: Nemtokake basa target kanggo terjemahan src-file: File sumber sing arep diterjemahake (dibutuhake) src-language: Basa file sumber (yen ora ditemtokake, alat kasebut bakal nemtokake file sumber kanthi otomatis) diff --git a/state/localize/ka.yaml b/state/localize/ka.yaml index 5a206d2..35aa014 100644 --- a/state/localize/ka.yaml +++ b/state/localize/ka.yaml @@ -125,6 +125,7 @@ cli: force: არსებული თარგმანების გადაწერა force-key-prefix: გასაღებები, რომლებიც იძულებით უნდა გადაიწეროს generate-const: შექმენით აღრიცხვის მნიშვნელობები მარტივი გამოძახებისთვის + generate-field: შექმენით ველის ტიპის აღრიცხვის მნიშვნელობები მარტივი გამოძახებისთვის languages: მიუთითეთ თარგმანის სამიზნე ენა src-file: წყაროს ფაილი უნდა ითარგმნოს (აუცილებელია) src-language: საწყისი ფაილის ენა (თუ არ არის მითითებული, ინსტრუმენტი ავტომატურად განსაზღვრავს წყაროს ფაილს) diff --git a/state/localize/kk.yaml b/state/localize/kk.yaml index 0fbbed9..89fe2c8 100644 --- a/state/localize/kk.yaml +++ b/state/localize/kk.yaml @@ -125,6 +125,7 @@ cli: force: Бар аудармаларды қайта жазыңыз force-key-prefix: қайта жазуды қажет ететін кілттер generate-const: Оңай қоңырау шалу үшін санау мәндерін жасаңыз + generate-field: Оңай қоңырау шалу үшін өріс түрінің санау мәндерін жасаңыз languages: Аударма үшін мақсатты тілді көрсетіңіз src-file: Аударылатын бастапқы файл (міндетті) src-language: Бастапқы файлдың тілі (көрсетілмесе, құрал бастапқы файлды автоматты түрде анықтайды) diff --git a/state/localize/km.yaml b/state/localize/km.yaml index 0e4b52a..c0852b0 100644 --- a/state/localize/km.yaml +++ b/state/localize/km.yaml @@ -125,6 +125,7 @@ cli: force: សរសេរជាន់លើការបកប្រែដែលមានស្រាប់ force-key-prefix: គ្រាប់ចុចដែលត្រូវបង្ខំឱ្យសរសេរជាន់លើ generate-const: បង្កើត​តម្លៃ​រាប់​បញ្ចូល​សម្រាប់​ការ​ហៅ​ទូរសព្ទ​ងាយស្រួល + generate-field: បង្កើតតម្លៃរាប់បញ្ចូលប្រភេទវាល ដើម្បីងាយស្រួលក្នុងការហៅទូរសព្ទ languages: បញ្ជាក់ភាសាគោលដៅសម្រាប់ការបកប្រែ src-file: ប្រភពឯកសារដែលត្រូវបកប្រែ (ទាមទារ) src-language: ភាសានៃឯកសារប្រភព (ប្រសិនបើមិនបានបញ្ជាក់ ឧបករណ៍នឹងកំណត់ឯកសារប្រភពដោយស្វ័យប្រវត្តិ) diff --git a/state/localize/kn.yaml b/state/localize/kn.yaml index 69fde0d..75b7788 100644 --- a/state/localize/kn.yaml +++ b/state/localize/kn.yaml @@ -125,6 +125,7 @@ cli: force: ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ ಅನುವಾದಗಳನ್ನು ತಿದ್ದಿ ಬರೆಯಿರಿ force-key-prefix: ಬಲವಂತವಾಗಿ ತಿದ್ದಿ ಬರೆಯಬೇಕಾದ ಕೀಲಿಗಳು generate-const: ಸುಲಭ ಕರೆಗಾಗಿ ಎಣಿಕೆ ಮೌಲ್ಯಗಳನ್ನು ರಚಿಸಿ + generate-field: ಸುಲಭ ಕರೆಗಾಗಿ ಕ್ಷೇತ್ರ ಪ್ರಕಾರದ ಎಣಿಕೆಯ ಮೌಲ್ಯಗಳನ್ನು ರಚಿಸಿ languages: ಅನುವಾದಕ್ಕಾಗಿ ಗುರಿ ಭಾಷೆಯನ್ನು ನಿರ್ದಿಷ್ಟಪಡಿಸಿ src-file: ಅನುವಾದಿಸಬೇಕಾದ ಮೂಲ ಫೈಲ್ (ಅಗತ್ಯವಿದೆ) src-language: ಮೂಲ ಫೈಲ್‌ನ ಭಾಷೆ (ನಿರ್ದಿಷ್ಟಪಡಿಸದಿದ್ದರೆ, ಉಪಕರಣವು ಮೂಲ ಫೈಲ್ ಅನ್ನು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ನಿರ್ಧರಿಸುತ್ತದೆ) diff --git a/state/localize/ko.yaml b/state/localize/ko.yaml index dc63006..f8f2079 100644 --- a/state/localize/ko.yaml +++ b/state/localize/ko.yaml @@ -125,6 +125,7 @@ cli: force: 기존 번역 덮어쓰기 force-key-prefix: 강제로 덮어써야 하는 키 generate-const: 쉬운 호출을 위한 열거값 생성 + generate-field: 쉬운 호출을 위한 필드형 열거값 생성 languages: 번역할 대상 언어를 지정하세요. src-file: 번역할 원본 파일 (필수) src-language: 소스 파일의 언어(지정하지 않으면 도구가 자동으로 소스 파일을 결정합니다) diff --git a/state/localize/kri.yaml b/state/localize/kri.yaml index b612811..44168a7 100644 --- a/state/localize/kri.yaml +++ b/state/localize/kri.yaml @@ -125,6 +125,7 @@ cli: force: Rayt di transleshɔn dɛn we dɔn de force-key-prefix: ki dɛn we nid fɔ fos fɔ rayt ɔva generate-const: Jɛnɛret ɛnyumɛreshɔn valyu fɔ izi kɔl + generate-field: Jɛnɛret fil tayp ɛnyumɛreshɔn valyu fɔ izi kɔl languages: Sho di langwej we yu want fɔ translet src-file: Sɔs fayl we dɛn fɔ translet (we dɛn nid) . src-language: Di langwej fɔ di sɔs fayl (if dɛn nɔ sho am, di tul go ɔtomɛtiks disayd di sɔs fayl) diff --git a/state/localize/ku.yaml b/state/localize/ku.yaml index 7f5ba08..82739e8 100644 --- a/state/localize/ku.yaml +++ b/state/localize/ku.yaml @@ -125,6 +125,7 @@ cli: force: Wergerên heyî binivîsînin force-key-prefix: mifteyên ku divê bi zorê bêne nivîsandin generate-const: Ji bo banga hêsan nirxên hejmartinê biafirînin + generate-field: Ji bo banga hêsan, nirxên hejmartinê yên celebê zeviyê biafirînin languages: Zimanê mebest ji bo wergerê diyar bike src-file: Dosyaya çavkaniyê ku were wergerandin (pêwîst e) src-language: Zimanê pelê çavkaniyê (heke ne diyar be, amûr dê bixweber pelê çavkaniyê diyar bike) diff --git a/state/localize/ky.yaml b/state/localize/ky.yaml index 3d52605..cbddf7f 100644 --- a/state/localize/ky.yaml +++ b/state/localize/ky.yaml @@ -125,6 +125,7 @@ cli: force: Учурдагы котормолордун үстүнөн жазыңыз force-key-prefix: кайра жазууга мажбурлоо керек баскычтар generate-const: Оңой чалуу үчүн санап чыгуу маанилерин түзүңүз + generate-field: Оңой чалуу үчүн талаа түрүн санап чыгуу маанилерин түзүңүз languages: Котормо үчүн максаттуу тилди көрсөтүңүз src-file: Которула турган булак файлы (талап кылынат) src-language: Баштапкы файлдын тили (эгерде көрсөтүлбөсө, курал баштапкы файлды автоматтык түрдө аныктайт) diff --git a/state/localize/la.yaml b/state/localize/la.yaml index e198f97..1968b33 100644 --- a/state/localize/la.yaml +++ b/state/localize/la.yaml @@ -125,6 +125,7 @@ cli: force: Rescribere existentium translationes force-key-prefix: clavium necessitatem cogendi esse overwritten generate-const: Enumerationem generare valores ad facilem vocationem + generate-field: Genera agri genus enumerationem valorum facilium vocationis languages: Specificare scopum lingua pro translatione src-file: Source file interpretari (requiritur) src-language: Lingua fasciculi fontis (nisi specificatur, instrumentum statim fontem lima definiet) diff --git a/state/localize/lb.yaml b/state/localize/lb.yaml index 91b6ff2..5f47dea 100644 --- a/state/localize/lb.yaml +++ b/state/localize/lb.yaml @@ -125,6 +125,7 @@ cli: force: Iwwerschreiwe bestehend Iwwersetzungen force-key-prefix: Schlësselen déi musse gezwongen sinn ze iwwerschreiwe generate-const: Generéiere Opzielungswäerter fir einfach ze ruffen + generate-field: Generéiere Feldtyp Opzielungswäerter fir einfach ze ruffen languages: Gitt d'Zilsprooch fir d'Iwwersetzung un src-file: Quelldatei fir ze iwwersetzen (obligatoresch) src-language: D'Sprooch vun der Quelldatei (wann net uginn, wäert d'Tool automatesch d'Quelldatei bestëmmen) diff --git a/state/localize/lg.yaml b/state/localize/lg.yaml index 0ca8a9f..3e00b0e 100644 --- a/state/localize/lg.yaml +++ b/state/localize/lg.yaml @@ -125,6 +125,7 @@ cli: force: Wandiika ku nkyusa eziriwo force-key-prefix: ebisumuluzo ebyetaaga okuwalirizibwa okuwandiikibwako generate-const: Okukola emiwendo gy'okubala okusobola okwanguyirwa okuyita + generate-field: Okukola emiwendo gy'okubala ekika ky'ennimiro okusobola okwanguyirwa okuyita languages: Laga olulimi lw’ogenderera okuvvuunula src-file: Fayiro y'ensibuko egenda okuvvuunulwa (kyetaagisa) . src-language: Olulimi lwa fayiro ensibuko (bwe kiba tekirambikiddwa, ekintu ekikozesebwa kijja kusalawo fayiro ensibuko mu ngeri ey’otoma) diff --git a/state/localize/ln.yaml b/state/localize/ln.yaml index 305da93..1de2f8e 100644 --- a/state/localize/ln.yaml +++ b/state/localize/ln.yaml @@ -125,6 +125,7 @@ cli: force: Kokoma likolo ya mabongoli oyo ezali force-key-prefix: bafungola oyo esengeli kotindama na makasi mpo na kokoma likolo generate-const: Bosala ba valeurs ya enumeration pona kobenga na pete + generate-field: Bosala ba valeurs ya enumeration ya type ya champ pona kobenga na pete languages: Lakisá monɔkɔ oyo olingi kobongola src-file: Fisyé ya source oyo esengeli kobongolama (esengeli) . src-language: Monoko ya fisyé ya source (soki elakisami te, esaleli ekoyeba automatiquement fichier source) diff --git a/state/localize/lo.yaml b/state/localize/lo.yaml index 10266be..a5b5f08 100644 --- a/state/localize/lo.yaml +++ b/state/localize/lo.yaml @@ -125,6 +125,7 @@ cli: force: ຂຽນທັບການແປທີ່ມີຢູ່ແລ້ວ force-key-prefix: ກະແຈທີ່ຕ້ອງການບັງຄັບໃຫ້ຂຽນທັບ generate-const: ສ້າງຄ່າ enumeration ສໍາລັບການໂທງ່າຍ + generate-field: ສ້າງ​ຄ່າ​ຈໍາ​ນວນ​ປະ​ເພດ​ພາກ​ສະ​ຫນາມ​ສໍາ​ລັບ​ການ​ໂທ​ງ່າຍ​ languages: ລະບຸພາສາເປົ້າໝາຍສຳລັບການແປ src-file: ໄຟລ໌ຕົ້ນສະບັບທີ່ຈະແປ (ຕ້ອງການ) src-language: ພາສາຂອງໄຟລ໌ແຫຼ່ງ (ຖ້າບໍ່ໄດ້ລະບຸ, ເຄື່ອງມືຈະກໍານົດໄຟລ໌ແຫຼ່ງອັດຕະໂນມັດ) diff --git a/state/localize/lt.yaml b/state/localize/lt.yaml index da920e0..b409f0d 100644 --- a/state/localize/lt.yaml +++ b/state/localize/lt.yaml @@ -125,6 +125,7 @@ cli: force: Perrašyti esamus vertimus force-key-prefix: raktus, kuriuos reikia priverstinai perrašyti generate-const: Generuokite surašymo reikšmes, kad galėtumėte lengvai skambinti + generate-field: Generuokite lauko tipo surašymo reikšmes, kad galėtumėte lengvai skambinti languages: Nurodykite vertimo kalbą src-file: Šaltinio failas, kurį reikia išversti (būtina) src-language: Šaltinio failo kalba (jei nenurodyta, įrankis automatiškai nustatys šaltinio failą) diff --git a/state/localize/lus.yaml b/state/localize/lus.yaml index aa4bdd0..f2db6d0 100644 --- a/state/localize/lus.yaml +++ b/state/localize/lus.yaml @@ -125,6 +125,7 @@ cli: force: Lehlin awm tawhte chu overwrite rawh force-key-prefix: keys te chu overwrite tura nawr a ngai a ni generate-const: Call awlsam zawk nan enumeration value siam rawh + generate-field: Call awlsam zawk nan field type enumeration value siam rawh languages: Lehlinna tur target language chu tarlang rawh src-file: Source file lehlin tur (a tul) . src-language: Source file tawng (a tarlan loh chuan tool hian source file chu a hril nghal ang) diff --git a/state/localize/lv.yaml b/state/localize/lv.yaml index 99df37d..869769e 100644 --- a/state/localize/lv.yaml +++ b/state/localize/lv.yaml @@ -125,6 +125,7 @@ cli: force: Pārrakstīt esošos tulkojumus force-key-prefix: atslēgas, kuras nepieciešams piespiest pārrakstīt generate-const: Ģenerējiet uzskaites vērtības, lai atvieglotu izsaukšanu + generate-field: Ģenerējiet lauka tipa uzskaites vērtības, lai tos varētu viegli izsaukt languages: Norādiet tulkošanas mērķa valodu src-file: Tulkojams avota fails (obligāti) src-language: Avota faila valoda (ja nav norādīta, rīks automātiski noteiks avota failu) diff --git a/state/localize/mai.yaml b/state/localize/mai.yaml index bc2d87f..a162e8a 100644 --- a/state/localize/mai.yaml +++ b/state/localize/mai.yaml @@ -125,6 +125,7 @@ cli: force: मौजूदा अनुवाद के ओवरराइट करू force-key-prefix: कुंजी जेकरा ओवरराइट करय कें लेल मजबूर करय कें जरूरत छै generate-const: आसान कॉलिंग के लेल गणना मान उत्पन्न करू + generate-field: आसान कॉलिंग कें लेल फील्ड प्रकार गणना मान उत्पन्न करूं languages: अनुवादक लेल लक्ष्य भाषा निर्दिष्ट करू src-file: अनुवाद करबाक लेल स्रोत फाइल (आवश्यक) src-language: स्रोत फाइल कें भाषा (यदि निर्दिष्ट नहि कैल गेल छै, त टूल स्वचालित रूप सं स्रोत फाइल कें निर्धारित करतय) diff --git a/state/localize/mg.yaml b/state/localize/mg.yaml index a99fb99..8c27a99 100644 --- a/state/localize/mg.yaml +++ b/state/localize/mg.yaml @@ -125,6 +125,7 @@ cli: force: Soraty ny dikanteny efa misy force-key-prefix: fanalahidy izay mila terena hosoloina generate-const: Mamorona soatoavina fanisana ho mora fiantsoana + generate-field: Mamorona sanda fanisana karazana saha ho mora fiantsoana languages: Lazao ny fiteny kendrena handikana src-file: rakitra loharano hadika (takina) src-language: Ny fitenin'ny rakitra loharano (raha tsy voafaritra dia hamaritra ho azy ny rakitra loharano ny fitaovana) diff --git a/state/localize/mi.yaml b/state/localize/mi.yaml index aba14db..7154104 100644 --- a/state/localize/mi.yaml +++ b/state/localize/mi.yaml @@ -125,6 +125,7 @@ cli: force: Tuhia nga whakamaoritanga o naianei force-key-prefix: mau taviri e tia ia faahepohia ia tuhiruahia generate-const: Waihanga uara tatau mo te waea ngawari + generate-field: Hangaia nga uara tatauranga momo mara mo te waea ngawari languages: Tauwhāitihia te reo whainga mo te whakamaoritanga src-file: Ko te konae puna hei whakamaori (hiahia) src-language: Te reo o te konae puna (mehemea kaore i tohua, ka whakatau aunoatia e te taputapu te konae puna) diff --git a/state/localize/mk.yaml b/state/localize/mk.yaml index a94fb10..0d4af96 100644 --- a/state/localize/mk.yaml +++ b/state/localize/mk.yaml @@ -125,6 +125,7 @@ cli: force: Презапишете ги постоечките преводи force-key-prefix: клучеви кои треба да се принудат да се препишат generate-const: Генерирајте вредности за набројување за лесно повикување + generate-field: Генерирајте вредности за набројување на типот на поле за лесно повикување languages: Наведете го целниот јазик за превод src-file: Изворната датотека што треба да се преведе (задолжително) src-language: Јазикот на изворната датотека (ако не е наведен, алатката автоматски ќе ја одреди изворната датотека) diff --git a/state/localize/ml.yaml b/state/localize/ml.yaml index 7d32900..2590a3a 100644 --- a/state/localize/ml.yaml +++ b/state/localize/ml.yaml @@ -125,6 +125,7 @@ cli: force: നിലവിലുള്ള വിവർത്തനങ്ങൾ തിരുത്തിയെഴുതുക force-key-prefix: തിരുത്തിയെഴുതാൻ നിർബന്ധിതമാക്കേണ്ട കീകൾ generate-const: എളുപ്പത്തിൽ വിളിക്കുന്നതിനായി എണ്ണൽ മൂല്യങ്ങൾ സൃഷ്ടിക്കുക + generate-field: എളുപ്പത്തിൽ കോളിംഗിനായി ഫീൽഡ് തരം എണ്ണൽ മൂല്യങ്ങൾ സൃഷ്ടിക്കുക languages: വിവർത്തനത്തിനായി ലക്ഷ്യമിടുന്ന ഭാഷ വ്യക്തമാക്കുക src-file: വിവർത്തനം ചെയ്യേണ്ട ഉറവിട ഫയൽ (ആവശ്യമാണ്) src-language: സോഴ്‌സ് ഫയലിൻ്റെ ഭാഷ (വ്യക്തമാക്കിയിട്ടില്ലെങ്കിൽ, ഉപകരണം സ്വയമേവ ഉറവിട ഫയലിനെ നിർണ്ണയിക്കും) diff --git a/state/localize/mn.yaml b/state/localize/mn.yaml index d5dab83..6c08cc5 100644 --- a/state/localize/mn.yaml +++ b/state/localize/mn.yaml @@ -125,6 +125,7 @@ cli: force: Одоо байгаа орчуулгыг дарж бичих force-key-prefix: хүчээр дарж бичих шаардлагатай түлхүүрүүд generate-const: Дуудлага хийхэд хялбар тооллогын утгыг үүсгэнэ үү + generate-field: Дуудлага хийхэд хялбар байхын тулд талбарын төрлийн тооллогын утгыг үүсгэнэ үү languages: Орчуулах зорилтот хэлийг зааж өгнө үү src-file: Орчуулах эх файл (шаардлагатай) src-language: Эх файлын хэл (хэрэв заагаагүй бол хэрэгсэл нь эх файлыг автоматаар тодорхойлох болно) diff --git a/state/localize/mni-mtei.yaml b/state/localize/mni-mtei.yaml index dfffaa5..e022ceb 100644 --- a/state/localize/mni-mtei.yaml +++ b/state/localize/mni-mtei.yaml @@ -125,6 +125,7 @@ cli: force: ꯍꯧꯖꯤꯛ ꯂꯩꯔꯤꯕꯥ ꯍꯟꯗꯣꯀꯄꯁꯤꯡ ꯑꯗꯨ ꯑꯣꯚꯔꯔꯥꯏꯠ ꯇꯧ꯫ force-key-prefix: ꯑꯣꯚꯔꯔꯥꯏꯠ ꯇꯧꯅꯕꯥ ꯐꯣꯔꯁ ꯇꯧꯕꯥ ꯃꯊꯧ ꯇꯥꯕꯥ ꯀꯤꯁꯤꯡ꯫ generate-const: ꯐꯖꯅꯥ ꯀꯣꯜ ꯇꯧꯅꯕꯒꯤꯗꯃꯛ ꯏꯅꯨꯃꯦꯔꯦꯁꯟ ꯚꯦꯜꯌꯨꯁꯤꯡ ꯖꯦꯅꯦꯔꯦꯠ ꯇꯧꯕꯥ꯫ + generate-field: ꯐꯖꯅꯥ ꯀꯣꯜ ꯇꯧꯅꯕꯒꯤꯗꯃꯛ ꯐꯤꯜꯗ ꯇꯥꯏꯞ ꯏꯅꯨꯃꯦꯔꯦꯁꯟ ꯚꯦꯜꯌꯨꯁꯤꯡ ꯖꯦꯅꯦꯔꯦꯠ ꯇꯧꯕꯥ꯫ languages: ꯍꯟꯗꯣꯀꯄꯒꯤ ꯇꯥꯔꯒꯦꯠ ꯂꯣꯜ ꯑꯗꯨ ꯇꯥꯀꯄꯤꯌꯨ꯫ src-file: ꯍꯟꯗꯣꯀꯄꯥ ꯌꯥꯕꯥ ꯁꯣꯔꯁ ꯐꯥꯏꯜ (ꯃꯊꯧ ꯇꯥꯕꯥ) src-language: ꯁꯣꯔꯁ ꯐꯥꯏꯂꯒꯤ ꯂꯣꯜ (ꯀꯔꯤꯒꯨꯝꯕꯥ ꯁꯦꯃꯗꯣꯀꯄꯥ ꯉꯃꯗ꯭ꯔꯕꯗꯤ, ꯇꯨꯜ ꯑꯗꯨꯅꯥ ꯁꯣꯔꯁ ꯐꯥꯏꯜ ꯑꯗꯨ ꯃꯁꯥ ꯃꯊꯟꯇꯥ ꯂꯦꯄꯊꯣꯛꯀꯅꯤ) diff --git a/state/localize/mr.yaml b/state/localize/mr.yaml index dc47f3e..d960b3d 100644 --- a/state/localize/mr.yaml +++ b/state/localize/mr.yaml @@ -125,6 +125,7 @@ cli: force: विद्यमान भाषांतर ओव्हरराइट करा force-key-prefix: अधिलिखित करणे सक्तीने आवश्यक असलेल्या कळा generate-const: सुलभ कॉलिंगसाठी गणना मूल्ये व्युत्पन्न करा + generate-field: सुलभ कॉलिंगसाठी फील्ड प्रकार गणना मूल्ये व्युत्पन्न करा languages: भाषांतरासाठी लक्ष्य भाषा निर्दिष्ट करा src-file: स्रोत फाइल भाषांतरित करायची आहे (आवश्यक) src-language: स्त्रोत फाइलची भाषा (निर्दिष्ट नसल्यास, साधन आपोआप स्त्रोत फाइल निश्चित करेल) diff --git a/state/localize/ms.yaml b/state/localize/ms.yaml index 4bae0b4..752c6d7 100644 --- a/state/localize/ms.yaml +++ b/state/localize/ms.yaml @@ -125,6 +125,7 @@ cli: force: Tulis ganti terjemahan sedia ada force-key-prefix: kunci yang perlu dipaksa untuk ditimpa generate-const: Hasilkan nilai penghitungan untuk panggilan mudah + generate-field: Hasilkan nilai penghitungan jenis medan untuk panggilan mudah languages: Tentukan bahasa sasaran untuk terjemahan src-file: Fail sumber untuk diterjemahkan (diperlukan) src-language: Bahasa fail sumber (jika tidak dinyatakan, alat akan menentukan fail sumber secara automatik) diff --git a/state/localize/mt.yaml b/state/localize/mt.yaml index 2b4711f..15977e5 100644 --- a/state/localize/mt.yaml +++ b/state/localize/mt.yaml @@ -125,6 +125,7 @@ cli: force: Ikteb traduzzjonijiet eżistenti force-key-prefix: ċwievet li jeħtieġ li jiġu sfurzati jinkitbu fuqhom generate-const: Iġġenera valuri ta' enumerazzjoni għal sejħa faċli + generate-field: Iġġenera valuri ta 'enumerazzjoni tat-tip ta' qasam għal sejħa faċli languages: Speċifika l-lingwa fil-mira għat-traduzzjoni src-file: Fajl tas-sors li jrid jiġi tradott (meħtieġa) src-language: Il-lingwa tal-fajl tas-sors (jekk mhux speċifikat, l-għodda tiddetermina awtomatikament il-fajl tas-sors) diff --git a/state/localize/my.yaml b/state/localize/my.yaml index 2e542ba..5803bcb 100644 --- a/state/localize/my.yaml +++ b/state/localize/my.yaml @@ -125,6 +125,7 @@ cli: force: ရှိပြီးသား ဘာသာပြန်ဆိုချက်များကို ထပ်ရေးပါ။ force-key-prefix: သော့များကို ထပ်ရေးခိုင်းရန် လိုအပ်သည်။ generate-const: ခေါ်ဆိုရလွယ်ကူရန်အတွက် စာရင်းကောက်တန်ဖိုးများကို ဖန်တီးပါ။ + generate-field: ခေါ်ဆိုရလွယ်ကူစေရန် အကွက်အမျိုးအစား စာရင်းကောက်ယူမှုတန်ဖိုးများကို ဖန်တီးပါ။ languages: ဘာသာပြန်ခြင်းအတွက် ပစ်မှတ်ဘာသာစကားကို သတ်မှတ်ပါ။ src-file: ဘာသာပြန်ရန် အရင်းအမြစ်ဖိုင် (လိုအပ်သည်) src-language: အရင်းအမြစ်ဖိုင်၏ဘာသာစကား (မသတ်မှတ်ပါက၊ ကိရိယာသည် အရင်းအမြစ်ဖိုင်ကို အလိုအလျောက် ဆုံးဖြတ်ပေးမည်) diff --git a/state/localize/ne.yaml b/state/localize/ne.yaml index fc6399e..3c22185 100644 --- a/state/localize/ne.yaml +++ b/state/localize/ne.yaml @@ -125,6 +125,7 @@ cli: force: अवस्थित अनुवादहरू अधिलेखन गर्नुहोस् force-key-prefix: कुञ्जीहरू अधिलेखन गर्न बाध्य हुन आवश्यक छ generate-const: सजिलो कलको लागि गणना मानहरू उत्पन्न गर्नुहोस् + generate-field: सजिलो कलको लागि क्षेत्र प्रकार गणना मानहरू उत्पन्न गर्नुहोस् languages: अनुवादको लागि लक्षित भाषा निर्दिष्ट गर्नुहोस् src-file: स्रोत फाइल अनुवाद गर्न (आवश्यक) src-language: स्रोत फाइलको भाषा (यदि निर्दिष्ट गरिएको छैन भने, उपकरणले स्वचालित रूपमा स्रोत फाइल निर्धारण गर्नेछ) diff --git a/state/localize/nl.yaml b/state/localize/nl.yaml index 4034fb9..f81d7e5 100644 --- a/state/localize/nl.yaml +++ b/state/localize/nl.yaml @@ -125,6 +125,7 @@ cli: force: Bestaande vertalingen overschrijven force-key-prefix: sleutels die geforceerd moeten worden overschreven generate-const: Genereer opsommingswaarden voor eenvoudig bellen + generate-field: Genereer opsommingswaarden van het veldtype voor eenvoudig bellen languages: Geef de doeltaal voor vertaling op src-file: Bronbestand dat moet worden vertaald (vereist) src-language: De taal van het bronbestand (indien niet gespecificeerd, zal de tool automatisch het bronbestand bepalen) diff --git a/state/localize/no.yaml b/state/localize/no.yaml index 32f6635..007dcbf 100644 --- a/state/localize/no.yaml +++ b/state/localize/no.yaml @@ -125,6 +125,7 @@ cli: force: Overskriv eksisterende oversettelser force-key-prefix: nøkler som må tvinges til å bli overskrevet generate-const: Generer oppregningsverdier for enkelt å ringe + generate-field: Generer felttypeoppregningsverdier for enkelt å ringe languages: Angi målspråket for oversettelse src-file: Kildefil som skal oversettes (obligatorisk) src-language: Språket til kildefilen (hvis ikke spesifisert, vil verktøyet automatisk bestemme kildefilen) diff --git a/state/localize/nso.yaml b/state/localize/nso.yaml index b2eae2b..55f158d 100644 --- a/state/localize/nso.yaml +++ b/state/localize/nso.yaml @@ -125,6 +125,7 @@ cli: force: Ngwala godimo ga diphetolelo tše di lego gona force-key-prefix: dinotlelo tšeo di swanetšego go gapeletšwa go ngwalwa godimo generate-const: Hlagiša dikelo tša go bala bakeng sa go bitša gabonolo + generate-field: Hlagiša dikelo tša go bala mohuta wa tšhemo bakeng sa go bitša gabonolo languages: Laetša leleme leo le nepišitšwego bakeng sa phetolelo src-file: Faele ya mohlodi yeo e tlago fetolelwa (e nyakega) . src-language: Polelo ya faele ya mohlodi (ge e sa laetšwa, sedirišwa se tla laola faele ya mohlodi ka go iketla) . diff --git a/state/localize/ny.yaml b/state/localize/ny.yaml index 6b11e4d..3a72325 100644 --- a/state/localize/ny.yaml +++ b/state/localize/ny.yaml @@ -125,6 +125,7 @@ cli: force: Lembani zomasulira zomwe zilipo kale force-key-prefix: makiyi omwe amafunika kukakamizidwa kuti alembetsedwe generate-const: Pangani zowerengera kuti muyimbe mosavuta + generate-field: Pangani zowerengera zamtundu wamunda kuti muyimbe mosavuta languages: Tchulani chilankhulo chomwe mungamasulire src-file: Fayilo yochokera kuti itanthauziridwe (yofunikira) src-language: Chilankhulo cha fayilo yochokera (ngati sichinatchulidwe, chidacho chidzadziwiratu fayilo yochokera) diff --git a/state/localize/om.yaml b/state/localize/om.yaml index 5a22c4e..1d52b41 100644 --- a/state/localize/om.yaml +++ b/state/localize/om.yaml @@ -125,6 +125,7 @@ cli: force: Hiikkaawwan jiran irra barreessi force-key-prefix: furtuuwwan dirqiin irra barreeffamuu qaban generate-const: Waamicha salphaadhaaf gatiiwwan lakkaa'uu uumi + generate-field: Waamicha salphaadhaaf gatiiwwan tarree gosa dirree uumi languages: Afaan galma hiikkaa ifteessi src-file: Faayilii madda hiikamuu qabu (barbaachisaa) . src-language: Afaan faayilii madda (yoo hin ibsamne, meeshaan ofumaan faayilii madda murteessa) . diff --git a/state/localize/or.yaml b/state/localize/or.yaml index f211a42..57b8b24 100644 --- a/state/localize/or.yaml +++ b/state/localize/or.yaml @@ -125,6 +125,7 @@ cli: force: ବିଦ୍ୟମାନ ଅନୁବାଦଗୁଡ଼ିକୁ ଓଭର୍ ରାଇଟ୍ କରନ୍ତୁ | force-key-prefix: ଚାବିଗୁଡ଼ିକ ଯାହାକି ଓଭର୍ ରାଇଟ୍ ହେବାକୁ ବାଧ୍ୟ ହେବା ଆବଶ୍ୟକ | generate-const: ସହଜ କଲିଂ ପାଇଁ ଗଣନା ମୂଲ୍ୟ ସୃଷ୍ଟି କରନ୍ତୁ | + generate-field: ସହଜ କଲିଂ ପାଇଁ ଫିଲ୍ଡ ପ୍ରକାର ଗଣନା ମୂଲ୍ୟ ସୃଷ୍ଟି କରନ୍ତୁ | languages: ଅନୁବାଦ ପାଇଁ ଲକ୍ଷ୍ୟ ଭାଷା ନିର୍ଦ୍ଦିଷ୍ଟ କରନ୍ତୁ | src-file: ଅନୁବାଦ ହେବାକୁ ଥିବା ଉତ୍ସ ଫାଇଲ (ଆବଶ୍ୟକ) src-language: ଉତ୍ସ ଫାଇଲର ଭାଷା (ଯଦି ନିର୍ଦ୍ଦିଷ୍ଟ କରାଯାଇ ନାହିଁ, ସାଧନ ସ୍ୱୟଂଚାଳିତ ଭାବରେ ଉତ୍ସ ଫାଇଲ ନିର୍ଣ୍ଣୟ କରିବ) diff --git a/state/localize/pa.yaml b/state/localize/pa.yaml index 37c1477..84e44fb 100644 --- a/state/localize/pa.yaml +++ b/state/localize/pa.yaml @@ -125,6 +125,7 @@ cli: force: ਮੌਜੂਦਾ ਅਨੁਵਾਦਾਂ ਨੂੰ ਓਵਰਰਾਈਟ ਕਰੋ force-key-prefix: ਕੁੰਜੀਆਂ ਜਿਨ੍ਹਾਂ ਨੂੰ ਓਵਰਰਾਈਟ ਕਰਨ ਲਈ ਮਜਬੂਰ ਕਰਨ ਦੀ ਲੋੜ ਹੈ generate-const: ਆਸਾਨ ਕਾਲਿੰਗ ਲਈ ਗਣਨਾ ਮੁੱਲ ਤਿਆਰ ਕਰੋ + generate-field: ਆਸਾਨ ਕਾਲਿੰਗ ਲਈ ਫੀਲਡ ਕਿਸਮ ਗਣਨਾ ਮੁੱਲ ਤਿਆਰ ਕਰੋ languages: ਅਨੁਵਾਦ ਲਈ ਟੀਚਾ ਭਾਸ਼ਾ ਦਿਓ src-file: ਸਰੋਤ ਫਾਈਲ ਦਾ ਅਨੁਵਾਦ ਕੀਤਾ ਜਾਣਾ ਹੈ (ਲੋੜੀਂਦਾ ਹੈ) src-language: ਸਰੋਤ ਫਾਈਲ ਦੀ ਭਾਸ਼ਾ (ਜੇਕਰ ਨਿਰਧਾਰਤ ਨਹੀਂ ਕੀਤੀ ਗਈ ਹੈ, ਤਾਂ ਟੂਲ ਆਪਣੇ ਆਪ ਸਰੋਤ ਫਾਈਲ ਨੂੰ ਨਿਰਧਾਰਤ ਕਰੇਗਾ) diff --git a/state/localize/pl.yaml b/state/localize/pl.yaml index 97659bf..bb0d060 100644 --- a/state/localize/pl.yaml +++ b/state/localize/pl.yaml @@ -125,6 +125,7 @@ cli: force: Zastąp istniejące tłumaczenia force-key-prefix: klucze, które należy wymusić, aby zostały nadpisane generate-const: Generuj wartości wyliczeniowe dla łatwego dzwonienia + generate-field: Generuj wartości wyliczeniowe typu pola dla łatwego wywoływania languages: Określ język docelowy tłumaczenia src-file: Plik źródłowy do przetłumaczenia (wymagane) src-language: Język pliku źródłowego (jeśli nie zostanie określony, narzędzie automatycznie określi plik źródłowy) diff --git a/state/localize/ps.yaml b/state/localize/ps.yaml index 506100a..f565fe8 100644 --- a/state/localize/ps.yaml +++ b/state/localize/ps.yaml @@ -125,6 +125,7 @@ cli: force: موجوده ژباړې له سره ولیکئ force-key-prefix: هغه کلیدونه چې د بیا لیکلو لپاره اړ ایستل کیږي generate-const: د اسانه زنګ وهلو لپاره د شمیرنې ارزښتونه رامینځته کړئ + generate-field: د اسانه زنګ وهلو لپاره د ساحې ډول شمیرنې ارزښتونه رامینځته کړئ languages: د ژباړې لپاره د هدف ژبه مشخص کړئ src-file: د سرچینې فایل باید ژباړل شي (اړین) src-language: د سرچینې فایل ژبه (که مشخص نه وي، وسیله به په اوتومات ډول د سرچینې فایل وټاکي) diff --git a/state/localize/pt-br.yaml b/state/localize/pt-br.yaml index fc83ecd..d12b232 100644 --- a/state/localize/pt-br.yaml +++ b/state/localize/pt-br.yaml @@ -127,6 +127,7 @@ cli: force: Substituir traduções existentes force-key-prefix: chaves que precisam ser forçadas a serem substituídas generate-const: Gere valores de enumeração para facilitar a chamada + generate-field: Gere valores de enumeração de tipo de campo para fácil chamada languages: Especifique o idioma de destino para tradução src-file: Arquivo fonte a ser traduzido (obrigatório) src-language: O idioma do arquivo de origem (se não for especificado, a ferramenta determinará automaticamente o arquivo de origem) diff --git a/state/localize/pt.yaml b/state/localize/pt.yaml index 9820a83..774a3b1 100644 --- a/state/localize/pt.yaml +++ b/state/localize/pt.yaml @@ -125,6 +125,7 @@ cli: force: Substituir traduções existentes force-key-prefix: chaves que precisam ser forçadas a serem substituídas generate-const: Gere valores de enumeração para facilitar a chamada + generate-field: Gere valores de enumeração de tipo de campo para fácil chamada languages: Especifique o idioma de destino para tradução src-file: Arquivo fonte a ser traduzido (obrigatório) src-language: O idioma do arquivo de origem (se não for especificado, a ferramenta determinará automaticamente o arquivo de origem) diff --git a/state/localize/qu.yaml b/state/localize/qu.yaml index 6283289..d7a2307 100644 --- a/state/localize/qu.yaml +++ b/state/localize/qu.yaml @@ -125,6 +125,7 @@ cli: force: Kaq t’ikraykunata hawaman qillqay force-key-prefix: llavekuna, chaykunatam obligana kanqa hawanpi qillqanapaq generate-const: Yupay chanikunata paqarichiy, mana sasa waqyanapaq + generate-field: Chakra laya yupay chanikunata paqarichiy, mana sasa waqyanapaq languages: Tikranapaq simita niy src-file: Pukyu willañiqi t'ikranapaq (mañasqa) . src-language: Pukyu willañiqip rimaynin (mana nisqa kaptinqa, llamk'anaqa kikinmantam pukyu willañiqita kamachinqa) diff --git a/state/localize/ro.yaml b/state/localize/ro.yaml index 302d3d6..313d672 100644 --- a/state/localize/ro.yaml +++ b/state/localize/ro.yaml @@ -125,6 +125,7 @@ cli: force: Suprascrieți traducerile existente force-key-prefix: cheile care trebuie forțate să fie suprascrise generate-const: Generați valori de enumerare pentru apeluri ușoare + generate-field: Generați valori de enumerare a tipurilor de câmp pentru apeluri ușoare languages: Specificați limba țintă pentru traducere src-file: Fișierul sursă de tradus (obligatoriu) src-language: Limba fișierului sursă (dacă nu este specificată, instrumentul va determina automat fișierul sursă) diff --git a/state/localize/ru.yaml b/state/localize/ru.yaml index db2805e..6d759ca 100644 --- a/state/localize/ru.yaml +++ b/state/localize/ru.yaml @@ -125,6 +125,7 @@ cli: force: Перезаписать существующие переводы force-key-prefix: ключи, которые нужно принудительно перезаписать generate-const: Генерация значений перечисления для удобного вызова + generate-field: Генерация значений перечисления типов полей для удобного вызова languages: Укажите целевой язык для перевода src-file: Исходный файл для перевода (обязательно) src-language: Язык исходного файла (если не указан, инструмент автоматически определит исходный файл) diff --git a/state/localize/rw.yaml b/state/localize/rw.yaml index 6d30459..b6d765c 100644 --- a/state/localize/rw.yaml +++ b/state/localize/rw.yaml @@ -125,6 +125,7 @@ cli: force: Andika ibisobanuro bihari force-key-prefix: urufunguzo rugomba guhatirwa kwandikwa generate-const: Kubyara indangagaciro zo kubara byoroshye guhamagarwa + generate-field: Kubyara umurima wubwoko bwo kubara kugirango byoroshye guhamagarwa languages: Kugaragaza ururimi rugenewe gusobanura src-file: Idosiye yinkomoko igomba guhindurwa (bisabwa) src-language: Ururimi rwa dosiye yinkomoko (niba bidasobanuwe neza, igikoresho kizahita kigena dosiye yinkomoko) diff --git a/state/localize/sa.yaml b/state/localize/sa.yaml index 2e91cb0..24fdc47 100644 --- a/state/localize/sa.yaml +++ b/state/localize/sa.yaml @@ -125,6 +125,7 @@ cli: force: विद्यमानानुवादानाम् अधिलेखनं कुर्वन्तु force-key-prefix: कीलानि येषां अधिलेखनं कर्तुं बाध्यं कर्तव्यम् generate-const: सुलभ-आह्वानार्थं गणना-मूल्यानि जनयन्तु + generate-field: सुलभ-आह्वानार्थं क्षेत्रप्रकारस्य गणना-मूल्यानि जनयन्तु languages: अनुवादार्थं लक्ष्यभाषां निर्दिशन्तु src-file: अनुवादितव्यं स्रोतसञ्चिका (आवश्यकम्) २. src-language: स्रोतसञ्चिकायाः ​​भाषा (यदि निर्दिष्टा नास्ति तर्हि साधनं स्वयमेव स्रोतसञ्चिकां निर्धारयिष्यति) diff --git a/state/localize/sd.yaml b/state/localize/sd.yaml index a53b9c8..d473533 100644 --- a/state/localize/sd.yaml +++ b/state/localize/sd.yaml @@ -125,6 +125,7 @@ cli: force: موجوده ترجمن کي اوور رائٽ ڪريو force-key-prefix: چابيون جن کي اوور رائٽ ڪرڻ لاءِ مجبور ڪيو وڃي generate-const: آسان ڪالنگ لاءِ ڳڻپيوڪر قدر پيدا ڪريو + generate-field: آسان ڪالنگ لاءِ فيلڊ جي قسم جي ڳڻپ جا قدر ٺاھيو languages: ترجمي لاءِ ھدف واري ٻولي بيان ڪريو src-file: ماخذ فائل ترجمو ڪيو وڃي (گهربل) src-language: ماخذ فائل جي ٻولي (جيڪڏهن بيان نه ڪيو ويو آهي، اوزار خودڪار طريقي سان ماخذ فائل کي طئي ڪندو) diff --git a/state/localize/si.yaml b/state/localize/si.yaml index cbcfdac..08c6a94 100644 --- a/state/localize/si.yaml +++ b/state/localize/si.yaml @@ -125,6 +125,7 @@ cli: force: පවතින පරිවර්තන උඩින් ලියන්න force-key-prefix: නැවත ලිවීමට බල කළ යුතු යතුරු generate-const: පහසු ඇමතුම් සඳහා ගණන් කිරීමේ අගයන් උත්පාදනය කරන්න + generate-field: පහසු ඇමතුම් සඳහා ක්ෂේත්‍ර වර්ග ගණන් කිරීමේ අගයන් ජනනය කරන්න languages: පරිවර්තනය සඳහා ඉලක්ක භාෂාව සඳහන් කරන්න src-file: පරිවර්තනය කළ යුතු මූලාශ්‍ර ගොනුව (අවශ්‍යයි) src-language: මූලාශ්‍ර ගොනුවේ භාෂාව (නිශ්චිතව දක්වා නොමැති නම්, මෙවලම ස්වයංක්‍රීයව මූලාශ්‍ර ගොනුව තීරණය කරයි) diff --git a/state/localize/sk.yaml b/state/localize/sk.yaml index 29eb6da..93ff513 100644 --- a/state/localize/sk.yaml +++ b/state/localize/sk.yaml @@ -125,6 +125,7 @@ cli: force: Prepíšte existujúce preklady force-key-prefix: kľúče, ktoré je potrebné vynútiť prepísanie generate-const: Generujte hodnoty enumerácie pre jednoduché volanie + generate-field: Generujte hodnoty enumerácie typu poľa pre jednoduché volanie languages: Zadajte cieľový jazyk prekladu src-file: Zdrojový súbor na preklad (povinné) src-language: Jazyk zdrojového súboru (ak nie je zadaný, nástroj automaticky určí zdrojový súbor) diff --git a/state/localize/sl.yaml b/state/localize/sl.yaml index 2b097cb..ac55f76 100644 --- a/state/localize/sl.yaml +++ b/state/localize/sl.yaml @@ -125,6 +125,7 @@ cli: force: Prepiši obstoječe prevode force-key-prefix: ključe, ki jih je treba prisilno prepisati generate-const: Ustvarite oštevilčene vrednosti za enostavno klicanje + generate-field: Ustvarite vrednosti oštevilčenja vrste polja za enostavno klicanje languages: Določite ciljni jezik za prevod src-file: Izvorna datoteka za prevod (obvezno) src-language: Jezik izvorne datoteke (če ni naveden, bo orodje samodejno določilo izvorno datoteko) diff --git a/state/localize/sm.yaml b/state/localize/sm.yaml index ecbdc5d..365491f 100644 --- a/state/localize/sm.yaml +++ b/state/localize/sm.yaml @@ -125,6 +125,7 @@ cli: force: Sui fa'aliliuga o iai force-key-prefix: ki e mana'omia ona fa'amalosia e fa'asolo generate-const: Fausia fa'amaumauga tau mo le faigofie vala'au + generate-field: Fausia tulaga tau fa'asologa o fanua mo vala'au faigofie languages: Fa'ailoa le gagana fa'atatau mo le fa'aliliuga src-file: Fa'aliliuga faila e fa'aliliu (mana'omia) src-language: Le gagana o le faila faila (pe a le faʻamaonia, o le meafaigaluega o le a otometi lava ona fuafua le faila faila) diff --git a/state/localize/sn.yaml b/state/localize/sn.yaml index 087ce92..07c46aa 100644 --- a/state/localize/sn.yaml +++ b/state/localize/sn.yaml @@ -125,6 +125,7 @@ cli: force: Nyora shanduro dziripo force-key-prefix: makiyi anoda kumanikidzwa kunyorwa generate-const: Gadzira enumeration kukosha kwekufona kuri nyore + generate-field: Gadzira ndima yerudzi rwekuverengera kukosha kwekufona kuri nyore languages: Taura mutauro waunoshandura src-file: Kwakabva faira rinofanira kushandurwa (rinodiwa) src-language: Mutauro weiyo faira faira (kana isina kutaurwa, chishandiso chinongoona faira rekubva) diff --git a/state/localize/so.yaml b/state/localize/so.yaml index 5969271..22c209f 100644 --- a/state/localize/so.yaml +++ b/state/localize/so.yaml @@ -125,6 +125,7 @@ cli: force: Dib u qor turjumaadaha jira force-key-prefix: furayaasha u baahan in lagu qasbo in dib loo qoro generate-const: Samee qiyamka xisaabinta ee wacitaanka fudud + generate-field: Samee qiimaha tirinta nooca goobta si fudud loogu waco languages: Sheeg luqadda la beegsanayo ee tarjumaada src-file: Faylka isha in la tarjumo (loo baahan yahay) src-language: Luqadda faylka isha (haddii aan la cayimin, qalabku wuxuu si toos ah u go'aamin doonaa faylka isha) diff --git a/state/localize/sq.yaml b/state/localize/sq.yaml index dd7d0f7..bab5eaf 100644 --- a/state/localize/sq.yaml +++ b/state/localize/sq.yaml @@ -125,6 +125,7 @@ cli: force: Mbishkruani përkthimet ekzistuese force-key-prefix: çelësat që duhet të detyrohen të mbishkruhen generate-const: Gjeneroni vlera numërimi për thirrje të lehtë + generate-field: Gjeneroni vlerat e numërimit të llojit të fushës për thirrje të lehtë languages: Specifikoni gjuhën e synuar për përkthim src-file: Skedari burimor që do të përkthehet (kërkohet) src-language: Gjuha e skedarit burimor (nëse nuk specifikohet, mjeti do të përcaktojë automatikisht skedarin burimor) diff --git a/state/localize/sr.yaml b/state/localize/sr.yaml index a33b5e6..dcbbda3 100644 --- a/state/localize/sr.yaml +++ b/state/localize/sr.yaml @@ -125,6 +125,7 @@ cli: force: Замените постојеће преводе force-key-prefix: кључеви које треба принудно преписати generate-const: Генеришите вредности набрајања за лако позивање + generate-field: Генеришите вредности набрајања типа поља за лако позивање languages: Наведите циљни језик за превод src-file: Изворни фајл за превод (обавезно) src-language: Језик изворне датотеке (ако није наведен, алатка ће аутоматски одредити изворну датотеку) diff --git a/state/localize/st.yaml b/state/localize/st.yaml index a82e758..81855f0 100644 --- a/state/localize/st.yaml +++ b/state/localize/st.yaml @@ -125,6 +125,7 @@ cli: force: Ngola liphetolelo tse teng force-key-prefix: linotlolo tse hlokang ho qobelloa ho ngoloa generate-const: Hlahisa litekanyetso tsa lipalo bakeng sa ho letsetsa habonolo + generate-field: Hlahisa boleng ba palo ea mofuta oa sebaka bakeng sa ho letsetsa habonolo languages: Hlalosa puo eo ho fetoleloang ho eona src-file: Faele ea mohloli e tla fetoleloa (ea hlokahala) src-language: Puo ea faele ea mohloli (haeba e sa hlalosoa, sesebelisoa se tla ikhethela faele ea mohloli) diff --git a/state/localize/su.yaml b/state/localize/su.yaml index 559bfa5..e15b881 100644 --- a/state/localize/su.yaml +++ b/state/localize/su.yaml @@ -125,6 +125,7 @@ cli: force: Nimpa tarjamahan nu aya force-key-prefix: kenop nu kudu dipaksa pikeun overwritten generate-const: Ngahasilkeun nilai enumerasi pikeun gampang nelepon + generate-field: Ngahasilkeun nilai enumerasi jinis lapangan pikeun gampang nelepon languages: Sebutkeun basa sasaran pikeun tarjamahan src-file: Sumber file pikeun ditarjamahkeun (diperlukeun) src-language: Basa file sumber (upami teu dieusian, alat bakal otomatis nangtukeun file sumber) diff --git a/state/localize/sv.yaml b/state/localize/sv.yaml index 9ed7524..d991c63 100644 --- a/state/localize/sv.yaml +++ b/state/localize/sv.yaml @@ -125,6 +125,7 @@ cli: force: Skriv över befintliga översättningar force-key-prefix: nycklar som måste tvingas skrivas över generate-const: Generera uppräkningsvärden för att enkelt ringa + generate-field: Generera fälttypsuppräkningsvärden för att enkelt ringa languages: Ange målspråk för översättning src-file: Källfil som ska översättas (krävs) src-language: Språket för källfilen (om det inte anges kommer verktyget automatiskt att avgöra källfilen) diff --git a/state/localize/sw.yaml b/state/localize/sw.yaml index 31f0bf6..adce9f3 100644 --- a/state/localize/sw.yaml +++ b/state/localize/sw.yaml @@ -125,6 +125,7 @@ cli: force: Batilisha tafsiri zilizopo force-key-prefix: funguo zinazohitaji kulazimishwa kuandikwa tena generate-const: Tengeneza maadili ya kuhesabu kwa simu rahisi + generate-field: Tengeneza maadili ya aina ya uga kwa ajili ya kupiga simu kwa urahisi languages: Bainisha lugha lengwa kwa tafsiri src-file: Faili asili ya kutafsiriwa (inahitajika) src-language: Lugha ya faili ya chanzo (ikiwa haijabainishwa, chombo kitaamua kiotomatiki faili ya chanzo) diff --git a/state/localize/ta.yaml b/state/localize/ta.yaml index 2fbdc73..17834c8 100644 --- a/state/localize/ta.yaml +++ b/state/localize/ta.yaml @@ -125,6 +125,7 @@ cli: force: ஏற்கனவே உள்ள மொழிபெயர்ப்புகளை மேலெழுதவும் force-key-prefix: கட்டாயமாக மேலெழுதப்பட வேண்டிய விசைகள் generate-const: எளிதாக அழைப்பதற்கு எண்ணியல் மதிப்புகளை உருவாக்கவும் + generate-field: எளிதாக அழைப்பதற்கு புல வகை எண்ணும் மதிப்புகளை உருவாக்கவும் languages: மொழிபெயர்ப்பிற்கான இலக்கு மொழியைக் குறிப்பிடவும் src-file: மொழிபெயர்க்க வேண்டிய மூலக் கோப்பு (தேவை) src-language: மூலக் கோப்பின் மொழி (குறிப்பிடப்படாவிட்டால், கருவி தானாகவே மூலக் கோப்பைத் தீர்மானிக்கும்) diff --git a/state/localize/te.yaml b/state/localize/te.yaml index fb05528..031bb64 100644 --- a/state/localize/te.yaml +++ b/state/localize/te.yaml @@ -125,6 +125,7 @@ cli: force: ఇప్పటికే ఉన్న అనువాదాలను ఓవర్‌రైట్ చేయండి force-key-prefix: బలవంతంగా ఓవర్‌రైట్ చేయాల్సిన కీలు generate-const: సులభంగా కాల్ చేయడానికి గణన విలువలను రూపొందించండి + generate-field: సులభంగా కాల్ చేయడానికి ఫీల్డ్ రకం గణన విలువలను రూపొందించండి languages: అనువాదం కోసం లక్ష్య భాషను పేర్కొనండి src-file: మూలాధార ఫైల్ అనువదించబడుతుంది (అవసరం) src-language: సోర్స్ ఫైల్ యొక్క భాష (పేర్కొనకపోతే, సాధనం స్వయంచాలకంగా సోర్స్ ఫైల్‌ని నిర్ణయిస్తుంది) diff --git a/state/localize/tg.yaml b/state/localize/tg.yaml index da747ea..b1dfc63 100644 --- a/state/localize/tg.yaml +++ b/state/localize/tg.yaml @@ -125,6 +125,7 @@ cli: force: Баргардонидани тарҷумаҳои мавҷуда force-key-prefix: калидҳое, ки бояд маҷбур карда шаванд, ки аз нав навишта шаванд generate-const: Барои занг задан арзишҳои рақамиро тавлид кунед + generate-field: Барои занг задан арзишҳои рақамии навъи майдонро тавлид кунед languages: Забони мақсаднокро барои тарҷума муайян кунед src-file: Файли манбаъ барои тарҷума (ҳатмӣ) src-language: Забони файли сарчашма (агар муайян нашуда бошад, асбоб ба таври худкор файли сарчашмаро муайян мекунад) diff --git a/state/localize/th.yaml b/state/localize/th.yaml index b91a693..2c27508 100644 --- a/state/localize/th.yaml +++ b/state/localize/th.yaml @@ -125,6 +125,7 @@ cli: force: เขียนทับคำแปลที่มีอยู่ force-key-prefix: คีย์ที่ต้องถูกบังคับให้เขียนทับ generate-const: สร้างค่าแจงนับเพื่อการโทรที่ง่ายดาย + generate-field: สร้างค่าการแจกแจงประเภทฟิลด์เพื่อการโทรที่ง่ายดาย languages: ระบุภาษาเป้าหมายสำหรับการแปล src-file: ไฟล์ต้นฉบับที่จะแปล (จำเป็น) src-language: ภาษาของไฟล์ต้นฉบับ (หากไม่ได้ระบุ เครื่องมือจะกำหนดไฟล์ต้นฉบับโดยอัตโนมัติ) diff --git a/state/localize/ti.yaml b/state/localize/ti.yaml index 02c5c6b..762e4f7 100644 --- a/state/localize/ti.yaml +++ b/state/localize/ti.yaml @@ -125,6 +125,7 @@ cli: force: ንዝጸንሑ ትርጉማት ምጽሓፍ force-key-prefix: ክግደዱ ዘለዎም መፍትሕታት generate-const: ንቐሊል ጻውዒት ናይ ምዝርዛር ክብርታት ምፍጣር + generate-field: ንቐሊል ጻውዒት ናይ ዓውዲ ዓይነት ምዝርዛር ክብርታት ምፍጣር languages: ንትርጉም ዕላማ ዝገበረ ቋንቋ ግለጽ src-file: ክትርጎም ዘለዎ ምንጪ ፋይል (ኣድላዪ) src-language: ቋንቋ ናይቲ ምንጪ ፋይል (እንተዘይተገልጸ እቲ መሳርሒ ብኣውቶማቲክ ነቲ ምንጪ ፋይል ክውስኖ እዩ) diff --git a/state/localize/tk.yaml b/state/localize/tk.yaml index 4441db4..38f96a9 100644 --- a/state/localize/tk.yaml +++ b/state/localize/tk.yaml @@ -125,6 +125,7 @@ cli: force: Bar bolan terjimeleriň üstünden ýazyň force-key-prefix: gaýtadan ýazylmaga mejbur edilmeli düwmeler generate-const: Aňsat jaň etmek üçin sanama bahalaryny dörediň + generate-field: Easyeňil jaň etmek üçin meýdan görnüşini sanamak bahalaryny dörediň languages: Terjime etmek üçin maksat dilini görkeziň src-file: Terjime edilmeli çeşme faýly (zerur) src-language: Çeşme faýlynyň dili (görkezilmedik bolsa, gural deslapky faýly awtomatiki kesgitlär) diff --git a/state/localize/tl.yaml b/state/localize/tl.yaml index 776f9ec..1a49ef9 100644 --- a/state/localize/tl.yaml +++ b/state/localize/tl.yaml @@ -125,6 +125,7 @@ cli: force: I-overwrite ang mga kasalukuyang pagsasalin force-key-prefix: mga susi na kailangang pilitin na ma-overwrite generate-const: Bumuo ng mga halaga ng enumeration para sa madaling pagtawag + generate-field: Bumuo ng mga halaga ng enumeration ng uri ng field para sa madaling pagtawag languages: Tukuyin ang target na wika para sa pagsasalin src-file: Source file na isasalin (kinakailangan) src-language: Ang wika ng source file (kung hindi tinukoy, awtomatikong tutukuyin ng tool ang source file) diff --git a/state/localize/tr.yaml b/state/localize/tr.yaml index e23654b..5446443 100644 --- a/state/localize/tr.yaml +++ b/state/localize/tr.yaml @@ -125,6 +125,7 @@ cli: force: Mevcut çevirilerin üzerine yaz force-key-prefix: Üzerine yazılmaya zorlanması gereken anahtarlar generate-const: Kolay arama için numaralandırma değerleri oluşturun + generate-field: Kolay arama için alan türü numaralandırma değerleri oluşturun languages: Çeviri için hedef dili belirtin src-file: Çevrilecek kaynak dosya (gerekli) src-language: Kaynak dosyanın dili (belirtilmezse araç kaynak dosyayı otomatik olarak belirleyecektir) diff --git a/state/localize/ts.yaml b/state/localize/ts.yaml index 3d068de..76ca3be 100644 --- a/state/localize/ts.yaml +++ b/state/localize/ts.yaml @@ -125,6 +125,7 @@ cli: force: Tsala ehenhla ka vuhundzuluxeri lebyi nga kona force-key-prefix: swilotlelo leswi lavaka ku sindzisiwa ku tsariwa ehenhla generate-const: Endla mimpimo ya ku hlayela ku olova ku vitana + generate-field: Endla mimpimo ya ku hlayela ka muxaka wa nsimu ku olova ku vitana languages: Boxa ririmi leri kongomisiweke eka vuhundzuluxeri src-file: Fayili ya xihlovo leyi nga ta hundzuluxeriwa (ya laveka) . src-language: Ririmi ra fayili ya xihlovo (loko ri nga boxiwanga, xitirhisiwa xi ta tihlawulela hi ku tisungulela fayili ya xihlovo) . diff --git a/state/localize/tt.yaml b/state/localize/tt.yaml index b66a3a2..164a719 100644 --- a/state/localize/tt.yaml +++ b/state/localize/tt.yaml @@ -125,6 +125,7 @@ cli: force: Хәзерге тәрҗемәләрне языгыз force-key-prefix: яңадан язарга мәҗбүр булган ачкычлар generate-const: Easyиңел шалтырату өчен санау кыйммәтләрен булдыру + generate-field: Easyиңел шалтырату өчен кыр тибын санау кыйммәтләрен булдырыгыз languages: Тәрҗемә өчен максатлы телне күрсәтегез src-file: Тәрҗемә ителергә тиешле чыганак файл (кирәк) src-language: Чыганак файлының теле (күрсәтелмәгән булса, корал чыганак файлын автоматик рәвештә билгеләячәк) diff --git a/state/localize/ug.yaml b/state/localize/ug.yaml index f28f963..580e41c 100644 --- a/state/localize/ug.yaml +++ b/state/localize/ug.yaml @@ -125,6 +125,7 @@ cli: force: مەۋجۇت تەرجىمىلەرنى قاپلىۋېلىڭ force-key-prefix: يېزىشقا مەجبۇرلاشقا تېگىشلىك ئاچقۇچلار generate-const: ئاسان چاقىرىش ئۈچۈن ھېسابلاش قىممىتىنى ھاسىل قىلىڭ + generate-field: ئاسان چاقىرىش ئۈچۈن مەيدان تىپىدىكى ھېسابلاش قىممىتىنى ھاسىل قىلىڭ languages: تەرجىمە ئۈچۈن نىشان تىلنى بەلگىلەڭ src-file: تەرجىمە قىلىنىدىغان مەنبە ھۆججەت (تەلەپ) src-language: ئەسلى ھۆججەتنىڭ تىلى (ئەگەر ئېنىقلانمىغان بولسا ، قورال ئەسلى ھۆججەتنى ئاپتوماتىك بەلگىلەيدۇ) diff --git a/state/localize/uk.yaml b/state/localize/uk.yaml index dccfe30..74db410 100644 --- a/state/localize/uk.yaml +++ b/state/localize/uk.yaml @@ -125,6 +125,7 @@ cli: force: Перезаписати існуючі переклади force-key-prefix: ключі, які необхідно примусово перезаписати generate-const: Генеруйте значення перерахування для легкого виклику + generate-field: Створюйте значення переліку типу поля для легкого виклику languages: Вкажіть мову перекладу src-file: Вихідний файл для перекладу (обов'язково) src-language: Мова вихідного файлу (якщо не вказано, інструмент автоматично визначить вихідний файл) diff --git a/state/localize/ur.yaml b/state/localize/ur.yaml index 2820253..d721c12 100644 --- a/state/localize/ur.yaml +++ b/state/localize/ur.yaml @@ -125,6 +125,7 @@ cli: force: موجودہ تراجم کو اوور رائٹ کریں۔ force-key-prefix: چابیاں جن کو اوور رائٹ کرنے کے لیے مجبور کرنے کی ضرورت ہے۔ generate-const: آسانی سے کال کرنے کے لیے گنتی کی قدریں بنائیں + generate-field: آسانی سے کال کرنے کے لیے فیلڈ کی قسم کی گنتی کی قدریں تیار کریں۔ languages: ترجمہ کے لیے ہدف کی زبان کی وضاحت کریں۔ src-file: ماخذ فائل کا ترجمہ کیا جانا ہے (ضروری ہے) src-language: سورس فائل کی زبان (اگر متعین نہ ہو تو ٹول خود بخود سورس فائل کا تعین کرے گا) diff --git a/state/localize/uz.yaml b/state/localize/uz.yaml index 099c024..d378aa7 100644 --- a/state/localize/uz.yaml +++ b/state/localize/uz.yaml @@ -125,6 +125,7 @@ cli: force: Mavjud tarjimalarni qayta yozing force-key-prefix: ustiga yozishga majbur bo'lishi kerak bo'lgan kalitlar generate-const: Oson qo'ng'iroq qilish uchun ro'yxat qiymatlarini yarating + generate-field: Oson qo'ng'iroq qilish uchun maydon turi sanab qiymatlarini yarating languages: Tarjima uchun maqsadli tilni belgilang src-file: Tarjima qilinadigan manba fayl (majburiy) src-language: Manba faylining tili (agar ko'rsatilmagan bo'lsa, vosita avtomatik ravishda manba faylni aniqlaydi) diff --git a/state/localize/vi.yaml b/state/localize/vi.yaml index f123335..a2d4c28 100644 --- a/state/localize/vi.yaml +++ b/state/localize/vi.yaml @@ -125,6 +125,7 @@ cli: force: Ghi đè các bản dịch hiện có force-key-prefix: các phím cần bị buộc phải ghi đè generate-const: Tạo giá trị liệt kê để gọi dễ dàng + generate-field: Tạo các giá trị liệt kê loại trường để gọi dễ dàng languages: Chỉ định ngôn ngữ đích để dịch src-file: Tệp nguồn cần dịch (bắt buộc) src-language: Ngôn ngữ của file nguồn (nếu không được chỉ định, công cụ sẽ tự động xác định file nguồn) diff --git a/state/localize/xh.yaml b/state/localize/xh.yaml index 6161251..3558c82 100644 --- a/state/localize/xh.yaml +++ b/state/localize/xh.yaml @@ -125,6 +125,7 @@ cli: force: Bhala phezu kweenguqulelo ezikhoyo force-key-prefix: izitshixo ezifuna ukunyanzeliswa ukuba zibhalwe ngaphezulu generate-const: Veza amaxabiso okubalwa ukufowuna lula + generate-field: Yenza amaxabiso oluhlu lohlobo lwentsimi ukwenzela ukufowuna lula languages: Chaza ulwimi ekujoliswe kulo ukuze uguqulelwe src-file: Umthombo wefayile eza kuguqulelwa (kuyafuneka) src-language: Ulwimi lwefayile yemvelaphi (ukuba ayichazwanga, isixhobo siya kumisela ngokuzenzekelayo ifayile yemvelaphi) diff --git a/state/localize/yi.yaml b/state/localize/yi.yaml index 1d28eaf..2bf1e80 100644 --- a/state/localize/yi.yaml +++ b/state/localize/yi.yaml @@ -125,6 +125,7 @@ cli: force: איבערשרייבן יגזיסטינג איבערזעצונגען force-key-prefix: שליסלען וואָס דאַרפֿן צו זיין געצווונגען צו זיין אָוווערריטאַן generate-const: דזשענערייט ינומעריישאַן וואַלועס פֿאַר גרינג רופן + generate-field: דזשענערייט פעלד טיפּ ינומעריישאַן וואַלועס פֿאַר גרינג פאַך languages: ספּעציפיצירן די ציל שפּראַך פֿאַר איבערזעצונג src-file: מקור טעקע צו זיין איבערגעזעצט (פארלאנגט) src-language: די שפּראַך פון דער מקור טעקע (אויב ניט ספּעסיפיעד, די געצייַג וועט אויטאָמאַטיש באַשטימען די מקור טעקע) diff --git a/state/localize/yo.yaml b/state/localize/yo.yaml index 905ba27..65b70aa 100644 --- a/state/localize/yo.yaml +++ b/state/localize/yo.yaml @@ -125,6 +125,7 @@ cli: force: Kọ awọn itumọ ti o wa tẹlẹ force-key-prefix: awọn bọtini ti o nilo lati fi agbara mu lati kọ generate-const: Ṣe ina awọn iye kika fun pipe pipe + generate-field: Ṣe ina awọn iye ikawe iru aaye fun pipe pipe languages: Pato ede ibi-afẹde fun itumọ src-file: Faili orisun lati tumọ (beere) src-language: Ede ti faili orisun (ti ko ba ṣe pato, ọpa yoo pinnu faili orisun laifọwọyi) diff --git a/state/localize/zh-chs.yaml b/state/localize/zh-chs.yaml index b244d49..59610d6 100644 --- a/state/localize/zh-chs.yaml +++ b/state/localize/zh-chs.yaml @@ -125,6 +125,7 @@ cli: force: 覆盖已存在的翻译 force-key-prefix: 需要被强制覆盖的 keys generate-const: 生成枚举值,方便调用 + generate-field: 生成字段类型枚举值,方便调用 languages: 指定翻译的目标语言 src-file: 需要被翻译的源文件(必填) src-language: 源文件的语言(如果不指定,则会工具源文件自动判断) diff --git a/state/localize/zh-cht.yaml b/state/localize/zh-cht.yaml index 93e42b2..ed73ad7 100644 --- a/state/localize/zh-cht.yaml +++ b/state/localize/zh-cht.yaml @@ -125,6 +125,7 @@ cli: force: 覆蓋已存在的翻譯 force-key-prefix: 需要被強制覆蓋的 keys generate-const: 產生枚舉值,方便調用 + generate-field: 產生欄位類型枚舉值,方便調用 languages: 指定翻譯的目標語言 src-file: 需要翻譯的原始檔(必填) src-language: 原始檔的語言(如果不指定,則會工具原始檔自動判斷) diff --git a/state/localize/zh-cn.yaml b/state/localize/zh-cn.yaml index b244d49..59610d6 100644 --- a/state/localize/zh-cn.yaml +++ b/state/localize/zh-cn.yaml @@ -125,6 +125,7 @@ cli: force: 覆盖已存在的翻译 force-key-prefix: 需要被强制覆盖的 keys generate-const: 生成枚举值,方便调用 + generate-field: 生成字段类型枚举值,方便调用 languages: 指定翻译的目标语言 src-file: 需要被翻译的源文件(必填) src-language: 源文件的语言(如果不指定,则会工具源文件自动判断) diff --git a/state/localize/zh-hans.yaml b/state/localize/zh-hans.yaml new file mode 100644 index 0000000..90afa64 --- /dev/null +++ b/state/localize/zh-hans.yaml @@ -0,0 +1,296 @@ +cli: + completion: + flags: + no-descriptions: 禁用完成说明 + long: |- + 为指定 shell 的 {{.RootName}} 生成自动完成脚本。 + 有关如何使用生成脚本的详细信息,请参阅每个子命令的帮助 + 可以将命令保存至 .profile 加载项中,以实现自动补全操作(注意:保存完成后或工具更新后,不会自动更新补全相关功能,需要手动更新) + short: 为指定 shell 生成自动完成脚本 + subcommand: + short: 为 {{.Command}} 生成自动完成脚本 + flags: + debug: 输出详细日志 + gen: + add-rpc: + flags: + action: 需要批量添加的行为,具体请查找使用文档 + default-role: 批量生成的接口默认的角色,具体请查看使用文档 + gen-to: 指定生成的 .go 文件的输出位置 + list-option: 列表也的筛选,具体请查找使用文档 + model: 指定模型名,支持 省略 `model` 前缀 + long: 批量生成接口,在.proto 文件中增加针对某个模型的接口 + short: 批量生成接口 + all: + long: 生成本工具所支持的所有的代码 + short: 生成所有代码 + cache: + long: 生成缓存文件,用于业务调用缓存的相关 SDK + short: 生成缓存文件 + cmd: + long: 生成入口文件,用于业务服务的 + short: 生成入口文件 + conf: + long: 生成配置文件模板 + short: 生成配置文件 + dockerignore: + long: 生成.dockerignore 文件,用于 Docker 镜像构建忽略文件管理 + short: 生成.dockerignore 文件 + editorconfig: + long: 生成.editorconfig 文件,用于编辑器的配置 + short: 生成.editorconfig 文件 + flags: + add-proto-files: 需要引入的其它和指定的 .proto 文件不在同一个文件夹内的其它 .proto 文件/文件夹路径,本操作会对 配置文件中已配置的路径进行追加(非覆盖) + go-module-prefix: 对于 .proto 文件 中配置的 go_package 的路径与实际的,可以配置该选项 + input: 指定要生成的 .proto 源文件 + output-path: 对于 .proto 文件 中配置的 go_package 的路径与实际需要生成的路基不一致时,可配置此选项 + overwrite: 对于不会重复生成的内容,强制覆盖已存在的内容 + proto-files: 需要引入的其它和指定的 .proto 文件不在同一个文件夹内的其它 .proto 文件/文件夹路径,本操作是覆盖配置文件中的配置字段的选项 + protoc: '`protoc` 可自行文件路径' + protoc-gen-go: '`protoc-gen-go` 插件路径' + tables-enable_field_created_at: 是否开启数据库 created_at 字段的默认配置生成 + tables-enable_field_deleted_at: 是否开启数据库 deleted_at 字段的默认 + tables-enable_field_id: 开启数据库相关字段的默认配置生成 + tables-enable_field_updated_at: 是否开启数据库 updated_at 字段的默认 + tables-enable_gorm_tag_column: 是否开启数据库相关的 gorm 生成 + gitignote: + long: 生成.gitignore 文件,用于版本控制的忽略文件管理 + short: 生成.gitignore 文件 + golang-lint: + long: 生成.golangci.yml 文件,用于代码质量检测 + short: 生成.golangci.yml 文件 + goreleaser: + long: 生成.goreleaser.yml 文件,用于发布工具的配置 + short: 生成.goreleaser.yml 文件 + impl: + flags: + template-impl-path: ./rpc_path.gen.go 文件生成模板路径 + template-impl-route: ./cmd/route.gen.go 文件生成模板路径 + long: 生成实现文件,用于业务服务的实现 + short: 生成实现文件 + long: 代码生成器,支持多种模板 + makefile: + long: 生成 Makefile 文件,用于构建工具等相关命令 + short: 生成 Makefile 文件 + mod: + long: 生成 go.mod 文件,用于依赖管理 + short: 生成 go.mod 文件 + pb: + long: 生成.pb.go 文件,用于 .proto 文件的生成,会根据配置自动添加相关的字段标签x + short: 生成.pb.go 文件 + short: 代码生成器 + state: + conf: + long: 生成配置文件读取代码,用于业务服务的配置读取 + short: 生成配置文件读取代码 + flags: + cache: 是否开启缓存相关生成 + config: 是否生成配置相关的代码 + i18n: 是否开启多语言相关联生成(生成仅包含state 初始化等内容,不包含多语言的自动翻译,如需自动翻译请使用 {{.Command}}查看详情) + table: 是否开启数据库相关的数据库生成 + i18n: + long: 生成 i18n 相关的代码,用于多语言国际化的调用 + short: 生成 i18n 相关的代码 + long: 生成 state 的所有相关功能,用于业务服务的有状态的资源或静态资源管理 + short: 生成 state 的所有相关功能 + table: + long: 生成 state.table 相关的代码,用于服务启动时对数据库的连接、表的初始化 + short: 生成 state.table 相关的代码 + table: + long: 生成 table 的所有相关功能,用于业务服务的有状态的资源或静态资源管理 + short: 生成 table 的所有相关功能 + group: + gen: 代码生成 + help: + additional_commands: 附加命令 + aliases: 命令别名 + available_commands: 支持的命令 + command: 命令 + flags: 参数 + get_info: 来获取更详细的信息 + global_flags: 全局参数 + long: 为应用程序中的任何命令提供使用说明。 + short: 有关任何命令的使用说明 + usage: '{{.Name}} 的使用说明' + use: 使用 + i18n: + long: 多语言国际化相关工具包 + short: 多语言国际化相关工具包 + support: + flags: + language: 指定展示的语言,否则会使用语言代码展示语言 + long: 列出所有支持的语言列表 + short: 支持的语言清单 + tran: + flags: + all-language: 翻译所有支持的语言(如果为 true 则 languages 标记失效) + force: 覆盖已存在的翻译 + force-key-prefix: 需要被强制覆盖的 keys + generate-const: 生成枚举值,方便调用 + generate-field: 生成字段类型枚举值,方便调用 + languages: 指定翻译的目标语言 + src-file: 需要被翻译的源文件(必填) + src-language: 源文件的语言(如果不指定,则会工具源文件自动判断) + translator: + google-free: Google 网页翻译 + usage: 翻译通道:支持类型 {{range $key,$value := .Type}}{{$key}}:{{$value}}{{end}} + long: 通过某一个源多语言文件还以为其它语言相同格式的文件 + short: 翻译 + long: 一个适合懒人工具集,包含基于 'proto' 的后端框架、常用模板,以及多语言翻译 + short: 一个适合懒人工具集 + sync: + flags: + password: 用于请求校验的密码 + template-path: 模板同步路径 + username: 用于请求校验的用户名 + long: 从远端同步配置,并且合并到本地配置中,同步时支持同时同步模板文件(如果配置了的话) + short: 从远端同步配置 + up-mod: + flags: + goproxy: 指定 goproxy 地址,如果没有则会使用环境变量中的第一个 + long: 更新 go.mod 文件种的依赖版本 + short: 更新 go.mod 文件 +lang: + af: 南非荷兰语 + ak: 契维语(阿坎语) + am: 阿姆哈拉语 + ar: 阿拉伯语 + as: 阿萨姆语 + ay: 艾马拉语 + az: 阿塞拜疆语 + be: 白俄罗斯语 + bg: 保加利亚语 + bho: 博杰普尔语 + bm: 班巴拉语 + bn: 孟加拉文 + bs: 波斯尼亚语 + ca: 加泰罗尼亚语 + ceb: 宿务语 + ckb: 库尔德语(索拉尼) + co: 科西嘉语 + cs: 捷克语 + cy: 威尔士语 + da: 丹麦语 + de: 德语 + doi: 多格来语 + dv: 迪维希语 + ee: 埃维语 + el: 希腊文 + en: 英语 + eo: 世界语 + es: 西班牙语 + et: 爱沙尼亚语 + eu: 巴斯克语 + fa: 波斯语 + fi: 芬兰语 + fil: 菲律宾语(塔加拉语) + fr: 法语 + fy: 弗里斯兰语 + ga: 爱尔兰语 + gd: 苏格兰盖尔语 + gl: 加利西亚语 + gn: 瓜拉尼人 + gom: 贡根语 + gu: 古吉拉特文 + ha: 豪萨语 + haw: 夏威夷语 + he: 希伯来语 + hi: 印地语 + hmn: 苗语 + hr: 克罗地亚语 + ht: 海地克里奥尔语 + hu: 匈牙利语 + hy: 亚美尼亚文 + id: 印度尼西亚语 + ig: 伊博语 + ilo: 伊洛卡诺语 + is: 冰岛语 + it: 意大利语 + iw: 希伯来语 + ja: 日语 + jv: 爪哇语 + jw: 爪哇语 + ka: 格鲁吉亚语 + kk: 哈萨克语 + km: 高棉语 + kn: 卡纳达文 + ko: 韩语 + kri: 克里奥尔语 + ku: 库尔德语 + ky: 吉尔吉斯语 + la: 拉丁文 + lb: 卢森堡语 + lg: 卢干达语 + ln: 林格拉语 + lo: 老挝语 + lt: 立陶宛语 + lus: 米佐语 + lv: 拉脱维亚语 + mai: 迈蒂利语 + mg: 马尔加什语 + mi: 毛利语 + mk: 马其顿语 + ml: 马拉雅拉姆文 + mn: 蒙古文 + mni-mtei: 梅泰语(曼尼普尔语) + mr: 马拉地语 + ms: 马来语 + mt: 马耳他语 + my: 缅甸语 + ne: 尼泊尔语 + nl: 荷兰语 + "no": 挪威语 + nso: 塞佩蒂语 + ny: 尼杨扎语(齐切瓦语) + om: 奥罗莫语 + or: 奥里亚语(奥里亚) + pa: 旁遮普语 + pl: 波兰语 + ps: 普什图语 + pt: 葡萄牙语(巴西) + pt-br: 葡萄牙语(巴西) + qu: 克丘亚语 + ro: 罗马尼亚语 + ru: 俄语 + rw: 卢旺达语 + sa: 梵语 + sd: 信德语 + si: 僧伽罗语 + sk: 斯洛伐克语 + sl: 斯洛文尼亚语 + sm: 萨摩亚语 + sn: 修纳语 + so: 索马里语 + sq: 阿尔巴尼亚语 + sr: 塞尔维亚语 + st: 塞索托语 + su: 巽他语 + sv: 瑞典语 + sw: 斯瓦希里语 + ta: 泰米尔语 + te: 泰卢固语 + tg: 塔吉克语 + th: 泰语 + ti: 蒂格尼亚语 + tk: 土库曼语 + tl: 塔加路语(菲律宾语) + tr: 土耳其语 + ts: 宗加语 + tt: 鞑靼语 + ug: 维吾尔语 + uk: 乌克兰语 + ur: 乌尔都语 + uz: 乌兹别克语 + vi: 越南语 + xh: 班图语 + yi: 意第绪语 + yo: 约鲁巴语 + zh: 中文 + zh-chs: 中文(简体) + zh-cht: 中文(简体) + zh-cn: 中文(简体) + zh-hk: 中文(香港) + zh-mo: 中文(澳门) + zh-sg: 中文(新加坡) + zh-tw: 中文(台湾) + zu: 祖鲁语 diff --git a/state/localize/zh-hk.yaml b/state/localize/zh-hk.yaml index 93e42b2..ed73ad7 100644 --- a/state/localize/zh-hk.yaml +++ b/state/localize/zh-hk.yaml @@ -125,6 +125,7 @@ cli: force: 覆蓋已存在的翻譯 force-key-prefix: 需要被強制覆蓋的 keys generate-const: 產生枚舉值,方便調用 + generate-field: 產生欄位類型枚舉值,方便調用 languages: 指定翻譯的目標語言 src-file: 需要翻譯的原始檔(必填) src-language: 原始檔的語言(如果不指定,則會工具原始檔自動判斷) diff --git a/state/localize/zh-mo.yaml b/state/localize/zh-mo.yaml index 93e42b2..ed73ad7 100644 --- a/state/localize/zh-mo.yaml +++ b/state/localize/zh-mo.yaml @@ -125,6 +125,7 @@ cli: force: 覆蓋已存在的翻譯 force-key-prefix: 需要被強制覆蓋的 keys generate-const: 產生枚舉值,方便調用 + generate-field: 產生欄位類型枚舉值,方便調用 languages: 指定翻譯的目標語言 src-file: 需要翻譯的原始檔(必填) src-language: 原始檔的語言(如果不指定,則會工具原始檔自動判斷) diff --git a/state/localize/zh-sg.yaml b/state/localize/zh-sg.yaml index 93e42b2..ed73ad7 100644 --- a/state/localize/zh-sg.yaml +++ b/state/localize/zh-sg.yaml @@ -125,6 +125,7 @@ cli: force: 覆蓋已存在的翻譯 force-key-prefix: 需要被強制覆蓋的 keys generate-const: 產生枚舉值,方便調用 + generate-field: 產生欄位類型枚舉值,方便調用 languages: 指定翻譯的目標語言 src-file: 需要翻譯的原始檔(必填) src-language: 原始檔的語言(如果不指定,則會工具原始檔自動判斷) diff --git a/state/localize/zh-tw.yaml b/state/localize/zh-tw.yaml index 93e42b2..ed73ad7 100644 --- a/state/localize/zh-tw.yaml +++ b/state/localize/zh-tw.yaml @@ -125,6 +125,7 @@ cli: force: 覆蓋已存在的翻譯 force-key-prefix: 需要被強制覆蓋的 keys generate-const: 產生枚舉值,方便調用 + generate-field: 產生欄位類型枚舉值,方便調用 languages: 指定翻譯的目標語言 src-file: 需要翻譯的原始檔(必填) src-language: 原始檔的語言(如果不指定,則會工具原始檔自動判斷) diff --git a/state/localize/zh.yaml b/state/localize/zh.yaml index 7d5998d..d0162d4 100644 --- a/state/localize/zh.yaml +++ b/state/localize/zh.yaml @@ -105,6 +105,7 @@ cli: all-language: 翻译所有支持的语言(如果为 true 则 languages 标记失效) languages: 指定翻译的目标语言 generate-const: 生成枚举值,方便调用 + generate-field: 生成字段类型枚举值,方便调用 translator: usage: 翻译通道:支持类型 {{range $key,$value := .Type}}{{$key}}:{{$value}}{{end}} google-free: Google 网页翻译 diff --git a/state/localize/zu.yaml b/state/localize/zu.yaml index b169fc0..d917e9b 100644 --- a/state/localize/zu.yaml +++ b/state/localize/zu.yaml @@ -125,6 +125,7 @@ cli: force: Bhala phezu kokuhumusha okukhona force-key-prefix: okhiye abadinga ukuphoqwa ukuthi babhalwe ngaphezulu generate-const: Khiqiza amanani okubala ukuze uthole ukushaya okulula + generate-field: Khiqiza amanani ezibalo ohlobo lwenkundla ukuze kube lula ukushaya languages: Cacisa ulimi okuqondiwe kulo ukuze kuhunyushwe src-file: Ifayela elingumthombo elizohunyushwa (kuyadingeka) src-language: Ulimi lwefayela elingumthombo (uma lungacacisiwe, ithuluzi lizonquma ngokuzenzakalelayo ifayela elingumthombo) From eb79eeca5043a8af6dfba1ce33a73cd6ae9f6c16 Mon Sep 17 00:00:00 2001 From: luoxin Date: Fri, 23 Aug 2024 15:16:54 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=8F=A6=E4=B8=80=E7=A7=8D=E9=A3=8E?= =?UTF-8?q?=E6=A0=BC=E7=9A=84=20i18n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli/i18n/tran.go | 4 +--- codegen/generate_i18n.go | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cli/i18n/tran.go b/cli/i18n/tran.go index d05fbdb..15f3a72 100644 --- a/cli/i18n/tran.go +++ b/cli/i18n/tran.go @@ -259,9 +259,7 @@ var tranCmd = &cobra.Command{ log.Errorf("err:%v", err) return err } - } - - if state.Config.I18n.GenerateField { + } else if state.Config.I18n.GenerateField { dstLocalize, err := i18n.LoadLocalize(c.SrcFile, c.Localizer) if err != nil { log.Errorf("err:%v", err) diff --git a/codegen/generate_i18n.go b/codegen/generate_i18n.go index e49978e..2d977e4 100644 --- a/codegen/generate_i18n.go +++ b/codegen/generate_i18n.go @@ -509,9 +509,9 @@ func GenerateI18n(pb *PbPackage) (err error) { return nil } -var I18nFieldLastTemplate = "type i8nTag{{ ToCamel .Keys }} string\n\nfunc (p i8nTag{{ ToCamel .Keys }}) Key() string {\n return `{{ .Keys }}`\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) String() string {\n return `{{ .Keys }}`\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) GoString() string {\n return `{{ .Keys }}`\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) Tran(lang string, args ...any) string {\n return Tran(lang, `{{ .Keys }}`, args...)\n}\n" +var I18nFieldLastTemplate = "type i8nTag{{ ToCamel .Keys }} string\n\nfunc (p i8nTag{{ ToCamel .Keys }}) Key() string {\n return `{{ .Keys }}`\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) String() string {\n return p.Key()\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) Tran(lang string, args ...any) string {\n return Tran(lang, p.Key(), args...)\n}\n" -var I18NFieldMiddleTemplate = "type i8nTag{{ ToCamel .Keys }} struct { {{ range $key, $value := .Subs}}\n\t// {{ $.Keys }}.{{ $value }}\n\t{{ ToCamel $value }}\ti8nTag{{ ToCamel $.Keys }}{{ ToCamel $value }}{{end}}\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) Key() string {\n return `{{ .Keys }}`\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) String() string {\n return `{{ .Keys }}`\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) Tran(lang string, args ...any) string {\n return Tran(lang, `{{ .Keys }}`, args...)\n}\n" +var I18NFieldMiddleTemplate = "type i8nTag{{ ToCamel .Keys }} struct { {{ range $key, $value := .Subs}}\n\t// {{ $.Keys }}.{{ $value }}\n\t{{ ToCamel $value }}\ti8nTag{{ ToCamel $.Keys }}{{ ToCamel $value }}{{end}}\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) Key() string {\n return `{{ .Keys }}`\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) String() string {\n return p.Key()\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) Tran(lang string, args ...any) string {\n return Tran(lang, p.Key(), args...)\n}\n\nfunc (p i8nTag{{ ToCamel .Keys }}) TranWithSuffix(lang string, suffix string, args ...any) string {\n return Tran(lang, p.Key()+\".\"+suffix, args...)\n}\n" var I18NFieldFirstTemplate = `var I18nTag{{ ToCamel .Keys }} struct { {{ range $key, $value := .Subs}} // {{ $value }}