Skip to content

Commit eb42635

Browse files
committed
Internal: Replace v-t with v-text in Vue components because v-t is deprecated
1 parent 4bfd6d3 commit eb42635

31 files changed

+178
-161
lines changed

assets/vue/AppInstaller.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,17 @@
4141
<main class="install-step-container col-span-3 md:col-span-2 row-span-2">
4242
<h1
4343
v-if="'new' === installerData.installType"
44-
v-t="'New installation'"
44+
v-text="t('New installation')"
4545
class="mb-4 text-center"
4646
/>
4747
<h1
4848
v-else-if="'update' === installerData.installType"
49-
v-t="{
50-
path: 'Update from Chamilo ' + installerData.upgradeFromVersion.join(' | '),
51-
}"
49+
v-text="t('Update from Chamilo ' + installerData.upgradeFromVersion.join(' | '))"
5250
class="mb-4 text-center"
5351
/>
5452
<h1
5553
v-else
56-
v-t="'Chamilo installation wizard'"
54+
v-text="t('Chamilo installation wizard')"
5755
class="mb-8 text-center"
5856
/>
5957

assets/vue/components/Login.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
tabindex="4"
6363
/>
6464
<label
65-
v-t="'Remember me'"
65+
v-text="t('Remember me')"
6666
for="remember_me"
6767
/>
6868
</div>
@@ -76,7 +76,7 @@
7676

7777
<a
7878
v-if="allowRegistration"
79-
v-t="'Sign up'"
79+
v-text="t('Sign up')"
8080
class="btn btn--primary-outline"
8181
href="/main/auth/registration.php"
8282
tabindex="3"
@@ -86,7 +86,7 @@
8686
<div class="field text-center">
8787
<a
8888
id="forgot"
89-
v-t="'Forgot your password?'"
89+
v-text="t('Forgot your password?')"
9090
class="field"
9191
href="/main/auth/lostPassword.php"
9292
tabindex="5"

assets/vue/components/basecomponents/BaseUserFinder.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ defineExpose({ selectedUsers })
126126
<template #header>
127127
<div class="flex justify-between items-center gap-4">
128128
<span
129-
v-t="'User list'"
129+
v-text="t('User list')"
130130
class="mr-auto"
131131
/>
132132
<BaseButton

