Tutorials: How to contribute a translation - vlachoudis/bCNC GitHub Wiki

You can help others by creating a translation of bCNC to your own language. bCNC will start up in the same language as the locale you have configured in your computer.

  1. In first place you'll need to install Poedit. This is the interface used in order to generate the translation files. Get it from: http://poedit.net/download (in Linux: apt-get install poedit OR yum install poedit)

  2. Once installed, open Poedit and select "Create new translation taking an existing POT file"

  3. Load the bCNC.pot file (it is at the root folder of the bCNC repository). A dialog will then prompt you to specify the language you'll be translating to.

  4. Now you will see all of the sentences that need translation, but do not start translating yet. Instead, go to Edit->Preferences and type in your Name and GitHub username (i.e. Peter Lang in the name field, @peter in the email field).

  5. Save the translation file. For instance, the Spanish translation is saved as "locale/es/LC_MESSAGES/bCNC.po". You'll need to change the language code to match yours. Note that the auto-generated bCNC.mo file that appears in that folder is also necessary for the translation.

  6. You can now begin translating. It is a long process, so make sure to save the file regularly. If you open bCNC throughout the process, you'll see the translated text if your computer has the locale configured to the same language you are translating to. If you need to resume editing after closing Poedit, you can directly load the file bCNC.po in the LC_MESSAGES folder

Note: You can leave any translation as blank, and the original text will be used instead. It is NOT necessary to duplicate the original text.

Note 2: As of today (january 2016) some of the sentences are shared among different parts of the GUI, this can make it difficult to accurately describe each functionality (for instance, "Cut" is used in the context of copy/paste AND as a machining operation).

Note 3: There are some paragraphs of text with detailed error information which is very technical. Don't bother too much with these if you don't have the time. Give more importance to translating the short and descriptive text.

Updating the translation

You may have noticed bCNC is under heavy development. It is thus desirable that you update your contributed translations frequently. In order to do this:

  1. Open 'poedit' and select "open existing .PO file". Load the .po file in the LC_messages folder within the directory for the language you want to edit (i.e. "locale/es/LC_MESSAGES/bCNC.po")
  2. Then go to the "Catalog" menu and select the option "Update from .POT file". Select the "bCNC.pot" file in the root directory of bCNC
  3. That's it! You can now proceed to incorporate the missing translations (don't forget to save the .po file frequently to prevent data loss)