mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-25 17:53:48 +02:00
improve i18n
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { PaginationEllipsis } from 'reka-ui';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { reactiveOmit } from '@vueuse/core';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const props = defineProps({
|
||||
asChild: { type: Boolean, required: false },
|
||||
@@ -10,6 +11,8 @@
|
||||
class: { type: null, required: false }
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const delegatedProps = reactiveOmit(props, 'class');
|
||||
</script>
|
||||
|
||||
@@ -20,7 +23,9 @@
|
||||
:class="cn('flex size-9 items-center justify-center text-[13px]', props.class)">
|
||||
<slot>
|
||||
<MoreHorizontal class="size-4" />
|
||||
<span class="sr-only">More pages</span>
|
||||
<span class="sr-only">
|
||||
{{ t('table.pagination.more_pages') }}
|
||||
</span>
|
||||
</slot>
|
||||
</PaginationEllipsis>
|
||||
</template>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import { buttonVariants } from '@/components/ui/button';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { reactiveOmit } from '@vueuse/core';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const props = defineProps({
|
||||
asChild: { type: Boolean, required: false },
|
||||
@@ -12,6 +13,8 @@
|
||||
class: { type: null, required: false }
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const delegatedProps = reactiveOmit(props, 'class', 'size');
|
||||
const forwarded = useForwardProps(delegatedProps);
|
||||
</script>
|
||||
@@ -23,7 +26,9 @@
|
||||
v-bind="forwarded">
|
||||
<slot>
|
||||
<ChevronLeftIcon />
|
||||
<span class="hidden sm:block">First</span>
|
||||
<span class="hidden sm:block">
|
||||
{{ t('table.pagination.first') }}
|
||||
</span>
|
||||
</slot>
|
||||
</PaginationFirst>
|
||||
</template>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import { buttonVariants } from '@/components/ui/button';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { reactiveOmit } from '@vueuse/core';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const props = defineProps({
|
||||
asChild: { type: Boolean, required: false },
|
||||
@@ -12,6 +13,8 @@
|
||||
class: { type: null, required: false }
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const delegatedProps = reactiveOmit(props, 'class', 'size');
|
||||
const forwarded = useForwardProps(delegatedProps);
|
||||
</script>
|
||||
@@ -22,7 +25,9 @@
|
||||
:class="cn(buttonVariants({ variant: 'ghost', size }), 'text-[13px] gap-1 px-2.5 sm:pr-2.5', props.class)"
|
||||
v-bind="forwarded">
|
||||
<slot>
|
||||
<span class="hidden sm:block">Last</span>
|
||||
<span class="hidden sm:block">
|
||||
{{ t('table.pagination.last') }}
|
||||
</span>
|
||||
<ChevronRightIcon />
|
||||
</slot>
|
||||
</PaginationLast>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import { buttonVariants } from '@/components/ui/button';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { reactiveOmit } from '@vueuse/core';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const props = defineProps({
|
||||
asChild: { type: Boolean, required: false },
|
||||
@@ -12,6 +13,8 @@
|
||||
class: { type: null, required: false }
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const delegatedProps = reactiveOmit(props, 'class', 'size');
|
||||
const forwarded = useForwardProps(delegatedProps);
|
||||
</script>
|
||||
@@ -22,7 +25,9 @@
|
||||
:class="cn(buttonVariants({ variant: 'ghost', size }), 'text-[13px] gap-1 px-2.5 sm:pr-2.5', props.class)"
|
||||
v-bind="forwarded">
|
||||
<slot>
|
||||
<span class="hidden sm:block">Next</span>
|
||||
<span class="hidden sm:block">
|
||||
{{ t('table.pagination.next') }}
|
||||
</span>
|
||||
<ChevronRightIcon />
|
||||
</slot>
|
||||
</PaginationNext>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import { buttonVariants } from '@/components/ui/button';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { reactiveOmit } from '@vueuse/core';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const props = defineProps({
|
||||
asChild: { type: Boolean, required: false },
|
||||
@@ -12,6 +13,8 @@
|
||||
class: { type: null, required: false }
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const delegatedProps = reactiveOmit(props, 'class', 'size');
|
||||
const forwarded = useForwardProps(delegatedProps);
|
||||
</script>
|
||||
@@ -23,7 +26,9 @@
|
||||
v-bind="forwarded">
|
||||
<slot>
|
||||
<ChevronLeftIcon />
|
||||
<span class="hidden sm:block">Previous</span>
|
||||
<span class="hidden sm:block">
|
||||
{{ t('table.pagination.previous') }}
|
||||
</span>
|
||||
</slot>
|
||||
</PaginationPrev>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user