PageSourceSearch

https://lenobl.ru/en/jsi18n/?language=en

js lenobl.ru collected 2026-09-24 08:26:46 UTC 3,659 bytes, 133 lines download raw bytes

1
2
3(function(globals) {
4
5  var django = globals.django || (globals.django = {});
6
7  
8  django.pluralidx = function(count) { return (count == 1) ? 0 : 1; };
9  
10
11  /* gettext library */
12
13  django.catalog = django.catalog || {};
14  
15  var newcatalog = {
16    "\u0412\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e": "Default mode",
17    "\u0412\u0435\u0440\u0441\u0438\u044f \u0434\u043b\u044f \u0441\u043b\u0430\u0431\u043e\u0432\u0438\u0434\u044f\u0449\u0438\u0445": "Accessibility mode"
18  };
19  for (var key in newcatalog) {
20    django.catalog[key] = newcatalog[key];
21  }
22  
23
24  if (!django.jsi18n_initialized) {
25    django.gettext = function(msgid) {
26      var value = django.catalog[msgid];
27      if (typeof(value) == 'undefined') {
28        return msgid;
29      } else {
30        return (typeof(value) == 'string') ? value : value[0];
31      }
32    };
33
34    django.ngettext = function(singular, plural, count) {
35      var value = django.catalog[singular];
36      if (typeof(value) == 'undefined') {
37        return (count == 1) ? singular : plural;
38      } else {
39        return value.constructor === Array ? value[django.pluralidx(count)] : value;
40      }
41    };
42
43    django.gettext_noop = function(msgid) { return msgid; };
44
45    django.pgettext = function(context, msgid) {
46      var value = django.gettext(context + '\x04' + msgid);
47      if (value.indexOf('\x04') != -1) {
48        value = msgid;
49      }
50      return value;
51    };
52
53    django.npgettext = function(context, singular, plural, count) {
54      var value = django.ngettext(context + '\x04' + singular, context + '\x04' + plural, count);
55      if (value.indexOf('\x04') != -1) {
56        value = django.ngettext(singular, plural, count);
57      }
58      return value;
59    };
60
61    django.interpolate = function(fmt, obj, named) {
62      if (named) {
63        return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])});
64      } else {
65        return fmt.replace(/%s/g, function(match){return String(obj.shift())});
66      }
67    };
68
69
70    /* formatting library */
71
72    django.formats = {
73    "DATETIME_FORMAT": "N j, Y, P",
74    "DATETIME_INPUT_FORMATS": [
75      "%Y-%m-%d %H:%M:%S",
76      "%Y-%m-%d %H:%M:%S.%f",
77      "%Y-%m-%d %H:%M",
78      "%Y-%m-%d",
79      "%m/%d/%Y %H:%M:%S",
80      "%m/%d/%Y %H:%M:%S.%f",
81      "%m/%d/%Y %H:%M",
82      "%m/%d/%Y",
83      "%m/%d/%y %H:%M:%S",
84      "%m/%d/%y %H:%M:%S.%f",
85      "%m/%d/%y %H:%M",
86      "%m/%d/%y"
87    ],
88    "DATE_FORMAT": "N j, Y",
89    "DATE_INPUT_FORMATS": [
90      "%Y-%m-%d",
91      "%m/%d/%Y",
92      "%m/%d/%y"
93    ],
94    "DECIMAL_SEPARATOR": ".",
95    "FIRST_DAY_OF_WEEK": 0,
96    "MONTH_DAY_FORMAT": "F j",
97    "NUMBER_GROUPING": 3,
98    "SHORT_DATETIME_FORMAT": "m/d/Y P",
99    "SHORT_DATE_FORMAT": "m/d/Y",
100    "THOUSAND_SEPARATOR": ",",
101    "TIME_FORMAT": "P",
102    "TIME_INPUT_FORMATS": [
103      "%H:%M:%S",
104      "%H:%M:%S.%f",
105      "%H:%M"
106    ],
107    "YEAR_MONTH_FORMAT": "F Y"
108  };
109
110    django.get_format = function(format_type) {
111      var value = django.formats[format_type];
112      if (typeof(value) == 'undefined') {
113        return format_type;
114      } else {
115        return value;
116      }
117    };
118
119    /* add to global namespace */
120    globals.pluralidx = django.pluralidx;
121    globals.gettext = django.gettext;
122    globals.ngettext = django.ngettext;
123    globals.gettext_noop = django.gettext_noop;
124    globals.pgettext = django.pgettext;
125    globals.npgettext = django.npgettext;
126    globals.interpolate = django.interpolate;
127    globals.get_format = django.get_format;
128
129    django.jsi18n_initialized = true;
130  }
131
132}(this));
133

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.