-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
182 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright (C) 2021-present Rong "Mantle" Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see https://www.gnu.org/licenses/ . | ||
*/ | ||
|
||
export type TResult<T, E> = { ok: true; value?: T } | { ok: false; err?: E } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (C) 2021-present Rong "Mantle" Bao | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see https://www.gnu.org/licenses/ . | ||
*/ | ||
|
||
export function getLocalizedLangName(lang: string): string { | ||
switch (lang) { | ||
case "zh": | ||
return "中文" | ||
case "en": | ||
return "English" | ||
|
||
default: | ||
throw new RangeError(`getLocalizedLangName: unknown language ${lang}`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"typ_h_not_started_intro": "Welcome to Periotris.js AUTOPLAY", | ||
"typ_p_not_started_intro": "In AUTOPLAY, the system takes over game input, and all user key presses and gestures are ignored. This session will not be recorded in play history. Apart from those, it is identical to Normal Mode and observes the same user settings, including map, color scheme and game speed.", | ||
"cap_home": "HOME", | ||
"cap_start": "START", | ||
"cap_retry": "RETRY", | ||
"typ_h_preparing": "Please wait", | ||
"typ_p_preparing": "Generating new unique patterns. The demonstration will start in a few seconds.", | ||
"typ_h_lost": "Ouch...", | ||
"typ_p_lost": "This should not happen. Please report this to the developer.", | ||
"typ_h_won": "Demo complete", | ||
"typ_p_won": "This AUTOPLAY session is over. Feel free to start a new one." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"typ_h_not_started_intro": "Welcome to Periotris.js! Your task: complete the Periodic Table", | ||
"typ_p_not_started_intro": "A/D/S/Swipe: move by one; W/Tap: rotate; Space/Long press: drop", | ||
"cap_home": "HOME", | ||
"cap_start": "START", | ||
"cap_retry": "RETRY", | ||
"typ_h_preparing": "Good luck!", | ||
"typ_p_preparing": "Generating new unique patterns for you. The game will start in a few seconds.", | ||
"typ_h_lost": "Oops...", | ||
"typ_p_lost": "This does not seem to be right. Ready to give it another shot?", | ||
"typ_h_won": "Congrats!", | ||
"typ_p_won": "You finished the game! Don't hesitate to brag about it." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"typ_h_not_started_intro": "欢迎来到 Periotris.js 自动演示模式", | ||
"typ_p_not_started_intro": "在自动演示模式中,系统将接管游戏输入,用户发出的按键与触屏手势无效。本次游玩将不计入历史。除了以上几点,自动演示模式与常规模式相同,并采用相同的用户自定义设置,包括地图、色彩主题和游戏速度。", | ||
"cap_home": "首页", | ||
"cap_start": "开始", | ||
"cap_retry": "重试", | ||
"typ_h_preparing": "请稍候", | ||
"typ_p_preparing": "正在生成新的分割排列。自动演示将马上开始。", | ||
"typ_h_lost": "不好……", | ||
"typ_p_lost": "这不应该发生。请向开发者报告该事件。", | ||
"typ_h_won": "演示完成", | ||
"typ_p_won": "本次自动演示已结束。你可以开始一次新的自动演示。" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"typ_h_not_started_intro": "欢迎来到 Periotris.js !你的任务:拼出化学元素周期表", | ||
"typ_p_not_started_intro": "A/D/S/触屏滑动:移动一格;W/触屏短按:旋转;Space/触屏长按:立即下落", | ||
"cap_home": "首页", | ||
"cap_start": "开始", | ||
"cap_retry": "重试", | ||
"typ_h_preparing": "祝你好运!", | ||
"typ_p_preparing": "正在生成全新的分割排列。游戏将马上开始。", | ||
"typ_h_lost": "糟糕……", | ||
"typ_p_lost": "这种排列方式不正确。再试一次?", | ||
"typ_h_won": "祝贺!", | ||
"typ_p_won": "你成功完成了这次挑战,请尽情欣赏你的杰作吧!" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
b869539
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
periotrisjs – ./
periotrisjs.vercel.app
periotrisjs-csharpermantle.vercel.app
periotrisjs-git-main-csharpermantle.vercel.app