diff --git a/packages/client/src/account.ts b/packages/client/src/account.ts index 5a935e1dc7..a04d0378c8 100644 --- a/packages/client/src/account.ts +++ b/packages/client/src/account.ts @@ -192,25 +192,25 @@ export async function openAccountMenu(opts: { if (opts.withExtraOperation) { popupMenu([...[{ type: 'link', - text: i18n.locale.profile, + text: i18n.ts.profile, to: `/@${ $i.username }`, avatar: $i, }, null, ...(opts.includeCurrentAccount ? [createItem($i)] : []), ...accountItemPromises, { icon: 'fas fa-plus', - text: i18n.locale.addAccount, + text: i18n.ts.addAccount, action: () => { popupMenu([{ - text: i18n.locale.existingAccount, + text: i18n.ts.existingAccount, action: () => { showSigninDialog(); }, }, { - text: i18n.locale.createAccount, + text: i18n.ts.createAccount, action: () => { createAccount(); }, }], ev.currentTarget || ev.target); }, }, { type: 'link', icon: 'fas fa-users', - text: i18n.locale.manageAccounts, + text: i18n.ts.manageAccounts, to: `/settings/accounts`, }]], ev.currentTarget || ev.target, { align: 'left' diff --git a/packages/client/src/components/abuse-report-window.vue b/packages/client/src/components/abuse-report-window.vue index cd04f62bca..f2cb369802 100644 --- a/packages/client/src/components/abuse-report-window.vue +++ b/packages/client/src/components/abuse-report-window.vue @@ -2,7 +2,7 @@ diff --git a/packages/client/src/components/channel-preview.vue b/packages/client/src/components/channel-preview.vue index 8d135a192f..dd3794a657 100644 --- a/packages/client/src/components/channel-preview.vue +++ b/packages/client/src/components/channel-preview.vue @@ -6,7 +6,7 @@
- + @@ -14,7 +14,7 @@
- + @@ -27,7 +27,7 @@
- {{ i18n.locale.updatedAt }}: + {{ i18n.ts.updatedAt }}:
diff --git a/packages/client/src/components/cw-button.vue b/packages/client/src/components/cw-button.vue index ccfd11462a..e7c9aabe4e 100644 --- a/packages/client/src/components/cw-button.vue +++ b/packages/client/src/components/cw-button.vue @@ -1,6 +1,6 @@ @@ -25,7 +25,7 @@ const label = computed(() => { return concat([ props.note.text ? [i18n.t('_cw.chars', { count: length(props.note.text) })] : [], props.note.files && props.note.files.length !== 0 ? [i18n.t('_cw.files', { count: props.note.files.length }) ] : [], - props.note.poll != null ? [i18n.locale.poll] : [] + props.note.poll != null ? [i18n.ts.poll] : [] ] as string[][]).join(' / '); }); diff --git a/packages/client/src/components/dialog.vue b/packages/client/src/components/dialog.vue index b6b649cde9..3e106a4f0c 100644 --- a/packages/client/src/components/dialog.vue +++ b/packages/client/src/components/dialog.vue @@ -28,8 +28,8 @@
- {{ (showCancelButton || input || select) ? i18n.locale.ok : i18n.locale.gotIt }} - {{ i18n.locale.cancel }} + {{ (showCancelButton || input || select) ? i18n.ts.ok : i18n.ts.gotIt }} + {{ i18n.ts.cancel }}
{{ action.text }} diff --git a/packages/client/src/components/drive-select-dialog.vue b/packages/client/src/components/drive-select-dialog.vue index 6d84511277..f6c59457d1 100644 --- a/packages/client/src/components/drive-select-dialog.vue +++ b/packages/client/src/components/drive-select-dialog.vue @@ -10,7 +10,7 @@ @closed="emit('closed')" > diff --git a/packages/client/src/components/drive-window.vue b/packages/client/src/components/drive-window.vue index 8b60bf7794..d08c5fb674 100644 --- a/packages/client/src/components/drive-window.vue +++ b/packages/client/src/components/drive-window.vue @@ -6,7 +6,7 @@ @closed="emit('closed')" > diff --git a/packages/client/src/components/drive.file.vue b/packages/client/src/components/drive.file.vue index fd6a813838..669c0d7db1 100644 --- a/packages/client/src/components/drive.file.vue +++ b/packages/client/src/components/drive.file.vue @@ -10,15 +10,15 @@ >
-

{{ i18n.locale.avatar }}

+

{{ i18n.ts.avatar }}

-

{{ i18n.locale.banner }}

+

{{ i18n.ts.banner }}

-

{{ i18n.locale.nsfw }}

+

{{ i18n.ts.nsfw }}

@@ -61,30 +61,30 @@ const title = computed(() => `${props.file.name}\n${props.file.type} ${bytes(pro function getMenu() { return [{ - text: i18n.locale.rename, + text: i18n.ts.rename, icon: 'fas fa-i-cursor', action: rename }, { - text: props.file.isSensitive ? i18n.locale.unmarkAsSensitive : i18n.locale.markAsSensitive, + text: props.file.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive, icon: props.file.isSensitive ? 'fas fa-eye' : 'fas fa-eye-slash', action: toggleSensitive }, { - text: i18n.locale.describeFile, + text: i18n.ts.describeFile, icon: 'fas fa-i-cursor', action: describe }, null, { - text: i18n.locale.copyUrl, + text: i18n.ts.copyUrl, icon: 'fas fa-link', action: copyUrl }, { type: 'a', href: props.file.url, target: '_blank', - text: i18n.locale.download, + text: i18n.ts.download, icon: 'fas fa-download', download: props.file.name }, null, { - text: i18n.locale.delete, + text: i18n.ts.delete, icon: 'fas fa-trash-alt', danger: true, action: deleteFile @@ -120,8 +120,8 @@ function onDragend() { function rename() { os.inputText({ - title: i18n.locale.renameFile, - placeholder: i18n.locale.inputNewFileName, + title: i18n.ts.renameFile, + placeholder: i18n.ts.inputNewFileName, default: props.file.name, }).then(({ canceled, result: name }) => { if (canceled) return; @@ -134,9 +134,9 @@ function rename() { function describe() { os.popup(import('@/components/media-caption.vue'), { - title: i18n.locale.describeFile, + title: i18n.ts.describeFile, input: { - placeholder: i18n.locale.inputNewDescription, + placeholder: i18n.ts.inputNewDescription, default: props.file.comment !== null ? props.file.comment : '', }, image: props.file diff --git a/packages/client/src/components/drive.folder.vue b/packages/client/src/components/drive.folder.vue index 20a6343cfe..57621bf097 100644 --- a/packages/client/src/components/drive.folder.vue +++ b/packages/client/src/components/drive.folder.vue @@ -20,7 +20,7 @@ {{ folder.name }}

- {{ i18n.locale.uploadFolder }} + {{ i18n.ts.uploadFolder }}

@@ -146,14 +146,14 @@ function onDrop(ev: DragEvent) { switch (err) { case 'detected-circular-definition': os.alert({ - title: i18n.locale.unableToProcess, - text: i18n.locale.circularReferenceFolder + title: i18n.ts.unableToProcess, + text: i18n.ts.circularReferenceFolder }); break; default: os.alert({ type: 'error', - text: i18n.locale.somethingHappened + text: i18n.ts.somethingHappened }); } }); @@ -184,8 +184,8 @@ function go() { function rename() { os.inputText({ - title: i18n.locale.renameFolder, - placeholder: i18n.locale.inputNewFolderName, + title: i18n.ts.renameFolder, + placeholder: i18n.ts.inputNewFolderName, default: props.folder.name }).then(({ canceled, result: name }) => { if (canceled) return; @@ -208,14 +208,14 @@ function deleteFolder() { case 'b0fc8a17-963c-405d-bfbc-859a487295e1': os.alert({ type: 'error', - title: i18n.locale.unableToDelete, - text: i18n.locale.hasChildFilesOrFolders + title: i18n.ts.unableToDelete, + text: i18n.ts.hasChildFilesOrFolders }); break; default: os.alert({ type: 'error', - text: i18n.locale.unableToDelete + text: i18n.ts.unableToDelete }); } }); @@ -227,7 +227,7 @@ function setAsUploadFolder() { function onContextmenu(ev: MouseEvent) { os.contextMenu([{ - text: i18n.locale.openInWindow, + text: i18n.ts.openInWindow, icon: 'fas fa-window-restore', action: () => { os.popup(import('./drive-window.vue'), { @@ -236,11 +236,11 @@ function onContextmenu(ev: MouseEvent) { }, 'closed'); } }, null, { - text: i18n.locale.rename, + text: i18n.ts.rename, icon: 'fas fa-i-cursor', action: rename, }, null, { - text: i18n.locale.delete, + text: i18n.ts.delete, icon: 'fas fa-trash-alt', danger: true, action: deleteFolder, diff --git a/packages/client/src/components/drive.nav-folder.vue b/packages/client/src/components/drive.nav-folder.vue index 7c35c5d3da..67223267c1 100644 --- a/packages/client/src/components/drive.nav-folder.vue +++ b/packages/client/src/components/drive.nav-folder.vue @@ -8,7 +8,7 @@ @drop.stop="onDrop" > - {{ folder == null ? i18n.locale.drive : folder.name }} + {{ folder == null ? i18n.ts.drive : folder.name }}
diff --git a/packages/client/src/components/drive.vue b/packages/client/src/components/drive.vue index e27b0a5fbb..b706839540 100644 --- a/packages/client/src/components/drive.vue +++ b/packages/client/src/components/drive.vue @@ -54,7 +54,7 @@ />
- {{ i18n.locale.loadMore }} + {{ i18n.ts.loadMore }}
- {{ i18n.locale.loadMore }} + {{ i18n.ts.loadMore }}

{{ i18n.t('empty-draghover') }}

-

{{ i18n.locale.emptyDrive }}
{{ i18n.t('empty-drive-description') }}

-

{{ i18n.locale.emptyFolder }}

+

{{ i18n.ts.emptyDrive }}
{{ i18n.t('empty-drive-description') }}

+

{{ i18n.ts.emptyFolder }}

@@ -253,14 +253,14 @@ function onDrop(e: DragEvent): any { switch (err) { case 'detected-circular-definition': os.alert({ - title: i18n.locale.unableToProcess, - text: i18n.locale.circularReferenceFolder + title: i18n.ts.unableToProcess, + text: i18n.ts.circularReferenceFolder }); break; default: os.alert({ type: 'error', - text: i18n.locale.somethingHappened + text: i18n.ts.somethingHappened }); } }); @@ -274,9 +274,9 @@ function selectLocalFile() { function urlUpload() { os.inputText({ - title: i18n.locale.uploadFromUrl, + title: i18n.ts.uploadFromUrl, type: 'url', - placeholder: i18n.locale.uploadFromUrlDescription + placeholder: i18n.ts.uploadFromUrlDescription }).then(({ canceled, result: url }) => { if (canceled || !url) return; os.api('drive/files/upload-from-url', { @@ -285,16 +285,16 @@ function urlUpload() { }); os.alert({ - title: i18n.locale.uploadFromUrlRequested, - text: i18n.locale.uploadFromUrlMayTakeTime + title: i18n.ts.uploadFromUrlRequested, + text: i18n.ts.uploadFromUrlMayTakeTime }); }); } function createFolder() { os.inputText({ - title: i18n.locale.createFolder, - placeholder: i18n.locale.folderName + title: i18n.ts.createFolder, + placeholder: i18n.ts.folderName }).then(({ canceled, result: name }) => { if (canceled) return; os.api('drive/folders/create', { @@ -308,8 +308,8 @@ function createFolder() { function renameFolder(folderToRename: Misskey.entities.DriveFolder) { os.inputText({ - title: i18n.locale.renameFolder, - placeholder: i18n.locale.inputNewFolderName, + title: i18n.ts.renameFolder, + placeholder: i18n.ts.inputNewFolderName, default: folderToRename.name }).then(({ canceled, result: name }) => { if (canceled) return; @@ -334,14 +334,14 @@ function deleteFolder(folderToDelete: Misskey.entities.DriveFolder) { case 'b0fc8a17-963c-405d-bfbc-859a487295e1': os.alert({ type: 'error', - title: i18n.locale.unableToDelete, - text: i18n.locale.hasChildFilesOrFolders + title: i18n.ts.unableToDelete, + text: i18n.ts.hasChildFilesOrFolders }); break; default: os.alert({ type: 'error', - text: i18n.locale.unableToDelete + text: i18n.ts.unableToDelete }); } }); @@ -562,29 +562,29 @@ function fetchMoreFiles() { function getMenu() { return [{ - text: i18n.locale.addFile, + text: i18n.ts.addFile, type: 'label' }, { - text: i18n.locale.upload, + text: i18n.ts.upload, icon: 'fas fa-upload', action: () => { selectLocalFile(); } }, { - text: i18n.locale.fromUrl, + text: i18n.ts.fromUrl, icon: 'fas fa-link', action: () => { urlUpload(); } }, null, { - text: folder.value ? folder.value.name : i18n.locale.drive, + text: folder.value ? folder.value.name : i18n.ts.drive, type: 'label' }, folder.value ? { - text: i18n.locale.renameFolder, + text: i18n.ts.renameFolder, icon: 'fas fa-i-cursor', action: () => { renameFolder(folder.value); } } : undefined, folder.value ? { - text: i18n.locale.deleteFolder, + text: i18n.ts.deleteFolder, icon: 'fas fa-trash-alt', action: () => { deleteFolder(folder.value as Misskey.entities.DriveFolder); } } : undefined, { - text: i18n.locale.createFolder, + text: i18n.ts.createFolder, icon: 'fas fa-folder-plus', action: () => { createFolder(); } }]; diff --git a/packages/client/src/components/emoji-picker.vue b/packages/client/src/components/emoji-picker.vue index 96670fa58c..f291510555 100644 --- a/packages/client/src/components/emoji-picker.vue +++ b/packages/client/src/components/emoji-picker.vue @@ -1,6 +1,6 @@ diff --git a/packages/client/src/components/forgot-password.vue b/packages/client/src/components/forgot-password.vue index c74e1ac75e..46cbf6bd70 100644 --- a/packages/client/src/components/forgot-password.vue +++ b/packages/client/src/components/forgot-password.vue @@ -5,28 +5,28 @@ @close="dialog.close()" @closed="emit('closed')" > - +
- + - - + + - {{ i18n.locale.send }} + {{ i18n.ts.send }}
- {{ i18n.locale._forgotPassword.ifNoEmail }} + {{ i18n.ts._forgotPassword.ifNoEmail }}
- {{ i18n.locale._forgotPassword.contactAdmin }} + {{ i18n.ts._forgotPassword.contactAdmin }}
diff --git a/packages/client/src/components/global/a.vue b/packages/client/src/components/global/a.vue index cf7385ca22..b1b6a0cdaf 100644 --- a/packages/client/src/components/global/a.vue +++ b/packages/client/src/components/global/a.vue @@ -43,31 +43,31 @@ function onContextmenu(ev) { text: props.to, }, { icon: 'fas fa-window-maximize', - text: i18n.locale.openInWindow, + text: i18n.ts.openInWindow, action: () => { os.pageWindow(props.to); } }, sideViewHook ? { icon: 'fas fa-columns', - text: i18n.locale.openInSideView, + text: i18n.ts.openInSideView, action: () => { sideViewHook(props.to); } } : undefined, { icon: 'fas fa-expand-alt', - text: i18n.locale.showInPage, + text: i18n.ts.showInPage, action: () => { router.push(props.to); } }, null, { icon: 'fas fa-external-link-alt', - text: i18n.locale.openInNewTab, + text: i18n.ts.openInNewTab, action: () => { window.open(props.to, '_blank'); } }, { icon: 'fas fa-link', - text: i18n.locale.copyLink, + text: i18n.ts.copyLink, action: () => { copyToClipboard(`${url}${props.to}`); } diff --git a/packages/client/src/components/global/header.vue b/packages/client/src/components/global/header.vue index a241ece407..02598d95b3 100644 --- a/packages/client/src/components/global/header.vue +++ b/packages/client/src/components/global/header.vue @@ -104,7 +104,7 @@ export default defineComponent({ if (props.info.share) { if (menu.length > 0) menu.push(null); menu.push({ - text: i18n.locale.share, + text: i18n.ts.share, icon: 'fas fa-share-alt', action: share }); diff --git a/packages/client/src/components/global/time.vue b/packages/client/src/components/global/time.vue index d2788264c5..19199fd408 100644 --- a/packages/client/src/components/global/time.vue +++ b/packages/client/src/components/global/time.vue @@ -31,9 +31,9 @@ const relative = $computed(() => { ago >= 3600 ? i18n.t('_ago.hoursAgo', { n: (~~(ago / 3600)).toString() }) : ago >= 60 ? i18n.t('_ago.minutesAgo', { n: (~~(ago / 60)).toString() }) : ago >= 10 ? i18n.t('_ago.secondsAgo', { n: (~~(ago % 60)).toString() }) : - ago >= -1 ? i18n.locale._ago.justNow : - ago < -1 ? i18n.locale._ago.future : - i18n.locale._ago.unknown); + ago >= -1 ? i18n.ts._ago.justNow : + ago < -1 ? i18n.ts._ago.future : + i18n.ts._ago.unknown); }); function tick() { diff --git a/packages/client/src/components/note-detailed.vue b/packages/client/src/components/note-detailed.vue index a3b30f726e..5fc3a0f334 100644 --- a/packages/client/src/components/note-detailed.vue +++ b/packages/client/src/components/note-detailed.vue @@ -250,7 +250,7 @@ function menu(viaKeyboard = false): void { function showRenoteMenu(viaKeyboard = false): void { if (!isMyRenote) return; os.popupMenu([{ - text: i18n.locale.unrenote, + text: i18n.ts.unrenote, icon: 'fas fa-trash-alt', danger: true, action: () => { diff --git a/packages/client/src/components/note.vue b/packages/client/src/components/note.vue index fc89c2777b..6c596fb60d 100644 --- a/packages/client/src/components/note.vue +++ b/packages/client/src/components/note.vue @@ -10,13 +10,13 @@ :class="{ renote: isRenote }" > -
{{ i18n.locale.pinnedNote }}
-
{{ i18n.locale.promotion }}
-
{{ i18n.locale.featured }}
+
{{ i18n.ts.pinnedNote }}
+
{{ i18n.ts.promotion }}
+
{{ i18n.ts.featured }}
- +