From 92cca91cce53e7bca351923e1bbb1dbdfe246bd7 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 24 Sep 2022 11:40:26 +0800 Subject: [PATCH] feat: countdowns and friend links locale --- web/app/controllers/index.php | 24 ++++++++++++++++-------- web/app/locale/basic/en.php | 8 ++++++++ web/app/locale/basic/zh-cn.php | 8 ++++++++ 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/web/app/controllers/index.php b/web/app/controllers/index.php index f349a93..1256b3c 100644 --- a/web/app/controllers/index.php +++ b/web/app/controllers/index.php @@ -117,12 +117,14 @@
- 倒计时 +
-

倒计时

+

+ +

-
(无)
+
+ +
- 友情链接 +
-

友情链接

+

+ +

    (无)
+
+ +
diff --git a/web/app/locale/basic/en.php b/web/app/locale/basic/en.php index 15105c8..aa84310 100644 --- a/web/app/locale/basic/en.php +++ b/web/app/locale/basic/en.php @@ -75,6 +75,14 @@ return [ 'refuse to answer' => 'Refuse to answer', 'male' => 'Male', 'female' => 'Female', + 'countdowns' => 'Countdowns', + 'countdown title has begun' => function($title) { + return "$title has begun."; + }, + 'x days until countdown title' => function($title, $days) { + return "$days ".($days <= 1 ? 'day' : 'days')." until $title."; + }, + 'friend links' => 'Friend Links', 'server time' => 'Server Time', 'opensource project' => 'OpenSource Project, modified by S2OJ' ]; diff --git a/web/app/locale/basic/zh-cn.php b/web/app/locale/basic/zh-cn.php index 78435b1..d6e076b 100644 --- a/web/app/locale/basic/zh-cn.php +++ b/web/app/locale/basic/zh-cn.php @@ -75,6 +75,14 @@ return [ 'refuse to answer' => '拒绝回答', 'male' => '男', 'female' => '女', + 'countdowns' => '倒计时', + 'countdown title has begun' => function($title) { + return "$title 已开始。"; + }, + 'x days until countdown title' => function($title, $days) { + return "距离 $title 还有 $days天。"; + }, + 'friend links' => '友情链接', 'server time' => '服务器时间', 'opensource project' => '开源项目,S2OJ 魔改版' ];