001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018 /*
019 * $Id: XMLErrorResources_sl.java 1225426 2011-12-29 04:13:08Z mrglavas $
020 */
021
022 package org.apache.xml.res;
023
024
025 import java.util.ListResourceBundle;
026 import java.util.Locale;
027 import java.util.MissingResourceException;
028 import java.util.ResourceBundle;
029
030 /**
031 * Set up error messages.
032 * We build a two dimensional array of message keys and
033 * message strings. In order to add a new message here,
034 * you need to first add a String constant. And you need
035 * to enter key, value pair as part of the contents
036 * array. You also need to update MAX_CODE for error strings
037 * and MAX_WARNING for warnings ( Needed for only information
038 * purpose )
039 */
040 public class XMLErrorResources_sl extends ListResourceBundle
041 {
042
043 /*
044 * This file contains error and warning messages related to Xalan Error
045 * Handling.
046 *
047 * General notes to translators:
048 *
049 * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of
050 * components.
051 * XSLT is an acronym for "XML Stylesheet Language: Transformations".
052 * XSLTC is an acronym for XSLT Compiler.
053 *
054 * 2) A stylesheet is a description of how to transform an input XML document
055 * into a resultant XML document (or HTML document or text). The
056 * stylesheet itself is described in the form of an XML document.
057 *
058 * 3) A template is a component of a stylesheet that is used to match a
059 * particular portion of an input document and specifies the form of the
060 * corresponding portion of the output document.
061 *
062 * 4) An element is a mark-up tag in an XML document; an attribute is a
063 * modifier on the tag. For example, in <elem attr='val' attr2='val2'>
064 * "elem" is an element name, "attr" and "attr2" are attribute names with
065 * the values "val" and "val2", respectively.
066 *
067 * 5) A namespace declaration is a special attribute that is used to associate
068 * a prefix with a URI (the namespace). The meanings of element names and
069 * attribute names that use that prefix are defined with respect to that
070 * namespace.
071 *
072 * 6) "Translet" is an invented term that describes the class file that
073 * results from compiling an XML stylesheet into a Java class.
074 *
075 * 7) XPath is a specification that describes a notation for identifying
076 * nodes in a tree-structured representation of an XML document. An
077 * instance of that notation is referred to as an XPath expression.
078 *
079 */
080
081 /*
082 * Message keys
083 */
084 public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
085 public static final String ER_CANNOT_OVERWRITE_CAUSE = "ER_CANNOT_OVERWRITE_CAUSE";
086 public static final String ER_NO_DEFAULT_IMPL = "ER_NO_DEFAULT_IMPL";
087 public static final String ER_CHUNKEDINTARRAY_NOT_SUPPORTED = "ER_CHUNKEDINTARRAY_NOT_SUPPORTED";
088 public static final String ER_OFFSET_BIGGER_THAN_SLOT = "ER_OFFSET_BIGGER_THAN_SLOT";
089 public static final String ER_COROUTINE_NOT_AVAIL = "ER_COROUTINE_NOT_AVAIL";
090 public static final String ER_COROUTINE_CO_EXIT = "ER_COROUTINE_CO_EXIT";
091 public static final String ER_COJOINROUTINESET_FAILED = "ER_COJOINROUTINESET_FAILED";
092 public static final String ER_COROUTINE_PARAM = "ER_COROUTINE_PARAM";
093 public static final String ER_PARSER_DOTERMINATE_ANSWERS = "ER_PARSER_DOTERMINATE_ANSWERS";
094 public static final String ER_NO_PARSE_CALL_WHILE_PARSING = "ER_NO_PARSE_CALL_WHILE_PARSING";
095 public static final String ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED";
096 public static final String ER_ITERATOR_AXIS_NOT_IMPLEMENTED = "ER_ITERATOR_AXIS_NOT_IMPLEMENTED";
097 public static final String ER_ITERATOR_CLONE_NOT_SUPPORTED = "ER_ITERATOR_CLONE_NOT_SUPPORTED";
098 public static final String ER_UNKNOWN_AXIS_TYPE = "ER_UNKNOWN_AXIS_TYPE";
099 public static final String ER_AXIS_NOT_SUPPORTED = "ER_AXIS_NOT_SUPPORTED";
100 public static final String ER_NO_DTMIDS_AVAIL = "ER_NO_DTMIDS_AVAIL";
101 public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
102 public static final String ER_NODE_NON_NULL = "ER_NODE_NON_NULL";
103 public static final String ER_COULD_NOT_RESOLVE_NODE = "ER_COULD_NOT_RESOLVE_NODE";
104 public static final String ER_STARTPARSE_WHILE_PARSING = "ER_STARTPARSE_WHILE_PARSING";
105 public static final String ER_STARTPARSE_NEEDS_SAXPARSER = "ER_STARTPARSE_NEEDS_SAXPARSER";
106 public static final String ER_COULD_NOT_INIT_PARSER = "ER_COULD_NOT_INIT_PARSER";
107 public static final String ER_EXCEPTION_CREATING_POOL = "ER_EXCEPTION_CREATING_POOL";
108 public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE";
109 public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED";
110 public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI";
111 public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI";
112 public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR";
113 public static final String ER_SCHEME_FROM_NULL_STRING = "ER_SCHEME_FROM_NULL_STRING";
114 public static final String ER_SCHEME_NOT_CONFORMANT = "ER_SCHEME_NOT_CONFORMANT";
115 public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = "ER_HOST_ADDRESS_NOT_WELLFORMED";
116 public static final String ER_PORT_WHEN_HOST_NULL = "ER_PORT_WHEN_HOST_NULL";
117 public static final String ER_INVALID_PORT = "ER_INVALID_PORT";
118 public static final String ER_FRAG_FOR_GENERIC_URI ="ER_FRAG_FOR_GENERIC_URI";
119 public static final String ER_FRAG_WHEN_PATH_NULL = "ER_FRAG_WHEN_PATH_NULL";
120 public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR";
121 public static final String ER_PARSER_IN_USE = "ER_PARSER_IN_USE";
122 public static final String ER_CANNOT_CHANGE_WHILE_PARSING = "ER_CANNOT_CHANGE_WHILE_PARSING";
123 public static final String ER_SELF_CAUSATION_NOT_PERMITTED = "ER_SELF_CAUSATION_NOT_PERMITTED";
124 public static final String ER_NO_USERINFO_IF_NO_HOST = "ER_NO_USERINFO_IF_NO_HOST";
125 public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST";
126 public static final String ER_NO_QUERY_STRING_IN_PATH = "ER_NO_QUERY_STRING_IN_PATH";
127 public static final String ER_NO_FRAGMENT_STRING_IN_PATH = "ER_NO_FRAGMENT_STRING_IN_PATH";
128 public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = "ER_CANNOT_INIT_URI_EMPTY_PARMS";
129 public static final String ER_METHOD_NOT_SUPPORTED ="ER_METHOD_NOT_SUPPORTED";
130 public static final String ER_INCRSAXSRCFILTER_NOT_RESTARTABLE = "ER_INCRSAXSRCFILTER_NOT_RESTARTABLE";
131 public static final String ER_XMLRDR_NOT_BEFORE_STARTPARSE = "ER_XMLRDR_NOT_BEFORE_STARTPARSE";
132 public static final String ER_AXIS_TRAVERSER_NOT_SUPPORTED = "ER_AXIS_TRAVERSER_NOT_SUPPORTED";
133 public static final String ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER = "ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER";
134 public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN";
135 public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN";
136 public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
137 public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
138 public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
139 public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
140 public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
141 public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
142 public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
143 public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
144 public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
145 public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON";
146
147 /*
148 * Now fill in the message text.
149 * Then fill in the message text for that message code in the
150 * array. Use the new error code as the index into the array.
151 */
152
153 // Error messages...
154
155 /**
156 * Get the lookup table for error messages
157 *
158 * @return The association list.
159 */
160 public Object[][] getContents()
161 {
162 return new Object[][] {
163
164 /** Error message ID that has a null message, but takes in a single object. */
165 {"ER0000" , "{0}" },
166
167 { ER_FUNCTION_NOT_SUPPORTED,
168 "Funkcija ni podprta!"},
169
170 { ER_CANNOT_OVERWRITE_CAUSE,
171 "Vzroka ni mogo\u010de prepisati"},
172
173 { ER_NO_DEFAULT_IMPL,
174 "Privzete implementacije ni mogo\u010de najti "},
175
176 { ER_CHUNKEDINTARRAY_NOT_SUPPORTED,
177 "ChunkedIntArray({0}) trenutno ni podprt"},
178
179 { ER_OFFSET_BIGGER_THAN_SLOT,
180 "Odmik ve\u010dji od re\u017ee"},
181
182 { ER_COROUTINE_NOT_AVAIL,
183 "Sorutina ni na voljo, id={0}"},
184
185 { ER_COROUTINE_CO_EXIT,
186 "CoroutineManager je prejel zahtevo co_exit()"},
187
188 { ER_COJOINROUTINESET_FAILED,
189 "co_joinCoroutineSet() je spodletela"},
190
191 { ER_COROUTINE_PARAM,
192 "Napaka parametra sorutine ({0})"},
193
194 { ER_PARSER_DOTERMINATE_ANSWERS,
195 "\nNEPRI\u010cAKOVANO: Odgovor raz\u010dlenjevalnika doTerminate je {0}"},
196
197 { ER_NO_PARSE_CALL_WHILE_PARSING,
198 "med raz\u010dlenjevanjem klic raz\u010dlenitve ni mo\u017een"},
199
200 { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED,
201 "Napaka: dolo\u010den iterator za os {0} ni implementiran"},
202
203 { ER_ITERATOR_AXIS_NOT_IMPLEMENTED,
204 "Napaka: iterator za os {0} ni implementiran "},
205
206 { ER_ITERATOR_CLONE_NOT_SUPPORTED,
207 "Klon iteratorja ni podprt"},
208
209 { ER_UNKNOWN_AXIS_TYPE,
210 "Neznan pre\u010dni tip osi: {0}"},
211
212 { ER_AXIS_NOT_SUPPORTED,
213 "Pre\u010dnik osi ni podprt: {0}"},
214
215 { ER_NO_DTMIDS_AVAIL,
216 "Na voljo ni ve\u010d DTM ID-jev"},
217
218 { ER_NOT_SUPPORTED,
219 "Ni podprto: {0}"},
220
221 { ER_NODE_NON_NULL,
222 "Vozli\u0161\u010de ne sme biti NULL za getDTMHandleFromNode"},
223
224 { ER_COULD_NOT_RESOLVE_NODE,
225 "Ne morem razre\u0161iti vozli\u0161\u010da v obravnavo"},
226
227 { ER_STARTPARSE_WHILE_PARSING,
228 "Med raz\u010dlenjevanjem klic startParse ni mogo\u010d"},
229
230 { ER_STARTPARSE_NEEDS_SAXPARSER,
231 "startParse potrebuje ne-NULL SAXParser"},
232
233 { ER_COULD_NOT_INIT_PARSER,
234 "parserja ni mogo\u010de inicializirati z"},
235
236 { ER_EXCEPTION_CREATING_POOL,
237 "izjema pri ustvarjanju novega primerka za zalogo"},
238
239 { ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE,
240 "Pot vsebuje neveljavno zaporedje za izhod"},
241
242 { ER_SCHEME_REQUIRED,
243 "Zahtevana je shema!"},
244
245 { ER_NO_SCHEME_IN_URI,
246 "Ne najdem sheme v URI: {0}"},
247
248 { ER_NO_SCHEME_INURI,
249 "Ne najdem sheme v URI"},
250
251 { ER_PATH_INVALID_CHAR,
252 "Pot vsebuje neveljaven znak: {0}"},
253
254 { ER_SCHEME_FROM_NULL_STRING,
255 "Ne morem nastaviti sheme iz niza NULL"},
256
257 { ER_SCHEME_NOT_CONFORMANT,
258 "Shema ni skladna."},
259
260 { ER_HOST_ADDRESS_NOT_WELLFORMED,
261 "Naslov gostitelja ni pravilno oblikovan"},
262
263 { ER_PORT_WHEN_HOST_NULL,
264 "Ko je gostitelj NULL, nastavitev vrat ni mogo\u010da"},
265
266 { ER_INVALID_PORT,
267 "Neveljavna \u0161tevilka vrat"},
268
269 { ER_FRAG_FOR_GENERIC_URI,
270 "Fragment je lahko nastavljen samo za splo\u0161ni URI"},
271
272 { ER_FRAG_WHEN_PATH_NULL,
273 "Ko je pot NULL, nastavitev fragmenta ni mogo\u010da"},
274
275 { ER_FRAG_INVALID_CHAR,
276 "Fragment vsebuje neveljaven znak"},
277
278 { ER_PARSER_IN_USE,
279 "Raz\u010dlenjevalnik je \u017ee v uporabi"},
280
281 { ER_CANNOT_CHANGE_WHILE_PARSING,
282 "Med raz\u010dlenjevanjem ni mogo\u010de spremeniti {0} {1}"},
283
284 { ER_SELF_CAUSATION_NOT_PERMITTED,
285 "Samopovzro\u010ditev ni dovoljena"},
286
287 { ER_NO_USERINFO_IF_NO_HOST,
288 "Informacije o uporabniku ne morejo biti navedene, \u010de ni naveden gostitelj"},
289
290 { ER_NO_PORT_IF_NO_HOST,
291 "Vrata ne morejo biti navedena, \u010de ni naveden gostitelj"},
292
293 { ER_NO_QUERY_STRING_IN_PATH,
294 "Poizvedbeni niz ne more biti naveden v nizu poti in poizvedbenem nizu"},
295
296 { ER_NO_FRAGMENT_STRING_IN_PATH,
297 "Fragment ne more biti hkrati naveden v poti in v fragmentu"},
298
299 { ER_CANNOT_INIT_URI_EMPTY_PARMS,
300 "Ne morem inicializirat URI-ja s praznimi parametri"},
301
302 { ER_METHOD_NOT_SUPPORTED,
303 "Metoda ni ve\u010d podprta "},
304
305 { ER_INCRSAXSRCFILTER_NOT_RESTARTABLE,
306 "IncrementalSAXSource_Filter v tem trenutku ni mogo\u010de ponovno zagnati"},
307
308 { ER_XMLRDR_NOT_BEFORE_STARTPARSE,
309 "XMLReader ne pred zahtevo za startParse"},
310
311 { ER_AXIS_TRAVERSER_NOT_SUPPORTED,
312 "Pre\u010dnik osi ni podprt: {0}"},
313
314 { ER_ERRORHANDLER_CREATED_WITH_NULL_PRINTWRITER,
315 "ListingErrorHandler ustvarjen s PrintWriter NULL!"},
316
317 { ER_SYSTEMID_UNKNOWN,
318 "Neznan sistemski ID"},
319
320 { ER_LOCATION_UNKNOWN,
321 "Mesto napake neznano"},
322
323 { ER_PREFIX_MUST_RESOLVE,
324 "Predpona se mora razre\u0161iti v imenski prostor: {0}"},
325
326 { ER_CREATEDOCUMENT_NOT_SUPPORTED,
327 "createDocument() ni podprt v XPathContext!"},
328
329 { ER_CHILD_HAS_NO_OWNER_DOCUMENT,
330 "Podrejeni predmet atributa nima lastni\u0161kega dokumenta!"},
331
332 { ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT,
333 "Podrejeni predmet atributa nima elementa lastni\u0161kega dokumenta!"},
334
335 { ER_CANT_OUTPUT_TEXT_BEFORE_DOC,
336 "Opozorilo: besedila ne morem prikazati pred elementom dokumenta! Ignoriram..."},
337
338 { ER_CANT_HAVE_MORE_THAN_ONE_ROOT,
339 "Na DOM-u ne more biti ve\u010d kot en koren!"},
340
341 { ER_ARG_LOCALNAME_NULL,
342 "Argument 'lokalno ime' je NULL"},
343
344 // Note to translators: A QNAME has the syntactic form [NCName:]NCName
345 // The localname is the portion after the optional colon; the message indicates
346 // that there is a problem with that part of the QNAME.
347 { ER_ARG_LOCALNAME_INVALID,
348 "Lokalno ime v QNAME bi moralo biti veljavno NCIme"},
349
350 // Note to translators: A QNAME has the syntactic form [NCName:]NCName
351 // The prefix is the portion before the optional colon; the message indicates
352 // that there is a problem with that part of the QNAME.
353 { ER_ARG_PREFIX_INVALID,
354 "Predpona v QNAME bi morala biti valjavno NCIme"},
355
356 { ER_NAME_CANT_START_WITH_COLON,
357 "Ime se ne more za\u010deti z dvopi\u010djem"},
358
359 { "BAD_CODE", "Parameter za ustvariSporo\u010dilo presega meje"},
360 { "FORMAT_FAILED", "Med klicem messageFormat naletel na izjemo"},
361 { "line", "Vrstica #"},
362 { "column","Stolpec #"}
363
364
365 };
366 }
367
368 /**
369 * Return a named ResourceBundle for a particular locale. This method mimics the behavior
370 * of ResourceBundle.getBundle().
371 *
372 * @param className the name of the class that implements the resource bundle.
373 * @return the ResourceBundle
374 * @throws MissingResourceException
375 */
376 public static final XMLErrorResources loadResourceBundle(String className)
377 throws MissingResourceException
378 {
379
380 Locale locale = Locale.getDefault();
381 String suffix = getResourceSuffix(locale);
382
383 try
384 {
385
386 // first try with the given locale
387 return (XMLErrorResources) ResourceBundle.getBundle(className
388 + suffix, locale);
389 }
390 catch (MissingResourceException e)
391 {
392 try // try to fall back to en_US if we can't load
393 {
394
395 // Since we can't find the localized property file,
396 // fall back to en_US.
397 return (XMLErrorResources) ResourceBundle.getBundle(className,
398 new Locale("sl", "SL"));
399 }
400 catch (MissingResourceException e2)
401 {
402
403 // Now we are really in trouble.
404 // very bad, definitely very bad...not going to get very far
405 throw new MissingResourceException(
406 "Could not load any resource bundles.", className, "");
407 }
408 }
409 }
410
411 /**
412 * Return the resource file suffic for the indicated locale
413 * For most locales, this will be based the language code. However
414 * for Chinese, we do distinguish between Taiwan and PRC
415 *
416 * @param locale the locale
417 * @return an String suffix which canbe appended to a resource name
418 */
419 private static final String getResourceSuffix(Locale locale)
420 {
421
422 String suffix = "_" + locale.getLanguage();
423 String country = locale.getCountry();
424
425 if (country.equals("TW"))
426 suffix += "_" + country;
427
428 return suffix;
429 }
430
431 }