Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 23, 2018
Some tips added that are mostly meant for non-coding translators.
Inspired by the findings of translator Starcrasher, le Briseur D'Étoiles.
Thanks!
Showing with 13 additions and 3 deletions.
  1. +13 −3 content/community/getting-involved/translating/3rdparty.html
@@ -42,7 +42,7 @@ <h2>1. Changes to the source code</h2>
text.ReplaceAll("%file%", filename);
</pre></li>

<li>Correctly handling plural forms is where a localization can shine or suck.<br />
<li><p>Correctly handling plural forms is where a localization can shine or suck.<br />
This sucks:</p>
<pre>BString text(B_TRANSLATE("You have %number% mail(s)."));
text.ReplaceAll("%number%", numberOfMailsAsString);</pre>
@@ -55,7 +55,8 @@ <h2>1. Changes to the source code</h2>
format.Format(text, numberOfMailsAsInt);
</pre>
<p>The "<tt>#</tt>" is replaced with the integer variable "<tt>numberOfMailsAsInt</tt>" when formatting it all and putting it into the "<tt>text</tt>" string in the last line.<br />
You'll have to include "<tt>MessageFormat.h</tt>".</p>
You'll have to include "<tt>MessageFormat.h</tt>".</p></li>
</ul>

<h2>2. Changes to the Makefile</h2>

@@ -79,14 +80,23 @@ <h2>3. Creating "catkeys"</h2>
<p>The first line always starts with a "1", then the language, the app's signature, and a checksum. The checksum has to stay the same across all translations!<br />
Then follow the rows of strings; the 1st column for the original string, the 2nd column shows the context, then optionally a comment, and the translated string last.</p>
<p>The translator must only work on the last column string (and possibly replace the "English" of the first line with their language name in English, e.g. "German". But that is only for human readers of that file, it doesn't matter when compiling the application).</p>
-<div class="alert alert-info">You have a much more convenient and safe way to work with catkeys files by installing <a href="https://depot.haiku-os.org/#/pkg/catkeyseditor">CatKeysEditor</a> from the HaikuDepot. It provides a simple and clean interface to the otherwise confusing string jungle presented when opening catkeys in a text editor.<br />
<div class="alert alert-info">You have a much more convenient and safe way to work with catkeys files by installing <a href="https://depot.haiku-os.org/#/pkg/catkeyseditor">CatKeysEditor</a> from the HaikuDepot. It provides a simple and clean interface to the otherwise confusing string jungle presented when opening catkeys in a text editor.<br />
Better yet, use the online tool "Polyglot", see below.</div>

<h2>4. Compiling the application</h2>
<p>After you've got back all those translated catkeys and put them in the <tt>locales</tt> folder, you compile your app like this:</p>
<pre class="terminal">make
make bindcatalogs</pre>
<p>So, after the regular built, you do the <tt>make bindcatalogs</tt> to put the catalogs created from the catkeys into the executable's resources.</p>

<h2>5. Tips</h2>
<p>The following tips are mostly geared towards the enthusiastic translators that would like to test their work. Seasoned coders are probably aware of them already.</p>
<ul>
<li><p>When you test translated catkeys, make sure you launch the right app executable, the one you did the <tt>make bindcatalogs</tt> on. Having more than one application with that same application signature in the system may result in unexpected results. Especially true when it comes to Replicants!<br />
Best to remove/uninstall other instances of the app. A reboot may even be needed, if the app in question is auto-(re)launched on bootup and runs in the background.</p></li>
<li><p>When testing a localized build, be aware that the application may expect data or help files in certain locations. You may have to move some of those files around. The app's project page should inform on the specifics on how to build.</p></li>
<li><p>If you open a Makefile with Pe, you have to invoke the menu item <i>Edit | Edit as text</i> or click on the little Pe icon in the tool bar to get to the LOCALE entry.</p></li>
</ul>
<p><br /></p>
<hr />
<div class="alert alert-info">If you need catkeys translations for your apps, you should have a look at <a href="http://i18n.kacperkasper.pl">Polyglot</a> and the forum thread <a href="https://discuss.haiku-os.org/t/help-translating-applications-with-polyglot">Help translating applications with Polyglot</a>.</div>

No commit comments for this range

You can’t perform that action at this time.