Skip to content

Commit f06c817

Browse files
committed
feat: Implement i18n support for OAuthCallback.vue error messages and button text
1 parent 2638d72 commit f06c817

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

custom/OAuthCallback.vue

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
<div v-if="error" class="py-8 px-4 mx-auto max-w-screen-xl lg:py-16 lg:px-6">
44
<div class="mx-auto max-w-screen-sm text-center">
55
<h1 class="mb-4 text-7xl tracking-tight font-extrabold lg:text-9xl text-lightPrimary dark:text-darkPrimary">
6-
Oops!
6+
{{$t('Oops!')}}
77
</h1>
88
<p class="mb-4 text-3xl tracking-tight font-bold text-gray-900 md:text-4xl dark:text-white">
9-
Authentication Failed
9+
{{$t('Authentication Failed')}}
1010
</p>
1111
<p class="mb-4 text-lg font-light text-gray-500 dark:text-gray-400">
1212
{{ error }}
1313
</p>
1414
<div class="flex justify-center">
15-
<LinkButton to="/login">Back to Login</LinkButton>
15+
<LinkButton to="/login">{{$t('Back to Login')}}</LinkButton>
1616
</div>
1717
</div>
1818
</div>
@@ -26,6 +26,9 @@ import { useUserStore } from '@/stores/user';
2626
import { useRouter, useRoute } from 'vue-router';
2727
import { callAdminForthApi } from '@/utils';
2828
import { Spinner, LinkButton } from '@/afcl';
29+
import { useI18n } from 'vue-i18n';
30+
31+
const { t } = useI18n();
2932
3033
const router = useRouter();
3134
const userStore = useUserStore();
@@ -57,7 +60,7 @@ onMounted(async () => {
5760
error.value = response.error;
5861
}
5962
} else {
60-
error.value = 'Invalid authentication request. Missing required parameters.';
63+
error.value = t('Invalid authentication request. Missing required parameters.');
6164
}
6265
});
6366
</script>

0 commit comments

Comments
 (0)