blob: 4b78dd1bbec0c125f042d22f3a058c65be6e3e21 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Babel Pseudo Translations</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<link href="../article.css" type="text/css" rel="stylesheet" />
</head>
<body>
<h1>Babel Pseudo Translations</h1>
<div class="summary">
<h2>Summary</h2>
<p>Babel Pseudo Translations are a very useful tool for globalization testing of
Eclipse projects. This article provides step-by-step instructions and examples
describing what are the Babel Pseudo Translations, where to download them, how to
install them, and how to launch Eclipse in Babel Pseudo Translations. Eclipse
developers can use the Babel Pseudo Translations to verify the translatability of
their projects and make sure Eclipse excels in national language support.</p>
<div class="author">
By Kit Lo, IBM
</div>
<div class="copyright">
Copyright &copy; 2012 International Business Machines Corp.
</div>
<div class="date">
January 4, 2012
</div>
</div>
<div class="content">
<h2>Introduction</h2>
<p>Eclipse is a global community. It is in everyone's interest to ensure that Eclipse
is globalized and translated into as many languages as possible. Babel is the
globalization project for Eclipse. The goal of the Babel project is to provide a set
of tools to make the job of globalizing Eclipse projects easier. Babel also provides
ways for people worldwide, who are interested, to contribute translations in their
language of choice.</p>
<h2>Babel Translation Server</h2>
<p>The Babel Translation Server (<a href=
"http://babel.eclipse.org/babel/">http://babel.eclipse.org/babel/</a>) is a wiki-like
server where any Eclipse user with an Eclipse Bugzilla ID may login and help
translate Eclipse.</p>
<h2>Babel Language Packs and Update Sites</h2>
<p>Babel produces nightly and weekly language packs from the translations entered
into the Babel Translation Server. Information for the latest Babel Language Packs
and Update Sites is available at: <a href=
"http://www.eclipse.org/babel/downloads.php">http://www.eclipse.org/babel/downloads.php</a></p>
<h2>Babel Pseudo Translation Language Packs</h2>
<p>Among the language packs built are the <b><i>Babel Pseudo Translation Language
Packs</i></b> . Using these pseudo translation language packs, you can:</p>
<ul>
<li>identify hard-coded strings</li>
<li>identify layout and truncation problems</li>
<li>identify the Eclipse project and file where strings come from</li>
</ul>
<h2>Installing the Babel Pseudo Translation Language Packs</h2>
<p>The following is an example on how to install the Babel Pseudo Translation
Language Pack for the Eclipse 3.7 project on Windows. Similar process can be used to
install the Babel Pseudo Translation Language Packs for other Eclipse projects on
different platforms.</p>
<ul>
<li>Assume that you have Eclipse 3.7 installed at:
<b><i>D:\eclipse-SDK-3.7-win32</i></b></li>
<li>Go to the <b><i>Babel Language Packs and Update Sites</i></b> download page at:
<a href=
"http://www.eclipse.org/babel/downloads.php">http://www.eclipse.org/babel/downloads.php</a></li>
<li>Click on the <b><i>Babel Language Pack Zips for Indigo</i></b> link (see figure
1)</li>
<li style="list-style: none"><br />
<img src="images/figure001.png" alt=
"Figure 1 - Babel Language Packs and Update Sites Download Page" /><br />
Figure 1 - Babel Language Packs and Update Sites Download Page<br />
<br /></li>
<li>Scroll down to the <b><i>Pseudo Translations</i></b> section</li>
<li>Click on the <b><i>Babel Pseudo Translation Language Pack for Eclipse</i></b>
link (see figure 2)</li>
<li style="list-style: none"><br />
<img src="images/figure002.png" alt=
"Figure 2 - Babel Pseudo Translation Language Packs" /><br />
Figure 2 - Babel Pseudo Translation Language Packs<br />
<br /></li>
<li>Download and unzip the pseudo translation language pack to:
<b><i>D:\eclipse-SDK-3.7-win32</i></b></li>
</ul>
<h2>Launching Eclipse in Babel Pseudo Translations</h2>
<ul>
<li>Create a shortcut for the Eclipse executable file:
<b><i>D:\eclipse-SDK-3.7-win32\eclipse\eclipse.exe</i></b></li>
<li>Rename the shortcut to <b><i>eclipse-pseudo</i></b> for easier
identification</li>
<li>Select <b><i>Properties</i></b> from the popup menu for the shortcut</li>
<li>Append the <b><i>-nl en_AA</i></b> command line argument to the end of the
<b><i>Target</i></b> field (see figure 3)</li>
<li style="list-style: none"><br />
<img src="images/figure003.png" alt=
"Figure 3 - Create Shortcut for Launching Eclipse in Babel Pseudo Translations" /><br />
Figure 3 - Create Shortcut for Launching Eclipse in Babel Pseudo Translations<br />
<br /></li>
<li>Click <b><i>OK</i></b> to save the changes</li>
<li>Double-click the shortcut to launch Eclipse in Babel Pseudo Translations</li>
<li>Choose your workspace folder on the <b><i>Workspace Launcher</i></b> dialog and
click <b><i>OK</i></b> to continue</li>
<li>Eclipse will be launched in Babel Pseudo Translations</li>
<li>Note: If your Eclipse package contains other Eclipse projects, you need to
download and install the Babel Pseudo Translation Language Packs for the other
Eclipse projects</li>
</ul>
<h2>Testing with Babel Pseudo Translations</h2>
<ul>
<li>Figure 4 below shows an example of the <b><i>Eclipse IDE for Java EE
Developers</i></b> package with <b><i>Babel Pseudo Translation Language
Packs</i></b> for <b><i>Eclipse</i></b> , <b><i>Datatools</i></b> ,
<b><i>Marketplace Client</i></b> , <b><i>Mylyn</i></b> , <b><i>Target Management
(RSE)</i></b> , and <b><i>Webtools</i></b> installed</li>
<li style="list-style: none"><br />
<img src="images/figure004.png" alt=
"Figure 4 - Eclipse IDE for Java EE Developers Package with Babel Pseudo Translation Language Packs" />
<br />
Figure 4 - Eclipse IDE for Java EE Developers Package with Babel Pseudo Translation
Language Packs<br />
<br /></li>
<li>You will notice that there is a special <b><i>Babel Pseudo Translation
Prefix</i></b> in the form of
<b><i>&lt;project-id&gt;&lt;pseudo-translation-index&gt;:</i></b> in front of every
string in Eclipse, for example: <b><i>eclipse2824094:General</i></b></li>
<li>A string without the <b><i>Babel Pseudo Translation Prefix</i></b> , for
example, the <b><i>Enable</i></b> checkbox label (enclosed in red in figure 4), is
&ldquo;usually&rdquo; hard-coded in the programs and not externalized for
translation</li>
<li>Further investigations have to be done to determine if the source plugins are
properly provided to Babel for string extraction, or if you are missing the Babel
Pseudo Translation Language Packs for other Eclipse projects</li>
<li>The added prefix to every string in Eclipse helps to simulate longer
translations from other languages and hence can help identify layout and truncation
problems in Eclipse</li>
<li>For example, the <b><i>Quick Access</i></b> label for global search field in
the tool bar (enclosed in blue in figure 4) does not take into account of longer
translations from other languages and the label is truncated when Eclipse is
launched in Babel Pseudo Translations</li>
</ul>
<h2>Identify the Eclipse Project and File Where Strings Come From</h2>
<ul>
<li>The Babel Pseudo Translation Language Packs can be used to identify the Eclipse
project and file where strings come from</li>
<li>For example, you'd like to indentify the Eclipse project and file where the
<b><i>webtools2846555:Syntax Coloring</i></b> string comes from</li>
<li>The first part of the Babel Pseudo Translation Prefix tells you that the string
comes from the <b><i>Webtools</i></b> project</li>
<li>Go to the <b><i>Babel Webtools NLS Feature</i></b> folder at where your Eclipse
package is installed:
<b><i>D:\eclipse-jee-juno-M4-win32\eclipse\features\org.eclipse.babel.nls_webtools_en_AA_4.2.0.v20111230043401</i></b>
(see figure 5)</li>
<li style="list-style: none"><br />
<img src="images/figure005.png" alt=
"Figure 5 - Babel Webtools NLS Feature Folder" /><br />
Figure 5 - Babel Webtools NLS Feature Folder<br />
<br /></li>
<li>Open the <b><i>BabelPseudoTranslationsIndex-webtools.html</i></b> file in a web
browser</li>
<li>Find the link for <b><i>webtools2846555</i></b> (see figure 6)</li>
<li style="list-style: none"><br />
<img src="images/figure006.png" alt=
"Figure 6 - BabelPseudoTranslationsIndex-webtools.html" /><br />
Figure 6 - BabelPseudoTranslationsIndex-webtools.html<br />
<br /></li>
<li>Inspect the URL:
<b><i>http://babel.eclipse.org/babel/translate.php?project=webtools&amp;version=3.4&amp;file=org.eclipse.wst.css.ui/plugin.properties&amp;string=CSS_Syntax_Coloring</i></b></li>
<li>The URL shows that the string comes from <b><i>project: webtools</i></b> ,
<b><i>version: 3.4</i></b> , <b><i>file:
org.eclipse.wst.css.ui/plugin.properties</i></b> , <b><i>string:
CSS_Syntax_Coloring</i></b></li>
<li>If you click on the URL, login to the Babel Translation Server with your
Eclipse Bugzilla user ID and password, you can help translate the string in your
language (see figure 7)!</li>
<li style="list-style: none"><br />
<img src="images/figure007.png" alt="Figure 7 - Babel Translation Server" /><br />
Figure 7 - Babel Translation Server<br />
<br /></li>
</ul>
<h2>Conclusion</h2>
<p>Babel Pseudo Translations are a very useful tool for Eclipse developers to test
for hard-coded strings, layout and truncation problems, and to identify the Eclipse
project and file where strings come from. Eclipse developers can use the Babel Pseudo
Translations to verify the translatability of their projects and make sure Eclipse
excels in national language support.</p>
<h2>Trademarks</h2>
<p>Eclipse is a trademark of the Eclipse Foundation, Inc.</p>
<p>IBM is a registered trademark of International Business Machines Corporation in
the United States, other countries, or both.</p>
<p>Microsoft and Windows are registered trademarks of Microsoft Corporation in the
United States, other countries, or both.</p>
<p>Oracle and Java are registered trademarks of Oracle and / or its affiliates.</p>
<p>Other company, product, or service names may be trademarks or service marks of
others.</p>
</div>
</body>
</html>