improve i18n

This commit is contained in:
pa
2026-01-19 11:49:41 +09:00
parent 7303cd0b33
commit 1e25255ac5
34 changed files with 179 additions and 65 deletions

View File

@@ -311,7 +311,7 @@
shortName: props.shortname
})
.then((args) => {
toast.success('Self invite sent');
toast.success(t('message.invite.self_sent'));
return args;
});
};

View File

@@ -91,8 +91,9 @@
})
.then((args) => {
if (args.json[slot].message === I.messageSlot.message) {
toast.error("VRChat API didn't update message, try again");
throw new Error("VRChat API didn't update message, try again");
const errorMessage = t('message.invite.message_update_failed');
toast.error(errorMessage);
throw new Error(errorMessage);
} else {
toast('Invite message updated');
}
@@ -141,7 +142,7 @@
} else {
J.loading = false;
J.visible = false;
toast.success('Invite sent');
toast.success(t('message.invite.sent'));
}
};
inviteLoop();

View File

@@ -244,7 +244,7 @@
function sendInvite() {
modalStore
.confirm({
description: 'Continue? Invite',
description: t('confirm.invite'),
title: 'Confirm'
})
.then(({ ok }) => {
@@ -281,7 +281,7 @@
} else {
D.loading = false;
D.visible = false;
toast.success('Invite sent');
toast.success(t('message.invite.sent'));
}
};
inviteLoop();

View File

@@ -273,7 +273,7 @@
function sendGroupInvite() {
modalStore
.confirm({
description: 'Continue? Invite User(s) To Group',
description: t('confirm.invite_group'),
title: 'Confirm'
})
.then(({ ok }) => {

View File

@@ -309,7 +309,7 @@
shortName
})
.then((args) => {
toast.success('Self invite sent');
toast.success(t('message.invite.self_sent'));
return args;
});
}

View File

@@ -916,7 +916,7 @@
worldId: L.worldId
})
.then((args) => {
toast.success('Self invite sent');
toast.success(t('message.invite.self_sent'));
return args;
});
}

View File

@@ -1854,7 +1854,7 @@
D.id
)
.then((_args) => {
toast('Invite sent');
toast(t('message.invite.sent'));
return _args;
});
});

View File

@@ -975,7 +975,9 @@
case 'Trash2':
modalStore
.confirm({
description: `Continue? ${command}`,
description: t('confirm.command_question', {
command
}),
title: 'Confirm'
})
.then(({ ok }) => {

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>