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

@@ -75,7 +75,7 @@
<div class="section-header">
<div class="section-label green">{{ formatMessage(messages.forPlayersLabel) }}</div>
<h2 class="section-tagline">
{{ formatMessage(messages.discoverCreationsTagline, { count: formattedProjectCount }) }}
{{ formatMessage(messages.discoverCreationsTagline, { count: PROJECT_COUNT }) }}
</h2>
<p class="section-description">
{{ formatMessage(messages.playersDescription) }}
@@ -466,8 +466,6 @@ const searchQuery = ref('leave')
const sortType = ref('relevance')
const PROJECT_COUNT = 100000
const formatNumber = new Intl.NumberFormat().format
const formattedProjectCount = computed(() => formatNumber(PROJECT_COUNT))
const auth = await useAuth()
@@ -526,7 +524,7 @@ const messages = defineMessages({
},
discoverCreationsTagline: {
id: 'landing.section.for-players.tagline',
defaultMessage: 'Discover over {count} creations',
defaultMessage: 'Discover over {count, number} creations',
},
shareContentTagline: {
id: 'landing.section.for-creators.tagline',