assets/vue/components/ccalendarevent/CalendarEventInvitationsInfo.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<script setup>
2+
import { useI18n } from "vue-i18n"
23
import ShowLinks from "../resource_links/ShowLinks.vue"
34
5+
const { t } = useI18n()
6+
47
defineProps({
58
event: {
69
type: Object,
@@ -12,15 +15,15 @@ defineProps({
1215
<template>
1316
<div class="invitations-info">
1417
<h6
15-
v-t="'Invitations'"
18+
v-text="t('Invitations')"
1619
class="invitations-info__title"
1720
/>
1821

1922
<div
2023
v-if="event.resourceLinkListFromEntity.length"
2124
class="invitations-info__item"
2225
>
23-
<p v-t="'Invitees'" />
26+
<p v-text="t('Invitees')" />
2427
<div>
2528
<ShowLinks
2629
:item="event"

assets/vue/components/ccalendarevent/CalendarEventSubscriptionsInfo.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<script setup>
2+
import { useI18n } from "vue-i18n"
23
import ShowLinks from "../resource_links/ShowLinks.vue"
34
import { subscriptionVisibility } from "../../constants/entity/ccalendarevent"
45
6+
const { t } = useI18n()
7+
58
defineProps({
69
event: {
710
type: Object,
@@ -13,12 +16,12 @@ defineProps({
1316
<template>
1417
<div class="invitations-info">
1518
<h6
16-
v-t="'Subscriptions'"
19+
v-text="t('Subscriptions')"
1720
class="invitations-info__title"
1821
/>
1922

2023
<div class="invitations-info__item">
21-
<p v-t="'Allow subscriptions'" />
24+
<p v-text="t('Allow subscriptions')" />
2225
<p
2326
v-if="subscriptionVisibility.no === event.subscriptionVisibility"
2427
v-text="'No'"
@@ -41,23 +44,23 @@ defineProps({
4144
v-if="event.maxAttendees"
4245
class="invitations-info__item"
4346
>
44-
<p v-t="'Maximum number of subscriptions'" />
47+
<p v-text="t('Maximum number of subscriptions')" />
4548
<p v-text="event.maxAttendees" />
4649
</div>
4750

4851
<div
4952
v-if="event.maxAttendees"
5053
class="invitations-info__item"
5154
>
52-
<p v-t="'Subscriptions count'" />
55+
<p v-text="t('Subscriptions count')" />
5356
<p v-text="event.resourceLinkListFromEntity.length" />
5457
</div>
5558

5659
<div
5760
v-if="event.resourceLinkListFromEntity.length"
5861
class="invitations-info__item"
5962
>
60-
<p v-t="'Subscribers'" />
63+
<p v-text="t('Subscribers')" />
6164
<div>
6265
<ShowLinks
6366
:item="event"

assets/vue/components/ccalendarevent/CalendarRemindersEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function addEmptyReminder() {
5353
option-value="value"
5454
/>
5555
<div
56-
v-t="'Before'"
56+
v-text="t('Before')"
5757
class="p-inputgroup-addon"
5858
/>
5959
</div>

assets/vue/components/ccalendarevent/CalendarRemindersInfo.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<script setup>
2+
import { useI18n } from "vue-i18n"
23
import { useCalendarReminders } from "../../composables/calendar/calendarReminders"
34
import BaseIcon from "../basecomponents/BaseIcon.vue"
45
6+
const { t } = useI18n()
57
const { decodeDateInterval } = useCalendarReminders()
68
79
defineProps({
@@ -18,7 +20,7 @@ defineProps({
1820
class="reminders-info"
1921
>
2022
<h6
21-
v-t="'Notification to remind the event'"
23+
v-text="t('Notification to remind the event')"
2224
class="reminders-info__title"
2325
/>
2426

assets/vue/components/installer/EmailSettings.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="mt-8">
33
<h3
44
class="mb-4"
5-
v-t="'Email Settings'"
5+
v-text="t('Email Settings')"
66
></h3>
77

88
<BaseInputText

assets/vue/components/installer/Step1.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
>
4646
<p
4747
class="update-message-text"
48-
v-t="'An update is available. Click the button below to proceed with the update.'"
48+
v-text="t('An update is available. Click the button below to proceed with the update.')"
4949
/>
5050
<p>{{ installerData.checkMigrationStatus.message }}</p>
5151
<p v-if="installerData.checkMigrationStatus.current_migration">

assets/vue/components/installer/Step2.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
tag="p"
1313
>
1414
<a
15-
v-t="'Read the installation guide'"
15+
v-text="t('Read the installation guide')"
1616
href="/main/documentation/installation_guide.html"
1717
target="_blank"
1818
rel="noopener noreferrer"
@@ -158,8 +158,10 @@
158158
v-text="t('Directory and files permissions')"
159159
/>
160160
<p
161-
v-t="
162-
'Some directories and the files they include must be writable by the web server in order for Chamilo to run (user uploaded files, homepage html files, ...). This might imply a manual change on your server (outside of this interface).'
161+
v-text="
162+
t(
163+
'Some directories and the files they include must be writable by the web server in order for Chamilo to run (user uploaded files, homepage html files, ...). This might imply a manual change on your server (outside of this interface).',
164+
)
163165
"
164166
class="mb-4"
165167
/>
@@ -246,7 +248,7 @@
246248
<div v-else>
247249
<div v-if="installerData.stepData.notWritable.length > 0">
248250
<strong
249-
v-t="'Warning!'"
251+
v-text="t('Warning!')"
250252
class="text-error"
251253
/>
252254
<p class="text-error">

0 commit comments

Comments
 (0)