forked from CGM_Public/pretix_original
Add pgettext to gettext stub
This commit is contained in:
@@ -13,6 +13,13 @@ function ngettext(singular, plural, count) {
|
||||
return plural;
|
||||
}
|
||||
|
||||
function pgettext(context, msgid) {
|
||||
if (typeof django !== 'undefined' && typeof django.pgettext !== 'undefined') {
|
||||
return django.pgettext(context, msgid);
|
||||
}
|
||||
return msgid;
|
||||
}
|
||||
|
||||
function interpolate(fmt, object, named) {
|
||||
if (named) {
|
||||
return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])});
|
||||
|
||||
Reference in New Issue
Block a user