v0.8.9 (Bugfixes + translations) released to Google Play!

Useful links
Source code of the game - Contribution guide - ATCS Editor - Translate the game on Weblate - Example walkthrough - Andor's Trail Directory - Join the Discord
Get the game (v0.8.9) from Google, F-Droid, our server, or itch.io

Translation using PO files

Discussions of the development process of the game.
Post Reply
oskarwiksten
Captain Awesome
Posts: 368
Joined: Sat Jan 29, 2011 8:51 am
android_version: 2.3 - Gingerbread
Location: Stockholm, Sweden

Translation using PO files

Post by oskarwiksten »

Hi,

Are you a translator? We'd love to have your help! Read on for the details.

We're playing with the idea of using PO files for translations, instead of using copies of our current resource files. Using a standardized translation format would mean that translators can use existing tools available for translation, instead of our custom-built tools for Andor's Trail. It could also mean that we can use a web-based interface for translators to work in, to collaboratively manage translations, instead of sending files back and forth.

We're currently looking at testing some existing software for this, and we'd like your help in beta-testing some parts of it. Specifically, we'd love to hear from translators that want to help beta-test and work on how to streamline the process of translations of Andor's Trail in the future. Also, if you have experience working with PO or POT files, we'd love to hear from you.

Please let us know if you're a translator and you'd like to help beta test some new software for translation!

Thanks in advance.

Regards
/The Andor's Trail dev team
/Oskar
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: Translation using PO files

Post by Samuel »

I am willing to beta test. Until now I never used PO/POT files.

I have doubts about the new format. Currently we have Conversation IDs that lead us to the next phrase. So we can translate in the context of several other phrases.
Is there something similar planned with the new format? As far as I see the context is not available in the new format. Am I missing something?

Another (IMO really important) thing:
Usually I keep track of every change in the English "translation" to judge if the according German translation needs to be adjusted too. So several strings (for example skill descriptions like ECC), conversations, etc. have been updated in the past and I forwarded this changes to the German translation. (if it have not been typos)

Now there has been a major refactoring in the ressources recently and there will be another one when changing to PO files.
Currently I cannot keep track of the recent refactoring, because I miss the latest files of the English translation before the refactoring and the earliest files after the refactoring.

Could you deploy this files for developers somewhere?
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: Translation using PO files

Post by Samuel »

I did find a solution to keep track of recent changes to forward them to the German translation.
It's possible to (hard-)reset a git branch to any revision.

I found this changes to the translation:

Code: Select all

values\strings.xml > name="heroinfo_reequip_cost"
values\strings.xml > name="heroinfo_useitem_cost"
itemlist_v0610_1.json > "id": "gloves_troublemaker" > "description"
raw\actorconditions_v0612_2.json > complete file
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
oskarwiksten
Captain Awesome
Posts: 368
Joined: Sat Jan 29, 2011 8:51 am
android_version: 2.3 - Gingerbread
Location: Stockholm, Sweden

Re: Translation using PO files

Post by oskarwiksten »

Samuel wrote:I have doubts about the new format. Currently we have Conversation IDs that lead us to the next phrase. So we can translate in the context of several other phrases.
Is there something similar planned with the new format? As far as I see the context is not available in the new format. Am I missing something?
I also try to keep a positive mind about new things that I haven't worked on before. Personally, if there's something I haven't seen yet, I try to keep my mind open to change, and try to keep a positive outlook on it. Having a positive mind, even about things that you haven't seen yet, is one of the key concepts in achieving success.

In terms of the PO files, they would totally replace the translated json files, so that the only json files that would be present would be the ones in the default translation (English). The PO files would contain only the translations of each English phrase, thereby separating the translation from the definition of stats on items, monsters and conversation flow etc.

Translations in PO files are usually done without an ID to define the string to be translated - usually the English string itself is used as an ID. That way, if some English string changes, it would be apparent that all translations would need to be updated as well.
Regarding context - PO files support something built-in called "context", where we can define what the string itself refers to. Other than than, by default, my plan is to have the PO files sorted by the current conversation flow, so that you can keep translating a whole conversation by stepping one phrase at a time. Just like the old resource file format, but without the funky pipe-sign formatting.
Samuel wrote:Another (IMO really important) thing:
Usually I keep track of every change in the English "translation" to judge if the according German translation needs to be adjusted too. So several strings (for example skill descriptions like ECC), conversations, etc. have been updated in the past and I forwarded this changes to the German translation. (if it have not been typos)
Behold. The power of the almight gitLinus Torvalds:

Code: Select all

oskar@diskmaskin:~/eclipse_workspace/googlecode$ git diff v0.6.12 HEAD AndorsTrail/res/values/strings.xml

diff --git a/AndorsTrail/res/values/strings.xml b/AndorsTrail/res/values/strings.xml
index e9a312e..433ed14 100644
--- a/AndorsTrail/res/values/strings.xml
+++ b/AndorsTrail/res/values/strings.xml
@@ -196,6 +196,8 @@
                <br />
                <a href="http://andorstrail.com/">Game forums on andorstrail.com for questions and gameplay discussions.</a><br />
                <br />
