feat(i18n): deprecate Spanish language support in the frontend
This commit is contained in:
@@ -1,87 +1,82 @@
|
||||
<script setup>
|
||||
import {ref} from 'vue';
|
||||
import {useClient} from '@/plugins/api.js';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { ref } from 'vue';
|
||||
import { useClient } from '@/plugins/api.js';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
creator: {
|
||||
required: true
|
||||
}
|
||||
});
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
creator: {
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const emits = defineEmits(['closeRequested']);
|
||||
const emits = defineEmits(['closeRequested']);
|
||||
|
||||
const name = ref(props.creator.name);
|
||||
const name = ref(props.creator.name);
|
||||
|
||||
const client = useClient();
|
||||
const client = useClient();
|
||||
|
||||
async function save() {
|
||||
try {
|
||||
await client.post(
|
||||
`/api/creators/${props.creator.id}/name`,
|
||||
{
|
||||
name: name.value
|
||||
async function save() {
|
||||
try {
|
||||
await client.post(`/api/creators/${props.creator.id}/name`, {
|
||||
name: name.value,
|
||||
});
|
||||
|
||||
props.creator.name = name.value;
|
||||
emits('closeRequested');
|
||||
} catch (error) {
|
||||
console.error('Error saving title:', error);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
props.creator.name = name.value;
|
||||
emits('closeRequested');
|
||||
} catch (error) {
|
||||
console.error('Error saving title:', error);
|
||||
}
|
||||
}
|
||||
|
||||
const cancel = () => {
|
||||
emits('closeRequested');
|
||||
};
|
||||
const cancel = () => {
|
||||
emits('closeRequested');
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="card dialog">
|
||||
<div class="card-title">
|
||||
{{ t('title') }}
|
||||
</div>
|
||||
<div class="card dialog">
|
||||
<div class="card-title">
|
||||
{{ t('title') }}
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<v-text-field
|
||||
v-model="name"
|
||||
:label="t('label')"
|
||||
outlined
|
||||
variant="outlined"
|
||||
></v-text-field>
|
||||
<div class="card-content">
|
||||
<v-text-field
|
||||
v-model="name"
|
||||
:label="t('label')"
|
||||
outlined
|
||||
variant="outlined"
|
||||
></v-text-field>
|
||||
|
||||
<div class="card-actions">
|
||||
<button class="secondary"
|
||||
@click="cancel">
|
||||
{{ t('cancel') }}
|
||||
</button>
|
||||
<button class="primary"
|
||||
@click="save">
|
||||
{{ t('save') }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-actions">
|
||||
<button
|
||||
class="secondary"
|
||||
@click="cancel"
|
||||
>
|
||||
{{ t('cancel') }}
|
||||
</button>
|
||||
<button
|
||||
class="primary"
|
||||
@click="save"
|
||||
>
|
||||
{{ t('save') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<style scoped></style>
|
||||
|
||||
<i18n>
|
||||
{
|
||||
"en": {
|
||||
"title": "Change Name",
|
||||
"label": "Your name"
|
||||
},
|
||||
"fr": {
|
||||
"title": "Modifier le nom",
|
||||
"label": "Votre nom"
|
||||
},
|
||||
"es": {
|
||||
"title": "Cambiar nombre",
|
||||
"label": "Tu nombre"
|
||||
}
|
||||
"en": {
|
||||
"title": "Change Name",
|
||||
"label": "Your name"
|
||||
},
|
||||
"fr": {
|
||||
"title": "Modifier le nom",
|
||||
"label": "Votre nom"
|
||||
}
|
||||
}
|
||||
</i18n>
|
||||
|
||||
Reference in New Issue
Block a user