|
4 | 4 | init: function() { |
5 | 5 |
|
6 | 6 |
|
7 | | -(function (globals) { |
| 7 | +(function(globals) { |
8 | 8 |
|
9 | 9 | var django = globals.django || (globals.django = {}); |
10 | 10 |
|
11 | 11 |
|
12 | | - django.pluralidx = function (count) { return (count == 1) ? 0 : 1; }; |
| 12 | + django.pluralidx = function(count) { return (count == 1) ? 0 : 1; }; |
13 | 13 |
|
14 | 14 |
|
15 | | - |
16 | | - /* gettext identity library */ |
| 15 | + /* gettext library */ |
17 | 16 |
|
18 | | - django.gettext = function (msgid) { return msgid; }; |
19 | | - django.ngettext = function (singular, plural, count) { return (count == 1) ? singular : plural; }; |
20 | | - django.gettext_noop = function (msgid) { return msgid; }; |
21 | | - django.pgettext = function (context, msgid) { return msgid; }; |
22 | | - django.npgettext = function (context, singular, plural, count) { return (count == 1) ? singular : plural; }; |
| 17 | + django.catalog = django.catalog || {}; |
23 | 18 |
|
24 | | - |
25 | | - django.interpolate = function (fmt, obj, named) { |
26 | | - if (named) { |
27 | | - return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])}); |
28 | | - } else { |
29 | | - return fmt.replace(/%s/g, function(match){return String(obj.shift())}); |
30 | | - } |
| 19 | + var newcatalog = { |
| 20 | + "Answer": "\ub2f5\ubcc0", |
| 21 | + "Delete": "\uc0ad\uc81c", |
| 22 | + "Feedback": "\ud53c\ub4dc\ubc31", |
| 23 | + "Image URL": "\uc774\ubbf8\uc9c0 URL", |
| 24 | + "Image alternative text": "\uc774\ubbf8\uc9c0 \ub300\uccb4 \ud14d\uc2a4\ud2b8", |
| 25 | + "Question": "\uc9c8\ubb38", |
| 26 | + "Results": "\uacb0\uacfc", |
| 27 | + "Results gathered from {total} respondent.": [ |
| 28 | + "\ucd1d {total}\uba85\uc758 \uc751\ub2f5\uc790\ub85c\ubd80\ud130 \uc218\uc9d1\ud55c \uacb0\uacfc\uc785\ub2c8\ub2e4.", |
| 29 | + "\ucd1d {total}\uba85\uc758 \uc751\ub2f5\uc790\ub85c\ubd80\ud130 \uc218\uc9d1\ud55c \uacb0\uacfc\uc785\ub2c8\ub2e4." |
| 30 | + ], |
| 31 | + "Submit": "\uc81c\ucd9c", |
| 32 | + "This must have an image URL or text, and can have both. If you add an image, you must also provide an alternative text that describes the image in a way that would allow someone to answer the poll if the image did not load.": "\uc774\ubbf8\uc9c0 URL \ub610\ub294 \ud14d\uc2a4\ud2b8 \uc911 \ud558\ub098\ub294 \uc788\uc5b4\uc57c \ud558\uba70 \ub458 \ub2e4 \uc788\uc5b4\ub3c4 \ub429\ub2c8\ub2e4. \uc774\ubbf8\uc9c0\ub97c \ucd94\uac00\ud558\ub294 \uacbd\uc6b0, \uc774\ubbf8\uc9c0\uac00 \ub85c\ub4dc\ub418\uc9c0 \uc54a\ub354\ub77c\ub3c4 \ub204\uad6c\ub4e0\uc9c0 \ud22c\ud45c\uc5d0 \ucc38\uc5ec\ud560 \uc218 \uc788\ub3c4\ub85d \uc774\ubbf8\uc9c0\ub97c \uc124\uba85\ud558\ub294 \ub300\uccb4 \ud14d\uc2a4\ud2b8\ub3c4 \uc81c\uacf5\ud574\uc57c \ud569\ub2c8\ub2e4.", |
| 33 | + "You can make limited use of Markdown in answer texts, preferably only bold and italics.": "Markdown\uc740 \ub2f5\ubcc0 \ud14d\uc2a4\ud2b8\uc5d0\uc11c \uc81c\ud55c\uc801\uc73c\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc73c\uba70 \ubcfc\ub4dc\uccb4 \ubc0f \uc774\ud0e4\ub9ad\uccb4\ub9cc \uc0ac\uc6a9\ud558\ub294 \uac83\uc774 \uc88b\uc2b5\ub2c8\ub2e4.", |
| 34 | + "move poll down": "\ud22c\ud45c \ub0b4\ub9ac\uae30", |
| 35 | + "move poll up": "\ud22c\ud45c \uc62c\ub9ac\uae30" |
31 | 36 | }; |
| 37 | + for (var key in newcatalog) { |
| 38 | + django.catalog[key] = newcatalog[key]; |
| 39 | + } |
| 40 | + |
32 | 41 |
|
| 42 | + if (!django.jsi18n_initialized) { |
| 43 | + django.gettext = function(msgid) { |
| 44 | + var value = django.catalog[msgid]; |
| 45 | + if (typeof(value) == 'undefined') { |
| 46 | + return msgid; |
| 47 | + } else { |
| 48 | + return (typeof(value) == 'string') ? value : value[0]; |
| 49 | + } |
| 50 | + }; |
33 | 51 |
|
34 | | - /* formatting library */ |
| 52 | + django.ngettext = function(singular, plural, count) { |
| 53 | + var value = django.catalog[singular]; |
| 54 | + if (typeof(value) == 'undefined') { |
| 55 | + return (count == 1) ? singular : plural; |
| 56 | + } else { |
| 57 | + return value[django.pluralidx(count)]; |
| 58 | + } |
| 59 | + }; |
35 | 60 |
|
36 | | - django.formats = { |
| 61 | + django.gettext_noop = function(msgid) { return msgid; }; |
| 62 | + |
| 63 | + django.pgettext = function(context, msgid) { |
| 64 | + var value = django.gettext(context + '\x04' + msgid); |
| 65 | + if (value.indexOf('\x04') != -1) { |
| 66 | + value = msgid; |
| 67 | + } |
| 68 | + return value; |
| 69 | + }; |
| 70 | + |
| 71 | + django.npgettext = function(context, singular, plural, count) { |
| 72 | + var value = django.ngettext(context + '\x04' + singular, context + '\x04' + plural, count); |
| 73 | + if (value.indexOf('\x04') != -1) { |
| 74 | + value = django.ngettext(singular, plural, count); |
| 75 | + } |
| 76 | + return value; |
| 77 | + }; |
| 78 | + |
| 79 | + django.interpolate = function(fmt, obj, named) { |
| 80 | + if (named) { |
| 81 | + return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])}); |
| 82 | + } else { |
| 83 | + return fmt.replace(/%s/g, function(match){return String(obj.shift())}); |
| 84 | + } |
| 85 | + }; |
| 86 | + |
| 87 | + |
| 88 | + /* formatting library */ |
| 89 | + |
| 90 | + django.formats = { |
37 | 91 | "DATETIME_FORMAT": "Y\ub144 n\uc6d4 j\uc77c g:i A", |
38 | 92 | "DATETIME_INPUT_FORMATS": [ |
39 | 93 | "%Y-%m-%d %H:%M:%S", |
|
60 | 114 | ], |
61 | 115 | "DECIMAL_SEPARATOR": ".", |
62 | 116 | "FIRST_DAY_OF_WEEK": "0", |
63 | | - "MONTH_DAY_FORMAT": "F\uc6d4 j\uc77c", |
| 117 | + "MONTH_DAY_FORMAT": "n\uc6d4 j\uc77c", |
64 | 118 | "NUMBER_GROUPING": "3", |
65 | 119 | "SHORT_DATETIME_FORMAT": "Y-n-j H:i", |
66 | 120 | "SHORT_DATE_FORMAT": "Y-n-j.", |
|
73 | 127 | "%H\uc2dc %M\ubd84 %S\ucd08", |
74 | 128 | "%H\uc2dc %M\ubd84" |
75 | 129 | ], |
76 | | - "YEAR_MONTH_FORMAT": "Y\ub144 F\uc6d4" |
| 130 | + "YEAR_MONTH_FORMAT": "Y\ub144 n\uc6d4" |
77 | 131 | }; |
78 | 132 |
|
79 | | - django.get_format = function (format_type) { |
80 | | - var value = django.formats[format_type]; |
81 | | - if (typeof(value) == 'undefined') { |
82 | | - return format_type; |
83 | | - } else { |
84 | | - return value; |
85 | | - } |
86 | | - }; |
| 133 | + django.get_format = function(format_type) { |
| 134 | + var value = django.formats[format_type]; |
| 135 | + if (typeof(value) == 'undefined') { |
| 136 | + return format_type; |
| 137 | + } else { |
| 138 | + return value; |
| 139 | + } |
| 140 | + }; |
| 141 | + |
| 142 | + /* add to global namespace */ |
| 143 | + globals.pluralidx = django.pluralidx; |
| 144 | + globals.gettext = django.gettext; |
| 145 | + globals.ngettext = django.ngettext; |
| 146 | + globals.gettext_noop = django.gettext_noop; |
| 147 | + globals.pgettext = django.pgettext; |
| 148 | + globals.npgettext = django.npgettext; |
| 149 | + globals.interpolate = django.interpolate; |
| 150 | + globals.get_format = django.get_format; |
87 | 151 |
|
88 | | - /* add to global namespace */ |
89 | | - globals.pluralidx = django.pluralidx; |
90 | | - globals.gettext = django.gettext; |
91 | | - globals.ngettext = django.ngettext; |
92 | | - globals.gettext_noop = django.gettext_noop; |
93 | | - globals.pgettext = django.pgettext; |
94 | | - globals.npgettext = django.npgettext; |
95 | | - globals.interpolate = django.interpolate; |
96 | | - globals.get_format = django.get_format; |
| 152 | + django.jsi18n_initialized = true; |
| 153 | + } |
97 | 154 |
|
98 | 155 | }(this)); |
99 | 156 |
|
|
0 commit comments