mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
Localize hard-coded texts (#2044)
* feat(lang): localize some views * feat(lang): an attempt at localizing vuetify (WIP) * feat(lang): localized some more screens * feat(lang): localized some more screens again * feat(lang): hack to localize vuetify * feat(lang): localize data management pages * fix linting errors --------- Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
parent
754d4c3937
commit
f8b8680b45
55 changed files with 695 additions and 393 deletions
|
@ -23,7 +23,7 @@
|
|||
</v-avatar>
|
||||
</div>
|
||||
|
||||
<v-card-title class="headline justify-center pb-1"> Sign In </v-card-title>
|
||||
<v-card-title class="headline justify-center pb-1"> {{ $t('user.sign-in') }} </v-card-title>
|
||||
<v-card-text>
|
||||
<v-form @submit.prevent="authenticate">
|
||||
<v-text-field
|
||||
|
@ -34,7 +34,7 @@
|
|||
autofocus
|
||||
class="rounded-lg"
|
||||
name="login"
|
||||
label="Email or Username"
|
||||
:label="$t('user.email-or-username')"
|
||||
type="text"
|
||||
/>
|
||||
<v-text-field
|
||||
|
@ -46,11 +46,11 @@
|
|||
rounded
|
||||
class="rounded-lg"
|
||||
name="password"
|
||||
label="Password"
|
||||
:label="$t('user.password')"
|
||||
:type="inputType"
|
||||
@click:append="togglePasswordShow"
|
||||
/>
|
||||
<v-checkbox v-model="form.remember" class="ml-2 mt-n2" label="Remember Me"></v-checkbox>
|
||||
<v-checkbox v-model="form.remember" class="ml-2 mt-n2" :label="$t('user.remember-me')"></v-checkbox>
|
||||
<v-card-actions class="justify-center pt-0">
|
||||
<div class="max-button">
|
||||
<v-btn :loading="loggingIn" color="primary" type="submit" large rounded class="rounded-xl" block>
|
||||
|
@ -72,17 +72,17 @@
|
|||
<div
|
||||
v-for="link in [
|
||||
{
|
||||
text: 'Sponsor',
|
||||
text: $t('about.sponsor'),
|
||||
icon: $globals.icons.heart,
|
||||
href: 'https://github.com/sponsors/hay-kot',
|
||||
},
|
||||
{
|
||||
text: 'GitHub',
|
||||
text: $t('about.github'),
|
||||
icon: $globals.icons.github,
|
||||
href: 'https://github.com/hay-kot/mealie',
|
||||
},
|
||||
{
|
||||
text: 'Docs',
|
||||
text: $t('about.docs'),
|
||||
icon: $globals.icons.folderOutline,
|
||||
href: 'https://docs.mealie.io/',
|
||||
},
|
||||
|
@ -103,7 +103,7 @@
|
|||
<v-icon left>
|
||||
{{ $vuetify.theme.dark ? $globals.icons.weatherSunny : $globals.icons.weatherNight }}
|
||||
</v-icon>
|
||||
{{ $vuetify.theme.dark ? "Light Mode" : "Dark Mode" }}
|
||||
{{ $vuetify.theme.dark ? $t('settings.theme.light-mode') : $t('settings.theme.dark-mode') }}
|
||||
</v-btn>
|
||||
</v-container>
|
||||
</template>
|
||||
|
@ -123,7 +123,7 @@ export default defineComponent({
|
|||
const isDark = useDark();
|
||||
|
||||
const router = useRouter();
|
||||
const { $auth } = useContext();
|
||||
const { $auth, i18n } = useContext();
|
||||
|
||||
whenever(
|
||||
() => $auth.loggedIn,
|
||||
|
@ -149,7 +149,7 @@ export default defineComponent({
|
|||
|
||||
async function authenticate() {
|
||||
if (form.email.length === 0 || form.password.length === 0) {
|
||||
alert.error("Please enter your email and password");
|
||||
alert.error(i18n.t("user.please-enter-your-email-and-password") as string);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -168,12 +168,12 @@ export default defineComponent({
|
|||
// if ($axios.isAxiosError(error) && error.response?.status === 401) {
|
||||
// @ts-ignore- see above
|
||||
if (error.response?.status === 401) {
|
||||
alert.error("Invalid Credentials");
|
||||
alert.error(i18n.t("user.invalid-credentials") as string);
|
||||
// @ts-ignore - see above
|
||||
} else if (error.response?.status === 423) {
|
||||
alert.error("Account Locked. Please try again later");
|
||||
alert.error(i18n.t("user.account-locked-please-try-again-later") as string);
|
||||
} else {
|
||||
alert.error("Something Went Wrong!");
|
||||
alert.error(i18n.t("events.something-went-wrong") as string);
|
||||
}
|
||||
}
|
||||
loggingIn.value = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue