71 return str(ord(';')) |
73 return str(ord(';')) |
72 |
74 |
73 def generateLocaleInfo(path): |
75 def generateLocaleInfo(path): |
74 (dir_name, file_name) = os.path.split(path) |
76 (dir_name, file_name) = os.path.split(path) |
75 |
77 |
76 exp = re.compile(r"([a-z]+)_([A-Z]{2})\.xml") |
78 if not path.endswith(".xml"): |
77 m = exp.match(file_name) |
|
78 if not m: |
|
79 return {} |
79 return {} |
80 |
80 language_code = findEntryInFile(path, "identity/language", attribute="type")[0] |
81 language_code = m.group(1) |
81 if language_code == 'root': |
82 country_code = m.group(2) |
82 # just skip it |
|
83 return {} |
|
84 country_code = findEntryInFile(path, "identity/territory", attribute="type")[0] |
|
85 script_code = findEntryInFile(path, "identity/script", attribute="type")[0] |
|
86 variant_code = findEntryInFile(path, "identity/variant", attribute="type")[0] |
|
87 |
|
88 # we should handle fully qualified names with the territory |
|
89 if not country_code: |
|
90 return {} |
|
91 |
|
92 # we do not support scripts and variants |
|
93 if variant_code or script_code: |
|
94 return {} |
83 |
95 |
84 language_id = enumdata.languageCodeToId(language_code) |
96 language_id = enumdata.languageCodeToId(language_code) |
85 if language_id == -1: |
97 if language_id == -1: |
86 sys.stderr.write("unnknown language code \"" + language_code + "\"\n") |
98 sys.stderr.write("unnknown language code \"" + language_code + "\"\n") |
87 return {} |
99 return {} |
88 language = enumdata.language_list[language_id][0] |
100 language = enumdata.language_list[language_id][0] |
89 |
101 |
90 country_id = enumdata.countryCodeToId(country_code) |
102 country_id = enumdata.countryCodeToId(country_code) |
91 if country_id == -1: |
103 country = "" |
|
104 if country_id != -1: |
|
105 country = enumdata.country_list[country_id][0] |
|
106 if country == "": |
92 sys.stderr.write("unnknown country code \"" + country_code + "\"\n") |
107 sys.stderr.write("unnknown country code \"" + country_code + "\"\n") |
93 return {} |
108 return {} |
94 country = enumdata.country_list[country_id][0] |
109 |
95 |
110 # So we say we accept only those values that have "contributed" or |
96 base = dir_name + "/" + language_code + "_" + country_code |
111 # "approved" resolution. see http://www.unicode.org/cldr/process.html |
|
112 # But we only respect the resolution for new datas for backward |
|
113 # compatibility. |
|
114 draft = DraftResolution.contributed |
97 |
115 |
98 result = {} |
116 result = {} |
99 result['base'] = base |
|
100 |
|
101 result['language'] = language |
117 result['language'] = language |
102 result['country'] = country |
118 result['country'] = country |
|
119 result['language_code'] = language_code |
|
120 result['country_code'] = country_code |
|
121 result['script_code'] = script_code |
|
122 result['variant_code'] = variant_code |
103 result['language_id'] = language_id |
123 result['language_id'] = language_id |
104 result['country_id'] = country_id |
124 result['country_id'] = country_id |
105 result['decimal'] = findEntry(base, "numbers/symbols/decimal") |
125 |
106 result['group'] = findEntry(base, "numbers/symbols/group") |
126 numberingSystem = None |
107 result['list'] = findEntry(base, "numbers/symbols/list") |
127 try: |
108 result['percent'] = findEntry(base, "numbers/symbols/percentSign") |
128 numbering_system = findEntry(path, "numbers/defaultNumberingSystem") |
109 result['zero'] = findEntry(base, "numbers/symbols/nativeZeroDigit") |
129 except: |
110 result['minus'] = findEntry(base, "numbers/symbols/minusSign") |
130 pass |
111 result['plus'] = findEntry(base, "numbers/symbols/plusSign") |
131 def get_number_in_system(path, xpath, numbering_system): |
112 result['exp'] = findEntry(base, "numbers/symbols/exponential").lower() |
132 if numbering_system: |
113 result['am'] = findEntry(base, "dates/calendars/calendar[gregorian]/am", draft=DraftResolution.approved) |
133 try: |
114 result['pm'] = findEntry(base, "dates/calendars/calendar[gregorian]/pm", draft=DraftResolution.approved) |
134 return findEntry(path, xpath + "[numberSystem=" + numbering_system + "]") |
115 result['longDateFormat'] = findEntry(base, "dates/calendars/calendar[gregorian]/dateFormats/dateFormatLength[full]/dateFormat/pattern") |
135 except xpathlite.Error: |
116 result['shortDateFormat'] = findEntry(base, "dates/calendars/calendar[gregorian]/dateFormats/dateFormatLength[short]/dateFormat/pattern") |
136 pass |
117 result['longTimeFormat'] = findEntry(base, "dates/calendars/calendar[gregorian]/timeFormats/timeFormatLength[full]/timeFormat/pattern") |
137 return findEntry(path, xpath) |
118 result['shortTimeFormat'] = findEntry(base, "dates/calendars/calendar[gregorian]/timeFormats/timeFormatLength[short]/timeFormat/pattern") |
138 result['decimal'] = get_number_in_system(path, "numbers/symbols/decimal", numbering_system) |
|
139 result['group'] = get_number_in_system(path, "numbers/symbols/group", numbering_system) |
|
140 result['list'] = get_number_in_system(path, "numbers/symbols/list", numbering_system) |
|
141 result['percent'] = get_number_in_system(path, "numbers/symbols/percentSign", numbering_system) |
|
142 result['zero'] = get_number_in_system(path, "numbers/symbols/nativeZeroDigit", numbering_system) |
|
143 result['minus'] = get_number_in_system(path, "numbers/symbols/minusSign", numbering_system) |
|
144 result['plus'] = get_number_in_system(path, "numbers/symbols/plusSign", numbering_system) |
|
145 result['exp'] = get_number_in_system(path, "numbers/symbols/exponential", numbering_system).lower() |
|
146 result['am'] = findEntry(path, "dates/calendars/calendar[gregorian]/dayPeriods/dayPeriodContext[format]/dayPeriodWidth[wide]/dayPeriod[am]", draft) |
|
147 result['pm'] = findEntry(path, "dates/calendars/calendar[gregorian]/dayPeriods/dayPeriodContext[format]/dayPeriodWidth[wide]/dayPeriod[pm]", draft) |
|
148 result['longDateFormat'] = convert_date(findEntry(path, "dates/calendars/calendar[gregorian]/dateFormats/dateFormatLength[full]/dateFormat/pattern")) |
|
149 result['shortDateFormat'] = convert_date(findEntry(path, "dates/calendars/calendar[gregorian]/dateFormats/dateFormatLength[short]/dateFormat/pattern")) |
|
150 result['longTimeFormat'] = convert_date(findEntry(path, "dates/calendars/calendar[gregorian]/timeFormats/timeFormatLength[full]/timeFormat/pattern")) |
|
151 result['shortTimeFormat'] = convert_date(findEntry(path, "dates/calendars/calendar[gregorian]/timeFormats/timeFormatLength[short]/timeFormat/pattern")) |
119 |
152 |
120 standalone_long_month_path = "dates/calendars/calendar[gregorian]/months/monthContext[stand-alone]/monthWidth[wide]/month" |
153 standalone_long_month_path = "dates/calendars/calendar[gregorian]/months/monthContext[stand-alone]/monthWidth[wide]/month" |
121 result['standaloneLongMonths'] \ |
154 result['standaloneLongMonths'] \ |
122 = findEntry(base, standalone_long_month_path + "[1]") + ";" \ |
155 = findEntry(path, standalone_long_month_path + "[1]") + ";" \ |
123 + findEntry(base, standalone_long_month_path + "[2]") + ";" \ |
156 + findEntry(path, standalone_long_month_path + "[2]") + ";" \ |
124 + findEntry(base, standalone_long_month_path + "[3]") + ";" \ |
157 + findEntry(path, standalone_long_month_path + "[3]") + ";" \ |
125 + findEntry(base, standalone_long_month_path + "[4]") + ";" \ |
158 + findEntry(path, standalone_long_month_path + "[4]") + ";" \ |
126 + findEntry(base, standalone_long_month_path + "[5]") + ";" \ |
159 + findEntry(path, standalone_long_month_path + "[5]") + ";" \ |
127 + findEntry(base, standalone_long_month_path + "[6]") + ";" \ |
160 + findEntry(path, standalone_long_month_path + "[6]") + ";" \ |
128 + findEntry(base, standalone_long_month_path + "[7]") + ";" \ |
161 + findEntry(path, standalone_long_month_path + "[7]") + ";" \ |
129 + findEntry(base, standalone_long_month_path + "[8]") + ";" \ |
162 + findEntry(path, standalone_long_month_path + "[8]") + ";" \ |
130 + findEntry(base, standalone_long_month_path + "[9]") + ";" \ |
163 + findEntry(path, standalone_long_month_path + "[9]") + ";" \ |
131 + findEntry(base, standalone_long_month_path + "[10]") + ";" \ |
164 + findEntry(path, standalone_long_month_path + "[10]") + ";" \ |
132 + findEntry(base, standalone_long_month_path + "[11]") + ";" \ |
165 + findEntry(path, standalone_long_month_path + "[11]") + ";" \ |
133 + findEntry(base, standalone_long_month_path + "[12]") + ";" |
166 + findEntry(path, standalone_long_month_path + "[12]") + ";" |
134 |
167 |
135 standalone_short_month_path = "dates/calendars/calendar[gregorian]/months/monthContext[stand-alone]/monthWidth[abbreviated]/month" |
168 standalone_short_month_path = "dates/calendars/calendar[gregorian]/months/monthContext[stand-alone]/monthWidth[abbreviated]/month" |
136 result['standaloneShortMonths'] \ |
169 result['standaloneShortMonths'] \ |
137 = findEntry(base, standalone_short_month_path + "[1]") + ";" \ |
170 = findEntry(path, standalone_short_month_path + "[1]") + ";" \ |
138 + findEntry(base, standalone_short_month_path + "[2]") + ";" \ |
171 + findEntry(path, standalone_short_month_path + "[2]") + ";" \ |
139 + findEntry(base, standalone_short_month_path + "[3]") + ";" \ |
172 + findEntry(path, standalone_short_month_path + "[3]") + ";" \ |
140 + findEntry(base, standalone_short_month_path + "[4]") + ";" \ |
173 + findEntry(path, standalone_short_month_path + "[4]") + ";" \ |
141 + findEntry(base, standalone_short_month_path + "[5]") + ";" \ |
174 + findEntry(path, standalone_short_month_path + "[5]") + ";" \ |
142 + findEntry(base, standalone_short_month_path + "[6]") + ";" \ |
175 + findEntry(path, standalone_short_month_path + "[6]") + ";" \ |
143 + findEntry(base, standalone_short_month_path + "[7]") + ";" \ |
176 + findEntry(path, standalone_short_month_path + "[7]") + ";" \ |
144 + findEntry(base, standalone_short_month_path + "[8]") + ";" \ |
177 + findEntry(path, standalone_short_month_path + "[8]") + ";" \ |
145 + findEntry(base, standalone_short_month_path + "[9]") + ";" \ |
178 + findEntry(path, standalone_short_month_path + "[9]") + ";" \ |
146 + findEntry(base, standalone_short_month_path + "[10]") + ";" \ |
179 + findEntry(path, standalone_short_month_path + "[10]") + ";" \ |
147 + findEntry(base, standalone_short_month_path + "[11]") + ";" \ |
180 + findEntry(path, standalone_short_month_path + "[11]") + ";" \ |
148 + findEntry(base, standalone_short_month_path + "[12]") + ";" |
181 + findEntry(path, standalone_short_month_path + "[12]") + ";" |
149 |
182 |
150 standalone_narrow_month_path = "dates/calendars/calendar[gregorian]/months/monthContext[stand-alone]/monthWidth[narrow]/month" |
183 standalone_narrow_month_path = "dates/calendars/calendar[gregorian]/months/monthContext[stand-alone]/monthWidth[narrow]/month" |
151 result['standaloneNarrowMonths'] \ |
184 result['standaloneNarrowMonths'] \ |
152 = findEntry(base, standalone_narrow_month_path + "[1]") + ";" \ |
185 = findEntry(path, standalone_narrow_month_path + "[1]") + ";" \ |
153 + findEntry(base, standalone_narrow_month_path + "[2]") + ";" \ |
186 + findEntry(path, standalone_narrow_month_path + "[2]") + ";" \ |
154 + findEntry(base, standalone_narrow_month_path + "[3]") + ";" \ |
187 + findEntry(path, standalone_narrow_month_path + "[3]") + ";" \ |
155 + findEntry(base, standalone_narrow_month_path + "[4]") + ";" \ |
188 + findEntry(path, standalone_narrow_month_path + "[4]") + ";" \ |
156 + findEntry(base, standalone_narrow_month_path + "[5]") + ";" \ |
189 + findEntry(path, standalone_narrow_month_path + "[5]") + ";" \ |
157 + findEntry(base, standalone_narrow_month_path + "[6]") + ";" \ |
190 + findEntry(path, standalone_narrow_month_path + "[6]") + ";" \ |
158 + findEntry(base, standalone_narrow_month_path + "[7]") + ";" \ |
191 + findEntry(path, standalone_narrow_month_path + "[7]") + ";" \ |
159 + findEntry(base, standalone_narrow_month_path + "[8]") + ";" \ |
192 + findEntry(path, standalone_narrow_month_path + "[8]") + ";" \ |
160 + findEntry(base, standalone_narrow_month_path + "[9]") + ";" \ |
193 + findEntry(path, standalone_narrow_month_path + "[9]") + ";" \ |
161 + findEntry(base, standalone_narrow_month_path + "[10]") + ";" \ |
194 + findEntry(path, standalone_narrow_month_path + "[10]") + ";" \ |
162 + findEntry(base, standalone_narrow_month_path + "[11]") + ";" \ |
195 + findEntry(path, standalone_narrow_month_path + "[11]") + ";" \ |
163 + findEntry(base, standalone_narrow_month_path + "[12]") + ";" |
196 + findEntry(path, standalone_narrow_month_path + "[12]") + ";" |
164 |
197 |
165 long_month_path = "dates/calendars/calendar[gregorian]/months/monthContext[format]/monthWidth[wide]/month" |
198 long_month_path = "dates/calendars/calendar[gregorian]/months/monthContext[format]/monthWidth[wide]/month" |
166 result['longMonths'] \ |
199 result['longMonths'] \ |
167 = findEntry(base, long_month_path + "[1]") + ";" \ |
200 = findEntry(path, long_month_path + "[1]") + ";" \ |
168 + findEntry(base, long_month_path + "[2]") + ";" \ |
201 + findEntry(path, long_month_path + "[2]") + ";" \ |
169 + findEntry(base, long_month_path + "[3]") + ";" \ |
202 + findEntry(path, long_month_path + "[3]") + ";" \ |
170 + findEntry(base, long_month_path + "[4]") + ";" \ |
203 + findEntry(path, long_month_path + "[4]") + ";" \ |
171 + findEntry(base, long_month_path + "[5]") + ";" \ |
204 + findEntry(path, long_month_path + "[5]") + ";" \ |
172 + findEntry(base, long_month_path + "[6]") + ";" \ |
205 + findEntry(path, long_month_path + "[6]") + ";" \ |
173 + findEntry(base, long_month_path + "[7]") + ";" \ |
206 + findEntry(path, long_month_path + "[7]") + ";" \ |
174 + findEntry(base, long_month_path + "[8]") + ";" \ |
207 + findEntry(path, long_month_path + "[8]") + ";" \ |
175 + findEntry(base, long_month_path + "[9]") + ";" \ |
208 + findEntry(path, long_month_path + "[9]") + ";" \ |
176 + findEntry(base, long_month_path + "[10]") + ";" \ |
209 + findEntry(path, long_month_path + "[10]") + ";" \ |
177 + findEntry(base, long_month_path + "[11]") + ";" \ |
210 + findEntry(path, long_month_path + "[11]") + ";" \ |
178 + findEntry(base, long_month_path + "[12]") + ";" |
211 + findEntry(path, long_month_path + "[12]") + ";" |
179 |
212 |
180 short_month_path = "dates/calendars/calendar[gregorian]/months/monthContext[format]/monthWidth[abbreviated]/month" |
213 short_month_path = "dates/calendars/calendar[gregorian]/months/monthContext[format]/monthWidth[abbreviated]/month" |
181 result['shortMonths'] \ |
214 result['shortMonths'] \ |
182 = findEntry(base, short_month_path + "[1]") + ";" \ |
215 = findEntry(path, short_month_path + "[1]") + ";" \ |
183 + findEntry(base, short_month_path + "[2]") + ";" \ |
216 + findEntry(path, short_month_path + "[2]") + ";" \ |
184 + findEntry(base, short_month_path + "[3]") + ";" \ |
217 + findEntry(path, short_month_path + "[3]") + ";" \ |
185 + findEntry(base, short_month_path + "[4]") + ";" \ |
218 + findEntry(path, short_month_path + "[4]") + ";" \ |
186 + findEntry(base, short_month_path + "[5]") + ";" \ |
219 + findEntry(path, short_month_path + "[5]") + ";" \ |
187 + findEntry(base, short_month_path + "[6]") + ";" \ |
220 + findEntry(path, short_month_path + "[6]") + ";" \ |
188 + findEntry(base, short_month_path + "[7]") + ";" \ |
221 + findEntry(path, short_month_path + "[7]") + ";" \ |
189 + findEntry(base, short_month_path + "[8]") + ";" \ |
222 + findEntry(path, short_month_path + "[8]") + ";" \ |
190 + findEntry(base, short_month_path + "[9]") + ";" \ |
223 + findEntry(path, short_month_path + "[9]") + ";" \ |
191 + findEntry(base, short_month_path + "[10]") + ";" \ |
224 + findEntry(path, short_month_path + "[10]") + ";" \ |
192 + findEntry(base, short_month_path + "[11]") + ";" \ |
225 + findEntry(path, short_month_path + "[11]") + ";" \ |
193 + findEntry(base, short_month_path + "[12]") + ";" |
226 + findEntry(path, short_month_path + "[12]") + ";" |
194 |
227 |
195 narrow_month_path = "dates/calendars/calendar[gregorian]/months/monthContext[format]/monthWidth[narrow]/month" |
228 narrow_month_path = "dates/calendars/calendar[gregorian]/months/monthContext[format]/monthWidth[narrow]/month" |
196 result['narrowMonths'] \ |
229 result['narrowMonths'] \ |
197 = findEntry(base, narrow_month_path + "[1]") + ";" \ |
230 = findEntry(path, narrow_month_path + "[1]") + ";" \ |
198 + findEntry(base, narrow_month_path + "[2]") + ";" \ |
231 + findEntry(path, narrow_month_path + "[2]") + ";" \ |
199 + findEntry(base, narrow_month_path + "[3]") + ";" \ |
232 + findEntry(path, narrow_month_path + "[3]") + ";" \ |
200 + findEntry(base, narrow_month_path + "[4]") + ";" \ |
233 + findEntry(path, narrow_month_path + "[4]") + ";" \ |
201 + findEntry(base, narrow_month_path + "[5]") + ";" \ |
234 + findEntry(path, narrow_month_path + "[5]") + ";" \ |
202 + findEntry(base, narrow_month_path + "[6]") + ";" \ |
235 + findEntry(path, narrow_month_path + "[6]") + ";" \ |
203 + findEntry(base, narrow_month_path + "[7]") + ";" \ |
236 + findEntry(path, narrow_month_path + "[7]") + ";" \ |
204 + findEntry(base, narrow_month_path + "[8]") + ";" \ |
237 + findEntry(path, narrow_month_path + "[8]") + ";" \ |
205 + findEntry(base, narrow_month_path + "[9]") + ";" \ |
238 + findEntry(path, narrow_month_path + "[9]") + ";" \ |
206 + findEntry(base, narrow_month_path + "[10]") + ";" \ |
239 + findEntry(path, narrow_month_path + "[10]") + ";" \ |
207 + findEntry(base, narrow_month_path + "[11]") + ";" \ |
240 + findEntry(path, narrow_month_path + "[11]") + ";" \ |
208 + findEntry(base, narrow_month_path + "[12]") + ";" |
241 + findEntry(path, narrow_month_path + "[12]") + ";" |
209 |
242 |
210 long_day_path = "dates/calendars/calendar[gregorian]/days/dayContext[format]/dayWidth[wide]/day" |
243 long_day_path = "dates/calendars/calendar[gregorian]/days/dayContext[format]/dayWidth[wide]/day" |
211 result['longDays'] \ |
244 result['longDays'] \ |
212 = findEntry(base, long_day_path + "[sun]") + ";" \ |
245 = findEntry(path, long_day_path + "[sun]") + ";" \ |
213 + findEntry(base, long_day_path + "[mon]") + ";" \ |
246 + findEntry(path, long_day_path + "[mon]") + ";" \ |
214 + findEntry(base, long_day_path + "[tue]") + ";" \ |
247 + findEntry(path, long_day_path + "[tue]") + ";" \ |
215 + findEntry(base, long_day_path + "[wed]") + ";" \ |
248 + findEntry(path, long_day_path + "[wed]") + ";" \ |
216 + findEntry(base, long_day_path + "[thu]") + ";" \ |
249 + findEntry(path, long_day_path + "[thu]") + ";" \ |
217 + findEntry(base, long_day_path + "[fri]") + ";" \ |
250 + findEntry(path, long_day_path + "[fri]") + ";" \ |
218 + findEntry(base, long_day_path + "[sat]") + ";" |
251 + findEntry(path, long_day_path + "[sat]") + ";" |
219 |
252 |
220 short_day_path = "dates/calendars/calendar[gregorian]/days/dayContext[format]/dayWidth[abbreviated]/day" |
253 short_day_path = "dates/calendars/calendar[gregorian]/days/dayContext[format]/dayWidth[abbreviated]/day" |
221 result['shortDays'] \ |
254 result['shortDays'] \ |
222 = findEntry(base, short_day_path + "[sun]") + ";" \ |
255 = findEntry(path, short_day_path + "[sun]") + ";" \ |
223 + findEntry(base, short_day_path + "[mon]") + ";" \ |
256 + findEntry(path, short_day_path + "[mon]") + ";" \ |
224 + findEntry(base, short_day_path + "[tue]") + ";" \ |
257 + findEntry(path, short_day_path + "[tue]") + ";" \ |
225 + findEntry(base, short_day_path + "[wed]") + ";" \ |
258 + findEntry(path, short_day_path + "[wed]") + ";" \ |
226 + findEntry(base, short_day_path + "[thu]") + ";" \ |
259 + findEntry(path, short_day_path + "[thu]") + ";" \ |
227 + findEntry(base, short_day_path + "[fri]") + ";" \ |
260 + findEntry(path, short_day_path + "[fri]") + ";" \ |
228 + findEntry(base, short_day_path + "[sat]") + ";" |
261 + findEntry(path, short_day_path + "[sat]") + ";" |
229 |
262 |
230 narrow_day_path = "dates/calendars/calendar[gregorian]/days/dayContext[format]/dayWidth[narrow]/day" |
263 narrow_day_path = "dates/calendars/calendar[gregorian]/days/dayContext[format]/dayWidth[narrow]/day" |
231 result['narrowDays'] \ |
264 result['narrowDays'] \ |
232 = findEntry(base, narrow_day_path + "[sun]") + ";" \ |
265 = findEntry(path, narrow_day_path + "[sun]") + ";" \ |
233 + findEntry(base, narrow_day_path + "[mon]") + ";" \ |
266 + findEntry(path, narrow_day_path + "[mon]") + ";" \ |
234 + findEntry(base, narrow_day_path + "[tue]") + ";" \ |
267 + findEntry(path, narrow_day_path + "[tue]") + ";" \ |
235 + findEntry(base, narrow_day_path + "[wed]") + ";" \ |
268 + findEntry(path, narrow_day_path + "[wed]") + ";" \ |
236 + findEntry(base, narrow_day_path + "[thu]") + ";" \ |
269 + findEntry(path, narrow_day_path + "[thu]") + ";" \ |
237 + findEntry(base, narrow_day_path + "[fri]") + ";" \ |
270 + findEntry(path, narrow_day_path + "[fri]") + ";" \ |
238 + findEntry(base, narrow_day_path + "[sat]") + ";" |
271 + findEntry(path, narrow_day_path + "[sat]") + ";" |
239 |
272 |
240 standalone_long_day_path = "dates/calendars/calendar[gregorian]/days/dayContext[stand-alone]/dayWidth[wide]/day" |
273 standalone_long_day_path = "dates/calendars/calendar[gregorian]/days/dayContext[stand-alone]/dayWidth[wide]/day" |
241 result['standaloneLongDays'] \ |
274 result['standaloneLongDays'] \ |
242 = findEntry(base, standalone_long_day_path + "[sun]") + ";" \ |
275 = findEntry(path, standalone_long_day_path + "[sun]") + ";" \ |
243 + findEntry(base, standalone_long_day_path + "[mon]") + ";" \ |
276 + findEntry(path, standalone_long_day_path + "[mon]") + ";" \ |
244 + findEntry(base, standalone_long_day_path + "[tue]") + ";" \ |
277 + findEntry(path, standalone_long_day_path + "[tue]") + ";" \ |
245 + findEntry(base, standalone_long_day_path + "[wed]") + ";" \ |
278 + findEntry(path, standalone_long_day_path + "[wed]") + ";" \ |
246 + findEntry(base, standalone_long_day_path + "[thu]") + ";" \ |
279 + findEntry(path, standalone_long_day_path + "[thu]") + ";" \ |
247 + findEntry(base, standalone_long_day_path + "[fri]") + ";" \ |
280 + findEntry(path, standalone_long_day_path + "[fri]") + ";" \ |
248 + findEntry(base, standalone_long_day_path + "[sat]") + ";" |
281 + findEntry(path, standalone_long_day_path + "[sat]") + ";" |
249 |
282 |
250 standalone_short_day_path = "dates/calendars/calendar[gregorian]/days/dayContext[stand-alone]/dayWidth[abbreviated]/day" |
283 standalone_short_day_path = "dates/calendars/calendar[gregorian]/days/dayContext[stand-alone]/dayWidth[abbreviated]/day" |
251 result['standaloneShortDays'] \ |
284 result['standaloneShortDays'] \ |
252 = findEntry(base, standalone_short_day_path + "[sun]") + ";" \ |
285 = findEntry(path, standalone_short_day_path + "[sun]") + ";" \ |
253 + findEntry(base, standalone_short_day_path + "[mon]") + ";" \ |
286 + findEntry(path, standalone_short_day_path + "[mon]") + ";" \ |
254 + findEntry(base, standalone_short_day_path + "[tue]") + ";" \ |
287 + findEntry(path, standalone_short_day_path + "[tue]") + ";" \ |
255 + findEntry(base, standalone_short_day_path + "[wed]") + ";" \ |
288 + findEntry(path, standalone_short_day_path + "[wed]") + ";" \ |
256 + findEntry(base, standalone_short_day_path + "[thu]") + ";" \ |
289 + findEntry(path, standalone_short_day_path + "[thu]") + ";" \ |
257 + findEntry(base, standalone_short_day_path + "[fri]") + ";" \ |
290 + findEntry(path, standalone_short_day_path + "[fri]") + ";" \ |
258 + findEntry(base, standalone_short_day_path + "[sat]") + ";" |
291 + findEntry(path, standalone_short_day_path + "[sat]") + ";" |
259 |
292 |
260 standalone_narrow_day_path = "dates/calendars/calendar[gregorian]/days/dayContext[stand-alone]/dayWidth[narrow]/day" |
293 standalone_narrow_day_path = "dates/calendars/calendar[gregorian]/days/dayContext[stand-alone]/dayWidth[narrow]/day" |
261 result['standaloneNarrowDays'] \ |
294 result['standaloneNarrowDays'] \ |
262 = findEntry(base, standalone_narrow_day_path + "[sun]") + ";" \ |
295 = findEntry(path, standalone_narrow_day_path + "[sun]") + ";" \ |
263 + findEntry(base, standalone_narrow_day_path + "[mon]") + ";" \ |
296 + findEntry(path, standalone_narrow_day_path + "[mon]") + ";" \ |
264 + findEntry(base, standalone_narrow_day_path + "[tue]") + ";" \ |
297 + findEntry(path, standalone_narrow_day_path + "[tue]") + ";" \ |
265 + findEntry(base, standalone_narrow_day_path + "[wed]") + ";" \ |
298 + findEntry(path, standalone_narrow_day_path + "[wed]") + ";" \ |
266 + findEntry(base, standalone_narrow_day_path + "[thu]") + ";" \ |
299 + findEntry(path, standalone_narrow_day_path + "[thu]") + ";" \ |
267 + findEntry(base, standalone_narrow_day_path + "[fri]") + ";" \ |
300 + findEntry(path, standalone_narrow_day_path + "[fri]") + ";" \ |
268 + findEntry(base, standalone_narrow_day_path + "[sat]") + ";" |
301 + findEntry(path, standalone_narrow_day_path + "[sat]") + ";" |
269 |
302 |
270 |
303 |
271 return result |
304 return result |
272 |
305 |
273 def addEscapes(s): |
306 def addEscapes(s): |