diff --git a/src/components/common/VnForm.vue b/src/components/common/VnForm.vue
index fd34e8ac..71f36fd3 100644
--- a/src/components/common/VnForm.vue
+++ b/src/components/common/VnForm.vue
@@ -227,7 +227,9 @@ defineExpose({
no-caps
flat
v-close-popup
- />
+ >
+ {{ t('cancel') }}
+
+ >
+ {{ t('save') }}
+
diff --git a/src/components/ui/VnImg.vue b/src/components/ui/VnImg.vue
index af078d6a..8bc1abee 100644
--- a/src/components/ui/VnImg.vue
+++ b/src/components/ui/VnImg.vue
@@ -4,6 +4,8 @@ import { useAppStore } from 'stores/app';
import ImageEditor from 'src/components/ui/ImageEditor.vue';
+import { useI18n } from 'vue-i18n';
+
const props = defineProps({
baseURL: {
type: String,
@@ -60,6 +62,8 @@ const props = defineProps({
}
});
+const { t } = useI18n();
+
const app = useAppStore();
const showZoom = ref(false);
const showEditForm = ref(false);
@@ -77,7 +81,9 @@ const url = computed(() => {
round
text-color="black"
@click.stop.prevent="showEditForm = !showEditForm"
- />
+ >
+ {{ t('addOrEditImage') }}
+
+en-US:
+ addOrEditImage: Add or update an image
+es-ES:
+ addOrEditImage: Añadir o actualizar imagen
+ca-ES:
+ addOrEditImage: Afegir o actualitzar Imatge
+fr-FR:
+ addOrEditImage: Ajouter our mettre à jour l'image
+pt-PT:
+ addOrEditImage: Adicionar ou atualizar imagem
+
diff --git a/src/components/ui/VnSearchBar.vue b/src/components/ui/VnSearchBar.vue
index 3c31465d..0d65a5f1 100644
--- a/src/components/ui/VnSearchBar.vue
+++ b/src/components/ui/VnSearchBar.vue
@@ -68,10 +68,10 @@ onMounted(() => {
@keyup.enter="search()"
:placeholder="props.placeholder || t('search')"
bg-color="white"
- isOutlined
+ is-outlined
:clearable="false"
>
-
+
diff --git a/src/i18n/ca-ES/index.js b/src/i18n/ca-ES/index.js
index 74106bfe..daa71789 100644
--- a/src/i18n/ca-ES/index.js
+++ b/src/i18n/ca-ES/index.js
@@ -62,5 +62,6 @@ export default {
//
orderLoadedIntoBasket: 'Comanda carregada a la cistella!',
at: 'a les',
- back: 'Tornar'
+ back: 'Tornar',
+ remove: 'Esborrar'
};
diff --git a/src/i18n/en-US/index.js b/src/i18n/en-US/index.js
index 5eb5753c..45c4b4d8 100644
--- a/src/i18n/en-US/index.js
+++ b/src/i18n/en-US/index.js
@@ -76,6 +76,7 @@ export default {
orderLoadedIntoBasket: 'Order loaded into basket!',
at: 'at',
back: 'Back',
+ remove: 'Remove',
orders: 'Orders',
order: 'Pending order',
diff --git a/src/i18n/es-ES/index.js b/src/i18n/es-ES/index.js
index 71a9223d..98af2234 100644
--- a/src/i18n/es-ES/index.js
+++ b/src/i18n/es-ES/index.js
@@ -82,6 +82,7 @@ export default {
orderLoadedIntoBasket: '¡Pedido cargado en la cesta!',
at: 'a las',
back: 'Volver',
+ remove: 'Borrar',
orders: 'Pedidos',
order: 'Pedido pendiente',
diff --git a/src/i18n/fr-FR/index.js b/src/i18n/fr-FR/index.js
index 2edf2e48..1ca353b8 100644
--- a/src/i18n/fr-FR/index.js
+++ b/src/i18n/fr-FR/index.js
@@ -62,5 +62,6 @@ export default {
//
orderLoadedIntoBasket: 'Commande chargée dans le panier!',
at: 'à',
- back: 'Retour'
+ back: 'Retour',
+ remove: 'Effacer'
};
diff --git a/src/i18n/pt-PT/index.js b/src/i18n/pt-PT/index.js
index a9199cb5..ef31036b 100644
--- a/src/i18n/pt-PT/index.js
+++ b/src/i18n/pt-PT/index.js
@@ -63,5 +63,6 @@ export default {
//
orderLoadedIntoBasket: 'Pedido carregado na cesta!',
at: 'às',
- back: 'Voltar'
+ back: 'Voltar',
+ remove: 'Eliminar'
};
diff --git a/src/lib/filters.js b/src/lib/filters.js
index fcdd5b21..cc979fec 100644
--- a/src/lib/filters.js
+++ b/src/lib/filters.js
@@ -14,6 +14,18 @@ export function date(val, format) {
return qdate.formatDate(val, format, i18n.global.tm('date'));
}
+export const formatDate = (timeStamp, format = 'YYYY-MM-DD') => {
+ if (!timeStamp) return '';
+ const { messages, locale } = i18n.global;
+
+ return qdate.formatDate(timeStamp, format, {
+ days: messages.value[locale.value].date.days,
+ months: messages.value[locale.value].date.months,
+ daysShort: messages.value[locale.value].date.daysShort,
+ monthsShort: messages.value[locale.value].date.monthsShort
+ });
+};
+
/**
* @param {Date} timeStamp - La marca de tiempo que se va a formatear. Si no se proporciona, la función devolverá una cadena vacía.
* @param {Object} options - Un objeto que contiene las opciones de formato.
@@ -22,24 +34,23 @@ export function date(val, format) {
* @param {boolean} options.shortDay - Indica si se debe usar una versión corta del día (por ejemplo, "Mon" en lugar de "Monday").
* @returns {string} La fecha formateada como un título.
*/
-export const formatStringDate = (timeStamp, options) => {
+export const formatDateTitle = (
+ timeStamp,
+ options = { showTime: false, showSeconds: false, shortDay: false }
+) => {
if (!timeStamp) return '';
-
- const { t, messages, locale } = i18n.global;
+ const { t } = i18n.global;
const timeFormat = options.showTime
? options.showSeconds
- ? ` [${t('at')}] hh:mm:ss`
- : ` [${t('at')}] hh:mm`
+ ? ` [${t('at')}] HH:mm:ss`
+ : ` [${t('at')}] HH:mm`
: '';
const day = options.shortDay ? 'dd' : 'dddd';
const formatString = `${day}, D [${t('of')}] MMMM [${t('of')}] YYYY${timeFormat}`;
- const formattedString = qdate.formatDate(timeStamp, formatString, {
- days: messages.value[locale.value].date.days,
- months: messages.value[locale.value].date.months
- });
+ const formattedString = formatDate(timeStamp, formatString);
return formattedString;
};
diff --git a/src/pages/Admin/ConnectionsView.vue b/src/pages/Admin/ConnectionsView.vue
index bad50ad7..befdfeb5 100644
--- a/src/pages/Admin/ConnectionsView.vue
+++ b/src/pages/Admin/ConnectionsView.vue
@@ -69,7 +69,11 @@ onBeforeUnmount(() => clearInterval(intervalId.value));
rounded
no-caps
class="q-mr-sm"
- />
+ >
+
+ {{ t('refresh') }}
+
+
{{ connections?.length }} {{ t('connections') }}
@@ -121,7 +125,11 @@ onBeforeUnmount(() => clearInterval(intervalId.value));
flat
rounded
@click="supplantUser(connection.user)"
- />
+ >
+
+ {{ t('supplantUser') }}
+
+
@@ -132,16 +140,21 @@ onBeforeUnmount(() => clearInterval(intervalId.value));
en-US:
refresh: Refresh
connections: Connections
+ supplantUser: Supplant user
es-ES:
refresh: Actualizar
connections: Conexiones
+ supplantUser: Suplantar usuario
ca-ES:
refresh: Actualitzar
connections: Connexions
+ supplantUser: Suplantar usuari
fr-FR:
refresh: Rafraîchir
connections: Connexions
+ supplantUser: Supplanter l'utilisateur
pt-PT:
refresh: Atualizar
connections: Conexões
+ supplantUser: Suplantar usuário
diff --git a/src/pages/Admin/LinksView.vue b/src/pages/Admin/LinksView.vue
index 3e884b58..60cb0bc5 100644
--- a/src/pages/Admin/LinksView.vue
+++ b/src/pages/Admin/LinksView.vue
@@ -21,13 +21,13 @@ onMounted(async () => getLinks());
-
+
{
rounded
no-caps
@click="goBack()"
- />
+ >
+ {{ t('back') }}
+
{
>
getNews());
:to="{ name: 'adminNewsDetails' }"
rounded
no-caps
- />
+ >
+ {{ t('addNew') }}
+
@@ -80,15 +82,15 @@ onMounted(async () => getNews());
@@ -108,7 +110,9 @@ onMounted(async () => getNews());
() => deleteNew(newsItem.id, index)
)
"
- />
+ >
+ {{ t('remove') }}
+
diff --git a/src/pages/Admin/VisitsView.vue b/src/pages/Admin/VisitsView.vue
index bbdb7814..79686a50 100644
--- a/src/pages/Admin/VisitsView.vue
+++ b/src/pages/Admin/VisitsView.vue
@@ -6,7 +6,7 @@ import { date as qdate } from 'quasar';
import VnInputDate from 'src/components/common/VnInputDate.vue';
-import { formatStringDate } from 'src/lib/filters.js';
+import { formatDateTitle } from 'src/lib/filters.js';
import { useAppStore } from 'stores/app';
import { storeToRefs } from 'pinia';
@@ -79,14 +79,22 @@ watch(
rounded
no-caps
class="q-mr-sm"
- />
+ >
+
+ {{ t('refresh') }}
+
+
+ >
+
+ {{ t('connections') }}
+
+
@@ -112,7 +120,7 @@ watch(
{{ visitsCardText }}
{{
- formatStringDate(visitsData.lastVisit, {
+ formatDateTitle(visitsData.lastVisit, {
showTime: true,
showSeconds: true,
shortDay: true