- Score:
+ {{ t('page.quest.score') }}
{{ data.answer.review.score }}
- by {{ data.answer.review.reviewer.name }} at
- {{ d(data.answer.review.updatedAt, fullDate) }}
URL.createObjectURL(file);
stripe
:stripe-color="data.answer?.final ? 'success' : 'primary'"
>
-
Submission
+
{{ t('page.quest.submission') }}
URL.createObjectURL(file);
v-model="answer"
:label="tKey(data, 'question').value"
:disabled="uploading || data.answer?.final"
- placeholder="Your answer"
+ :placeholder="t('page.quest.your_answer')"
:required-mark="data.textRequired"
:clearable="!!data.answer?.text"
:clear-value="data.answer?.text || ''"
@@ -216,7 +222,7 @@ const createImageURL = (file: File) => URL.createObjectURL(file);
:type="textType[data.textType]"
:messages="[
t(`enums.text_type.${data.textType}`),
- data.textRequired ? 'Required Answer' : ''
+ data.textRequired ? t('page.quest.required_answer') : ''
]"
>
@@ -247,15 +253,18 @@ const createImageURL = (file: File) => URL.createObjectURL(file);
file-types="jpg,png,jpeg"
/>
- Last update:
- {{ d(data.answer.updatedAt, fullDate) }}
- by {{ data.answer.member.name }}
+ {{
+ t('page.quest.last_update', {
+ date: d(data.answer.updatedAt, fullDate),
+ name: data.answer.member.name
+ })
+ }}
URL.createObjectURL(file);
"
:loading="uploading"
@click="submit"
- >Update{{ t('page.common.update_btn') }}
- Your final answer has already been submitted!
+ {{ t('page.quest.already_submitted') }}
diff --git a/app/pages/hunt/[huntSlug]/diashow.vue b/app/pages/hunt/[huntSlug]/diashow.vue
index 068ff0f..1582d2f 100644
--- a/app/pages/hunt/[huntSlug]/diashow.vue
+++ b/app/pages/hunt/[huntSlug]/diashow.vue
@@ -54,7 +54,7 @@ const { data, refresh, error } = await useFetch(`/api/hunt/${id}/diashow`, {
useHead({
title: t('layouts.two_title', {
title: data.value?.name || name,
- subtitle: 'Diashow'
+ subtitle: t('pages.diashow.head')
})
});
@@ -92,28 +92,29 @@ titleStore.title = data.value?.name;
v-else-if="error"
class="flex h-full w-full flex-col items-center justify-center text-center text-2xl"
>
-
Answers are not revealed yet, please wait until the end!
+
{{
+ t('pages.common.not_revealed')
+ }}
{{
error
}}Back to Hunt{{ t('pages.common.back_to_hunt') }}
- Answers are not revealed yet, please wait until the end!{{
+ t('pages.common.not_revealed')
+ }}Back to Hunt{{ t('pages.common.back_to_hunt') }}
diff --git a/app/pages/hunt/[huntSlug]/index.vue b/app/pages/hunt/[huntSlug]/index.vue
index 57b1cf9..c862cc0 100644
--- a/app/pages/hunt/[huntSlug]/index.vue
+++ b/app/pages/hunt/[huntSlug]/index.vue
@@ -46,9 +46,9 @@ async function invite() {
{{ data ? tKey(data, 'name') : name }}
- Total points: {{ data!!.totalScore }}
+ {{
+ t('page.hunt.total_points', data!!.totalScore)
+ }}
Refresh{{ t('page.common.refresh') }}
Showcase{{ t('page.hunt.showcase') }}
Diashow{{ t('page.hunt.diashow') }}
All pictures{{ t('page.hunt.all_pictures') }}
Admin{{ t('page.common.admin') }}Teams{{ t('page.hunt.teams') }}
@@ -110,22 +110,34 @@ async function invite() {
:title="data ? tKey(data, 'name').value : name"
/>
- Start:
- {{ d(data.start, fullDate) }}
+ {{
+ t('page.home.start', {
+ start: d(data.start, fullDate)
+ })
+ }}
- End:
- {{ d(data.end, fullDate) }}
+ {{
+ t('page.home.end', {
+ start: d(data.end, fullDate)
+ })
+ }}
- {{ data._count.teams }} teams joined{{
- data.ownTeam !== null ? ', just like you' : ', unlike you'
- }}!
+ {{
+ t(
+ data.ownTeam !== null
+ ? 'page.hunt.team_count_joined'
+ : 'page.hunt.team_count',
+ data._count.teams
+ )
+ }}
- Your team: {{ data.ownTeam.name }}
+ {{ t('page.hunt.your_team') }}
+ {{ data.ownTeam.name }}
Invite:
+ >{{ t('page.hunt.invite') }}
@@ -138,10 +150,10 @@ async function invite() {
color="primary"
class="mb-16 mt-8"
>
- Join this hunt!
- To join this hunt you need to join or create a team:
+ {{ t('page.hunt.join_this_hunt') }}
+ {{
+ t('page.hunt.login_to_join')
+ }}
@@ -151,12 +163,14 @@ async function invite() {
color="info"
icon="login"
:to="$localePath(`/login?to=/hunt/${tSluggy(data).value}`)"
- >Login first{{ t('page.common.login_first') }}
- Hide answers
+ {{
+ t('page.hunt.hide_answers')
+ }}
Open{{ t('page.common.open') }}
Admin ({{ quest.unreviewed || 0 }} unreviewed){{
+ t('page.hunt.admin_unreviewed', quest.unreviewed || 0)
+ }}
Quests not revealed yet!
- Soon all {{ data._count.quests }} quests will be
- revealed!
+ >{{ t('page.hunt.quest_not_revealed') }}
+ {{
+ t('page.hunt.quest_soon_reveal', data._count.quests)
+ }}
{{ t(parseError(error)) }}
- Back home
+ {{
+ t('page.common.back_home')
+ }}
diff --git a/app/pages/hunt/[huntSlug]/pictures.vue b/app/pages/hunt/[huntSlug]/pictures.vue
index 88ff2d6..f6a9cb8 100644
--- a/app/pages/hunt/[huntSlug]/pictures.vue
+++ b/app/pages/hunt/[huntSlug]/pictures.vue
@@ -67,7 +67,7 @@ const { data, refresh, error } = await useFetch(`/api/hunt/${id}/diashow`, {
useHead({
title: t('layouts.two_title', {
title: hasKey(data.value, 'name') ? tKey(data.value!, 'name').value : name,
- subtitle: 'Diashow'
+ subtitle: t('pages.pictures.head')
})
});
@@ -95,35 +95,36 @@ titleStore.title = data.value ? tKey(data.value, 'name').value : undefined;
v-if="data.count <= 0"
color="warning"
class="sm:col-span-2 md:col-span-3 lg:col-span-4"
- >No pictures has been submitted yet :({{ t('pages.common.no_pictures') }}
- Answers are not revealed yet, please wait until the end!
+ {{
+ t('pages.common.not_revealed')
+ }}
{{
error
}}Back to Hunt{{ t('pages.common.back_to_hunt') }}
- Answers are not revealed yet, please wait until the end!{{
+ t('pages.common.not_revealed')
+ }}Back to Hunt{{ t('pages.common.back_to_hunt') }}
diff --git a/app/pages/hunt/[huntSlug]/showcase.vue b/app/pages/hunt/[huntSlug]/showcase.vue
index 1711cf5..299b5dc 100644
--- a/app/pages/hunt/[huntSlug]/showcase.vue
+++ b/app/pages/hunt/[huntSlug]/showcase.vue
@@ -265,7 +265,7 @@ const columns = leaderboardColumns.map((c) =>
>Back to Hunt{{ t('pages.common.back_to_hunt') }}
diff --git a/app/pages/profile.vue b/app/pages/profile.vue
index acd97a9..4c4adfc 100644
--- a/app/pages/profile.vue
+++ b/app/pages/profile.vue
@@ -43,8 +43,7 @@ async function submitProfile() {
await fetch();
} catch (e) {
if (e instanceof Error && 'statusCode' in e && e.statusCode === 409) {
- // ToDo: i18n
- profileError.value = 'Email already exists!';
+ profileError.value = t('auth.conflict');
} else {
profileError.value = parseError(e);
}
@@ -72,8 +71,7 @@ async function submitPassword() {
password.old = '';
} catch (e) {
if (e instanceof Error && 'statusCode' in e && e.statusCode === 404) {
- // ToDo: i18n
- passwordError.value = 'Old password incorrect!';
+ passwordError.value = t('auth.old_invalid');
} else {
passwordError.value = parseError(e);
}
@@ -91,7 +89,7 @@ async function submitPassword() {
Update{{ t('page.common.update_btn') }}
@@ -143,8 +141,8 @@ async function submitPassword() {
v-model="password.old"
class="w-full"
:type="isPasswordVisible.value ? 'text' : 'password'"
- label="Old password"
- :placeholder="t('auth.password')"
+ :label="t('pages.profile.old_password')"
+ :placeholder="t('pages.profile.old_password')"
autocomplete="current-password"
:minlength="8"
required
@@ -181,7 +179,7 @@ async function submitPassword() {
v-model="password.password"
class="w-full"
:type="isPasswordVisible.value ? 'text' : 'password'"
- label="New password"
+ :label="t('pages.profile.new_password')"
:placeholder="t('auth.password')"
autocomplete="current-password"
:minlength="8"
@@ -236,7 +234,7 @@ async function submitPassword() {