🌐 Add Portuguese Brazilian language support https://github.com/siyuan-note/siyuan/pull/15029

This commit is contained in:
Daniel 2025-06-15 10:28:22 +08:00
parent ec21e814b5
commit a30d13ce1b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 63 additions and 33 deletions

View file

@ -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