Skip to content
Clonewayx edited this page Mar 11, 2017 · 6 revisions

Translating A Dark Room in your native language is a good way of contributing to the project.

Prerequisites

In order to translate A Dark Room, you'll need a few tools:

  • Python
  • the python library polib: pip install polib
  • a 'PO' editor, for example PoEdit.

Translation Process

Here's how to make sure your translation work is going to be complete. Remember to follow, even in your language, the guidelines provided in the Design Guide

Update PO

First, we need to update the .po file (which will be used to translate) from the .pot file (the main file containing all the strings)

With PoEdit:

  1. Open the .po file located in adarkroom/lang/<YOUR LANG>/strings.po
  2. In the 'Catalog' menu, select 'Update from POT file...'
  3. Choose the .pot file located in adarkroom/lang/adarkroom.pot

Translate

You have now an up-to-date strings.po, ready to be translated. When translating, you should always follow the guidelines to maintain the creator's view of A Dark Room. If you have questions about the translation, or about specific wording, you can check the source with PoEdit (edit menu > show reference) and look for an indication to point you in the right direction. You can also open a GitHub issue and ask.

Create JS

Now that the strings.po file is translated (don't forget to save it!), you can generate the strings.js that will be used by the game.

  1. Open a terminal
  2. cd adarkroom
  3. ./tools/po2js.py lang/<YOUR LANG>/strings.po

These steps will create a brand new strings.js, based on the content of the strings.po file.

Pull Request

You can now submit your changes by submitting a Pull Request on GitHub.

Clone this wiki locally