PageSourceSearch

https://charim-geonode.net/jsi18n/

js charim-geonode.net collected 2026-10-06 00:40:07 UTC 2,351 bytes, 79 lines download raw bytes

1
2/* gettext library */
3
4var catalog = new Array();
5
6function pluralidx(count) { return (count == 1) ? 0 : 1; }
7
8
9function gettext(msgid) {
10  var value = catalog[msgid];
11  if (typeof(value) == 'undefined') {
12    return msgid;
13  } else {
14    return (typeof(value) == 'string') ? value : value[0];
15  }
16}
17
18function ngettext(singular, plural, count) {
19  value = catalog[singular];
20  if (typeof(value) == 'undefined') {
21    return (count == 1) ? singular : plural;
22  } else {
23    return value[pluralidx(count)];
24  }
25}
26
27function gettext_noop(msgid) { return msgid; }
28
29function pgettext(context, msgid) {
30  var value = gettext(context + '\x04' + msgid);
31  if (value.indexOf('\x04') != -1) {
32    value = msgid;
33  }
34  return value;
35}
36
37function npgettext(context, singular, plural, count) {
38  var value = ngettext(context + '\x04' + singular, context + '\x04' + plural, count);
39  if (value.indexOf('\x04') != -1) {
40    value = ngettext(singular, plural, count);
41  }
42  return value;
43}
44
45function interpolate(fmt, obj, named) {
46  if (named) {
47    return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])});
48  } else {
49    return fmt.replace(/%s/g, function(match){return String(obj.shift())});
50  }
51}
52
53/* formatting library */
54
55var formats = new Array();
56
57formats['DATETIME_FORMAT'] = 'N j, Y, P';
58formats['DATE_FORMAT'] = 'N j, Y';
59formats['DECIMAL_SEPARATOR'] = '.';
60formats['MONTH_DAY_FORMAT'] = 'F j';
61formats['NUMBER_GROUPING'] = '0';
62formats['TIME_FORMAT'] = 'P';
63formats['FIRST_DAY_OF_WEEK'] = '0';
64formats['TIME_INPUT_FORMATS'] = ['%H:%M:%S', '%H:%M'];
65formats['THOUSAND_SEPARATOR'] = ',';
66formats['DATE_INPUT_FORMATS'] = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'];
67formats['YEAR_MONTH_FORMAT'] = 'F Y';
68formats['SHORT_DATE_FORMAT'] = 'm/d/Y';
69formats['SHORT_DATETIME_FORMAT'] = 'm/d/Y P';
70formats['DATETIME_INPUT_FORMATS'] = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'];
71
72function get_format(format_type) {
73    var value = formats[format_type];
74    if (typeof(value) == 'undefined') {
75      return format_type;
76    } else {
77      return value;
78    }
79}

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.