[cal10n-dev] branch, master, updated. v0.5.1-3-g809f610

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Wed Sep 2 16:29:39 CEST 2009


The branch, master has been updated
       via  809f61077f605b6b8a2e9b3e3cb7eeca37306b0b (commit)
      from  6486da0be0e36b83a9bf0fb013446bc630e77611 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=cal10n.git;a=commit;h=809f61077f605b6b8a2e9b3e3cb7eeca37306b0b
http://github.com/ceki/cal10n/commit/809f61077f605b6b8a2e9b3e3cb7eeca37306b0b

commit 809f61077f605b6b8a2e9b3e3cb7eeca37306b0b
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Wed Sep 2 14:05:24 2009 +0200

    - Renamed the ResourceBundleName annotation as BaseName which is
    simply more accurate.
    
    - Ongoing testing of resource bundle chaining and default locale

diff --git a/cal10n-api/src/main/java/ch/qos/cal10n/ResourceBundleName.java b/cal10n-api/src/main/java/ch/qos/cal10n/BaseName.java
similarity index 87%
rename from cal10n-api/src/main/java/ch/qos/cal10n/ResourceBundleName.java
rename to cal10n-api/src/main/java/ch/qos/cal10n/BaseName.java
index 4dc28b1..46fa24c 100644
--- a/cal10n-api/src/main/java/ch/qos/cal10n/ResourceBundleName.java
+++ b/cal10n-api/src/main/java/ch/qos/cal10n/BaseName.java
@@ -38,15 +38,15 @@ import ch.qos.cal10n.verifier.MessageKeyVerifier;
  * 
  * <pre>
  * &#064;LocaleNames({&quot;en&quot;, &quot;jp&quot;})
- * &#064;ResourceBundleName(&quot;colors&quot;);
+ * &#064;BaseName(&quot;colors&quot;);
  * public class enum Colors {
  *   RED, WHITE, BLUE; 
  * }
  * </pre>
  * 
  * <p>
- * In the above example, @ResourceBundleName("colors") means that there exists
- * resource files with the root name "colors". In conjunction with the
+ * In the above example, @BaseName("colors") means that there exists a family of
+ * resource bundle files with the base name "colors". In conjunction with the
  * information provided in the @LocaleNames annotation, we can assume that the
  * files <em>colors_en.properties</em> and <em>colors_jp.properties</em> exist.
  * 
