From ef23d820ecb234679e108953247f921cdf64f3ef Mon Sep 17 00:00:00 2001 From: "Calum H. (IMB11)" Date: Fri, 16 Jan 2026 08:00:43 +0000 Subject: [PATCH 1/2] fix i18n --- apps/frontend/src/utils/analytics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/frontend/src/utils/analytics.js b/apps/frontend/src/utils/analytics.js index cfa73703db..6cd961e4ee 100644 --- a/apps/frontend/src/utils/analytics.js +++ b/apps/frontend/src/utils/analytics.js @@ -1,5 +1,6 @@ import dayjs from 'dayjs' import { computed, ref, watch } from 'vue' +import { injectI18n } from '@modrinth/ui' // note: build step can miss unix import for some reason, so // we have to import it like this @@ -7,8 +8,7 @@ import { computed, ref, watch } from 'vue' const { unix } = dayjs export function useCountryNames(style = 'long') { - const { $i18n } = useNuxtApp() - const locale = $i18n.locale + const { locale } = injectI18n() const displayNames = computed( () => new Intl.DisplayNames([locale.value], { type: 'region', style }), ) From bdb33d0e335259f57850c6459e2b367f5f612c56 Mon Sep 17 00:00:00 2001 From: "Calum H. (IMB11)" Date: Fri, 16 Jan 2026 09:05:20 +0000 Subject: [PATCH 2/2] fix: lint --- apps/frontend/src/utils/analytics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/frontend/src/utils/analytics.js b/apps/frontend/src/utils/analytics.js index 6cd961e4ee..aa1a435a3a 100644 --- a/apps/frontend/src/utils/analytics.js +++ b/apps/frontend/src/utils/analytics.js @@ -1,6 +1,6 @@ +import { injectI18n } from '@modrinth/ui' import dayjs from 'dayjs' import { computed, ref, watch } from 'vue' -import { injectI18n } from '@modrinth/ui' // note: build step can miss unix import for some reason, so // we have to import it like this