mirror of
https://github.com/spf13/cobra
synced 2024-11-24 22:57:12 +00:00
feat(i18n): add make i18n_extract
and make i18n_merge
Flow is as follows: <add some new i18n.Message in code> make i18n_extract <fill the generated translations/translate.*.toml> make i18n_merge <perhaps delete translations/translate.*.toml> ?
This commit is contained in:
parent
cb76695584
commit
2e90e51710
4 changed files with 21 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -19,6 +19,9 @@ _cgo_export.*
|
||||||
|
|
||||||
_testmain.go
|
_testmain.go
|
||||||
|
|
||||||
|
# Translation files
|
||||||
|
translations/translate.*.toml
|
||||||
|
|
||||||
# Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore
|
# Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore
|
||||||
# swap
|
# swap
|
||||||
[._]*.s[a-w][a-z]
|
[._]*.s[a-w][a-z]
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -33,3 +33,10 @@ install_deps:
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(BIN)
|
rm -rf $(BIN)
|
||||||
|
|
||||||
|
i18n_extract:
|
||||||
|
goi18n extract -outdir translations
|
||||||
|
goi18n merge -outdir translations translations/*
|
||||||
|
|
||||||
|
i18n_merge:
|
||||||
|
goi18n merge -outdir translations translations/*
|
||||||
|
|
|
@ -5,3 +5,7 @@ other = "Error"
|
||||||
[ExclusiveFlagsValidationError]
|
[ExclusiveFlagsValidationError]
|
||||||
description = "error shown when multiple exclusive flags are provided (group flags, offending flags)"
|
description = "error shown when multiple exclusive flags are provided (group flags, offending flags)"
|
||||||
other = "if any flags in the group [%v] are set none of the others can be; %v were all set"
|
other = "if any flags in the group [%v] are set none of the others can be; %v were all set"
|
||||||
|
|
||||||
|
[RunHelpTip]
|
||||||
|
description = "tip shown when a command fails (command path)"
|
||||||
|
other = "Run '%v --help' for usage."
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
[Error]
|
[Error]
|
||||||
description = "prefix of error messages"
|
description = "prefix of error messages"
|
||||||
|
hash = "sha1-7dcb56355a3ddc7ff7e5ccd6522507999ca7f238"
|
||||||
other = "Erreur"
|
other = "Erreur"
|
||||||
|
|
||||||
[ExclusiveFlagsValidationError]
|
[ExclusiveFlagsValidationError]
|
||||||
description = "error shown when multiple exclusive flags are provided (group flags, offending flags)"
|
description = "error shown when multiple exclusive flags are provided (group flags, offending flags)"
|
||||||
|
hash = "sha1-221b98bada52cfc2932f9aa5142b653b46baded6"
|
||||||
other = "les options [%v] sont exclusives, mais les options %v ont été fournies"
|
other = "les options [%v] sont exclusives, mais les options %v ont été fournies"
|
||||||
|
|
||||||
|
[RunHelpTip]
|
||||||
|
description = "tip shown when a command fails (command path)"
|
||||||
|
hash = "sha1-e1d2c4cccd484df365c3249347d5172981929b88"
|
||||||
|
other = "Essayez '%v --help' pour obtenir de l'aide."
|
||||||
|
|
Loading…
Reference in a new issue