forked from CGM_Public/pretix_original
Refactor stubs for gettext JS function (#5170)
This commit is contained in:
@@ -1,18 +1,4 @@
|
||||
/*global $,gettext*/
|
||||
|
||||
function gettext(msgid) {
|
||||
if (typeof django !== 'undefined' && typeof django.gettext !== 'undefined') {
|
||||
return django.gettext(msgid);
|
||||
}
|
||||
return msgid;
|
||||
}
|
||||
|
||||
function ngettext(singular, plural, count) {
|
||||
if (typeof django !== 'undefined' && typeof django.ngettext !== 'undefined') {
|
||||
return django.ngettext(singular, plural, count);
|
||||
}
|
||||
return plural;
|
||||
}
|
||||
/*global $, gettext, ngettext, interpolate */
|
||||
|
||||
function formatPrice(price, currency, locale) {
|
||||
if (!window.Intl || !Intl.NumberFormat) return price;
|
||||
|
||||
Reference in New Issue
Block a user