@@ -60,6 +60,6 @@ import ch.qos.cal10n.verifier.MessageKeyVerifier;
  */
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.TYPE)
-public @interface ResourceBundleName {
+public @interface BaseName {
   String value();
 }
diff --git a/cal10n-api/src/main/java/ch/qos/cal10n/Cal10nConstants.java b/cal10n-api/src/main/java/ch/qos/cal10n/Cal10nConstants.java
index d782ec1..87d5c27 100644
--- a/cal10n-api/src/main/java/ch/qos/cal10n/Cal10nConstants.java
+++ b/cal10n-api/src/main/java/ch/qos/cal10n/Cal10nConstants.java
@@ -10,7 +10,7 @@ package ch.qos.cal10n;
 public class Cal10nConstants {
 
   final public static String CODE_URL_PREFIX = "http://cal10n.qos.ch/codes.html";
-  final public static String MISSING_RB_ANNOTATION_URL =  Cal10nConstants.CODE_URL_PREFIX+"#missingRBAnnotation";
+  final public static String MISSING_BN_ANNOTATION_URL =  Cal10nConstants.CODE_URL_PREFIX+"#missingBaseNameAnnotation";
 
   final public static String MessageKeyVerifier_FQCN = "ch.qos.cal10n.verifier.MessageKeyVerifier";
 }
diff --git a/cal10n-api/src/main/java/ch/qos/cal10n/LocaleNames.java b/cal10n-api/src/main/java/ch/qos/cal10n/LocaleNames.java
index db6602b..753441f 100644
--- a/cal10n-api/src/main/java/ch/qos/cal10n/LocaleNames.java
+++ b/cal10n-api/src/main/java/ch/qos/cal10n/LocaleNames.java
@@ -37,7 +37,7 @@ import ch.qos.cal10n.verifier.MessageKeyVerifier;
  * 
  * <pre>
  * &#064;LocaleNames({&quot;en&quot;, &quot;jp&quot;})
- * &#064;ResourceBundleName(&quot;colors&quot;);
+ * &#064;BaseName(&quot;colors&quot;);
  * public class enum Colors {
  *   RED, WHITE, BLUE; 
  * }
diff --git a/cal10n-api/src/main/java/ch/qos/cal10n/MessageConveyor.java b/cal10n-api/src/main/java/ch/qos/cal10n/MessageConveyor.java
index 4815e3e..6f682ae 100644
--- a/cal10n-api/src/main/java/ch/qos/cal10n/MessageConveyor.java
+++ b/cal10n-api/src/main/java/ch/qos/cal10n/MessageConveyor.java
@@ -56,7 +56,7 @@ public class MessageConveyor implements IMessageConveyor {
    * 
    * <p>
    * The name of the resource bundle is defined via the
-   * {@link ResourceBundleName} annotation whereas the locale is specified in
+   * {@link BaseName} annotation whereas the locale is specified in
    * this MessageConveyor instance's constructor.
    * 
    * @param key
@@ -66,12 +66,12 @@ public class MessageConveyor implements IMessageConveyor {
   public <E extends Enum<?>> String getMessage(E key, Object... args) {
     String keyAsStr = key.toString();
 
-    String resouceBundleName = AnnotationExtractor.getResourceBundleName(key
+    String resouceBundleName = AnnotationExtractor.getBaseName(key
         .getDeclaringClass());
     if (resouceBundleName == null) {
       throw new IllegalArgumentException(
-          "Missing @ResourceBundleName annotation in enum type [" + key.getClass().getName()
-              + "]. See also " + Cal10nConstants.MISSING_RB_ANNOTATION_URL);
+          "Missing @BaseName annotation in enum type [" + key.getClass().getName()
+              + "]. See also " + Cal10nConstants.MISSING_BN_ANNOTATION_URL);
     }
     ResourceBundle rb = ResourceBundle.getBundle(resouceBundleName, locale);
 
diff --git a/cal10n-api/src/main/java/ch/qos/cal10n/util/AnnotationExtractor.java b/cal10n-api/src/main/java/ch/qos/cal10n/util/AnnotationExtractor.java
index 0b917f4..3c555a5 100644
--- a/cal10n-api/src/main/java/ch/qos/cal10n/util/AnnotationExtractor.java
+++ b/cal10n-api/src/main/java/ch/qos/cal10n/util/AnnotationExtractor.java
@@ -22,7 +22,7 @@
 package ch.qos.cal10n.util;
 
 import ch.qos.cal10n.LocaleNames;
-import ch.qos.cal10n.ResourceBundleName;
+import ch.qos.cal10n.BaseName;
 
 /**
  * 
@@ -31,10 +31,10 @@ import ch.qos.cal10n.ResourceBundleName;
  */
 public class AnnotationExtractor {
 
-  static public <E extends Enum<?>> String getResourceBundleName(
+  static public <E extends Enum<?>> String getBaseName(
       Class<E> enumClass) {
-    ResourceBundleName rbnAnnotation = (ResourceBundleName) enumClass
-        .getAnnotation(ResourceBundleName.class);
+    BaseName rbnAnnotation = (BaseName) enumClass
+        .getAnnotation(BaseName.class);
     if (rbnAnnotation == null) {
       return null;
     }
diff --git a/cal10n-api/src/main/java/ch/qos/cal10n/verifier/Cal10nError.java b/cal10n-api/src/main/java/ch/qos/cal10n/verifier/Cal10nError.java
index db048f3..6ea790b 100644
--- a/cal10n-api/src/main/java/ch/qos/cal10n/verifier/Cal10nError.java
+++ b/cal10n-api/src/main/java/ch/qos/cal10n/verifier/Cal10nError.java
@@ -35,7 +35,7 @@ public class Cal10nError {
   enum ErrorType {
     // MISSING_LOCALE_NAMES_ANNOTATION
 
-    MISSING_RBN_ANNOTATION, FAILED_TO_FIND_RB, EMPTY_RB, EMPTY_ENUM, ABSENT_IN_RB, ABSENT_IN_ENUM;
+    MISSING_BN_ANNOTATION, FAILED_TO_FIND_RB, EMPTY_RB, EMPTY_ENUM, ABSENT_IN_RB, ABSENT_IN_ENUM;
   }
 
   final ErrorType errorType;
@@ -74,8 +74,8 @@ public class Cal10nError {
   @Override
   public String toString() {
     switch (errorType) {
-    case MISSING_RBN_ANNOTATION:
-      return "Missing @ResourceBundleName annotation in enum type ["
+    case MISSING_BN_ANNOTATION:
+      return "Missing @BaseName annotation in enum type ["
           + enumClassName + "]";
       // case MISSING_LOCALE_NAMES_ANNOTATION:
       // return "Missing @LocaleNames annotation in enum class [" +
diff --git a/cal10n-api/src/main/java/ch/qos/cal10n/verifier/IMessageKeyVerifier.java b/cal10n-api/src/main/java/ch/qos/cal10n/verifier/IMessageKeyVerifier.java
index 5dee005..ae4b89b 100644
--- a/cal10n-api/src/main/java/ch/qos/cal10n/verifier/IMessageKeyVerifier.java
+++ b/cal10n-api/src/main/java/ch/qos/cal10n/verifier/IMessageKeyVerifier.java
@@ -69,10 +69,10 @@ public interface IMessageKeyVerifier {
   public String[] getLocaleNames();
 
   /**
-   * Get the name of the resource bundle specified in the enumType (via
+   * Get the base name for the resource bundle family as specified in the enumType (via
    * annotations)
    * 
    * @return
    */
-  public String getResourceBundleName();
+  public String getBaseName();
 }
\ No newline at end of file
diff --git a/cal10n-api/src/main/java/ch/qos/cal10n/verifier/MessageKeyVerifier.java b/cal10n-api/src/main/java/ch/qos/cal10n/verifier/MessageKeyVerifier.java
index 48465e9..ce31ace 100644
--- a/cal10n-api/src/main/java/ch/qos/cal10n/verifier/MessageKeyVerifier.java
+++ b/cal10n-api/src/main/java/ch/qos/cal10n/verifier/MessageKeyVerifier.java
@@ -74,10 +74,10 @@ public class MessageKeyVerifier implements IMessageKeyVerifier {
     List<Cal10nError> errorList = new ArrayList<Cal10nError>();
 
     String resouceBundleName = AnnotationExtractor
-        .getResourceBundleName(enumType);
+        .getBaseName(enumType);
 
     if (resouceBundleName == null) {
-      errorList.add(new Cal10nError(ErrorType.MISSING_RBN_ANNOTATION, "",
+      errorList.add(new Cal10nError(ErrorType.MISSING_BN_ANNOTATION, "",
           enumType, locale, ""));
       // no point in continuing
       return errorList;
@@ -167,8 +167,8 @@ public class MessageKeyVerifier implements IMessageKeyVerifier {
     return localeNameArray;
   }
 
-  public String getResourceBundleName() {
-    String rbName = AnnotationExtractor.getResourceBundleName(enumType);
+  public String getBaseName() {
+    String rbName = AnnotationExtractor.getBaseName(enumType);
     return rbName;
   }
 
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/Colors.java b/cal10n-api/src/test/java/ch/qos/cal10n/sample/Colors.java
index e05bb00..bb5e4a0 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/Colors.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/sample/Colors.java
@@ -23,9 +23,9 @@
 package ch.qos.cal10n.sample;
 
 import ch.qos.cal10n.LocaleNames;
-import ch.qos.cal10n.ResourceBundleName;
+import ch.qos.cal10n.BaseName;
 
- at ResourceBundleName("colors")
+ at BaseName("colors")
 @LocaleNames({"en_UK", "fr"})
 public enum Colors {
   RED {
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/Countries.java b/cal10n-api/src/test/java/ch/qos/cal10n/sample/Countries.java
index 626c621..333fbfa 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/Countries.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/sample/Countries.java
@@ -22,9 +22,9 @@
 package ch.qos.cal10n.sample;
 
 import ch.qos.cal10n.LocaleNames;
-import ch.qos.cal10n.ResourceBundleName;
+import ch.qos.cal10n.BaseName;
 
- at ResourceBundleName("countries")
+ at BaseName("countries")
 @LocaleNames({"en", "fr"})
 public enum Countries {
   CH,  // Switzerland (Confederation Helvetique)
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/Colors.java b/cal10n-api/src/test/java/ch/qos/cal10n/sample/Furnitures.java
similarity index 88%
copy from cal10n-api/src/test/java/ch/qos/cal10n/sample/Colors.java
copy to cal10n-api/src/test/java/ch/qos/cal10n/sample/Furnitures.java
index e05bb00..07e91b9 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/Colors.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/sample/Furnitures.java
@@ -19,18 +19,15 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-
 package ch.qos.cal10n.sample;
 
 import ch.qos.cal10n.LocaleNames;
-import ch.qos.cal10n.ResourceBundleName;
+import ch.qos.cal10n.BaseName;
 
- at ResourceBundleName("colors")
+ at BaseName("furnitures")
 @LocaleNames({"en_UK", "fr"})
-public enum Colors {
-  RED {
-     
-  },
-  BLUE, 
-  GREEN;
+public enum Furnitures {
+  TABLE,
+  CHAIR,
+  SOFA;
 }
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/Host.java b/cal10n-api/src/test/java/ch/qos/cal10n/sample/Host.java
new file mode 100644
index 0000000..47b7c5f
--- /dev/null
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/sample/Host.java
@@ -0,0 +1,15 @@
+package ch.qos.cal10n.sample;
+
+import ch.qos.cal10n.BaseName;
+
+public class Host {
+
+  @BaseName("colors")
+  enum OtherColors {
+    RED {
+      
+    },
+    BLUE, 
+    GREEN;
+  }
+}
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorTest.java
index 4bef85d..bdd7ba8 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/sample/MessageConveyorTest.java
@@ -37,69 +37,57 @@ public class MessageConveyorTest {
   @Test
   public void smoke_EN() {
     MessageConveyor rbbmc = new MessageConveyor(Locale.UK);
+    String val;
 
-    {
-      String val = rbbmc.getMessage(Colors.BLUE);
-      assertEquals("violets are blue", val);
-    }
-
-    {
-      String val = rbbmc.getMessage(Colors.GREEN, "apples");
-      assertEquals("apples are green", val);
-    }
+    val = rbbmc.getMessage(Colors.BLUE);
+    assertEquals("violets are blue", val);
 
+    val = rbbmc.getMessage(Colors.GREEN, "apples");
+    assertEquals("apples are green", val);
   }
 
   // see http://jira.qos.ch/browse/CAL-1
   @Test
   public void nestedEnum_EN() {
     MessageConveyor rbbmc = new MessageConveyor(Locale.UK);
-    {
-      String val = rbbmc.getMessage(Colors.RED);
-      assertEquals("roses are red", val);
-    }
-
-    {
-      String val = rbbmc.getMessage(OtherColors.RED);
-      assertEquals("roses are red", val);
-    }
-
-    {
-      String val = rbbmc.getMessage(OtherColors.BLUE);
-      assertEquals("violets are blue", val);
-    }
+    String val;
+
+    val = rbbmc.getMessage(Colors.RED);
+    assertEquals("roses are red", val);
+
+    val = rbbmc.getMessage(OtherColors.RED);
+    assertEquals("roses are red", val);
+
+    val = rbbmc.getMessage(OtherColors.BLUE);
+    assertEquals("violets are blue", val);
   }
 
   @Test
   public void smoke_FR() {
     MessageConveyor rbbmc = new MessageConveyor(Locale.FRANCE);
+    String val;
 
-    {
-      String val = rbbmc.getMessage(Colors.BLUE);
-      assertEquals("les violettes sont bleues", val);
-    }
-
-    {
-      // lemon=citron in french. This illustrates the problem of
-      // translating the parameters of a message
-      String val = rbbmc.getMessage(Colors.GREEN, "pommes");
-      assertEquals("les pommes sont verts", val);
-    }
+    val = rbbmc.getMessage(Colors.BLUE);
+    assertEquals("les violettes sont bleues", val);
+
+    // lemon=citron in french. This illustrates the problem of
+    // translating the parameters of a message
+    val = rbbmc.getMessage(Colors.GREEN, "pommes");
+    assertEquals("les pommes sont verts", val);
   }
 
   @Test
   public void mpo() {
     MessageConveyor rbbmc = new MessageConveyor(Locale.UK);
-    {
-      MessageParameterObj mpo = new MessageParameterObj(Colors.BLUE);
-      String val = rbbmc.getMessage(mpo);
-      assertEquals("violets are blue", val);
-    }
-
-    {
-      MessageParameterObj mpo = new MessageParameterObj(Colors.GREEN, "apples");
-      String val = rbbmc.getMessage(mpo);
-      assertEquals("apples are green", val);
-    }
+    MessageParameterObj mpo;
+    String val;
+
+    mpo = new MessageParameterObj(Colors.BLUE);
+    val = rbbmc.getMessage(mpo);
+    assertEquals("violets are blue", val);
+
+    mpo = new MessageParameterObj(Colors.GREEN, "apples");
+    val = rbbmc.getMessage(mpo);
+    assertEquals("apples are green", val);
   }
 }
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/PackageTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/sample/PackageTest.java
index ba875ed..6df62ba 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/PackageTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/sample/PackageTest.java
@@ -27,6 +27,6 @@ import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
 
 @RunWith(Suite.class)
- at SuiteClasses( { MessageKeyVerifierTest.class, MessageConveyorTest.class })
+ at SuiteClasses( { MessageKeyVerifierTest.class, MessageConveyorTest.class, WithDefaultTest.class })
 public class PackageTest {
 }
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/sample/PackageTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/sample/WithDefaultTest.java
similarity index 74%
copy from cal10n-api/src/test/java/ch/qos/cal10n/sample/PackageTest.java
copy to cal10n-api/src/test/java/ch/qos/cal10n/sample/WithDefaultTest.java
index ba875ed..b2da013 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/sample/PackageTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/sample/WithDefaultTest.java
@@ -19,14 +19,26 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-
 package ch.qos.cal10n.sample;
 
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
+import static org.junit.Assert.assertEquals;
+
+import java.util.Locale;
+
+import org.junit.Test;
+
+import ch.qos.cal10n.MessageConveyor;
+
+
+public class WithDefaultTest {
+
+  @Test
+  public void smoke() {
+    MessageConveyor mc = new MessageConveyor(Locale.UK);
+    String val;
+
+    val = mc.getMessage(Furnitures.TABLE);
+    assertEquals("the table", val);
 
- at RunWith(Suite.class)
- at SuiteClasses( { MessageKeyVerifierTest.class, MessageConveyorTest.class })
-public class PackageTest {
+  }
 }
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/util/AnnotationExtractorTest.java b/cal10n-api/src/test/java/ch/qos/cal10n/util/AnnotationExtractorTest.java
index 0d4cd40..6959476 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/util/AnnotationExtractorTest.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/util/AnnotationExtractorTest.java
@@ -35,7 +35,7 @@ public class AnnotationExtractorTest {
 
   @Test
   public void resourcceBundleName() {
-    String result = AnnotationExtractor.getResourceBundleName(Fruit.class);
+    String result = AnnotationExtractor.getBaseName(Fruit.class);
     assertEquals("fruits", result);
   }
   
diff --git a/cal10n-api/src/test/java/ch/qos/cal10n/util/Fruit.java b/cal10n-api/src/test/java/ch/qos/cal10n/util/Fruit.java
index b0c70af..28dcab4 100644
--- a/cal10n-api/src/test/java/ch/qos/cal10n/util/Fruit.java
+++ b/cal10n-api/src/test/java/ch/qos/cal10n/util/Fruit.java
@@ -22,9 +22,9 @@
 package ch.qos.cal10n.util;
 
 import ch.qos.cal10n.LocaleNames;
-import ch.qos.cal10n.ResourceBundleName;
+import ch.qos.cal10n.BaseName;
 
- at ResourceBundleName("fruits")
+ at BaseName("fruits")
 @LocaleNames({"fr", "en"})
 public enum Fruit {
   APPLE,
diff --git a/cal10n-api/src/test/resources/furnitures.properties b/cal10n-api/src/test/resources/furnitures.properties
new file mode 100644
index 0000000..b977c62
--- /dev/null
+++ b/cal10n-api/src/test/resources/furnitures.properties
@@ -0,0 +1,3 @@
+TABLE=the table
+CHAIR=the chair
+SOFA=the sofa
\ No newline at end of file
diff --git a/cal10n-api/src/test/resources/furnitures_fr.properties b/cal10n-api/src/test/resources/furnitures_fr.properties
new file mode 100644
index 0000000..7902933
--- /dev/null
+++ b/cal10n-api/src/test/resources/furnitures_fr.properties
@@ -0,0 +1,3 @@
+TABLE=la table
+CHAIR=la chaise
+SOFA=le sofa
\ No newline at end of file
diff --git a/cal10n-site/src/site/pages/codes.html b/cal10n-site/src/site/pages/codes.html
index 876ed88..b6e38e4 100644
--- a/cal10n-site/src/site/pages/codes.html
+++ b/cal10n-site/src/site/pages/codes.html
@@ -23,19 +23,19 @@
    <h1>CAL10N error codes and their meanings</h1>
 
 
-   <h3><a name="missingRBAnnotation"
-   href="#missingRBAnnotation">Missing
-   <code>@ResourceBundleName</code> annotation in enum type [...].
+   <h3><a name="missingBaseNameAnnotation"
+   href="#missingBaseNameAnnotation">Missing
+   <code>@BaseName</code> annotation in enum type [...].
     </a>
    </h3>
 
-    <p>The @ResourceBundleName annotation is mandatory when an
-    enum type is used in conjuction with <a
+    <p>The @BaseName annotation is mandatory when an enum type is used
+    in conjuction with <a
     href="apidocs/ch/qos/cal10n/MessageConveyor.html">MessageConveyor</a>
     to retreive localized messages.  See the <a
     href="manual.html#core">user manual</a> as well as the javadocs
     for <a
-    href="apidocs/ch/qos/cal10n/ResourceBundleName.html">ResourceBundleName</a>
+    href="apidocs/ch/qos/cal10n/BaseName.html">BaseName</a>
     annotation for more details.
     </p>
 
diff --git a/cal10n-site/src/site/pages/manual.html b/cal10n-site/src/site/pages/manual.html
index 487ea8a..685a471 100644
--- a/cal10n-site/src/site/pages/manual.html
+++ b/cal10n-site/src/site/pages/manual.html
@@ -89,9 +89,9 @@
    <pre class="prettyprint source">package com.foo.somePackage;
 
 import ch.qos.cal10n.LocaleNames;
-import ch.qos.cal10n.ResourceBundleName;
+import ch.qos.cal10n.BaseName;
 
- at ResourceBundleName("colors") // mandatory annotation
+ at BaseName("colors") // mandatory annotation
 @LocaleNames({"en_UK", "fr"}) // list of locale names used by
                               // verification tools
 public enum Colors  {
@@ -102,7 +102,7 @@ public enum Colors  {
    
 
   <p>Once you define a few color keys, you can create a regular
-  resource bundle named after the value of the @ResourceBundleName
+  resource bundle named after the value of the @BaseName
   annotation in Colors and the appropriate locale. For example, for
   the UK locale, you would name your resource bundle as
   <em>colors_en_UK.properties</em>. It should also be placed in the
diff --git a/maven-cal10n-plugin-smoke/src/main/java/ch/qos/cal10n/smoke/Countries.java b/maven-cal10n-plugin-smoke/src/main/java/ch/qos/cal10n/smoke/Countries.java
index 51e31fe..ea6f271 100644
--- a/maven-cal10n-plugin-smoke/src/main/java/ch/qos/cal10n/smoke/Countries.java
+++ b/maven-cal10n-plugin-smoke/src/main/java/ch/qos/cal10n/smoke/Countries.java
@@ -1,9 +1,9 @@
 package ch.qos.cal10n.smoke;
 
 import ch.qos.cal10n.LocaleNames;
-import ch.qos.cal10n.ResourceBundleName;
+import ch.qos.cal10n.BaseName;
 
- at ResourceBundleName("countries")
+ at BaseName("countries")
 @LocaleNames({"en", "fr"})
 public enum Countries {
    CH, 
diff --git a/maven-cal10n-plugin/src/main/java/ch/qos/cal10n/plugins/VerifyMojo.java b/maven-cal10n-plugin/src/main/java/ch/qos/cal10n/plugins/VerifyMojo.java
index 72d7c83..32f41b0 100644
--- a/maven-cal10n-plugin/src/main/java/ch/qos/cal10n/plugins/VerifyMojo.java
+++ b/maven-cal10n-plugin/src/main/java/ch/qos/cal10n/plugins/VerifyMojo.java
@@ -120,7 +120,7 @@ public class VerifyMojo extends AbstractMojo {
       Locale locale = new Locale(localeName);
       List<String> errorList = mcv.typeIsolatedVerify(locale);
       if (errorList.size() == 0) {
-        String resouceBundleName = mcv.getResourceBundleName();
+        String resouceBundleName = mcv.getBaseName();
         getLog().info(
             "SUCCESSFUL verification for resource bundle [" + resouceBundleName
                 + "] for locale [" + locale + "]");

-----------------------------------------------------------------------

Summary of changes:
 .../{ResourceBundleName.java => BaseName.java}     |    8 +-
 .../main/java/ch/qos/cal10n/Cal10nConstants.java   |    2 +-
 .../src/main/java/ch/qos/cal10n/LocaleNames.java   |    2 +-
 .../main/java/ch/qos/cal10n/MessageConveyor.java   |    8 +-
 .../ch/qos/cal10n/util/AnnotationExtractor.java    |    8 +-
 .../java/ch/qos/cal10n/verifier/Cal10nError.java   |    6 +-
 .../qos/cal10n/verifier/IMessageKeyVerifier.java   |    4 +-
 .../ch/qos/cal10n/verifier/MessageKeyVerifier.java |    8 +-
 .../src/test/java/ch/qos/cal10n/sample/Colors.java |    4 +-
 .../test/java/ch/qos/cal10n/sample/Countries.java  |    4 +-
 .../cal10n/sample/{Colors.java => Furnitures.java} |   15 ++--
 .../src/test/java/ch/qos/cal10n/sample/Host.java   |   15 ++++
 .../ch/qos/cal10n/sample/MessageConveyorTest.java  |   78 ++++++++-----------
 .../java/ch/qos/cal10n/sample/PackageTest.java     |    2 +-
 .../{Countries.java => WithDefaultTest.java}       |   30 +++++---
 .../qos/cal10n/util/AnnotationExtractorTest.java   |    2 +-
 .../src/test/java/ch/qos/cal10n/util/Fruit.java    |    4 +-
 .../src/test/resources/furnitures.properties       |    3 +
 .../src/test/resources/furnitures_fr.properties    |    3 +
 cal10n-site/src/site/pages/codes.html              |   12 ++--
 cal10n-site/src/site/pages/manual.html             |    6 +-
 .../main/java/ch/qos/cal10n/smoke/Countries.java   |    4 +-
 .../java/ch/qos/cal10n/plugins/VerifyMojo.java     |    2 +-
 23 files changed, 122 insertions(+), 108 deletions(-)
 rename cal10n-api/src/main/java/ch/qos/cal10n/{ResourceBundleName.java => BaseName.java} (87%)
 copy cal10n-api/src/test/java/ch/qos/cal10n/sample/{Colors.java => Furnitures.java} (88%)
 create mode 100644 cal10n-api/src/test/java/ch/qos/cal10n/sample/Host.java
 copy cal10n-api/src/test/java/ch/qos/cal10n/sample/{Countries.java => WithDefaultTest.java} (74%)
 create mode 100644 cal10n-api/src/test/resources/furnitures.properties
 create mode 100644 cal10n-api/src/test/resources/furnitures_fr.properties


hooks/post-receive
-- 
Compiler assisted localization library


More information about the cal10n-dev mailing list