diff --git a/app/lang/de.json b/app/lang/de.json index 3e0768f..e175ee5 100644 --- a/app/lang/de.json +++ b/app/lang/de.json @@ -13,7 +13,8 @@ "register": "Registrieren", "register_instead": "Stattdessen registrieren", "reset": "Zurücksetzen", - "showPassword": "Passwort einblenden" + "showPassword": "Passwort einblenden", + "old_invalid": "Altes Passwort inkorrekt!" }, "enums": { "text_type": { @@ -42,6 +43,17 @@ "en": "Englisch" }, "page": { + "common": { + "update_btn": "Updaten", + "back_to_hunt": "Zurück zum Hunt", + "no_pictures": "Es wurden noch keine Bilder abgeschickt :(", + "not_revealed": "Antworten sind noch nicht aufgedeckt, bitte warte bis zum Ende des Hunt!", + "admin": "Admin", + "refresh": "Aktualisieren", + "login_first": "Erst anmelden", + "open": "Öffnen", + "back_home": "Zurück zur Startseite" + }, "home": { "click_hunt_below_to_join": "Klick auf einen Hunt um ihm beizutreten!", "end": "Ende: {start}", @@ -76,6 +88,51 @@ "description": "Beschreibung", "score": "Punkte" } + }, + "profile": { + "old_password": "Altes Passwort", + "new_password": "Neues Passwort", + "uploaded_pictures": "Hochgeladene Bilder", + "no_pictures": "Noch keine Bilder hochgeladen." + }, + "pictures": { + "head": "Bilderwand" + }, + "diashow": { + "head": "Diashow" + }, + "quest": { + "already_finalized": "Antwort ist bereits finalisiert, keine Änderung erlaubt!", + "conflict": "Konflikt: Bitte aktualisiere", + "extra_points": "Extrapunkte:", + "review": "Bewertung", + "score": "Punkte:", + "reviewed_by": "von {name} am {date}", + "last_update": "Letztes Update: {date} von {name}", + "submission": "Einreichung", + "your_answer": "Deine Antwort", + "required_answer": "Erforderliche Antwort", + "finalize": "Antwort finalisieren", + "already_submitted": "Deine Antwort wurde bereits übermittelt!", + "finalize_explain": "Dies gibt den Admins die Möglichkeit deine Antwort zu bewerten und dir Punkte zu geben. Du kannst deine Antwort anschließend nicht mehr ändern!" + }, + "hunt": { + "total_points": "Punktestand: {score}", + "showcase": "Showcase", + "diashow": "Diashow", + "all_pictures": "Bilderwand", + "teams": "Teams", + "team_count": "Keine Team beigetreten, so wie du! | Ein Team ist beigetreten, du noch nicht! | {count} Teams sind beigetreten, du noch nicht!", + "team_count_joined": "Keine Team beigetreten, so wie du! | Ein Team ist beigetreten, du auch! | {count} Teams sind beigetreten, du auch!", + "your_team": "Dein Team:", + "invite": "Einladen:", + "join_this_hunt": "Trete diesem Hunt bei!", + "login_to_join": "Um diesem Hunt beizutreten suche oder erstelle ein Team:", + "hide_answers": "Antworten verstecken", + "no_picture_uploaded": "Kein Bild hochgeladen", + "admin_unreviewed": "Admin ({count} unbewertet)", + "quest_not_revealed": "Quests wurden noch nicht aufgedeckt!", + "quest_soon_reveal": "Bald werden alle {count} Quests aufgedeckt!" } }, "validation": { diff --git a/app/lang/en.json b/app/lang/en.json index a37f19e..cb8a7b6 100644 --- a/app/lang/en.json +++ b/app/lang/en.json @@ -13,7 +13,8 @@ "register": "Register", "register_instead": "Register instead", "reset": "Reset", - "showPassword": "Show password" + "showPassword": "Show password", + "old_invalid": "Old password incorrect!" }, "enums": { "text_type": { @@ -42,6 +43,17 @@ "en": "English" }, "page": { + "common": { + "update_btn": "Update", + "back_to_hunt": "Back to Hunt", + "no_pictures": "No pictures has been submitted yet :(", + "not_revealed": "Answers are not revealed yet, please wait until the end!", + "admin": "Admin", + "refresh": "Refresh", + "login_first": "Login first", + "open": "Open", + "back_home": "Back home" + }, "home": { "click_hunt_below_to_join": "Click on a hunt below and join them!", "end": "End: {start}", @@ -76,6 +88,51 @@ "description": "Description", "score": "Score" } + }, + "profile": { + "old_password": "Old password", + "new_password": "New password", + "uploaded_pictures": "Uploaded pictures", + "no_pictures": "No pictures uploaded yet." + }, + "pictures": { + "head": "Picture wall" + }, + "diashow": { + "head": "Diashow" + }, + "quest": { + "already_finalized": "Answer is already finalized, no update allowed!", + "conflict": "Conflict: Please refresh", + "extra_points": "Extra points:", + "review": "Review", + "score": "Score:", + "reviewed_by": "by {name} at {date}", + "last_update": "Last update: {date} by {name}", + "submission": "Submission", + "your_answer": "Your answer", + "required_answer": "Required Answer", + "finalize": "Finalize answer", + "already_submitted": "Your final answer has already been submitted!", + "finalize_explain": "This allows the admins to review your answer and give you points. You cannot change your answer afterwards!" + }, + "hunt": { + "total_points": "Total points: {score}", + "showcase": "Showcase", + "diashow": "Diashow", + "all_pictures": "All pictures", + "teams": "Teams", + "team_count": "No teams joined, just like you! | One team joined, unlike you! | {count} teams joined, unlike you!", + "team_count_joined": "No teams joined, just like you! | One team joined, just like you! | {count} teams joined, just like you!", + "your_team": "Your team:", + "invite": "Invite:", + "join_this_hunt": "Join this hunt!", + "login_to_join": "To join this hunt you need to join or create a team:", + "hide_answers": "Hide answers", + "no_picture_uploaded": "No picture uploaded", + "admin_unreviewed": "Admin ({count} unreviewed)", + "quest_not_revealed": "Quests not revealed yet!", + "quest_soon_reveal": "Soon all {count} quests will be revealed!" } }, "validation": { diff --git a/app/pages/hunt/[huntSlug]/[questSlug]/admin.vue b/app/pages/hunt/[huntSlug]/[questSlug]/admin.vue index 848f7da..8132450 100644 --- a/app/pages/hunt/[huntSlug]/[questSlug]/admin.vue +++ b/app/pages/hunt/[huntSlug]/[questSlug]/admin.vue @@ -45,7 +45,7 @@ titleStore.title = data.value ? tKey(data.value, 'title').value : undefined; `/hunt/${data ? tSluggy(data.hunt).value : sluggy(huntSlug!)}` ) " - >Back to Hunt{{ t('pages.common.back_to_hunt') }} Refresh URL.createObjectURL(file); `/hunt/${data ? tSluggy(data.hunt).value : sluggy(huntSlug!)}` ) " - >Back to Hunt{{ t('pages.common.back_to_hunt') }} URL.createObjectURL(file); `/hunt/${data?.hunt ? tSluggy(data.hunt).value : sluggy(huntSlug!)}/${data ? tSluggy(data).value : sluggy(questSlug!)}}/admin` ) " - >Admin{{ t('pages.common.admin') }}
@@ -164,21 +164,27 @@ const createImageURL = (file: File) => URL.createObjectURL(file); 🖋: {{ t(`enums.text_type.${data.textType}`) }}

- Extra points: + {{ + t('page.quest.extra_points') + }} {{ tKey(data, 'extraText') }}

- Review + {{ t('page.quest.review') }}

- 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') : '' ]" > 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() { - Uploaded pictures + {{ t('pages.profile.uploaded_pictures') }} - No pictures uploaded yet. + {{ t('pages.profile.no_pictures') }}