Skip to content

Commit

Permalink
Fix breaking changes for nuxtjs/i18n v9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
gb-beng committed Nov 26, 2024
1 parent 0d99ade commit be35d6c
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion components/ArticleHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<section>
<div class="d-flex justify-space-between align-center">
<h3>
<NuxtLink class="category" :to="localePath(path)">
<NuxtLink class="category" :to="$localePath(path)">
{{ $t(dataClass) }}
</NuxtLink>
</h3>
Expand Down
2 changes: 1 addition & 1 deletion components/CardItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
link
:v-ripple="{ class: rippleClass }"
:to="
localePath({
$localePath({
name: path,
params: { slug: card.slug },
})
Expand Down
2 changes: 1 addition & 1 deletion components/ChipList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
label
size="large"
link
:to="localePath('/' + path + '/' + chip.slug)"
:to="$localePath('/' + path + '/' + chip.slug)"
:style="{
backgroundImage: getImageOverlayCSS(
getImageSrc(chip.image),
Expand Down
8 changes: 6 additions & 2 deletions components/PrevNext.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
<v-col>
<NuxtLink
v-if="prev"
:to="localePath({ name: 'showcase-slug', params: { slug: prev.slug } })"
:to="
$localePath({ name: 'showcase-slug', params: { slug: prev.slug } })
"
>
{{ prev.title }}
</NuxtLink>
</v-col>
<v-col>
<NuxtLink
v-if="next"
:to="localePath({ name: 'showcase-slug', params: { slug: next.slug } })"
:to="
$localePath({ name: 'showcase-slug', params: { slug: next.slug } })
"
>
{{ next.title }}
</NuxtLink>
Expand Down
4 changes: 2 additions & 2 deletions components/SectionHeading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<h1>
<component
:is="actionPath ? 'NuxtLink' : 'span'"
:to="localePath(actionPath)"
:to="$localePath(actionPath)"
class="text-decoration-none text-grey-darken-4"
>
{{ title }}&nbsp;<span :class="`text-${color}`">/</span>
Expand All @@ -16,7 +16,7 @@
<slot name="actions">
<v-btn
v-if="actionTitle && actionPath"
:to="localePath(actionPath)"
:to="$localePath(actionPath)"
variant="plain"
>
{{ actionTitle }}
Expand Down
2 changes: 1 addition & 1 deletion components/visual/VisualDatasetInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<v-btn
color="primary"
:to="
localePath({
$localePath({
name: 'datasets-slug',
params: { slug: dataset.slug },
})
Expand Down
2 changes: 1 addition & 1 deletion components/visual/VisualMain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</div>

<!-- Button -->
<v-btn :to="localePath('datasets')" color="primary">
<v-btn :to="$localePath('datasets')" color="primary">
{{ $t('all_datasets') }}
</v-btn>
</div>
Expand Down
2 changes: 1 addition & 1 deletion error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-app>
<h1>{{ error.statusCode }}</h1>
<p>{{ error.message }}</p>
<NuxtLink :to="localePath('/')">Home page</NuxtLink>
<NuxtLink :to="$localePath('/')">Home page</NuxtLink>
</v-app>
</template>

Expand Down
2 changes: 1 addition & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
:value="aboutPage"
:excerpt="true"
/>
<v-btn color="primary" :to="localePath('about')">
<v-btn color="primary" :to="$localePath('about')">
{{ $t('read_more') }}
</v-btn>
</v-col>
Expand Down

0 comments on commit be35d6c

Please sign in to comment.