Verified Commit 1d5c4fa2 authored by Chocobozzz's avatar Chocobozzz
Browse files

Correctly format currency

parent e1a70e94
Pipeline #218072 passed with stage
in 37 seconds
......@@ -9,7 +9,7 @@
<div>
<div>
<img :src="`${$root['/']}img/process.svg`" height="200" alt="" class="pull-right">
<img :src="buildImgUrl('crowdfunding/process.svg')" height="200" alt="" class="pull-right">
<p v-translate>
From a birthday party with friends and family to a march for climate change,
......
......@@ -21,7 +21,8 @@ export default {
},
formatCurrency (amount) {
return new Intl.NumberFormat('fr-FR', { style: 'currency', currency: 'EUR' }).format(amount)
const options = { style: 'currency', currency: 'EUR', minimumFractionDigits: 0, maximumFractionDigits: 0 }
return new Intl.NumberFormat(this.getShortLocale(), options).format(amount)
},
getShortLocale () {
......
......@@ -25,7 +25,7 @@
</span>
<br>
<span class="text-muted" v-translate>
raised on the way to {{ formatCurrency(progress.max) }}
raised on the way to {{ formatCurrency(progress.max) }}
</span>
</p>
</div>
......@@ -1023,38 +1023,38 @@
amount: 10,
rewardsContent: {
d1: {
title: this.$gettext('€1 and more'),
title: this.$gettextInterpolate('%{ amount } and more', { amount: this.formatCurrency(1) }),
subtitle: this.$gettext('<small>equivalent to </small> a hug to the team!'),
p: this.$gettext('You show us your trust and support, and you contribute to the birth of Mobilizon: THANK YOU')
},
d25: {
title: this.$gettext('€25 and more'),
title: this.$gettextInterpolate('%{ amount } and more', { amount: this.formatCurrency(25) }),
subtitle: this.$gettext('<small>equivalent to</small> 15 minutes of conversation'),
p: this.$gettext('Meetings, phone calls and interviews… Sometimes, creating user-friendly software requires more spit than sweat!')
},
d42: {
title: this.$gettext('€42 and more'),
title: this.$gettextInterpolate('%{ amount } and more', { amount: this.formatCurrency(42) }),
subtitle: this.$gettext('<small>equivalent to</small> one hour of programming'),
p: this.$gettext('Accounting for payroll expenses, offices, equipment… this is the price of code written in humane conditions.')
},
d88: {
title: this.$gettext('€88 and more'),
title: this.$gettextInterpolate('%{ amount } and more', { amount: this.formatCurrency(88) }),
subtitle: this.$gettext('<small>equivalent to</small> a brainstorm'),
p: this.$gettext('Getting together around a whiteboard… that’s how the most beautiful ideas are born!')
},
d130: {
title: this.$gettext('€130 and more'),
title: this.$gettextInterpolate('%{ amount } and more', { amount: this.formatCurrency(130) }),
subtitle: this.$gettext('<small>equivalent to</small> one UX interview'),
p: this.$gettext('If you want to design software made for others, you need to ask them about their needs.')
}
},
sponsorsContent: {
d1000: {
title: this.$gettext('€1000 and more'),
title: this.$gettextInterpolate('%{ amount } and more', { amount: this.formatCurrency(1000) }),
p: this.$gettext('Your logo will be highlighted in the joinmobilizon.org hall of fame.')
},
d2500: {
title: this.$gettext('€2500 and more'),
title: this.$gettextInterpolate('%{ amount } and more', { amount: this.formatCurrency(2500) }),
p: this.$gettext('Your logo will also be shown, by default, in the “About” page of the software.')
}
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment