feat(i18n): i18nize everything
This commit is contained in:
@@ -19,7 +19,7 @@ const handleActivateA = () => {
|
||||
}
|
||||
let confirmed = false;
|
||||
confirmationModal.open({
|
||||
text: "Restart game?",
|
||||
text: $t("settings.options.2048.restartConfirmation"),
|
||||
onConfirm: () => {
|
||||
confirmed = true;
|
||||
},
|
||||
@@ -95,7 +95,7 @@ let animating = false;
|
||||
const showRestartModal = () => {
|
||||
let confirmed = false;
|
||||
confirmationModal.open({
|
||||
text: "Game Over!\nRestart?",
|
||||
text: $t("settings.options.2048.gameOver"),
|
||||
onConfirm: () => {
|
||||
confirmed = true;
|
||||
},
|
||||
@@ -179,11 +179,15 @@ onRender((ctx) => {
|
||||
ctx.fillStyle = "#010101";
|
||||
|
||||
// score
|
||||
ctx.fillText("Score:", SCORE_X, SCORE_Y);
|
||||
ctx.fillText(`${$t("settings.options.2048.score")}:`, SCORE_X, SCORE_Y);
|
||||
ctx.fillText(score.toString(), SCORE_X, SCORE_Y + 16);
|
||||
|
||||
// high score
|
||||
ctx.fillText("High:", SCORE_X, HIGH_SCORE_Y);
|
||||
ctx.fillText(
|
||||
`${$t("settings.options.2048.highScore")}:`,
|
||||
SCORE_X,
|
||||
HIGH_SCORE_Y,
|
||||
);
|
||||
ctx.fillText(
|
||||
savedState.value.highScore.toString(),
|
||||
SCORE_X,
|
||||
@@ -500,8 +504,8 @@ useKeyDown((key) => {
|
||||
<template>
|
||||
<CommonButtons
|
||||
:y-offset="confirmationModal.buttonsYOffset"
|
||||
b-label="Cancel"
|
||||
a-label="Restart"
|
||||
:b-label="$t('common.quit')"
|
||||
:a-label="$t('common.restart')"
|
||||
@activate-b="handleActivateB()"
|
||||
@activate-a="handleActivateA()"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user