mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 14:46:04 +02:00
improve i18n
This commit is contained in:
+1
-1
@@ -418,7 +418,7 @@ export const useAuthStore = defineStore('Auth', () => {
|
||||
function logout() {
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Continue? Logout',
|
||||
description: t('confirm.logout'),
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { nextTick, ref, watch } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import {
|
||||
checkVRChatCache,
|
||||
@@ -31,6 +32,7 @@ export const useAvatarStore = defineStore('Avatar', () => {
|
||||
const advancedSettingsStore = useAdvancedSettingsStore();
|
||||
const userStore = useUserStore();
|
||||
const modalStore = useModalStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
let cachedAvatarModerations = new Map();
|
||||
let cachedAvatars = new Map();
|
||||
@@ -392,7 +394,7 @@ export const useAvatarStore = defineStore('Avatar', () => {
|
||||
function promptClearAvatarHistory() {
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Continue? Clear Avatar History',
|
||||
description: t('confirm.clear_avatar_history'),
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
@@ -556,7 +558,7 @@ export const useAvatarStore = defineStore('Avatar', () => {
|
||||
function selectAvatarWithConfirmation(id) {
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Continue? Select Avatar',
|
||||
description: t('confirm.select_avatar'),
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(({ ok }) => {
|
||||
|
||||
@@ -1581,7 +1581,7 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
function confirmDeleteFriend(id) {
|
||||
modalStore
|
||||
.confirm({
|
||||
description: 'Continue? Unfriend',
|
||||
description: t('confirm.unfriend'),
|
||||
title: 'Confirm'
|
||||
})
|
||||
.then(async ({ ok }) => {
|
||||
|
||||
+3
-1
@@ -1,6 +1,7 @@
|
||||
import { nextTick, reactive, ref, watch } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import {
|
||||
groupRequest,
|
||||
@@ -32,6 +33,7 @@ export const useGroupStore = defineStore('Group', () => {
|
||||
const userStore = useUserStore();
|
||||
const notificationStore = useNotificationStore();
|
||||
const modalStore = useModalStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
let cachedGroups = new Map();
|
||||
|
||||
@@ -152,7 +154,7 @@ export const useGroupStore = defineStore('Group', () => {
|
||||
.catch((err) => {
|
||||
D.loading = false;
|
||||
D.visible = false;
|
||||
toast.error('Failed to load group');
|
||||
toast.error(t('message.group.load_failed'));
|
||||
throw err;
|
||||
})
|
||||
.then((args) => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { instanceRequest, inviteMessagesRequest } from '../api';
|
||||
import { parseLocation } from '../shared/utils';
|
||||
@@ -15,6 +16,7 @@ export const useInviteStore = defineStore('Invite', () => {
|
||||
const gameStore = useGameStore();
|
||||
const launchStore = useLaunchStore();
|
||||
const advancedSettingsStore = useAdvancedSettingsStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
const inviteMessageTable = ref({
|
||||
data: [],
|
||||
@@ -95,7 +97,7 @@ export const useInviteStore = defineStore('Invite', () => {
|
||||
instanceStore.createNewInstance(worldId).then((args) => {
|
||||
const location = args?.json?.location;
|
||||
if (!location) {
|
||||
toast.error('Failed to create instance');
|
||||
toast.error(t('message.instance.create_failed'));
|
||||
return;
|
||||
}
|
||||
// self invite
|
||||
@@ -115,7 +117,7 @@ export const useInviteStore = defineStore('Invite', () => {
|
||||
worldId: L.worldId
|
||||
})
|
||||
.then((args) => {
|
||||
toast.success('Self invite sent');
|
||||
toast.success(t('message.invite.self_sent'));
|
||||
return args;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { nextTick, ref, watch } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { instanceRequest } from '../api';
|
||||
import { parseLocation } from '../shared/utils';
|
||||
@@ -11,6 +12,7 @@ import configRepository from '../service/config';
|
||||
export const useLaunchStore = defineStore('Launch', () => {
|
||||
const isLaunchOptionsDialogVisible = ref(false);
|
||||
const isOpeningInstance = ref(false);
|
||||
const { t } = useI18n();
|
||||
const launchDialogData = ref({
|
||||
visible: false,
|
||||
loading: false,
|
||||
@@ -114,7 +116,7 @@ export const useLaunchStore = defineStore('Launch', () => {
|
||||
worldId: L.worldId,
|
||||
shortName
|
||||
});
|
||||
toast.success('Self invite sent');
|
||||
toast.success(t('message.invite.self_sent'));
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
@@ -485,9 +485,9 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
|
||||
.confirm({
|
||||
description:
|
||||
'Error reporting setting has been enabled. Would you like to restart VRCX now for the change to take effect?',
|
||||
title: 'Restart Required',
|
||||
confirmText: 'Restart Now',
|
||||
cancelText: 'Later'
|
||||
title: t('confirm.restart_required_title'),
|
||||
confirmText: t('confirm.restart_now'),
|
||||
cancelText: t('confirm.restart_later')
|
||||
})
|
||||
.then(async ({ ok }) => {
|
||||
if (!ok) return;
|
||||
@@ -507,9 +507,9 @@ export const useAdvancedSettingsStore = defineStore('AdvancedSettings', () => {
|
||||
.confirm({
|
||||
description:
|
||||
'Error reporting setting has been disabled. Would you like to restart VRCX now for the change to take effect?',
|
||||
title: 'Restart Required',
|
||||
confirmText: 'Restart Now',
|
||||
cancelText: 'Later'
|
||||
title: t('confirm.restart_required_title'),
|
||||
confirmText: t('confirm.restart_now'),
|
||||
cancelText: t('confirm.restart_later')
|
||||
})
|
||||
.then(async ({ ok }) => {
|
||||
if (!ok) return;
|
||||
|
||||
+3
-1
@@ -1,6 +1,7 @@
|
||||
import { computed, reactive, ref, shallowReactive, watch } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import Noty from 'noty';
|
||||
|
||||
@@ -70,6 +71,7 @@ export const useUserStore = defineStore('User', () => {
|
||||
const moderationStore = useModerationStore();
|
||||
const photonStore = usePhotonStore();
|
||||
const sharedFeedStore = useSharedFeedStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
const currentUser = ref({
|
||||
acceptedPrivacyVersion: 0,
|
||||
@@ -837,7 +839,7 @@ export const useUserStore = defineStore('User', () => {
|
||||
.catch((err) => {
|
||||
D.loading = false;
|
||||
D.visible = false;
|
||||
toast.error('Failed to load user');
|
||||
toast.error(t('message.user.load_failed'));
|
||||
throw err;
|
||||
})
|
||||
.then((args) => {
|
||||
|
||||
+1
-1
@@ -195,7 +195,7 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
||||
toast.dismiss(msgBox);
|
||||
if (state.databaseVersion) {
|
||||
// only display when database exists
|
||||
toast.success('Database upgrade complete');
|
||||
toast.success(t('message.database.upgrade_complete'));
|
||||
}
|
||||
state.databaseVersion = databaseVersion;
|
||||
} catch (err) {
|
||||
|
||||
+3
-1
@@ -1,6 +1,7 @@
|
||||
import { reactive, shallowReactive, watch } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import {
|
||||
checkVRChatCache,
|
||||
@@ -24,6 +25,7 @@ export const useWorldStore = defineStore('World', () => {
|
||||
const favoriteStore = useFavoriteStore();
|
||||
const instanceStore = useInstanceStore();
|
||||
const userStore = useUserStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
const worldDialog = reactive({
|
||||
visible: false,
|
||||
@@ -132,7 +134,7 @@ export const useWorldStore = defineStore('World', () => {
|
||||
.catch((err) => {
|
||||
D.loading = false;
|
||||
D.visible = false;
|
||||
toast.error('Failed to load world');
|
||||
toast.error(t('message.world.load_failed'));
|
||||
throw err;
|
||||
})
|
||||
.then((args) => {
|
||||
|
||||
Reference in New Issue
Block a user