+               <a href="http://andorstrail.com/wiki">Game wiki for info about the Andor\'s Trail world, among other things.</a><br /&g
+               <br />
                <a href="http://code.google.com/p/andors-trail/">Project homepage on code.google.com for developers.</a><br />
                <br />
                Please visit the forums to discuss the game with other players.<br />
@@ -208,8 +210,6 @@
                        http://www.gnu.org/licenses/old-licenses/gpl-2.0-translations.html
        -->
        <string name="about_contents3">
-               Copyright (C) 2011-2012 Oskar Wiksten<br />
-               <br />
                This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published
                <br />
                This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN
@@ -557,5 +557,10 @@
        <string name="preferences_dialog_overwrite_savegame_title">Confirm overwriting savegames</string>
        <string name="preferences_dialog_overwrite_savegame">Gives a question about whether you want to overwrite when saving to a savegame slot that 
        
-                       
+       <!-- =========================================== -->
+       <!-- Added in v0.7.0 -->
+       
+       <string name="heroinfo_reequip_cost">Re-equip cost (AP):</string>
+       <string name="heroinfo_useitem_cost">Use item cost (AP):</string>
+
 </resources>
"v0.6.12" in the git command refers to the tag that was placed on the commit that constitutes the code that was released as v0.6.12.
"HEAD" refers to the current state of your git branch.

Linus is a clever guy :)
Samuel wrote:Now there has been a major refactoring in the ressources recently and there will be another one when changing to PO files.
Currently I cannot keep track of the recent refactoring, because I miss the latest files of the English translation before the refactoring and the earliest files after the refactoring.
I am so glad we moved to using git for revision control. Not only does it allow us to work on different feature branches in parallel, but also allows us to do the things that you yourself seek.

Code: Select all

oskar@diskmaskin:~/eclipse_workspace/googlecode$ git log --pretty=format:"%h %s" | egrep 'Merge .*json'
bc1fb7d Merge branch 'resource_as_json'
oskar@diskmaskin:~/eclipse_workspace/googlecode$ git show bc1fb7d^:AndorsTrail/res/values/content_itemlist.xml
..
( displays the content of content_itemlist.xml before the json merge )
..
Samuel wrote:Could you deploy this files for developers somewhere?
Since we run this project as an open-source project, It's all available in the git repository at http://code.google.com/p/andors-trail/source/list .

Git has a lot of great features available, but it requires some learning to be able to master them all. See this as a learning step towards the enlightenment that is Git :)
Me, I run everything on Linux as you might have noticed, which makes everything a lot easier. From people that still are forced to use other OS:es, I hear they are happy with using Git extensions, which has a graphical user interface, for those that want those types of UIs.

The main reasoning behind the change of translation format is to keep down the amount of administrative work that translators have to do, and to focus that work on actually translating things instead. While a knowledge of git commands is useful if you want to be a developer, my view is translation is something totally different. If some translation needs updating, the tool should tell you that. PO files with using the English phrase as ID, in my view, does exactly that - it keeps the focus on the phrase that needs to be translated, and away from whether we format resource files as json or from whether the resource files have been split into several files.

I am totally positive about changing the translations to something else than duplicating the item- & monster stats for each translation.
/Oskar
oskarwiksten
Captain Awesome
Posts: 368
Joined: Sat Jan 29, 2011 8:51 am
android_version: 2.3 - Gingerbread
Location: Stockholm, Sweden

Re: Translation using PO files

Post by oskarwiksten »

Anyway, here's an example of what the English (.POT) and German (.PO) files could look like. (see attached files)

There are several tools available for handling PO file translations, but the most frequently used client-side program is supposedly poedit.

There's also online tools available that can even suggest machine-translations, for example https://poeditor.com/

In terms of free- & open-source software, I hear a lot of people are happy with using their own installations of Pootle or Weblate, which are all open-source, and well maintained projects.

Overall, I think the concept of building Andor's Trail using things that other (even more clever) people have built is the only way forward. That way, we in the dev team of Andor's Trail can focus on building things that and central to Andor's Trail, instead of spending our development time on building translation tools that other (more clever) people have already built before us.

Personally, I'm really positive about the whole concept of doing translations in a more standardized format, since it will mean less tedious work both for the people doing translations, and for us that maintain the core Andor's Trail world.
You do not have the required permissions to view the files attached to this post.
/Oskar
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: Translation using PO files

Post by Samuel »

Noone else interested in this topic?
I also try to keep a positive mind about new things that I haven't worked on before. Personally, if there's something I haven't seen yet, I try to keep my mind open to change, and try to keep a positive outlook on it.
Oskar, don't get me wrong. I also think we need to change from the current format. Currently the administrative overhead is really big. I think the new files do have very great benefits. However there may be disadvantages too and IMO we should address them before we introduce the new format.


Here are the disadvantages I can think of:
1. Context may be lost
You addressed it nicely with the comments about the IDs using the current string.


