Skip to content

Commit c7dc2d4

Browse files
committed
i17097: Implemented more translatable symbols
1 parent 2f0ad98 commit c7dc2d4

File tree

6 files changed

+30
-6
lines changed

6 files changed

+30
-6
lines changed

modules/coreI18n/src/main/key.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,10 @@ object I18nKey:
11421142
val `practice`: I18nKey = "practice:practice"
11431143
val `practiceChess`: I18nKey = "practice:practiceChess"
11441144
val `makesPerfect`: I18nKey = "practice:makesPerfect"
1145+
val `resetMyProgress`: I18nKey = "practice:resetMyProgress"
1146+
val `progressX`: I18nKey = "practice:progressX"
1147+
val `youWillLoseYourPracticeProgress`: I18nKey = "practice:youWillLoseYourPracticeProgress"
1148+
var `signUpToSaveYourProgress`: I18nKey = "practice:signUpToSaveYourProgress"
11451149

11461150
object preferences:
11471151
val `preferences`: I18nKey = "preferences:preferences"

modules/practice/src/main/PracticeUi.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ final class PracticeUi(helpers: Helpers)(
4949
main(cls := "page-menu force-ltr")(
5050
st.aside(cls := "page-menu__menu practice-side")(
5151
i(cls := "fat"),
52-
h1("Practice"),
53-
h2("makes your chess perfect"),
52+
h1(trp.practice()),
53+
h2(trp.makesPerfect()),
5454
div(cls := "progress")(
55-
div(cls := "text")("Progress: ", data.progressPercent, "%"),
55+
div(cls := "text")(trp.progressX(data.progressPercent + '%')),
5656
div(cls := "bar", style := s"width: ${data.progressPercent}%")
5757
),
5858
postForm(action := routes.Practice.reset)(
5959
if ctx.isAuth then
6060
(data.nbDoneChapters > 0).option(
6161
submitButton(
6262
cls := "button ok-cancel-confirm",
63-
title := "You will lose your practice progress!"
64-
)("Reset my progress")
63+
title := trp.youWillLoseYourPracticeProgress.txt()
64+
)(trp.resetMyProgress())
6565
)
66-
else a(href := routes.Auth.signup)("Sign up to save your progress")
66+
else a(href := routes.Auth.signup)(trp.signUpToSaveYourProgress())
6767
)
6868
),
6969
div(cls := "page-menu__content practice-app")(

translation/dest/practice/en-US.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
<string name="practice">Practice</string>
44
<string name="practiceChess">Practice chess</string>
55
<string name="makesPerfect">makes your chess perfect</string>
6+
<string name="resetMyProgress">Reset my progress</string>
7+
<string name="progressX">Progress: %s</string>
8+
<string name="youWillLoseYourPracticeProgress">You will lose your practice progress!</string>
9+
<string name="signUpToSaveYourProgress">Sign up to save your progress</string>
610
</resources>

translation/dest/practice/ru-RU.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
<string name="practice">Практика</string>
44
<string name="practiceChess">Практика шахмат</string>
55
<string name="makesPerfect">повышает Ваш уровень игры</string>
6+
<string name="resetMyProgress">Начать все с начала</string>
7+
<string name="progressX">Пройдено: %s</string>
8+
<string name="youWillLoseYourPracticeProgress">Все ваши успехи обнулятся!</string>
9+
<string name="signUpToSaveYourProgress">Авторизуйтесь для сохранения прогресса</string>
610
</resources>

translation/source/practice.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
<string name="practice">Practice</string>
44
<string name="practiceChess">Practice chess</string>
55
<string name="makesPerfect">makes your chess perfect</string>
6+
<string name="resetMyProgress">Reset my progress</string>
7+
<string name="progressX">Progress: %s</string>
8+
<string name="youWillLoseYourPracticeProgress">You will lose your practice progress!</string>
9+
<string name="signUpToSaveYourProgress">Sign up to save your progress</string>
610
</resources>

ui/@types/lichess/i18n.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2213,6 +2213,14 @@ interface I18n {
22132213
practice: string;
22142214
/** Practice chess */
22152215
practiceChess: string;
2216+
/** Progress: %s */
2217+
progressX: I18nFormat;
2218+
/** Reset my progress */
2219+
resetMyProgress: string;
2220+
/** Sign up to save your progress */
2221+
signUpToSaveYourProgress: string;
2222+
/** You will lose your practice progress! */
2223+
youWillLoseYourPracticeProgress: string;
22162224
};
22172225
preferences: {
22182226
/** Bell notification sound */

0 commit comments

Comments
 (0)