From The Mana World
(Pondering translation in TMW)
 
(Less poo)
 
Line 1: Line 1:
I am thinking aloud on the translation process of TMW.
Something about the translation process of TMW.


== Translation of client ==
== General ==


Already being done. A few things to keep in mind for hackers:
To ease the work of the translators and in the end the users, please


* Keep sentences complete, while your clever solution at dynamically creating text strings may work in English, it will most likely not do that in other languages.
* Strive to make all text visible to the user translateable
* Always include variables in the strings, they may need to be rearranged.
* Only work with complete sentences (including variables and punctuation marks)
* Please include all kind of punctuation marks in the strings, different languages may use other marks.
* Refrain from ending strings with spaces
* Do not include unnecessary spaces, tabs and similar blanks in the strings.
* Make almost identical strings identical
* Try to keep almost identical strings identical.
* Use a single translation system for the whole project


== Translation of server ==
=== What is translated now ===


It might be preferable to keep translateable text minimal and instead put most of that in the client or data modules/repositories.
* C++ code (<code>.cpp</code>) files for the client


== Translation of client/server data ==
A few things that perhaps could be reworked:


Currently the client and server data are not translateable, and while many methods could be used to achieve it, gettext is preferred as that is the translation system already used elsewhere.
* PHP code (<code>.php</code>) files for the web interface are translated, but not with gettext
* Move the translateable strings from the C++ header (<code>.h</code>) files for the client to the corresponding C++ code (<code>.cpp</code>) files


It seems there already is gettext support for Lua. For the Athena and magic scripts a custom gettext extraction tool probably is needed. There probably exists some scripts for XML and gettext somewhere already.
=== What is not yet translated ===


=== The scope ===
* Scripts
** XML script (<code>.xml</code>) files for both the client and tmwserv
** Lua script (<code>.lua</code>) files for tmwserv
** Athena script (<code>.txt</code>) files for eAthena
** Magic script (<code>.conf</code>) files for eAthena
* Other text
** Help text (<code>.txt</code>) files for the client


The following current data files could potentially be translated:
== External links ==


* XML scripts in ''tmwdata''
* Gettexting the scripts for Wesnoth ([http://www.wesnoth.org/wiki/Translation_Maintainance_Commands#wmlxgettext about] · [http://svn.gna.org/viewcvs/wesnoth/trunk/utils/wmlxgettext?view=auto perl] · [http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmlxgettext?view=auto python])
** <code>emotes.xml</code> (emote names)
** <code>hair.xml</code> (hair colour names)
** <code>items.xml</code> (item names, descriptions and effects)
** <code>monsters.xml</code> (monster names)
** <code>skills.xml</code> (skill names)
** <code>status-effects.xml</code> (text messages)
** <code>units.xml</code> (unit names)
* XML scripts in ''tmwserv-data''
** <code>runes.xml</code> (rune names)
* Lua scripts in ''tmwserv-data''
** <code>scripts/*.lua</code> (text messages et cetera)
* Athena scripts in ''tmw-eathena-data''
** <code>npc/*.txt</code> (text messages)
* Magic scripts in ''tmw-eathena-data''
** <code>conf/magic.conf (text messages)</code>
** Possibly other <code>conf/*.conf</code> files, such as <code>motd.conf</code>
 
A few questions:
 
* Where are the element names defined?
* Add human readable versions of the spell names to <code>magic.conf[.template]</code>?
 
=== Similar approaches ===
 
Wesnoth has used a similar approach for their own mark-up language (WML), see for instance:
 
* [http://www.wesnoth.org/wiki/Translation_Maintainance_Commands#wmlxgettext About wmlxgettext]
* [http://svn.gna.org/viewcvs/wesnoth/trunk/utils/wmlxgettext?view=auto As a perl script]
* [http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmlxgettext?view=auto As a python script]
 
== Translation of the web interface ==
 
The PHP files in the ''tmwweb'' module should be made translateable with gettext as well, see http://www.php.net/manual/en/book.gettext.php for instance. Currently a non-gettext solution is used, which does not scale very well.

Latest revision as of 11:15, 31 May 2009

Something about the translation process of TMW.

General

To ease the work of the translators and in the end the users, please

  • Strive to make all text visible to the user translateable
  • Only work with complete sentences (including variables and punctuation marks)
  • Refrain from ending strings with spaces
  • Make almost identical strings identical
  • Use a single translation system for the whole project

What is translated now

  • C++ code (.cpp) files for the client

A few things that perhaps could be reworked:

  • PHP code (.php) files for the web interface are translated, but not with gettext
  • Move the translateable strings from the C++ header (.h) files for the client to the corresponding C++ code (.cpp) files

What is not yet translated

  • Scripts
    • XML script (.xml) files for both the client and tmwserv
    • Lua script (.lua) files for tmwserv
    • Athena script (.txt) files for eAthena
    • Magic script (.conf) files for eAthena
  • Other text
    • Help text (.txt) files for the client

External links