Tennera is an umbrella project for various Java tools to do with internationalisation, initially tools for processing the Gettext and Properties formats.
JGettext includes an ANTLR-based parser for GNU Gettext PO/POT files and a PO/POT generator as well.
Note that JGettext has moved to a new home: https://github.com/zanata/jgettext/
Ant-Gettext includes various Ant tasks which can convert Java Properties files to and from Gettext PO/POT files. Ant-Gettext makes use of OpenProps and JGettext (below) to do its work.
Some of these tasks have similarities to commands in the GNU Gettext tools and the Translate Toolkit (but generally with fewer options):
Some tasks which might go away unless someone shows interest in them:
Originated as a patch for the old JBoss consoles, and hasn't been properly documented.
Features: a. a method for localising strings in JSPs in the Gettext style (keeping English in the source JSP) b. an Ant task which can find such strings in JSPs and generate a Gettext POT file.
(a) is provided by WebGettext, which provides an EL resolver for expressions such as ${messages["Hello {0}"][username]}
. The resolver looks up a translation, for the requesting user's locale, and substitutes any parameters using MessageFormat.
(b) is provided by Regex2PotTask (actually part of Ant-Gettext, not WebGettext), which is a bit like xgettext but rather than finding C, Java, Perl, etc, function calls such as gettext("my string"), it finds a configurable regex expression.
Example JSP project - see RUNNING.txt
Ant-Gettext was created by Red Hat's Internationalisation team in Brisbane, for use in JBoss projects, by allowing i18n tasks to be added to pure-Java build processes.
JGettext was created by Steve Ebersole as part of the Maven jDocBook plugin in the JBoss project.
Tennera is made up of several jars, arranged in a Maven2 repository here: http://svn.fedorahosted.org/svn/tennera/m2repo/
Tennera's jars are all under: http://svn.fedorahosted.org/svn/tennera/m2repo/org/fedorahosted/tennera/
Irregular snapshots go here occasionally: http://seanf.fedorapeople.org/maven2/snapshot/
It's best if you can use something like Maven to pick up your dependencies (see below), but otherwise you can download the individual jars from http://svn.fedorahosted.org/svn/tennera/m2repo/org/fedorahosted/tennera/ You will also need ANTLR . If you're using Ant, Maven Ant Tasks can help with the dependencies.
<repositories>
<repository>
<name>Tennera release repository on fedorahosted.org</name>
<id>fhosted.tennera.svn</id>
<url>http://svn.fedorahosted.org/svn/tennera/m2repo/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!--
<repository>
<name>Tennera snapshot repository on fedorapeople.org</name>
<id>fpeople.tennera.snap</id>
<url>http://seanf.fedorapeople.org/maven2/snapshot/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
-->
</repositories>
<dependencies>
<dependency>
<groupId>org.fedorahosted.tennera</groupId>
<artifactId>tennera</artifactId>
<version>0.6</version>
</dependency>
</dependencies>
NB: You might need to update the version numbers. And don't forget to uncomment the snapshot repo if you use snapshot versions!
Set up a classpath called "dependency.classpath" with the jars above, then:
<taskdef resource="org/fedorahosted/tennera/antgettext/antlib.xml"
classpathref="https://github.com/zanata/tennera/blob/master/dependency.classpath" />
LGPL 2.1