From 63628fdf1ce42a9d29942016f00ef2428601b7e1 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 11 Feb 2022 02:35:24 +0800 Subject: [PATCH] Fix bug for version update hint (#18701) (#18705) * Fix bug for version update hint (#18701) * Add translation for zh-CN Co-authored-by: silverwind --- options/locale/locale_en-US.ini | 1 + options/locale/locale_zh-CN.ini | 7 ++++--- templates/admin/dashboard.tmpl | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 1d0a5a2f0dd1..2fbf7e79bc7f 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -2334,6 +2334,7 @@ first_page = First last_page = Last total = Total: %d +dashboard.new_version_hint = Gitea %s is now available, you are running %s. Check the blog for more details. dashboard.statistic = Summary dashboard.operations = Maintenance Operations dashboard.system_status = System Status diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index e78abd05d579..6d1af6721690 100644 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -673,8 +673,8 @@ last_used=上次使用在 no_activity=没有最近活动 can_read_info=读取 can_write_info=写入 -key_state_desc=7 天内使用过该密钥 -token_state_desc=7 天内使用过该密钥 +key_state_desc=7 天内使用过该密钥 +token_state_desc=7 天内使用过该密钥 principal_state_desc=7 天内使用过该规则 show_openid=在个人信息上显示 hide_openid=在个人信息上隐藏 @@ -855,7 +855,7 @@ watchers=关注者 stargazers=称赞者 forks=派生仓库 pick_reaction=选择你的表情 -reactions_more=再加载 %d +reactions_more=再加载 %d unit_disabled=站点管理员已禁用此仓库单元。 language_other=其它 adopt_search=输入用户名以搜索未被收录的仓库... (留空以查找全部) @@ -2334,6 +2334,7 @@ first_page=首页 last_page=末页 total=总计:%d +dashboard.new_version_hint = Gitea %s 可以更新了,您正在运行 %s。请检查 博客 查看更多详情。 dashboard.statistic=摘要 dashboard.operations=维护操作 dashboard.system_status=系统状态 diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 35f45bd3529c..d9e056973aee 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -5,7 +5,7 @@ {{template "base/alert" .}} {{if .NeedUpdate}}
-

"Gitea {{.RemoteVersion | Str2html}} is now available, you are running {{.AppVer | Str2html}}. Check the blog for more details.

+

{{.i18n.Tr "admin.dashboard.new_version_hint" (.RemoteVersion | Str2html) (AppVer | Str2html)}}

{{end}}