
/* gettext library */

var catalog = new Array();

function pluralidx(n) {
  var v=(n != 1);
  if (typeof(v) == 'boolean') {
    return v ? 1 : 0;
  } else {
    return v;
  }
}
catalog['Are you sure you want to change tabs without saving the page first?'] = 'Sind Sie sicher, dass Sie den Reiter wechseln m\u00f6chten, ohne die Seite zu speichern?';
catalog['Are you sure you want to change the %(field_name)s without saving the page first?'] = 'Sind Sie sicher, dass Sie %(field_name)s \u00e4ndern m\u00f6chten, ohne die Seite zun\u00e4chst zu speichern?';
catalog['Are you sure you want to delete this plugin?'] = 'Sind Sie sicher, dass Sie das Plugin l\u00f6schen m\u00f6chten?';
catalog['Must be a valid e-mail address.'] = 'Bitte eine g\u00fcltige E-Mail-Adresse eingeben.';
catalog['Not all plugins are saved. Are you sure you want to save the page?\nAll unsaved plugin content will tried to save.'] = 'Nicht alle Plugins sind gespeichert. Sind sie sicher, dass Sie die Seite speichern m\u00f6chten? Es wird versucht, den Inhalt aller Plugins zu speichern.';
catalog['Please enter a valid date.'] = 'Bitte geben Sie ein g\u00fcltiges Datum ein.';
catalog['Please enter a valid postcode.'] = 'Bitte geben Sie eine g\u00fcltige PLZ ein.';
catalog['Please enter only digits.'] = 'Bitte nur Ziffern eingeben.';
catalog['This field is required.'] = 'Bitte f\u00fcllen Sie dieses Feld aus.';
catalog['This field must be checked.'] = 'Dieses Feld muss ausgew\u00e4hlt sein.';
catalog['This field must have a minimal length of {arg1}.'] = 'Dieses Feld muss mindestens {arg1} Zeichen enthalten.';
catalog['calculate'] = 'berechnen';
catalog['continue'] = 'weiter';


function gettext(msgid) {
  var value = catalog[msgid];
  if (typeof(value) == 'undefined') {
    return msgid;
  } else {
    return (typeof(value) == 'string') ? value : value[0];
  }
}

function ngettext(singular, plural, count) {
  value = catalog[singular];
  if (typeof(value) == 'undefined') {
    return (count == 1) ? singular : plural;
  } else {
    return value[pluralidx(count)];
  }
}

function gettext_noop(msgid) { return msgid; }

function pgettext(context, msgid) {
  var value = gettext(context + '' + msgid);
  if (value.indexOf('') != -1) {
    value = msgid;
  }
  return value;
}

function npgettext(context, singular, plural, count) {
  var value = ngettext(context + '' + singular, context + '' + plural, count);
  if (value.indexOf('') != -1) {
    value = ngettext(singular, plural, count);
  }
  return value;
}

function interpolate(fmt, obj, named) {
  if (named) {
    return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])});
  } else {
    return fmt.replace(/%s/g, function(match){return String(obj.shift())});
  }
}

/* formatting library */

var formats = new Array();

formats['DATETIME_FORMAT'] = 'j. F Y H:i:s';
formats['DATE_FORMAT'] = 'j. F Y';
formats['DECIMAL_SEPARATOR'] = ',';
formats['MONTH_DAY_FORMAT'] = 'j. F';
formats['NUMBER_GROUPING'] = '3';
formats['TIME_FORMAT'] = 'H:i:s';
formats['FIRST_DAY_OF_WEEK'] = '1';
formats['TIME_INPUT_FORMATS'] = ['%H:%M:%S', '%H:%M'];
formats['THOUSAND_SEPARATOR'] = '.';
formats['DATE_INPUT_FORMATS'] = ['%d.%m.%Y', '%d.%m.%y', '%Y-%m-%d', '%y-%m-%d'];
formats['YEAR_MONTH_FORMAT'] = 'F Y';
formats['SHORT_DATE_FORMAT'] = 'd.m.Y';
formats['SHORT_DATETIME_FORMAT'] = 'd.m.Y H:i:s';
formats['DATETIME_INPUT_FORMATS'] = ['%d.%m.%Y %H:%M:%S', '%d.%m.%Y %H:%M', '%d.%m.%Y', '%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d'];

function get_format(format_type) {
    var value = formats[format_type];
    if (typeof(value) == 'undefined') {
      return msgid;
    } else {
      return value;
    }
}

