From 288049e2dcc5c8c15dc978b95b45a820ab81876f Mon Sep 17 00:00:00 2001 From: Johann150 Date: Mon, 1 Aug 2022 21:45:05 +0200 Subject: [PATCH] refactor: reduce usage of i18n global variables --- .../client/src/pages/antenna-timeline.vue | 2 +- packages/client/src/pages/federation.vue | 48 +++++++++---------- packages/client/src/pages/miauth.vue | 19 ++++---- packages/client/src/ui/visitor/header.vue | 15 +++--- 4 files changed, 43 insertions(+), 41 deletions(-) diff --git a/packages/client/src/pages/antenna-timeline.vue b/packages/client/src/pages/antenna-timeline.vue index 1865781a0..1eb8322b1 100644 --- a/packages/client/src/pages/antenna-timeline.vue +++ b/packages/client/src/pages/antenna-timeline.vue @@ -2,7 +2,7 @@
-
+
- + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
diff --git a/packages/client/src/pages/miauth.vue b/packages/client/src/pages/miauth.vue index a07d1368a..740498363 100644 --- a/packages/client/src/pages/miauth.vue +++ b/packages/client/src/pages/miauth.vue @@ -7,27 +7,27 @@
-

{{ $ts._auth.denied }}

+

{{ i18n.ts._auth.denied }}

-

{{ $ts._auth.callback }}

-

{{ $ts._auth.pleaseGoBack }}

+

{{ i18n.ts._auth.callback }}

+

{{ i18n.ts._auth.pleaseGoBack }}

-
{{ $t('_auth.shareAccess', { name: name }) }}
-
{{ $ts._auth.shareAccessAsk }}
+
{{ i18n.t('_auth.shareAccess', { name: name }) }}
+
{{ i18n.ts._auth.shareAccessAsk }}
-

{{ $ts._auth.permissionAsk }}

+

{{ i18n.ts._auth.permissionAsk }}

    -
  • {{ $t(`_permissions.${p}`) }}
  • +
  • {{ i18n.t(`_permissions.${p}`) }}
@@ -43,6 +43,7 @@ import MkButton from '@/components/ui/button.vue'; import * as os from '@/os'; import { login } from '@/account'; import { appendQuery, query } from '@/scripts/url'; +import { i18n } from '@/i18n'; const props = defineProps<{ session: string; diff --git a/packages/client/src/ui/visitor/header.vue b/packages/client/src/ui/visitor/header.vue index b01c147c5..71d393284 100644 --- a/packages/client/src/ui/visitor/header.vue +++ b/packages/client/src/ui/visitor/header.vue @@ -2,10 +2,10 @@
- {{ $ts.home }} - {{ $ts.explore }} - {{ $ts.featured }} - {{ $ts.channel }} + {{ i18n.ts.home }} + {{ i18n.ts.explore }} + {{ i18n.ts.featured }} + {{ i18n.ts.channel }}
@@ -47,6 +47,7 @@ import XSigninDialog from '@/components/signin-dialog.vue'; import XSignupDialog from '@/components/signup-dialog.vue'; import * as os from '@/os'; import { search } from '@/scripts/search'; +import { i18n } from '@/i18n'; defineProps<{ info: any;