diff options
author | Sean E. Russell <ser@ser1.net> | 2020-06-21 10:14:18 -0500 |
---|---|---|
committer | Sean E. Russell <ser@ser1.net> | 2020-06-21 10:14:18 -0500 |
commit | b49c7c9a60e2912839c6d6ed1729e7269768d9c8 (patch) | |
tree | af343ccc6989801145afe1d4cb9f2ad21ff9d6cb | |
parent | 23364aa754c836b8a5fbc69adbdbd49abd183a57 (diff) |
Revert to English if jibber_jabber can't detect the language; revert accidental removal of two zh_CN translations.
-rw-r--r-- | cmd/gotop/main.go | 3 | ||||
-rw-r--r-- | translations/dicts/zh_CN.toml | 14 |
2 files changed, 8 insertions, 9 deletions
diff --git a/cmd/gotop/main.go b/cmd/gotop/main.go index 1f9f0a5..9c228b8 100644 --- a/cmd/gotop/main.go +++ b/cmd/gotop/main.go @@ -362,8 +362,7 @@ func run() int { } lang, err := jj.DetectIETF() if err != nil { - fmt.Printf("failed to get language setting from environment: %s\n", err) - return 2 + lang = "en_US" } lang = strings.Replace(lang, "-", "_", -1) // Get the locale from the os diff --git a/translations/dicts/zh_CN.toml b/translations/dicts/zh_CN.toml index acaf7da..8bd65dc 100644 --- a/translations/dicts/zh_CN.toml +++ b/translations/dicts/zh_CN.toml @@ -88,13 +88,13 @@ test="执行测试并返回成功或失败码。" conffile="用于替代缺省参数的配置文件(必须是第一个参数)" list=""" List <devices|layouts|colorschemes|paths|keys> - devices: Prints out device names for filterable widgets - layouts: Lists build-in layouts - colorschemes: Lists built-in colorschemes - paths: List out configuration file search paths - widgets: Widgets that can be used in a layout - keys: Show the keyboard bindings.""" -write="Write out a default config file." + devices: 显示可用于过滤的设备名 + layouts: 列出所有内置布局方案 + colorschemes: 列出所有内置配色方案 + paths: 列出配置文件的搜索路径 + widgets: 所有可被用于布局的组件 + keys: 显示所有热键。""" +write="将当前配置写入缺省配置文件。" [config.err] |