Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
s00d committed Sep 27, 2024
1 parent 6346d73 commit de71cad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 0 additions & 2 deletions test/fixtures/undefault/pages/page2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@
</NuxtLink>
</div>
</template>
<script setup lang="ts">
</script>
17 changes: 1 addition & 16 deletions test/fixtures/undefault/pages/unlocalized.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,5 @@
<script setup>
import { useNuxtApp } from '#imports'
const { $t, $getLocale, $getLocales, $tc, $localeRoute } = useNuxtApp()
const customPluralRule = (key, count, _locale, t) => {
const translation = t(key)
if (!translation) {
return null
}
const forms = translation.toString().split('|')
if (count === 0 && forms.length > 2) {
return forms[0].trim() // Case for "no apples"
}
if (count === 1 && forms.length > 1) {
return forms[1].trim() // Case for "one apple"
}
return (forms.length > 2 ? forms[2].trim() : forms[forms.length - 1].trim()).replace('{count}', count.toString())
}
const { $t, $getLocale, $getLocales, $localeRoute } = useNuxtApp()
</script>

0 comments on commit de71cad

Please sign in to comment.