From 4bfdb66d468302ef7382c8ac51c3d52bfc4d8bdb Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Wed, 15 May 2024 15:14:46 -0700 Subject: [PATCH] fix: i18n t prop type --- web/components/I18nHost.ce.vue | 2 +- web/components/KeyActions.vue | 3 ++- web/components/Modal.vue | 3 ++- web/components/Registration/KeyLinkedStatus.vue | 3 ++- web/components/Registration/ReplaceCheck.vue | 3 ++- web/components/Registration/UpdateExpiration.vue | 3 ++- web/components/Registration/UpdateExpirationAction.vue | 3 ++- web/components/UpdateOs/CallbackButton.vue | 3 ++- web/components/UpdateOs/ChangelogModal.vue | 3 ++- web/components/UpdateOs/CheckUpdateResponseModal.vue | 3 ++- web/components/UpdateOs/Downgrade.vue | 3 ++- web/components/UpdateOs/IgnoredRelease.vue | 3 ++- web/components/UpdateOs/Status.vue | 3 ++- web/components/UpdateOs/ThirdPartyDrivers.vue | 3 ++- web/components/UpdateOs/Update.vue | 3 ++- web/components/UpdateOs/UpdateIneligible.vue | 3 ++- web/components/UserProfile/CallbackFeedback.vue | 3 ++- web/components/UserProfile/DropdownConnectStatus.vue | 3 ++- web/components/UserProfile/DropdownContent.vue | 3 ++- web/components/UserProfile/DropdownError.vue | 3 ++- web/components/UserProfile/DropdownItem.vue | 4 +++- web/components/UserProfile/DropdownLaunchpad.vue | 4 +++- web/components/UserProfile/DropdownTrigger.vue | 3 ++- web/components/UserProfile/Promo.vue | 3 ++- web/components/UserProfile/ServerState.vue | 3 ++- web/components/UserProfile/Trial.vue | 4 +++- web/components/UserProfile/UptimeExpire.vue | 3 ++- 27 files changed, 56 insertions(+), 27 deletions(-) diff --git a/web/components/I18nHost.ce.vue b/web/components/I18nHost.ce.vue index 2f7884915..86b00c49a 100644 --- a/web/components/I18nHost.ce.vue +++ b/web/components/I18nHost.ce.vue @@ -17,7 +17,7 @@ let nonDefaultLocale = false; * Unfortunately, this was the only way I could get the data from PHP to vue-i18n :( * I tried using i18n.setLocaleMessage() but it didn't work no matter what I tried. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any - window.LOCALE_DATA is set in webgui PHP +// eslint-disable-next-line @typescript-eslint/no-explicit-any const windowLocaleData = (window as any).LOCALE_DATA || null; if (windowLocaleData) { try { diff --git a/web/components/KeyActions.vue b/web/components/KeyActions.vue index 44286921a..0925f06f6 100644 --- a/web/components/KeyActions.vue +++ b/web/components/KeyActions.vue @@ -1,6 +1,7 @@ diff --git a/web/components/Registration/ReplaceCheck.vue b/web/components/Registration/ReplaceCheck.vue index e1da18130..295c891ec 100644 --- a/web/components/Registration/ReplaceCheck.vue +++ b/web/components/Registration/ReplaceCheck.vue @@ -4,6 +4,7 @@ import { KeyIcon, } from '@heroicons/vue/24/solid'; import { storeToRefs } from 'pinia'; +import type { ComposerTranslation } from 'vue-i18n'; import { DOCS_REGISTRATION_REPLACE_KEY } from '~/helpers/urls'; import { useReplaceRenewStore } from '~/store/replaceRenew'; @@ -12,7 +13,7 @@ const replaceRenewStore = useReplaceRenewStore(); const { replaceStatusOutput } = storeToRefs(replaceRenewStore); defineProps<{ - t: any; + t: ComposerTranslation; }>(); diff --git a/web/components/Registration/UpdateExpiration.vue b/web/components/Registration/UpdateExpiration.vue index b5f559ba6..dbe68c0dd 100644 --- a/web/components/Registration/UpdateExpiration.vue +++ b/web/components/Registration/UpdateExpiration.vue @@ -1,12 +1,13 @@