

(function(globals) {

  var django = globals.django || (globals.django = {});

  
  django.pluralidx = function(count) { return (count == 1) ? 0 : 1; };
  

  /* gettext library */

  django.catalog = django.catalog || {};
  
  var newcatalog = {
    "1st %(weekday)s": "1. %(weekday)s",
    "2nd %(weekday)s": "2. %(weekday)s",
    "2nd last": "2. letzten",
    "2nd last %(weekday)s": "2. letzten %(weekday)s",
    "3rd %(weekday)s": "3. %(weekday)s",
    "3rd last": "3. letzten",
    "3rd last %(weekday)s": "3. letzten %(weekday)s",
    "4th %(weekday)s": "4. %(weekday)s",
    "4th last": "4. letzten",
    "Add date": "Datum hinzuf\u00fcgen",
    "Add rule": "Regel hinzuf\u00fcgen",
    "Apr": "Apr",
    "April": "April",
    "Aug": "Aug",
    "Aug.": "Aug.",
    "August": "August",
    "Calendar": "Kalender",
    "Date": "Datum",
    "Day of month\u0004%j%S": "%j%S.",
    "Dec": "Dez",
    "Dec.": "Dez.",
    "December": "Dezember",
    "Each": "Jeden",
    "Every": "Alle",
    "Exclude these occurences": "Diese Vorkommen ausschlie\u00dfen",
    "Exclude this date": "Dieses Datum ausschlie\u00dfen",
    "Feb": "Feb",
    "Feb.": "Feb.",
    "February": "Februar",
    "Frequency": "Frequenz",
    "Fri": "Fr",
    "Friday": "Freitag",
    "Friday first letter\u0004F": "F",
    "Jan": "Jan",
    "Jan.": "Jan.",
    "January": "Januar",
    "Jul": "Jul",
    "July": "Juli",
    "Jun": "Jun",
    "June": "Juni",
    "Mar": "Mrz",
    "March": "M\u00e4rz",
    "Mon": "Mo",
    "Monday": "Montag",
    "Monday first letter\u0004M": "M",
    "Nov": "Nov",
    "Nov.": "Nov.",
    "November": "November",
    "Occurs %(number)s time": "Bis zum %(number)s. Mal",
    "Occurs %(number)s times": "Bis zum %(number)s. Mal",
    "Oct": "Okt",
    "Oct.": "Okt.",
    "October": "Oktober",
    "On the": "Am",
    "Remove": "Entfernen",
    "Repeat until": "Wiederholen bis",
    "Sat": "Sa",
    "Saturday": "Samstag",
    "Saturday first letter\u0004S": "S",
    "Sep": "Sep",
    "Sept.": "Sept.",
    "September": "September",
    "Sun": "So",
    "Sunday": "Sonntag",
    "Sunday first letter\u0004S": "S",
    "Thu": "Do",
    "Thursday": "Donnerstag",
    "Thursday first letter\u0004T": "D",
    "Time": "Zeit",
    "Tue": "Di",
    "Tuesday": "Dienstag",
    "Tuesday first letter\u0004T": "D",
    "Until": "Bis",
    "Until date format\u0004%Y-%m-%d": "%d.%m.%Y",
    "Wed": "Mi",
    "Wednesday": "Mittwoch",
    "Wednesday first letter\u0004W": "M",
    "annually": "j\u00e4hrlich",
    "daily": "t\u00e4glich",
    "date\u0004%l, %F %j, %Y": "%l, %j. %F %Y",
    "day": "Tag",
    "days": "Tage",
    "each %(items)s": "jeden %(items)s",
    "every %(number)s %(freq)s": "alle %(number)s %(freq)s",
    "excluding": "ohne",
    "first %(weekday)s": "ersten %(weekday)s",
    "fourth %(weekday)s": "vierten %(weekday)s",
    "fourth last": "viertletzten",
    "hour": "Stunde",
    "hourly": "st\u00fcndlich",
    "hours": "Stunden",
    "including": "einschlie\u00dfend",
    "last": "letzten",
    "last %(weekday)s": "letzten %(weekday)s",
    "midnight": "Mitternacht",
    "minute": "Minute",
    "minutely": "min\u00fctlich",
    "minutes": "Minuten",
    "month": "Monat",
    "month name\u0004May": "Mai",
    "monthly": "monatlich",
    "months": "Monate",
    "noon": "Mittags",
    "occuring %(number)s time": "bis zum %(number)s. Mal",
    "occuring %(number)s times": "bis zum %(number)s. Mal",
    "on the %(items)s": "am %(items)s",
    "second": "Sekunde",
    "second %(weekday)s": "zweiten %(weekday)s",
    "second last": "vorletzten",
    "second last %(weekday)s": "vorletzten %(weekday)s",
    "secondly": "sek\u00fcndlich",
    "seconds": "Sekunden",
    "third %(weekday)s": "dritten %(weekday)s",
    "third last": "drittletzten",
    "third last %(weekday)s": "drittletzten %(weekday)s",
    "until %(date)s": "bis %(date)s",
    "week": "Woche",
    "weekly": "w\u00f6chentlich",
    "weeks": "Wochen",
    "year": "Jahr",
    "years": "Jahre"
  };
  for (var key in newcatalog) {
    django.catalog[key] = newcatalog[key];
  }
  

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

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

    django.gettext_noop = function(msgid) { return msgid; };

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

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

    django.interpolate = function(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 */

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

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

    /* add to global namespace */
    globals.pluralidx = django.pluralidx;
    globals.gettext = django.gettext;
    globals.ngettext = django.ngettext;
    globals.gettext_noop = django.gettext_noop;
    globals.pgettext = django.pgettext;
    globals.npgettext = django.npgettext;
    globals.interpolate = django.interpolate;
    globals.get_format = django.get_format;

    django.jsi18n_initialized = true;
  }

}(this));

