mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-22 16:26:09 +01:00
🌐 Add Turkish support (#16575)
* Add Turkish language in configs * add Turkish localization file * Add Turkish readme file and links * Add Turkish Currency TRY * Turkish Readme Check Links * Add new keys localizations --------- Co-authored-by: Ömer Gürbüz <mhmd.omer.grbz@hotmail.com>
This commit is contained in:
parent
e1e9a0a73b
commit
94dc95be42
24 changed files with 2163 additions and 4 deletions
|
|
@ -490,6 +490,7 @@ const (
|
|||
NumberFormatRUB NumberFormat = "RUB" // 卢布
|
||||
NumberFormatINR NumberFormat = "INR" // 卢比
|
||||
NumberFormatKRW NumberFormat = "KRW" // 韩元
|
||||
NumberFormatKRW NumberFormat = "TRY" // 土耳其里拉
|
||||
NumberFormatCAD NumberFormat = "CAD" // 加拿大元
|
||||
NumberFormatCHF NumberFormat = "CHF" // 瑞士法郎
|
||||
NumberFormatTHB NumberFormat = "THB" // 泰铢
|
||||
|
|
@ -562,6 +563,9 @@ func formatNumber(content float64, format NumberFormat) string {
|
|||
case NumberFormatKRW, "won":
|
||||
p := message.NewPrinter(language.Korean)
|
||||
return p.Sprintf("₩%.0f", content)
|
||||
case NumberFormatTRY, "turkishLira":
|
||||
p := message.NewPrinter(language.Turkish)
|
||||
return p.Sprintf("₺%.2f", content)
|
||||
case NumberFormatCAD, "canadianDollar":
|
||||
p := message.NewPrinter(language.English)
|
||||
return p.Sprintf("CA$%.2f", content)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ type DisplayName struct {
|
|||
PlPL string `json:"pl_PL"`
|
||||
PtBR string `json:"pt_BR"`
|
||||
RuRU string `json:"ru_RU"`
|
||||
TrTR string `json:"tr_TR"`
|
||||
ZhCHT string `json:"zh_CHT"`
|
||||
ZhCN string `json:"zh_CN"`
|
||||
}
|
||||
|
|
@ -72,6 +73,7 @@ type Description struct {
|
|||
PlPL string `json:"pl_PL"`
|
||||
PtBR string `json:"pt_BR"`
|
||||
RuRU string `json:"ru_RU"`
|
||||
TrTR string `json:"tr_TR"`
|
||||
ZhCHT string `json:"zh_CHT"`
|
||||
ZhCN string `json:"zh_CN"`
|
||||
}
|
||||
|
|
@ -90,6 +92,7 @@ type Readme struct {
|
|||
PlPL string `json:"pl_PL"`
|
||||
PtBR string `json:"pt_BR"`
|
||||
RuRU string `json:"ru_RU"`
|
||||
TrTR string `json:"tr_TR"`
|
||||
ZhCHT string `json:"zh_CHT"`
|
||||
ZhCN string `json:"zh_CN"`
|
||||
}
|
||||
|
|
@ -224,6 +227,10 @@ func getPreferredReadme(readme *Readme) string {
|
|||
if "" != readme.RuRU {
|
||||
ret = readme.RuRU
|
||||
}
|
||||
case "tr_TR":
|
||||
if "" != readme.TrTR {
|
||||
ret = readme.TrTR
|
||||
}
|
||||
case "zh_CHT":
|
||||
if "" != readme.ZhCHT {
|
||||
ret = readme.ZhCHT
|
||||
|
|
@ -299,6 +306,10 @@ func GetPreferredName(pkg *Package) string {
|
|||
if "" != pkg.DisplayName.RuRU {
|
||||
ret = pkg.DisplayName.RuRU
|
||||
}
|
||||
case "tr_TR":
|
||||
if "" != pkg.DisplayName.TrTR {
|
||||
ret = pkg.DisplayName.TrTR
|
||||
}
|
||||
case "zh_CHT":
|
||||
if "" != pkg.DisplayName.ZhCHT {
|
||||
ret = pkg.DisplayName.ZhCHT
|
||||
|
|
@ -374,6 +385,10 @@ func getPreferredDesc(desc *Description) string {
|
|||
if "" != desc.RuRU {
|
||||
ret = desc.RuRU
|
||||
}
|
||||
case "tr_TR":
|
||||
if "" != desc.TrTR {
|
||||
ret = desc.TrTR
|
||||
}
|
||||
case "zh_CHT":
|
||||
if "" != desc.ZhCHT {
|
||||
ret = desc.ZhCHT
|
||||
|
|
|
|||
|
|
@ -103,7 +103,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", "", "ar_SA/de_DE/en_US/es_ES/fr_FR/he_IL/it_IT/ja_JP/ko_KR/pl_PL/pt_BR/ru_RU/zh_CHT/zh_CN")
|
||||
lang := flag.String("lang", "", "ar_SA/de_DE/en_US/es_ES/fr_FR/he_IL/it_IT/ja_JP/ko_KR/pl_PL/pt_BR/ru_RU/tr_TR/zh_CHT/zh_CN")
|
||||
mode := flag.String("mode", "prod", "dev/prod")
|
||||
flag.Parse()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue