Discussion and Support

Skip to content

It is currently Wed Feb 21, 2018 6:02 pm 

Forum rules

PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)

This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Site Admin
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12111
Location: Tampa, FL
 Post subject: Interested in translating MapTool into other languages?
PostPosted: Mon Dec 06, 2010 3:45 pm 
The RPTools team would be thrilled to have you translate this tool into other languages!

As you've probably already seen we have translations for Spanish, Italian, French, German, and Chinese. And perhaps others by the time you read this. The link below will always show the current list of translations. Please PM me first to let me know which language you're working on -- there may already be volunteers for that language and you may want to work together. (Languages in progress include Polish and Russian.)

Not all of the MapTool messages have been put into external files (we are working on this), but there is one file per language that includes all of the messages that are ready to be translated. Periodically we move more messages from being inside the Java program to being in the external files so the translation effort is ongoing...

If you visit this link you'll find all of the current translation files:

http://rptools.svn.sourceforge.net/view ... /language/

I would suggest that you use the English one as your base because it'll always be the most current (it's the one with the i18n.properties name). But if you know some other language better and want to use that as a base for translation, we won't turn it down! Whichever language you choose, click the corresponding numerical link in the second column. That will download the file and show it to you in the web browser. (There will be a download link right above the text so you can use it as your starting template if you wish.)

I recommend you skim through the whole file as there are some comments which describe how some sections work and it would be good to read that before you start translating anything.

When you are done, please PM me the translation file and I'll get it uploaded to the source code repository so that it appears in the next build.

And don't forget to send me information to put into the Help > Credits listing. Just take a look at the current credits to see what the format is like.

User avatar  Offline
Site Admin
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12111
Location: Tampa, FL
 Post subject: Re: Interested in translating MapTool into other languages?
PostPosted: Mon Apr 22, 2013 2:32 pm 
When editing a translation file, please use UTF-8 for your character encoding! If you don't, I may not have the proper encoding conversion available on my Mac and I won't be able to use the file without asking you to convert it for me! Even when using UTF-8, it's nice if you can use the \u0000 codes if you know what they are. These six-character codes are from the first 128 bytes of the character encoding table so they are very portable from one editing environment to another.

In order to test your translations, the following technique can be used (it has been tested by me on Mac OS X and by one of our translators on Windows):

  1. Download and unpack the ZIP version of MapTool into a new directory that you've created.
  2. Inside the unpacked directory you'll find a file named maptool-version.jar. For my example commands I'm going to assume maptool-1.3.b76.jar. This file is just a ZIP file, but the filename extension must remain .jar in order for the Java application to work properly.
  3. Inside that file are all of the translations, so you should be able to simply add yours. The problem is that you must preserve the directory structure inside that file. You may use any tool you have for updating the file (remember: it's just a ZIP file) as long as the directory hierarchy is maintained. The rest of this description is one technique specific to Windows, but using your favorite ZIP application is probably much easier!
    • Create a subdirectory structure like this -- the name is case-sensitive!
    • Copy your new file into that directory using the name i18n_pl.properties. (I'm using i18n_pl here to represent Polish, but there's a description of the language/country codes below.)
    • Now add that directory (and its contents) to the JAR file:
      1. Open a command prompt window.
        Start > Run... and then enter cmd and click OK.
      2. Navigate to the directory created in step 1.
        Type "cd " into the window -- without the double quotes, so only three characters including the space. Drag the folder from step 1 from Windows Explorer into the window and drop it. (Or you can type in the name.) Press Enter to execute the command. You should see your prompt change to include the new directory.
      3. Add the new file to the JAR file using this command:
        jar uf maptool-1.3.b76.jar net\rptools\maptool\language\i18n_pl.properties
  4. The best way to execute the program is to use one of the included BAT files because that way any warnings will show up in the terminal window where you typed the above command. If your system is set up for one language and you want to test a different language, add the following text right after the word java in the BAT file of your choice:
    -Duser.language=xx -Duser.country=XX
    The lowercase "xx" should be the two-letter ISO language code and the uppercase "XX" should be the two-letter ISO country code. So you might have en_US for U.S. English, en_GB for Great Britain English, fr_FR for France's French, and fr_CA for Canada's French.

    You can also execute it normally by double-clicking on the MapToolLauncher.exe program in that directory. But then the language and country settings will come from your operating system default.

Any time you want to test an updated translation file, go back and re-execute step 5.

Last edited by Azhrei on Fri Apr 12, 2013 6:26 pm, edited 1 time in total.
added notes regarding UTF-8

Last bumped by Azhrei on Mon Apr 22, 2013 2:32 pm.

Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 4 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman