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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user