View Javadoc

1   /*
2    * ModeShape (http://www.modeshape.org)
3    * See the COPYRIGHT.txt file distributed with this work for information
4    * regarding copyright ownership.  Some portions may be licensed
5    * to Red Hat, Inc. under one or more contributor license agreements.
6    * See the AUTHORS.txt file in the distribution for a full listing of 
7    * individual contributors.
8    * 
9    * ModeShape is free software. Unless otherwise indicated, all code in ModeShape
10   * is licensed to you under the terms of the GNU Lesser General Public License as
11   * published by the Free Software Foundation; either version 2.1 of
12   * the License, or (at your option) any later version.
13   * 
14   * ModeShape is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17   * Lesser General Public License for more details.
18   *
19   * You should have received a copy of the GNU Lesser General Public
20   * License along with this software; if not, write to the Free
21   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
23   */
24  package org.modeshape.common;
25  
26  import java.util.Locale;
27  import java.util.Set;
28  import org.modeshape.common.i18n.I18n;
29  
30  /**
31   * The internationalized string constants for the <code>org.modeshape.common*</code> packages.
32   */
33  public final class CommonI18n {
34  
35      // Make sure the following I18n.java-related fields are defined before all other fields to ensure a valid error message is
36      // produced in the event of a missing/duplicate/unused property
37  
38      public static I18n i18nClassInterface;
39      public static I18n i18nClassNotPublic;
40      public static I18n i18nFieldFinal;
41      public static I18n i18nFieldInvalidType;
42      public static I18n i18nFieldNotPublic;
43      public static I18n i18nFieldNotStatic;
44      public static I18n i18nLocalizationFileNotFound;
45      public static I18n i18nLocalizationProblems;
46      public static I18n i18nPropertyDuplicate;
47      public static I18n i18nPropertyMissing;
48      public static I18n i18nPropertyUnused;
49      public static I18n i18nRequiredToSuppliedParameterMismatch;
50  
51      // Core-related fields
52      public static I18n argumentDidNotContainKey;
53      public static I18n argumentDidNotContainObject;
54      public static I18n argumentMayNotBeEmpty;
55      public static I18n argumentMayNotBeGreaterThan;
56      public static I18n argumentMayNotBeLessThan;
57      public static I18n argumentMayNotBeNegative;
58      public static I18n argumentMayNotBeNull;
59      public static I18n argumentMayNotBeNullOrZeroLength;
60      public static I18n argumentMayNotBeNullOrZeroLengthOrEmpty;
61      public static I18n argumentMayNotBePositive;
62      public static I18n argumentMayNotContainNullValue;
63      public static I18n argumentMustBeEmpty;
64      public static I18n argumentMustBeEquals;
65      public static I18n argumentMustBeGreaterThan;
66      public static I18n argumentMustBeGreaterThanOrEqualTo;
67      public static I18n argumentMustBeInstanceOf;
68      public static I18n argumentMustBeLessThan;
69      public static I18n argumentMustBeLessThanOrEqualTo;
70      public static I18n argumentMustBeNegative;
71      public static I18n argumentMustBeNull;
72      public static I18n argumentMustBeNumber;
73      public static I18n argumentMustBeOfMaximumSize;
74      public static I18n argumentMustBeOfMinimumSize;
75      public static I18n argumentMustBePositive;
76      public static I18n argumentMustBeSameAs;
77      public static I18n argumentMustNotBeEquals;
78      public static I18n argumentMustNotBeSameAs;
79      public static I18n componentClassnameNotValid;
80      public static I18n componentNotConfigured;
81      public static I18n dateParsingFailure;
82      public static I18n initialActivityMonitorTaskName;
83      public static I18n nullActivityMonitorTaskName;
84      public static I18n pathAncestorDegreeIsInvalid;
85      public static I18n pathCannotBeNormalized;
86      public static I18n pathIsAlreadyAbsolute;
87      public static I18n pathIsNotAbsolute;
88      public static I18n pathIsNotRelative;
89      public static I18n requiredToSuppliedParameterMismatch;
90      public static I18n unableToAccessResourceFileFromClassLoader;
91  
92      // TokenStream
93      public static I18n noMoreContent;
94      public static I18n noMoreContentButWasExpectingToken;
95      public static I18n unexpectedToken;
96      public static I18n noMoreContentButWasExpectingCharacter;
97      public static I18n unexpectedCharacter;
98      public static I18n noMoreContentButWasExpectingTokenType;
99      public static I18n unexpectedTokenType;
100     public static I18n startMethodMustBeCalledBeforeNext;
101     public static I18n startMethodMustBeCalledBeforeConsumingOrMatching;
102     public static I18n noMatchingDoubleQuoteFound;
103     public static I18n noMatchingSingleQuoteFound;
104     public static I18n expectingValidIntegerAtLineAndColumn;
105     public static I18n expectingValidLongAtLineAndColumn;
106     public static I18n expectingValidBooleanAtLineAndColumn;
107     public static I18n endPositionMustBeGreaterThanStartingPosition;
108 
109     static {
110         try {
111             I18n.initialize(CommonI18n.class);
112         } catch (final Exception err) {
113             System.err.println(err);
114         }
115     }
116 
117     public static Set<Locale> getLocalizationProblemLocales() {
118         return I18n.getLocalizationProblemLocales(CommonI18n.class);
119     }
120 
121     public static Set<String> getLocalizationProblems() {
122         return I18n.getLocalizationProblems(CommonI18n.class);
123     }
124 
125     public static Set<String> getLocalizationProblems( Locale locale ) {
126         return I18n.getLocalizationProblems(CommonI18n.class, locale);
127     }
128 }