Use <template #slotName> form instead of v-slot

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-08-12 16:42:40 +02:00
parent 9d00aff619
commit e893f3f089
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
15 changed files with 28 additions and 29 deletions

View File

@ -21,7 +21,7 @@
<i18n-t <i18n-t
keypath="This instance, {instanceName}, hosts your profile, so remember its name." keypath="This instance, {instanceName}, hosts your profile, so remember its name."
> >
<template v-slot:instanceName> <template #instanceName>
<b>{{ <b>{{
t("{instanceName} ({domain})", { t("{instanceName} ({domain})", {
domain, domain,

View File

@ -35,10 +35,10 @@
tag="span" tag="span"
keypath="{instanceName} is an instance of {mobilizon_link}, a free software built with the community." keypath="{instanceName} is an instance of {mobilizon_link}, a free software built with the community."
> >
<template v-slot:instanceName> <template #instanceName>
<b>{{ config?.name }}</b> <b>{{ config?.name }}</b>
</template> </template>
<template v-slot:mobilizon_link> <template #mobilizon_link>
<a href="https://joinmobilizon.org">{{ t("Mobilizon") }}</a> <a href="https://joinmobilizon.org">{{ t("Mobilizon") }}</a>
</template> </template>
</i18n-t> </i18n-t>

View File

@ -7,7 +7,7 @@
tag="p" tag="p"
keypath="You have been invited by {invitedBy} to the following group:" keypath="You have been invited by {invitedBy} to the following group:"
> >
<template v-slot:invitedBy> <template #invitedBy>
<b>{{ member?.invitedBy?.name }}</b> <b>{{ member?.invitedBy?.name }}</b>
</template> </template>
</i18n-t> </i18n-t>

View File

@ -42,7 +42,7 @@
<p class="flex gap-1" v-if="isCurrentActorMember"> <p class="flex gap-1" v-if="isCurrentActorMember">
<AccountEdit /> <AccountEdit />
<i18n-t keypath="Published by {name}"> <i18n-t keypath="Published by {name}">
<template v-slot:name> <template #name>
<b class="">{{ displayName(post.author) }}</b> <b class="">{{ displayName(post.author) }}</b>
</template> </template>
</i18n-t> </i18n-t>

View File

@ -10,22 +10,22 @@
> >
<div class="statistics flex-1 min-w-[20rem]"> <div class="statistics flex-1 min-w-[20rem]">
<i18n-t tag="p" keypath="Home to {number} users"> <i18n-t tag="p" keypath="Home to {number} users">
<template v-slot:number> <template #number>
<strong>{{ statistics.numberOfUsers }}</strong> <strong>{{ statistics.numberOfUsers }}</strong>
</template> </template>
</i18n-t> </i18n-t>
<i18n-t tag="p" keypath="and {number} groups"> <i18n-t tag="p" keypath="and {number} groups">
<template v-slot:number> <template #number>
<strong>{{ statistics.numberOfLocalGroups }}</strong> <strong>{{ statistics.numberOfLocalGroups }}</strong>
</template> </template>
</i18n-t> </i18n-t>
<i18n-t tag="p" keypath="Who published {number} events"> <i18n-t tag="p" keypath="Who published {number} events">
<template v-slot:number> <template #number>
<strong>{{ statistics.numberOfLocalEvents }}</strong> <strong>{{ statistics.numberOfLocalEvents }}</strong>
</template> </template>
</i18n-t> </i18n-t>
<i18n-t tag="p" keypath="And {number} comments"> <i18n-t tag="p" keypath="And {number} comments">
<template v-slot:number> <template #number>
<strong>{{ statistics.numberOfLocalComments }}</strong> <strong>{{ statistics.numberOfLocalComments }}</strong>
</template> </template>
</i18n-t> </i18n-t>

View File

@ -54,7 +54,7 @@
tag="dd" tag="dd"
keypath="SSL and it's successor TLS are encryption technologies to secure data communications when using the service. You can recognize an encrypted connection in your browser's address line when the URL begins with {https} and the lock icon is displayed in your browser's address bar." keypath="SSL and it's successor TLS are encryption technologies to secure data communications when using the service. You can recognize an encrypted connection in your browser's address line when the URL begins with {https} and the lock icon is displayed in your browser's address bar."
> >
<template v-slot:https><code>https://</code></template> <template #https><code>https://</code></template>
</i18n-t> </i18n-t>
<dt>{{ t("Cookies and Local storage") }}</dt> <dt>{{ t("Cookies and Local storage") }}</dt>
<dd> <dd>

View File

@ -51,7 +51,7 @@
icon="magnify" icon="magnify"
/> />
</template> </template>
<template v-slot:default="props"> <template #default="props">
<router-link <router-link
class="profile" class="profile"
:to="{ :to="{
@ -91,7 +91,7 @@
icon="magnify" icon="magnify"
/> />
</template> </template>
<template v-slot:default="props"> <template #default="props">
{{ props.row.domain }} {{ props.row.domain }}
</template> </template>
</o-table-column> </o-table-column>

View File

@ -42,7 +42,7 @@
icon="magnify" icon="magnify"
/> />
</template> </template>
<template v-slot:default="props"> <template #default="props">
<router-link <router-link
class="profile" class="profile"
:to="{ :to="{
@ -81,7 +81,7 @@
icon="magnify" icon="magnify"
/> />
</template> </template>
<template v-slot:default="props"> <template #default="props">
{{ props.row.domain }} {{ props.row.domain }}
</template> </template>
</o-table-column> </o-table-column>

View File

@ -45,7 +45,7 @@
{{ props.row.id }} {{ props.row.id }}
</o-table-column> </o-table-column>
<o-table-column field="email" :label="$t('Email')"> <o-table-column field="email" :label="$t('Email')">
<template v-slot:default="props"> <template #default="props">
<router-link <router-link
:to="{ :to="{
name: RouteName.ADMIN_USER_PROFILE, name: RouteName.ADMIN_USER_PROFILE,

View File

@ -399,7 +399,7 @@
:close-button-aria-label="t('Close')" :close-button-aria-label="t('Close')"
> >
<identity-picker v-model="identity"> <identity-picker v-model="identity">
<template v-slot:footer> <template #footer>
<footer class="modal-card-foot"> <footer class="modal-card-foot">
<button <button
class="button" class="button"

View File

@ -147,12 +147,12 @@
keypath="Do you wish to {create_event} or {explore_events}?" keypath="Do you wish to {create_event} or {explore_events}?"
tag="p" tag="p"
> >
<template v-slot:create_event> <template #create_event>
<router-link :to="{ name: RouteName.CREATE_EVENT }">{{ <router-link :to="{ name: RouteName.CREATE_EVENT }">{{
t("create an event") t("create an event")
}}</router-link> }}</router-link>
</template> </template>
<template v-slot:explore_events> <template #explore_events>
<router-link :to="{ name: RouteName.SEARCH }">{{ <router-link :to="{ name: RouteName.SEARCH }">{{
t("explore the events") t("explore the events")
}}</router-link> }}</router-link>

View File

@ -516,10 +516,9 @@
<template #desc> <template #desc>
<template v-if="isCurrentActorFollowing"> <template v-if="isCurrentActorFollowing">
<i18n-t <i18n-t
class="has-text-grey-dark"
keypath="You will receive notifications about this group's public activity depending on %{notification_settings}." keypath="You will receive notifications about this group's public activity depending on %{notification_settings}."
> >
<template v-slot:notification_settings> <template #notification_settings>
<router-link :to="{ name: RouteName.NOTIFICATIONS }">{{ <router-link :to="{ name: RouteName.NOTIFICATIONS }">{{
t("your notification settings") t("your notification settings")
}}</router-link> }}</router-link>

View File

@ -46,7 +46,7 @@
tag="span" tag="span"
keypath="On {instance} and other federated instances" keypath="On {instance} and other federated instances"
> >
<template v-slot:instance> <template #instance>
<b>{{ config.name }}</b> <b>{{ config.name }}</b>
</template> </template>
</i18n-t> </i18n-t>
@ -252,7 +252,7 @@
tag="span" tag="span"
keypath="On {instance} and other federated instances" keypath="On {instance} and other federated instances"
> >
<template v-slot:instance> <template #instance>
<b>{{ config.name }}</b> <b>{{ config.name }}</b>
</template> </template>
</i18n-t> </i18n-t>

View File

@ -3,7 +3,7 @@
<h1 class="">{{ $t("Explore") }}</h1> <h1 class="">{{ $t("Explore") }}</h1>
<section v-if="tag"> <section v-if="tag">
<i18n-t keypath="Events tagged with {tag}"> <i18n-t keypath="Events tagged with {tag}">
<template v-slot:tag> <template #tag>
<b-tag variant="light">{{ $t("#{tag}", { tag }) }}</b-tag> <b-tag variant="light">{{ $t("#{tag}", { tag }) }}</b-tag>
</template> </template>
</i18n-t> </i18n-t>

View File

@ -12,10 +12,10 @@
tag="p" tag="p"
keypath="{instanceName} is an instance of the {mobilizon} software." keypath="{instanceName} is an instance of the {mobilizon} software."
> >
<template v-slot:instanceName> <template #instanceName>
<b>{{ config?.name }}</b> <b>{{ config?.name }}</b>
</template> </template>
<template v-slot:mobilizon> <template #mobilizon>
<a href="https://joinmobilizon.org" target="_blank" class="out">{{ <a href="https://joinmobilizon.org" target="_blank" class="out">{{
t("Mobilizon") t("Mobilizon")
}}</a> }}</a>
@ -73,12 +73,12 @@
<i18n-t <i18n-t
keypath="Please read the {fullRules} published by {instance}'s administrators." keypath="Please read the {fullRules} published by {instance}'s administrators."
tag="p" tag="p"
><template v-slot:fullRules> ><template #fullRules>
<router-link class="out" :to="{ name: RouteName.RULES }">{{ <router-link class="out" :to="{ name: RouteName.RULES }">{{
t("full rules") t("full rules")
}}</router-link> }}</router-link>
</template> </template>
<template v-slot:instance> <template #instance>
<b>{{ config?.name }}</b> <b>{{ config?.name }}</b>
</template> </template>
</i18n-t> </i18n-t>
@ -141,12 +141,12 @@
tag="span" tag="span"
keypath="I agree to the {instanceRules} and {termsOfService}" keypath="I agree to the {instanceRules} and {termsOfService}"
> >
<template v-slot:instanceRules> <template #instanceRules>
<router-link class="out" :to="{ name: RouteName.RULES }">{{ <router-link class="out" :to="{ name: RouteName.RULES }">{{
t("instance rules") t("instance rules")
}}</router-link> }}</router-link>
</template> </template>
<template v-slot:termsOfService> <template #termsOfService>
<router-link class="out" :to="{ name: RouteName.TERMS }">{{ <router-link class="out" :to="{ name: RouteName.TERMS }">{{
t("terms of service") t("terms of service")
}}</router-link> }}</router-link>