Start i18n on static texts

This commit is contained in:
2025-08-21 20:52:59 +02:00
parent 5d1a029a54
commit 7948fed103
9 changed files with 225 additions and 85 deletions
+10 -12
View File
@@ -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() {
<div class="flex flex-col gap-4">
<VaInput
v-model="form.name"
label="Name"
:label="t('auth.name')"
clearable
:clear-value="data.name"
clearable-icon="replay"
@@ -107,7 +105,7 @@ async function submitPassword() {
/>
<VaInput
v-model="form.email"
label="Email"
:label="t('auth.email')"
type="email"
clearable
:clear-value="data.email"
@@ -129,7 +127,7 @@ async function submitPassword() {
color="success"
:disabled="!changed || pending || uploading"
@click="submitProfile"
>Update</VaButton
>{{ t('page.common.update_btn') }}</VaButton
>
</div>
</VaCardContent>
@@ -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() {
</VaCardContent>
</VaCard>
<VaCard stripe stripe-color="primary">
<VaCardTitle>Uploaded pictures</VaCardTitle>
<VaCardTitle>{{ t('pages.profile.uploaded_pictures') }}</VaCardTitle>
<VaCardContent v-if="data && data.uploadedFiles.length > 0">
<VaCarousel
stateful
@@ -266,7 +264,7 @@ async function submitPassword() {
>
</VaCarousel>
</VaCardContent>
<VaCardContent v-else> No pictures uploaded yet. </VaCardContent>
<VaCardContent v-else>{{ t('pages.profile.no_pictures') }}</VaCardContent>
</VaCard>
</div>
</template>