mirror of https://github.com/1Panel-dev/1Panel
feat: Add pt-BR support for i18n (#7261)
parent
e6a772ebfd
commit
7202de6f4c
|
@ -99,11 +99,15 @@ func Init() {
|
|||
_, _ = bundle.LoadMessageFileFS(fs, "lang/en.yaml")
|
||||
_, _ = bundle.LoadMessageFileFS(fs, "lang/zh-Hant.yaml")
|
||||
_, _ = bundle.LoadMessageFileFS(fs, "lang/fa.yaml")
|
||||
_, _ = bundle.LoadMessageFileFS(fs, "lang/pt.yaml")
|
||||
}
|
||||
|
||||
func UseI18nForCmd(lang string) {
|
||||
if lang == "" {
|
||||
lang = "zh"
|
||||
lang = "en"
|
||||
}
|
||||
if lang == "pt-BR" {
|
||||
lang = "pt"
|
||||
}
|
||||
if bundle == nil {
|
||||
Init()
|
||||
|
|
|
@ -16,7 +16,7 @@ import (
|
|||
var language string
|
||||
|
||||
func init() {
|
||||
RootCmd.PersistentFlags().StringVarP(&language, "language", "l", "zh", "Set the language (default is 'zh')")
|
||||
RootCmd.PersistentFlags().StringVarP(&language, "language", "l", "en", "Set the language")
|
||||
}
|
||||
|
||||
var RootCmd = &cobra.Command{
|
||||
|
|
Loading…
Reference in New Issue