<?xml version="1.0"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to you under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!DOCTYPE document [
  <!ENTITY ndash  "&#x02013;">
  <!ENTITY hellip "&#x02026;">
]>
<document>

  <properties>

    <author email="dev@jmeter.apache.org">Apache JMeter developers</author>

     <title>JMeter Localisation (Translator's Guide)</title>

  </properties>

<body>

<section name="Introduction" anchor="intro">

<p>This document describes the process of creating and maintaining translated texts for JMeter in languages
other than English. English has been tacitly chosen as the project's primary (or "default") language &ndash; despite its
obvious inadequacy for reasonably unambiguous communication &ndash; as a tribute to the Power of the Empire :-)<br/>
The metropolitan language texts are thus maintained by the software developers, while other project contributors
(called "translators" in this document) take care of maintaining the texts in the languages of the
provinces. The process of producing and maintaining the later is called "translation" in this document.</p>

<p>This document assumes you'll be using i18nEdit as your tool to edit properties files, and instructions will
be specific to this software, but this is not mandatory: the process should mostly work also if you prefer to use
another tool, such as or <b>vi</b> or <b>Emacs</b>.
</p>

<p>This document describes 6 processes:</p>
<ol>
<li>Obtaining the current texts [translators].</li>
<li>Providing the current texts to translators [developers].</li>
<li>Downloading and running i18nEdit [everyone].</li>
<li>Translating [translators].</li>
<li>Submitting your translations to the project [translators].</li>
<li>Merging in new translations [committers].</li>
</ol>

</section>

<section name="Obtaining the current texts" anchor="obtain">

<p>If you want to help with JMeter's translation process, start by reading this document. Then
send a message to <a href="mailto:dev@jmeter.apache.org">dev@jmeter.apache.org</a>
stating your intention. The files you need (*.properties and *.metaprop) are included in the source archive.
But if you are having any difficulty, one of the project contributors will be able to grab the current texts
from SVN and send them to you. You'll receive a jar, zip, tar or tgz file that you'll need to unpack in your
local disk.</p>
<p>If you are familiar with SVN or you're brave, feel free to anonymously connect to the Apache SVN server
and obtain the JMeter source yourself, as described in
<a href="http://jmeter.apache.org/svnindex.html">http://jmeter.apache.org/svnindex.html</a>
&ndash; the files necessary to the translation process are all under the <code>jmeter/src</code> directory.
</p>
<p>Once you've unpacked or checked out the files, make sure to find file <code>src/i18nedit.properties</code> in there:
you'll need to know where it is to start working with i18nEdit.</p>

</section>

<section name="Providing the current texts to translators" anchor="provide">

<p>If you have access to JMeter's SVN repository and you want to pack the files necessary for localisation
for sending to a translator, just go to the directory above the project root and issue the following command:
</p>
<source>
tar czf jmeter-localisation.tgz `find jmeter/src -name "*.properties" -o -name "*.metaprops"`
</source>
<p>
Of course you could also send the translator the whole jmeter directory, but this will make their life easier.
</p>

</section>

<section name="Downloading and running i18nEdit" anchor="i18nEdit">

<p>The runtime for i18nEdit can be obtained from
<a href="https://sourceforge.net/projects/i18nedit/">https://sourceforge.net/projects/i18nedit/</a>.
Download the binary distribution (i18nedit-1.2.2.jar) and save it locally.</p>
<p>To run i18nEdit, just make sure to have a reasonably modern Java Runtime Environment in your PATH, change
to the directory where you saved i18nedit-1.2.2.jar, then issue the following command:</p>
<source>
java -jar i18nedit-1.2.2.jar
</source>

Then:
<ol>
<li>If you've never run i18nEdit before, choose a language. The rest of this document assumes you chose UK English.</li>
<li>Select the "<code>Projects</code>" menu, then "<code>Open project&hellip;</code>".</li>
<li>Navigate to <code>jmeter/src/</code>, select <code>i18nedit.properties</code>, and press the "<code>Open</code>" button.</li>
<li>In the window that opens, select the "<code>Project</code>" menu, then "<code>Project settings</code>". Check that your target language
appears in the list in field "<code>Additional locales (ISO codes)</code>". Otherwise, add it now. Press "<code>Save</code>".</li>
</ol>
You're now ready to start translating.

</section>

<section name="Translating" anchor="translating">

<p>Before you start translating, select the "<code>Project</code>" menu, then "<code>Translation settings</code>". Choose work mode
"<code>Directed translation (source to target)</code>". Enter "<code>en</code>" (without the quotes) in the "<code>Source localization</code>" field. Enter
the ISO code of your target language in the "<code>Target localization field</code>".</p>

<p>Click on one of the editable fields in the right panel ("<code>Comment</code>" or "<code>Content</code>" for your language). Press <keycombo><keysym>F2</keysym></keycombo>.
i18nEdit will bring you to the first property that requires your attention, either because a translation does not yet
exist for it or because the English text has changed since the translation was provided. Enter or fix the text if
necessary, then press <keycombo><keysym>F2</keysym></keycombo> again to repeat the process.</p>

<p>i18nEdit's on-line help is excellent: read through it for more information and tips.</p>

</section>

<section name="Submitting your translations to the project" anchor="submitting">

<p>Once you're done translating, just pack up the whole set of files in <code>jmeter/src</code> in a jar, zip, tar,
tgz, or alike and attach them to a JMeter bug report
(follow link to "Known bugs" in <a href="http://jmeter.apache.org/">JMeter's home page</a> for that).</p>

</section>

<section name="Merging in new translations" anchor="merging">

If you're a committer receiving text files from a translator, follow this steps to merge them into
the project:
<ol>
<li>Unpack the files submitted by the translator in a separate directory.</li>
<li>Start i18nEdit as described in <a href="#i18nEdit">Downloading and running i18nEdit</a> above.</li>
<li>If the translator worked in a new language, make sure it is listed in the Additional locales field in the Project Settings.</li>
<li>Open the "<code>Team</code>" menu and select "<code>Merge changes as integrator</code>".</li>
<li>Enter the path to the <code>src</code> directory in the files submitted by the translator.</li>
<li>Select the translator's target language.</li>
<li>Press "<code>Perform merge</code>".</li>
<li>Close i18nEdit and commit to SVN as usual (remember to Refresh your project if you're using Eclipse).</li>
</ol>

</section>

</body>

</document>
