first commit
This commit is contained in:
commit
3553790475
27 files changed
+3839
No files matched your search
@@ -0,0 +1,17 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/lang"
|
||||
)
|
||||
|
||||
// zhHansExtra 补上 Fyne 内置中文包里缺失的条目。
|
||||
// widget.NewSelect 在构造时就会取默认占位符,缺翻译会在日志里刷 Translation failure。
|
||||
const zhHansExtra = `{
|
||||
"(Select one)": {"other": "请选择"}
|
||||
}`
|
||||
|
||||
// installTranslations 在创建窗口前调用,注册补充翻译。
|
||||
func installTranslations() {
|
||||
_ = lang.AddTranslationsForLocale([]byte(zhHansExtra), fyne.Locale("zh-Hans"))
|
||||
}
|
||||
Reference in new issue
Block a user