Interested in translating MapTool into other languages?

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

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. :)
Locked
User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Interested in translating MapTool into other languages?

Post by Azhrei »

The RPTools team would be thrilled to have you translate this tool into other languages!

Edit: we’re now using Crowdin so the link below has changed. Use this one instead: https://crowdin.com/project/maptool

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, which are mostly done, and we have a new user who's committed to doing Danish!)

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:

https://github.com/RPTools/maptool/tree ... l/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.
Last edited by Azhrei on Thu Feb 28, 2019 6:56 pm, edited 1 time in total.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Interested in translating MapTool into other languages?

Post by Azhrei »

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!

      Code: Select all

      net\rptools\maptool\language
    • 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:

        Code: Select all

        jar uf maptool-1.3.b76.jar net\rptools\maptool\language\i18n_pl.properties
  4. Some versions of MapTool include a "launcher" program. That program provides a nice GUI for controlling how MapTool is going to be executed so it's the best choice.

    If your distribution of MapTool doesn't include the launcher, then 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 operating 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, or in the command line field of the GUI launcher:

    Code: Select all

    -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.
Any time you want to test an updated translation file, go back and re-execute step 3 (adding the file to the JAR file and re-executing).
Last edited by Azhrei on Thu Feb 28, 2019 7:07 pm, edited 2 times in total.


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

Locked

Return to “MapTool”