Impove Intl formatting (#5372)

* Improve Intl formatting

* Additional fixes

* Fixed formatters were not updated on locale change

* Fixed formatNumber was not updated on locale change

* Additional formatting and fixes after merge

* Run prepr:frontend

* Remove `'` in icon map

* Run `pnpm install`

* fix: lint + import

* Additional fixes

---------

Co-authored-by: Calum H. <calum@modrinth.com>
Co-authored-by: Calum H. (IMB11) <contact@cal.engineer>
This commit is contained in:
Jerozgen
2026-03-10 00:29:32 +03:00
committed by GitHub
parent 9b2f0c88cd
commit f62c60a681
88 changed files with 839 additions and 621 deletions

View File

@@ -616,7 +616,7 @@
<p v-if="lowestPrice" class="m-0 text-sm">
{{
formatMessage(messages.startingAtPrice, {
price: formatPrice(locale, lowestPrice, selectedCurrency, true),
price: formatPrice(lowestPrice, selectedCurrency, true),
})
}}
</p>
@@ -644,10 +644,10 @@ import {
injectNotificationManager,
IntlFormatted,
ModrinthServersPurchaseModal,
useFormatPrice,
useVIntl,
} from '@modrinth/ui'
import { monthsInInterval } from '@modrinth/ui/src/utils/billing.ts'
import { formatPrice } from '@modrinth/utils'
import { computed } from 'vue'
import { useBaseFetch } from '@/composables/fetch.js'
@@ -678,7 +678,8 @@ if (affiliateCode.value) {
}
const { addNotification } = injectNotificationManager()
const { locale, formatMessage } = useVIntl()
const { formatMessage } = useVIntl()
const formatPrice = useFormatPrice()
const flags = useFeatureFlags()
const messages = defineMessages({