From c60851f80bd925c4d4010d2553f2d7daed3ad5e0 Mon Sep 17 00:00:00 2001
From: Prospector <6166773+Prospector@users.noreply.github.com>
Date: Wed, 24 Dec 2025 14:05:23 -0800
Subject: [PATCH] sample languages refactor
---
apps/app-frontend/package.json | 3 +-
apps/app-frontend/src/App.vue | 2 +-
.../src/components/ui/IntlFormatted.vue | 70 +
.../src/components/ui/UpdateToast.vue | 2 +-
.../src/components/ui/friends/FriendsList.vue | 4 +-
.../components/ui/friends/FriendsSection.vue | 2 +-
.../ui/instance_settings/GeneralSettings.vue | 2 +-
.../ui/instance_settings/HooksSettings.vue | 2 +-
.../InstallationSettings.vue | 2 +-
.../ui/instance_settings/JavaSettings.vue | 2 +-
.../ui/instance_settings/WindowSettings.vue | 2 +-
.../components/ui/modal/AppSettingsModal.vue | 2 +-
.../ui/modal/InstanceSettingsModal.vue | 2 +-
.../src/components/ui/world/InstanceItem.vue | 2 +-
.../src/components/ui/world/WorldItem.vue | 4 +-
.../ui/world/modal/AddServerModal.vue | 2 +-
.../ui/world/modal/EditServerModal.vue | 2 +-
.../modal/EditSingleplayerWorldModal.vue | 2 +-
.../ui/world/modal/HideFromHomeOption.vue | 3 +-
.../ui/world/modal/ServerModalBody.vue | 2 +-
apps/app-frontend/src/i18n.ts | 37 +
apps/app-frontend/src/main.js | 21 +-
apps/app-frontend/src/pages/Browse.vue | 2 +-
apps/app-frontend/src/pages/instance/Mods.vue | 2 +-
.../src/pages/instance/Worlds.vue | 2 +-
apps/app-frontend/src/utils/i18n-vintl.ts | 53 +
apps/frontend/nuxt.config.ts | 246 +--
apps/frontend/package.json | 6 +-
.../src/components/ui/IntlFormatted.vue | 69 +
.../src/components/ui/ProjectMemberHeader.vue | 2 +-
.../ui/create/CollectionCreateModal.vue | 3 +-
.../components/ui/create/CreateLimitAlert.vue | 3 +-
.../ui/create/OrganizationCreateModal.vue | 3 +-
.../ui/create/ProjectCreateModal.vue | 3 +-
.../ui/dashboard/CreatorTaxFormModal.vue | 4 +-
.../ui/dashboard/CreatorWithdrawModal.vue | 2 +-
.../ui/dashboard/RevenueInputField.vue | 3 +-
.../ui/dashboard/WithdrawFeeBreakdown.vue | 3 +-
.../withdraw-stages/CompletionStage.vue | 4 +-
.../LegacyPaypalDetailsStage.vue | 4 +-
.../withdraw-stages/MethodSelectionStage.vue | 4 +-
.../withdraw-stages/MuralpayDetailsStage.vue | 4 +-
.../withdraw-stages/MuralpayKycStage.vue | 2 +-
.../withdraw-stages/TaxFormStage.vue | 4 +-
.../TremendousDetailsStage.vue | 4 +-
.../ui/moderation/ModerationProjectNags.vue | 3 +-
.../src/components/ui/news/LatestNewsRow.vue | 3 +-
.../servers/marketing/ServerPlanSelector.vue | 3 +-
.../ui/servers/notice/NoticeDashboardItem.vue | 3 +-
apps/frontend/src/error.vue | 4 +-
apps/frontend/src/i18n.config.ts | 59 +
apps/frontend/src/layouts/default.vue | 2 +-
apps/frontend/src/pages/[type]/[id].vue | 2 +-
.../src/pages/[type]/[id]/settings.vue | 2 +-
.../[type]/[id]/settings/environment.vue | 3 +-
.../pages/[type]/[id]/settings/general.vue | 3 +-
.../src/pages/admin/servers/notices.vue | 2 +-
apps/frontend/src/pages/app.vue | 4 +-
apps/frontend/src/pages/auth/authorize.vue | 2 +-
apps/frontend/src/pages/auth/sign-in.vue | 2 +-
apps/frontend/src/pages/auth/sign-up.vue | 2 +-
apps/frontend/src/pages/auth/welcome.vue | 3 +-
apps/frontend/src/pages/collection/[id].vue | 4 +-
.../src/pages/dashboard/affiliate-links.vue | 3 +-
.../src/pages/dashboard/revenue/index.vue | 2 +-
.../src/pages/dashboard/revenue/transfers.vue | 2 +-
apps/frontend/src/pages/discover.vue | 2 +-
apps/frontend/src/pages/hosting/index.vue | 2 +-
.../src/pages/hosting/manage/[id].vue | 2 +-
apps/frontend/src/pages/index.vue | 4 +-
apps/frontend/src/pages/moderation.vue | 2 +-
apps/frontend/src/pages/moderation/index.vue | 2 +-
.../src/pages/moderation/reports/index.vue | 2 +-
.../src/pages/moderation/technical-review.vue | 2 +-
apps/frontend/src/pages/report.vue | 4 +-
apps/frontend/src/pages/settings/index.vue | 4 +-
apps/frontend/src/pages/settings/language.vue | 255 +--
apps/frontend/src/pages/settings/pats.vue | 2 +-
apps/frontend/src/pages/settings/profile.vue | 3 +-
apps/frontend/src/pages/user/[id].vue | 2 +-
apps/frontend/src/plugins/i18n-bridge.ts | 44 +
apps/frontend/src/plugins/locale-loader.ts | 49 +
.../src/providers/creator-withdraw.ts | 2 +-
apps/frontend/src/types/vintl.d.ts | 26 +-
apps/frontend/src/utils/i18n-vintl.ts | 53 +
apps/frontend/src/utils/muralpay-rails.ts | 2 +-
packages/moderation/package.json | 4 +-
packages/moderation/src/data/nags/core.ts | 2 +-
.../moderation/src/data/nags/description.ts | 2 +-
packages/moderation/src/data/nags/links.ts | 2 +-
packages/moderation/src/data/nags/tags.ts | 2 +-
packages/moderation/src/types/nags.ts | 2 +-
packages/ui/package.json | 4 +-
.../affiliate/AffiliateLinkCard.vue | 2 +-
.../affiliate/AffiliateLinkCreateModal.vue | 2 +-
packages/ui/src/components/base/Badge.vue | 2 +-
packages/ui/src/components/base/CopyCode.vue | 2 +-
.../components/base/EnvironmentIndicator.vue | 2 +-
packages/ui/src/components/base/FilterBar.vue | 2 +-
.../ui/src/components/base/IconSelect.vue | 2 +-
.../ui/src/components/base/IntlFormatted.vue | 74 +
.../ui/src/components/base/ServerNotice.vue | 2 +-
.../ui/src/components/base/SettingsLabel.vue | 4 +-
.../components/base/UnsavedChangesPopup.vue | 2 +-
packages/ui/src/components/base/index.ts | 1 +
.../billing/AddPaymentMethodModal.vue | 2 +-
.../billing/ExpandableInvoiceTotal.vue | 2 +-
.../billing/FormattedPaymentMethod.vue | 2 +-
.../billing/ModalBasedServerPlan.vue | 2 +-
.../billing/ModrinthServersPurchaseModal.vue | 2 +-
.../src/components/billing/PurchaseModal.vue | 2 +-
.../billing/ServersPurchase0Plan.vue | 2 +-
.../billing/ServersPurchase1Region.vue | 4 +-
.../billing/ServersPurchase2PaymentMethod.vue | 2 +-
.../billing/ServersPurchase3Review.vue | 2 +-
.../billing/ServersRegionButton.vue | 2 +-
.../components/changelog/ChangelogEntry.vue | 2 +-
.../ui/src/components/modal/TabbedModal.vue | 2 +-
.../project/ProjectPageVersions.vue | 2 +-
.../project/ProjectSidebarCompatibility.vue | 7 +-
.../project/ProjectSidebarCreators.vue | 2 +-
.../project/ProjectSidebarDetails.vue | 2 +-
.../project/ProjectSidebarLinks.vue | 2 +-
.../components/project/ProjectStatusBadge.vue | 2 +-
.../ProjectSettingsEnvSelector.vue | 2 +-
.../components/search/SearchFilterControl.vue | 2 +-
.../components/search/SearchSidebarFilter.vue | 2 +-
.../components/servers/backups/BackupItem.vue | 2 +-
.../src/components/settings/ThemeSelector.vue | 2 +-
.../version/VersionChannelIndicator.vue | 2 +-
packages/ui/src/composables/how-ago.ts | 66 +-
packages/ui/src/utils/common-messages.ts | 2 +-
packages/ui/src/utils/game-modes.ts | 3 +-
packages/ui/src/utils/i18n.ts | 82 +
packages/ui/src/utils/index.ts | 1 +
packages/ui/src/utils/notices.ts | 2 +-
packages/ui/src/utils/regions.ts | 2 +-
packages/ui/src/utils/search.ts | 3 +-
pnpm-lock.yaml | 1660 ++++-------------
139 files changed, 1265 insertions(+), 1909 deletions(-)
create mode 100644 apps/app-frontend/src/components/ui/IntlFormatted.vue
create mode 100644 apps/app-frontend/src/i18n.ts
create mode 100644 apps/app-frontend/src/utils/i18n-vintl.ts
create mode 100644 apps/frontend/src/components/ui/IntlFormatted.vue
create mode 100644 apps/frontend/src/i18n.config.ts
create mode 100644 apps/frontend/src/plugins/i18n-bridge.ts
create mode 100644 apps/frontend/src/plugins/locale-loader.ts
create mode 100644 apps/frontend/src/utils/i18n-vintl.ts
create mode 100644 packages/ui/src/components/base/IntlFormatted.vue
create mode 100644 packages/ui/src/utils/i18n.ts
diff --git a/apps/app-frontend/package.json b/apps/app-frontend/package.json
index 44439c7976..a0468e289a 100644
--- a/apps/app-frontend/package.json
+++ b/apps/app-frontend/package.json
@@ -28,7 +28,8 @@
"@tauri-apps/plugin-updater": "^2.7.1",
"@tauri-apps/plugin-window-state": "^2.2.2",
"@types/three": "^0.172.0",
- "@vintl/vintl": "^4.4.1",
+ "intl-messageformat": "^10.7.7",
+ "vue-i18n": "^9.14.0",
"@vueuse/core": "^11.1.0",
"dayjs": "^1.11.10",
"floating-vue": "^5.2.2",
diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue
index 26f041fd68..4a56f35eed 100644
--- a/apps/app-frontend/src/App.vue
+++ b/apps/app-frontend/src/App.vue
@@ -48,7 +48,6 @@ import { getCurrentWindow } from '@tauri-apps/api/window'
import { openUrl } from '@tauri-apps/plugin-opener'
import { type } from '@tauri-apps/plugin-os'
import { saveWindowState, StateFlags } from '@tauri-apps/plugin-window-state'
-import { defineMessages, useVIntl } from '@vintl/vintl'
import { $fetch } from 'ofetch'
import { computed, onMounted, onUnmounted, provide, ref, watch } from 'vue'
import { RouterView, useRoute, useRouter } from 'vue-router'
@@ -98,6 +97,7 @@ import {
import { useError } from '@/store/error.js'
import { useInstall } from '@/store/install.js'
import { useLoading, useTheming } from '@/store/state'
+import { defineMessages, useVIntl } from '@/utils/i18n-vintl'
import { create_profile_and_install_from_file } from './helpers/pack'
import { generateSkinPreviews } from './helpers/rendering/batch-skin-renderer'
diff --git a/apps/app-frontend/src/components/ui/IntlFormatted.vue b/apps/app-frontend/src/components/ui/IntlFormatted.vue
new file mode 100644
index 0000000000..77a4d29c36
--- /dev/null
+++ b/apps/app-frontend/src/components/ui/IntlFormatted.vue
@@ -0,0 +1,70 @@
+
+
+
+
+