Add localization support for various components, including dialogs and views, in English, Spanish, and French. Implemented translations for user profile management, payment processes, and creator functionalities. Updated existing components to utilize the new translation system.
This commit is contained in:
@@ -1,29 +1,11 @@
|
||||
<template>
|
||||
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
|
||||
<h1>
|
||||
{{ $t('paymentConfirmation.failure.title') }}
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
<v-icon size="120" color="error">
|
||||
mdi-close-circle
|
||||
</v-icon>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ $t('paymentConfirmation.failure.message') }}
|
||||
</p>
|
||||
|
||||
<h1>{{ t('title') }}</h1>
|
||||
<p>{{ t('message') }}</p>
|
||||
<div class="card-actions">
|
||||
<button
|
||||
class="action-button"
|
||||
@click="router.push({ path: `/@${creatorUserName}` })"
|
||||
>
|
||||
{{ $t('paymentConfirmation.success.continue') }}
|
||||
{{ creatorUserName }}
|
||||
<button class="action-button" @click="goBack()">
|
||||
{{ t('continue') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -31,25 +13,21 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {useClient} from '@/plugins/api.js';
|
||||
import {onBeforeMount, ref} from 'vue';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { useTranslations } from '@/translations/translations';
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const client = useClient();
|
||||
const t = useTranslations();
|
||||
|
||||
const creatorId = route.params.creatorId;
|
||||
const creatorUserName = ref('');
|
||||
|
||||
onBeforeMount(async () => {
|
||||
try {
|
||||
const response = await client.get(`/api/creators/${creatorId}`);
|
||||
creatorUserName.value = response.data.name;
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch creator data:', error);
|
||||
function goBack() {
|
||||
const returnUrl = route.query.returnUrl;
|
||||
if (returnUrl) {
|
||||
router.push(returnUrl);
|
||||
} else {
|
||||
router.back();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user