discourse-subscriptions/assets/javascripts/discourse/helpers/format-curency.js.es6

18 lines
401 B
Plaintext
Raw Normal View History

2019-10-30 23:35:19 -04:00
// TODO: typo in this helper name: currency not curency.
2019-09-12 04:16:47 -04:00
export default Ember.Helper.helper(function(params) {
let currencySign;
switch (Discourse.SiteSettings.discourse_patrons_currency) {
2019-09-12 04:18:50 -04:00
case "EUR":
2019-09-12 04:16:47 -04:00
currencySign = "€";
break;
2019-09-12 04:18:50 -04:00
case "GBP":
2019-09-12 04:16:47 -04:00
currencySign = "£";
break;
default:
currencySign = "$";
}
2019-09-12 04:18:50 -04:00
return [currencySign, params[0]].join("");
2019-09-12 04:16:47 -04:00
});