2. How should we handle updates of English string?
a) One could argue the previous (translated) string is not valid anymore. So it would be deleted along with its translation. However there is a low probability that typos get translated too. So we would loose a valid translation. (probably in the middle of an translation - some translations are not updated before new releases)
b) One could reuse the previous translation for the updated string. But this would mean the translation gets probably invalid and the translator wouldn't be informed. (he could use Winmerge)
c) One could reuse the previous translation and introduce comments like this to inform the translator: (it would be hard to generate this comments automatically)

Code: Select all

#: TODO - this English entry has previously been '...' please update the translation if necessary and remove this comment
3. Currently there may be different translations for the same string (because of typos, translations mistakes, different translation possibilities)
Perhaps we should introduce comments like this to inform the translator: (it would be hard to generate this comments automatically)

Code: Select all

#: TODO - this translated entry had previously the following additional translations: '...', '...', '...' please update the translation if necessary and remove this comment
Otherwise we may use the wrong translation.


4. A translator may have started a translation weeks ago
There is need of merging depending on how much of the English translation has been changed. The use of static IDs would avoid that, but I prefer the strings as IDs.


5. A partly translation sucks
I heard about that many times. We would support that because the string is the ID. Some strings get translated early: "Welcome", "Goodbye", "What do you have to trade?" So in untranslated conversations from time to time suddenly an translated sentence will pop up. IMO we should only use the translated strings if the whole conversation of a npc or of an area or the whole questlog of a quest has been translated. Please don't tell me we should use Google translate then...


Could you (and others) please comment on this 5 issues?
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
spooky
Posts: 13
Joined: Tue Nov 20, 2012 8:54 am
android_version: 4.1 - Jellybean

Re: Translation using PO files

Post by spooky »

Hey guys,

I would love to get on board with translating. I once started proofreading the German translation and made a few changes, but Samuel uploaded a new version and I never got around to compare the versions.

So I would love to see an online, collaborative translation system where the current translations are hosted in one place, so we don't have to send files around.

I haven't looked at the new file formats, so I don't have an opinion about that yet. Just wanted to say that I want to help and would definitely like to see some kind of system where all translators can work simultaneously in order to avoid the version mismatch that kept me from further translating back then.
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: Translation using PO files

Post by Samuel »

spooky wrote:Hey guys,

I would love to get on board with translating. I once started proofreading the German translation and made a few changes, but Samuel uploaded a new version and I never got around to compare the versions.

So I would love to see an online, collaborative translation system where the current translations are hosted in one place, so we don't have to send files around.

I haven't looked at the new file formats, so I don't have an opinion about that yet. Just wanted to say that I want to help and would definitely like to see some kind of system where all translators can work simultaneously in order to avoid the version mismatch that kept me from further translating back then.
Could you please send me whatever you have? I will happily merge the changes you made. (even if in old format - i will merge relevant changes)

I also think the new format is a big improvement towards collaborative translation.
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: Translation using PO files

Post by Samuel »

spooky wrote:I haven't looked at the new file formats, so I don't have an opinion about that yet.
It looks like this:

Code: Select all

#: conversationlist_alynndir.json:alynndir_1
msgid "Hello there. Welcome to my cabin."
msgstr "Hallo. Willkommen in meiner Hütte."

#: conversationlist_alynndir.json:alynndir_1:0
#: conversationlist_farrik.json:farrik_2:0
#: conversationlist_foamingflask_guards.json:ff_captain_2:1
#: conversationlist_foamingflask_outsideguard.json:ff_outsideguard_2:1
#: conversationlist_thievesguild_1.json:thievesguild_troublemaker_1:1
msgid "What do you do around here?"
msgstr "Was machst du hier?"

#: conversationlist_alynndir.json:alynndir_1:1
#: conversationlist_alynndir.json:alynndir_2:1
msgid "What can you tell me about the surroundings here?"
msgstr "Was kannst du mir über die Umgebung hier erzählen?"

#: conversationlist_alynndir.json:alynndir_2
msgid "Mostly, I trade with travelers on the main road on the way to Nor City."
msgstr "Meistens handle ich mit Reisenden auf der Hauptstraße auf dem Weg nach Nor City."

#: conversationlist_alynndir.json:alynndir_2:0
#: conversationlist_crossglen.json:arambold1:1
#: conversationlist_crossglen.json:mara_default:0
#: conversationlist_crossglen_tharal.json:tharal1:0
#: conversationlist_fallhaven_tavern.json:ganos:0
msgid "Do you have anything to trade?"
msgstr "Hast du etwas zu verkaufen?"
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
oskarwiksten
Captain Awesome
Posts: 368
Joined: Sat Jan 29, 2011 8:51 am
android_version: 2.3 - Gingerbread
Location: Stockholm, Sweden

Re: Translation using PO files

Post by oskarwiksten »

Let's try using Launchpad for translations. Launchpad is an open source project hosting site, originally created by Canonical for Ubuntu. They have an online collaborative translation service, where people can suggest translations for different languages, and get suggestions from translations of similar phrases in other open-source projects.

Follow this link, and click on "View all languages" on the right-hand side.
https://translations.launchpad.net/andors-trail/trunk
/Oskar
Post Reply