From 35eb4c170c899a5e79e2be8dfe3d1098353cbfcd Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Fri, 23 Dec 2022 21:41:46 +0800 Subject: [PATCH] chore(web): translate more strings --- web/app/controllers/add_contest.php | 11 +++++----- web/app/controllers/problem.php | 32 +++++++++++++++++++++-------- web/app/locale/contests/en.php | 1 + web/app/locale/contests/zh-cn.php | 1 + web/app/locale/problems/en.php | 3 +++ web/app/locale/problems/zh-cn.php | 3 +++ 6 files changed, 38 insertions(+), 13 deletions(-) diff --git a/web/app/controllers/add_contest.php b/web/app/controllers/add_contest.php index 72b7776..75dfd82 100644 --- a/web/app/controllers/add_contest.php +++ b/web/app/controllers/add_contest.php @@ -9,7 +9,7 @@ $time_form = new UOJBs4Form('time'); $time_form->addVInput( 'name', 'text', - '比赛标题', + UOJLocale::get('contests::new contest'), 'New Contest', function ($name, &$vdata) { if ($name == '') { @@ -35,7 +35,7 @@ $time_form->addVInput( $time_form->addVInput( 'start_time', 'text', - '开始时间', + UOJLocale::get('contests::start time'), date("Y-m-d H:i:s"), function ($str, &$vdata) { try { @@ -75,7 +75,7 @@ $time_form->handle = function (&$vdata) { $time_form->succ_href = "/contests"; $time_form->runAtServer(); ?> - +
@@ -83,12 +83,13 @@ $time_form->runAtServer();
-

添加比赛

+

+ +

printHTML(); ?>
-
diff --git a/web/app/controllers/problem.php b/web/app/controllers/problem.php index ef90fed..cf6678c 100644 --- a/web/app/controllers/problem.php +++ b/web/app/controllers/problem.php @@ -385,16 +385,26 @@ if (UOJContest::cur()) {
diff --git a/web/app/locale/contests/en.php b/web/app/locale/contests/en.php index 8421782..da44fcb 100644 --- a/web/app/locale/contests/en.php +++ b/web/app/locale/contests/en.php @@ -1,5 +1,6 @@ 'New Contest', 'current or upcoming contests' => 'Current or upcoming contests', 'ended contests' => 'Ended contests', 'back to the contest' => 'Back to the contest', diff --git a/web/app/locale/contests/zh-cn.php b/web/app/locale/contests/zh-cn.php index e09aad0..6adefb6 100644 --- a/web/app/locale/contests/zh-cn.php +++ b/web/app/locale/contests/zh-cn.php @@ -1,5 +1,6 @@ '新建比赛', 'current or upcoming contests' => '正在进行或即将到来的比赛', 'ended contests' => '已结束的比赛', 'back to the contest' => '返回比赛', diff --git a/web/app/locale/problems/en.php b/web/app/locale/problems/en.php index 9522bc4..a7c1884 100644 --- a/web/app/locale/problems/en.php +++ b/web/app/locale/problems/en.php @@ -52,4 +52,7 @@ return [ 'hacks to me' => 'Hacks to me', 'difficulty' => 'Difficulty', 'show difficulty' => 'Show difficulty', + 'tags' => 'Tags', + 'historical score' => 'Historical Score', + 'uploader' => 'Uploader', ]; diff --git a/web/app/locale/problems/zh-cn.php b/web/app/locale/problems/zh-cn.php index 797ed51..580882f 100644 --- a/web/app/locale/problems/zh-cn.php +++ b/web/app/locale/problems/zh-cn.php @@ -52,4 +52,7 @@ return [ 'hacks to me' => '我的被Hack记录', 'difficulty' => '难度', 'show difficulty' => '显示难度', + 'tags' => '标签', + 'historical score' => '历史分数', + 'uploader' => '上传者', ];