You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/09/09 23:57:43 UTC

cvs commit: avalon-excalibur/i18n/xdocs download.xml index.xml navigation.xml usage.xml

mcconnell    2003/09/09 14:57:43

  Modified:    i18n     .cvsignore
  Added:       i18n     maven.xml project.properties project.xml
               i18n/xdocs download.xml index.xml navigation.xml usage.xml
  Log:
  Mavenize the project and set as verion 1.1-RC1.
  
  Revision  Changes    Path
  1.5       +2 -0      avalon-excalibur/i18n/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/i18n/.cvsignore,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- .cvsignore	21 Mar 2002 01:16:30 -0000	1.4
  +++ .cvsignore	9 Sep 2003 21:57:42 -0000	1.5
  @@ -6,3 +6,5 @@
   excalibur-*
   *.el
   *.ipr
  +*.log
  +target
  
  
  
  1.1                  avalon-excalibur/i18n/maven.xml
  
  Index: maven.xml
  ===================================================================
  <project default="site" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
  
    <property file="${basedir}/build.properties"/>
    <property file="${basedir}/project.properties"/>
  
    <preGoal name="site">
      <attainGoal name="license"/>
    </preGoal>
  
  </project>
  
  
  1.5       +20 -5     avalon-excalibur/i18n/project.properties
  
  
  
  
  1.1                  avalon-excalibur/i18n/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <project>
  
    <extend>${basedir}/../project.xml</extend>
  
    <id>excalibur-i18n</id>
    <name>Excalibur i18n</name>
    <package>org.apache.avalon.excalibur.i18n</package>
    <currentVersion>1.1-RC1</currentVersion>
  
    <inceptionYear>2002</inceptionYear>
    <shortDescription>
      Internationalization utility for Avalon.
    </shortDescription>
  
    <siteDirectory>${root.site.directory}/excalibur/i18n</siteDirectory>
  
    <repository>
      <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:avalon-excalibur/i18n</connection>
      <url>http://cvs.apache.org/viewcvs/avalon-excalibur/i18n/</url>
    </repository>
  
    <reports>
      <report>maven-changelog-plugin</report>
      <report>maven-file-activity-plugin</report>
      <report>maven-developer-activity-plugin</report>
    </reports>
  
  </project>
  
  
  
  1.1                  avalon-excalibur/i18n/xdocs/download.xml
  
  Index: download.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <document>
  
    <properties>
      <author email="mcconnell@apache.org">Stephen McConnell</author>
      <title>Cornerstone</title>
    </properties>
  
    <body>
      <section name="Download">
        <subsection name="Instructions">
          <p>PLACEHOLDER</p>
        </subsection>
      </section>
    </body>
  
  </document>
  
  
  
  
  
  1.1                  avalon-excalibur/i18n/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <document>
  
      <properties>
          <author email="dev@avalon.apache.org">Avalon Documentation Team</author>
          <title>Excalibur i18n</title>
      </properties>
  
      <body>
  
          <section name="Excalibur i18n">
  
              <subsection name="Overview">
              <p>
                Excalibur's Internationalization package is found in
                <code>org.apache.avalon.excalibur.i18n</code>.  Avalon
                Excalibur includes a method of managing resources, and
                an interface for specifying the resource.  Support for
                XML resource bundles are still under development.
              </p>
              </subsection>
  
          </section>
  
      </body>
  
  </document>
  
  
  
  1.1                  avalon-excalibur/i18n/xdocs/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <project>
  
   <title>Avalon Sandbox</title>
  
   <body>
  
      <links>
        <item name="Home" href="http://avalon.apache.org/"/>
        <item name="Framework" href="http://avalon.apache.org/framework/"/>
        <item name="Components" href="http://avalon.apache.org/components"/>
        <item name="Containers" href="http://avalon.apache.org/containers/"/>
        <item name="Sandbox" href="http://avalon.apache.org/sandbox/"/>
      </links>
  
      <menu name="About Excalibur Configuration">
        <item name="Overview" href="/index.html"/>
        <item name="Usage" href="/usage.html"/>
        <item name="Download" href="/download.html"/>
        <item name="Javadoc" href="/apidocs/index.html"/>
      </menu>
  
   </body>
  
  </project>
  
  
  
  1.1                  avalon-excalibur/i18n/xdocs/usage.xml
  
  Index: usage.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <document>
  
      <properties>
          <author email="dev@avalon.apache.org">Avalon Documentation Team</author>
          <title>Excalibur i18n - Usage</title>
      </properties>
  
      <body>
  
          <section name="Excalibur i18n">
  
            <section name="Usage">
              <p>
                  Using the i18n code is really straightforward; several 
                  examples of internationalized applications exist within 
                  the Avalon application family.
              </p>
              <p>
                  The following code is an example of the usage of the 
                  i18n package.
               </p>
              <source>
  // in a file called src/java/MyClass.java
  
  import org.apache.avalon.excalibur.i18n.ResourceManager;
  import org.apache.avalon.excalibur.i18n.Resources;
  
  public class MyClass implements MyInterface
  {
      private static final Resources REZ =
          ResourceManager.getPackageResources( MyClass.class );
  
      public void doStuff( Object myArg ) throws Exception
      {
          // ...
          final String stupidArgumentIdentifier = myArg.toString();
          // ...
          final String message =
                  REZ.getString( "myclass.error.dostuff.bad-argument",
                          stupidArgumentIdentifier );
          m_logger.error( message );
          throw new SomeException( message, myArg );
      }
  
  }
  
  # in a file called src/java/Resources.properties
  myclass.error.dostuff.bad-argument=the argument passed to the \
  doStuff method is invalid; it is {0}, which is plain silly!
              </source>
  
              <p>
                  That's basically all there is to it. If you follow this
                  pattern consistently, it will be extremely easy to i18n
                  your application by just putting in place a different
                  Resources.properties.
              </p>
              <p>
                  This i18n package is, indeed, a trivial wrapper around
                  the built-in i18n features java has using ResourceBundles
                  and the like. See the java api docs for
                  <link href="http://java.sun.com/j2se/1.4.1/docs/api/java/util/ResourceBundle.html">ResourceBundle</link>
                  to learn more about i18n, and take a look at the javadoc
                  for Resources and ResourceManager to see which options
                  are available.
              </p>
          </subsection>
  
          </section>
  
      </body>
  
  </document>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org