<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Looks pretty straightforward to build.&nbsp; The gettext-commons project has
no external dependencies, with the minor exception of junit for the
tests.&nbsp; I'll have an RPM either today or tomorrow<br>
<br>
<br>
On 04/15/2010 12:38 PM, Dmitri Dolguikh wrote:
<blockquote cite="mid:4BC740F2.8020305@redhat.com" type="cite">
  <meta http-equiv="content-type"
 content="text/html; charset=ISO-8859-1">
  <font face="Arial">changes are in. Here's the skinny:<br>
  <br>
- there's a new dependency in the build: gettext-commons<br>
- there are new targets in the build: extractkeys - extracts strings
that need to be localized, mergekeys - performs a merge on the existing
.po files, createresourcebundles - compiles resource bundles<br>
- localized resource bundles can be found in
localized_resources/classes/ directory<br>
- if you're running tomcat from under eclipse, you'll need to the above
directory into tomcat's classpath<br>
  <br>
how to use it (development):<br>
inject I18n (there's a I18n provider) instance in the classes that will
have user-visible text. Then (assuming instance variable name is i18n):<br>
  <br>
&lt;snip&gt;<br>
&nbsp;&nbsp;&nbsp; i18n.tr("goodbye, cruel world.");<br>
&lt;/snip&gt;<br>
  <br>
will do the trick. <br>
NOTES: if a resource bundle for a given locale wasn't found, the
default locale (en_US) will be used. Default locale (en_US) is an empty
resource bundle, therefore all calls to tr() will return unmodified
arguments.<br>
  <br>
how to use it (translation of resources):<br>
&nbsp;- create .po file for the desired locale in </font><font face="Arial">localized_resources
directory</font><br>
&nbsp;- update buildfile (tasks mentioned above) with the new locale<br>
&nbsp;- run <font face="Arial">mergekeys<br>
&nbsp;- provide translations using poedit (or w/e else you choose to use)<br>
&nbsp;- run </font><font face="Arial">createresourcebundles to build the
resources<br>
&nbsp;- profit!<br>
  </font><font face="Arial"><br>
-d<br>
  <br>
  <br>
  <br>
  </font>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
candlepin mailing list
<a class="moz-txt-link-abbreviated" href="mailto:candlepin@lists.fedorahosted.org">candlepin@lists.fedorahosted.org</a>
<a class="moz-txt-link-freetext" href="https://fedorahosted.org/mailman/listinfo/candlepin">https://fedorahosted.org/mailman/listinfo/candlepin</a>
  </pre>
</blockquote>
<br>
</body>
</html>