From ca1b1c932169e024a2ade514d65086099bd10be3 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Thu, 10 Nov 2022 14:12:44 -0800 Subject: [PATCH] refactor: :recycle: Replace all `$ts` with i18n --- CALCKEY.md | 1 + .../client/src/components/MkContainer.vue | 3 +- .../client/src/components/MkFormDialog.vue | 13 +- packages/client/src/components/MkGoogle.vue | 3 +- .../client/src/components/MkMediaBanner.vue | 5 +- .../client/src/components/MkMediaCaption.vue | 7 +- .../client/src/components/MkMediaImage.vue | 7 +- .../client/src/components/MkMediaVideo.vue | 5 +- .../src/components/MkModalPageWindow.vue | 5 +- .../src/components/MkPostFormAttaches.vue | 15 +- .../src/components/MkTokenGenerateWindow.vue | 11 +- .../client/src/components/form/suspense.vue | 5 +- .../client/src/components/global/MkAd.vue | 7 +- packages/client/src/pages/about.emojis.vue | 9 +- packages/client/src/pages/admin/metrics.vue | 139 +++++++++--------- packages/client/src/pages/announcements.vue | 3 +- .../client/src/pages/antenna-timeline.vue | 2 +- packages/client/src/pages/auth.form.vue | 7 +- packages/client/src/pages/auth.vue | 11 +- packages/client/src/pages/explore.users.vue | 7 +- .../page-editor/els/page-editor.el.button.vue | 31 ++-- .../page-editor/els/page-editor.el.canvas.vue | 9 +- .../els/page-editor.el.counter.vue | 9 +- .../page-editor/els/page-editor.el.if.vue | 8 +- .../page-editor/els/page-editor.el.image.vue | 3 +- .../page-editor/els/page-editor.el.note.vue | 9 +- .../els/page-editor.el.number-input.vue | 9 +- .../page-editor/els/page-editor.el.post.vue | 9 +- .../els/page-editor.el.radio-button.vue | 11 +- .../page-editor/els/page-editor.el.switch.vue | 9 +- .../els/page-editor.el.text-input.vue | 9 +- .../page-editor/els/page-editor.el.text.vue | 3 +- .../els/page-editor.el.textarea-input.vue | 9 +- .../els/page-editor.el.textarea.vue | 3 +- .../page-editor/page-editor.script-block.vue | 15 +- .../src/pages/page-editor/page-editor.vue | 30 ++-- packages/client/src/pages/settings/2fa.vue | 2 +- .../client/src/pages/user/index.activity.vue | 2 +- .../client/src/pages/user/index.photos.vue | 5 +- .../client/src/pages/welcome.entrance.b.vue | 17 ++- .../client/src/pages/welcome.entrance.c.vue | 25 ++-- packages/client/src/ui/classic.header.vue | 7 +- packages/client/src/ui/classic.sidebar.vue | 11 +- packages/client/src/ui/classic.widgets.vue | 5 +- packages/client/src/ui/visitor/a.vue | 7 +- packages/client/src/ui/visitor/b.vue | 16 +- packages/client/src/ui/visitor/header.vue | 19 +-- packages/client/src/ui/visitor/kanban.vue | 11 +- 48 files changed, 306 insertions(+), 262 deletions(-) diff --git a/CALCKEY.md b/CALCKEY.md index 8f64109e71..c2925d4c8f 100644 --- a/CALCKEY.md +++ b/CALCKEY.md @@ -84,6 +84,7 @@ - Phosphor icons instead of FontAwesome - Fully deprecate MkEmojiPickerWindow in favor of MkEmojiPickerDialog - Link hover effect +- Replace all `$ts` with i18n - Obliteration of Ai-chan - [Make showing ads optional](https://github.com/misskey-dev/misskey/pull/8996) - [Tapping avatar in mobile opens account modal](https://github.com/misskey-dev/misskey/pull/9056) diff --git a/packages/client/src/components/MkContainer.vue b/packages/client/src/components/MkContainer.vue index dbb028f48d..03a2b40ce6 100644 --- a/packages/client/src/components/MkContainer.vue +++ b/packages/client/src/components/MkContainer.vue @@ -20,7 +20,7 @@
@@ -29,6 +29,7 @@ diff --git a/packages/client/src/pages/announcements.vue b/packages/client/src/pages/announcements.vue index 17c056e0e5..b038a68573 100644 --- a/packages/client/src/pages/announcements.vue +++ b/packages/client/src/pages/announcements.vue @@ -10,7 +10,7 @@ @@ -25,6 +25,7 @@ import MkButton from '@/components/MkButton.vue'; import * as os from '@/os'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; +import { i18n } from '@/i18n'; const pagination = { endpoint: 'announcements' as const, diff --git a/packages/client/src/pages/antenna-timeline.vue b/packages/client/src/pages/antenna-timeline.vue index 3fd763138d..348512ea72 100644 --- a/packages/client/src/pages/antenna-timeline.vue +++ b/packages/client/src/pages/antenna-timeline.vue @@ -2,7 +2,7 @@
-
+
{{ app.description }}

-

{{ $ts._auth.permissionAsk }}

+

{{ i18n.ts._auth.permissionAsk }}

  • {{ $t(`_permissions.${p}`) }}
@@ -23,6 +23,7 @@ import { defineComponent } from 'vue'; import MkButton from '@/components/MkButton.vue'; import * as os from '@/os'; +import { i18n } from '@/i18n'; const emit = defineEmits<{ (ev: 'denied'): void; diff --git a/packages/client/src/pages/auth.vue b/packages/client/src/pages/auth.vue index bb55881a22..70c2c9622b 100644 --- a/packages/client/src/pages/auth.vue +++ b/packages/client/src/pages/auth.vue @@ -12,15 +12,15 @@ @accepted="accepted" />
-

{{ $ts._auth.denied }}

+

{{ i18n.ts._auth.denied }}

-

{{ session.app.isAuthorized ? $t('already-authorized') : $ts.allowed }}

-

{{ $ts._auth.callback }}

-

{{ $ts._auth.pleaseGoBack }}

+

{{ session.app.isAuthorized ? $t('already-authorized') : i18n.ts.allowed }}

+

{{ i18n.ts._auth.callback }}

+

{{ i18n.ts._auth.pleaseGoBack }}

-

{{ $ts.somethingHappened }}

+

{{ i18n.ts.somethingHappened }}