Page 1 of 3

How to translate AT the (hopefully) easy way at high quality

Posted: Tue Oct 30, 2012 11:38 pm
by Samuel
I was asked in a PM how I translate AT. I thougt this could be useful for other forum members too. IMO you should always use a computer (here with Windows) to translate. There should be several problems when using a phone or a tablet: small screen, typing is slower, AFAIK there is no merge program like winmerge, etc.

Here is a list of active translation topics: In the following steps I will assume you have a computer and the target language would be German.

1.1 Create these folders on your computer

Code: Select all

English translation
English translation update
German translation
1.2 Download the following files from "git/AndorsTrail/res/values" to "English translation"

Code: Select all

content_actorconditions.xml
content_conversationlist.xml
content_itemcategories.xml
content_itemlist.xml
content_monsterlist.xml
content_questlist.xml
strings.xml
strings_about.xml
To download the file in the original format, I recommend to open the file and use "save target as" on the link "View raw file" in the details box on the right:
Image

1.3 Download the same files from "git/AndorsTrail/res/values-de" to "German translation"

1.4 Copy missing files from "English translation" to "German translation"

1.5 Use a file merging tool like Winmerge or DiffMerge to show the according English and German files side by side. Edit the German file to improve or create the translation.
You should start with the file "strings.xml". For reference you may also download a translation to some other language.

1.6 Check in the Online Translation Validator for untranslated strings.
This might not be wrong, as "Ok" may be translated by "Ok" in German.

1.7 Commit your zipped "German translation" folder to a new issue here:

On an update of the English Translation you should do the following steps:
2.1 Download the updated files from "git/AndorsTrail/res/values" to "English translation update":

2.2 Use Winmerge to check if there are changes between "English translation" and "English translation update"
2.2.1 For each change check if you need to adjust the German translation. Perhaps the meaning of some text entries changed.
2.2.2 Check if there are new text entries to translate. Most of the time at the bottom of the file, but sometimes there are also new text entries in already translated parts.

2.3 Move the files from "English translation update" to "English translation"

Re: How to translate AT the (hopefully) easy way at high qua

Posted: Tue Oct 30, 2012 11:40 pm
by Samuel
Did I forget something? Any additional thoughts?
Perhaps this should be sticky.

Re: How to translate AT the (hopefully) easy way at high qua

Posted: Wed Oct 31, 2012 12:44 am
by sdevaney
This is a nice tutorial Samuel. The only thing I would add is using the translation validator to make sure no parts of the translation were skipped. http://andors-trail.googlecode.com/git/ ... tions.html

I will have to look into winmerge looks like it may be easier than what I use currently, a combo of git-cola and notepad++.

Re: How to translate AT the (hopefully) easy way at high qua

Posted: Wed Oct 31, 2012 1:42 am
by Samuel
I added the reference to the translation validator. Although with its last update (enabling editing on the fly) its not easy to see what exact strings have not been translated. Previously they were marked.

Re: How to translate AT the (hopefully) easy way at high qua

Posted: Wed Oct 31, 2012 10:29 am
by Trolu
Thanks for the tutorial (it was my PM request that "gave birth" to it), but I still have one question, and I prefer to ask that before I'm well into the translating process. The "download following files" part is somewhat unclear, since download results differ greatly when I use "save target as" or I open the file and then copy/paste the displayed content. The latter is FAR more user friendly for usage and translation. "strings.xml" obtained the fist way is 169kB in size, while the second produces a 39kB file (which is more in line with the file size listed at "git/AndorsTrail/res/values"), and file headers look like this:
1. ("save target as" method)

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >

<meta name="ROBOTS" content="NOARCHIVE">

<link rel="icon" type="image/vnd.microsoft.icon" href="http://www.gstatic.com/codesite/ph/images/phosting.ico">


<script type="text/javascript">




var codesite_token = "cSKXWBgWHArK9gosEoliXWa4zSQ:1351679040689";


2. ("copy/paste" method)
<?xml version="1.0" encoding="utf-8"?> <resources>
<string name="app_name">Andor\'s Trail</string>
<string name="app_description">Quest-driven fantasy RPG</string>
<string name="exit">Exit</string>
<string name="exit_to_menu">Exit to menu</string>
<string name="menu_pause">Pause</string>
<string name="menu_settings">Preferences</string>
<string name="menu_save">Save</string>
<string name="menu_load">Load</string>
<string name="menu_save_gamesaved">Game was saved to slot %1$d</string>
<string name="menu_save_failed">Failed to save game! Is the SD card mounted and writable?</string>
<string name="loadsave_title_save">Save game</string>


Which one is correct, so I don't end up with translated, but useless files?

Re: How to translate AT the (hopefully) easy way at high qua

Posted: Wed Oct 31, 2012 3:15 pm
by sdevaney
You seem to be getting the html file that displays the xml file as well as the file its self when you download it the first way.

I would recommend either doing it the 2nd way if that is more comfortable to you or downloading the whole source from the downloads page.

Re: How to translate AT the (hopefully) easy way at high qua

Posted: Wed Oct 31, 2012 3:36 pm
by fiernaq
I recommend DiffMerge rather than WinMerge as mentioned in 1.5 on the OP. Just a personal opinion though.

Re: How to translate AT the (hopefully) easy way at high qua

Posted: Thu Nov 01, 2012 1:41 am
by Pyrizzle
Samuel: Great work here! Thank you for posting this information! Very helpful (as always)

Re: How to translate AT the (hopefully) easy way at high qua

Posted: Thu Nov 01, 2012 5:23 am
by Johan
Regarding "save target as" vs. copy/paste. A third option (fourth after using git?) is to open the file and use "save target as" on the link View raw file in the details box om the right.
view-raw-file.png

Re: How to translate AT the (hopefully) easy way at high qua

Posted: Thu Nov 01, 2012 8:59 am
by Trolu
Thanks everyone. I've downloaded the full source, and already posted new issue with start of Polish translation (strings.xml). More to follow soon.