mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02: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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue