mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-18 06:35:27 +01:00
🌐 Add Portuguese Brazilian language support https://github.com/siyuan-note/siyuan/pull/15029
This commit is contained in:
parent
ec21e814b5
commit
a30d13ce1b
6 changed files with 63 additions and 33 deletions
|
|
@ -51,6 +51,7 @@ type DisplayName struct {
|
|||
ItIT string `json:"it_IT"`
|
||||
JaJP string `json:"ja_JP"`
|
||||
PlPL string `json:"pl_PL"`
|
||||
ptBR string `json:"pt_BR"`
|
||||
RuRU string `json:"ru_RU"`
|
||||
ZhCHT string `json:"zh_CHT"`
|
||||
ZhCN string `json:"zh_CN"`
|
||||
|
|
@ -67,6 +68,7 @@ type Description struct {
|
|||
ItIT string `json:"it_IT"`
|
||||
JaJP string `json:"ja_JP"`
|
||||
PlPL string `json:"pl_PL"`
|
||||
ptBR string `json:"pt_BR"`
|
||||
RuRU string `json:"ru_RU"`
|
||||
ZhCHT string `json:"zh_CHT"`
|
||||
ZhCN string `json:"zh_CN"`
|
||||
|
|
@ -83,6 +85,7 @@ type Readme struct {
|
|||
ItIT string `json:"it_IT"`
|
||||
JaJP string `json:"ja_JP"`
|
||||
PlPL string `json:"pl_PL"`
|
||||
ptBR string `json:"pt_BR"`
|
||||
RuRU string `json:"ru_RU"`
|
||||
ZhCHT string `json:"zh_CHT"`
|
||||
ZhCN string `json:"zh_CN"`
|
||||
|
|
@ -205,6 +208,10 @@ func getPreferredReadme(readme *Readme) string {
|
|||
if "" != readme.PlPL {
|
||||
ret = readme.PlPL
|
||||
}
|
||||
case "pt_BR":
|
||||
if "" != readme.ptBR {
|
||||
ret = readme.ptBR
|
||||
}
|
||||
case "ru_RU":
|
||||
if "" != readme.RuRU {
|
||||
ret = readme.RuRU
|
||||
|
|
@ -271,6 +278,10 @@ func GetPreferredName(pkg *Package) string {
|
|||
if "" != pkg.DisplayName.PlPL {
|
||||
ret = pkg.DisplayName.PlPL
|
||||
}
|
||||
case "pt_BR":
|
||||
if "" != pkg.DisplayName.ptBR {
|
||||
ret = pkg.DisplayName.ptBR
|
||||
}
|
||||
case "ru_RU":
|
||||
if "" != pkg.DisplayName.RuRU {
|
||||
ret = pkg.DisplayName.RuRU
|
||||
|
|
@ -337,6 +348,10 @@ func getPreferredDesc(desc *Description) string {
|
|||
if "" != desc.PlPL {
|
||||
ret = desc.PlPL
|
||||
}
|
||||
case "pt_BR":
|
||||
if "" != desc.ptBR {
|
||||
ret = desc.ptBR
|
||||
}
|
||||
case "ru_RU":
|
||||
if "" != desc.RuRU {
|
||||
ret = desc.RuRU
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ func Boot() {
|
|||
readOnly := flag.String("readonly", "false", "read-only mode")
|
||||
accessAuthCode := flag.String("accessAuthCode", "", "access auth code")
|
||||
ssl := flag.Bool("ssl", false, "for https and wss")
|
||||
lang := flag.String("lang", "", "zh_CN/zh_CHT/en_US/fr_FR/es_ES/ja_JP/it_IT/de_DE/he_IL/ru_RU/pl_PL/ar_SA")
|
||||
lang := flag.String("lang", "", "ar_SA/de_DE/en_US/es_ES/fr_FR/he_IL/it_IT/ja_JP/pl_PL/pt_BR/ru_RU/zh_CHT/zh_CN")
|
||||
mode := flag.String("mode", "prod", "dev/prod")
|
||||
flag.Parse()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue