Fandom

Foldit Wiki

Translating Foldit

1,465pages on
this wiki
Add New Page
Comments5 Share

Note: To use an existing translation, please see Foldit_Translations

Chapter 1 - Get going with translating Foldit

  1. Select your editor:
    1. download Poedit (Windows, Linux, and Mac versions available) and install it on your computer. Fedora Linux has an RPM package for poedit.
    2. For Linux, you can also use Lokalize (KDE), KBabel (KDE), Gtranslator (Gnome), Emacs PO mode,
    3. Text editor
  2. Find the file .../cmp-resources-????????????????????????????????/resources/locale/foldit.pot. (PO template file)
  3. If using a text editor, manually edit the file.
  4. If using Poedit:
    1. Start Poedit. Cancel the "Language Selection" dialog if it pops up.
    2. Cancel the "Preferences" dialog.
    3. File->New Catalog from POT file...
    4. Select the foldit.pot file from step 2, press Open.
    5. Press OK for any errors that pop up.
    6. In the "Settings" dialog, make sure charset is UTF-8 and press OK.
    7. In the "Save As" dialog, enter name of the translation file you'll create with .po extension. foldit.[LANGUAGE_CODE].po is fine. Do not edit your *.po file in /home/thom/games/Foldit1/cmp-resources-????????????????????????????????/resources/locale/ folder, place it somewhere else, or it might get deleted during the next update of FoldIt.
    8. Press OK for any errors that pop up.
    9. Proceed with translation of all the strings. See Chapter 2 for detailed instruction on actual translation.
    10. Be sure to save periodically.
  5. Once the translation is complete, share it with the world and receive the credit for it. Also see http://fold.it/portal/node/add/client-translation


Chapter 2 - Translating Foldit after loading template file

The most translatable items, we'll call them messages, are simple. They are something like this:
Show only my solutions

  • To translate in a text editor: put the translation of each message that begins with 'msgid' in the following area that begins with 'msgstr'.
  • In Poedit, simply enter the translation into the textfield at the bottom of Poedit like this: Показать мои решения


A few messages have special character sequences that you symbolize important things.

Watch out for for back slashes "\" and percent signs "%":

Back slash is always followed by small case latin "n". Together they symbolize the place where line of text ends and new one begins when shown in Foldit.

Your goal is to keep your translation to approximately the same number of lines. So, for example:
Main\nMenu
This is displayed as two lines within a button. So your translation should try to fit there as well:
Главное\nMenu
{C}
The "%" is always followed by a small latin letter ("s" or "d"). Together they function as the placeholder for a value that is filled in by Foldit when you play it. Place them together in the appropriate places within the translated sentence. Example:
Your buddy %s has passed you on puzzle %s
The place holders wil be replaced by your buddy's name and the puzzle's title. Translation looks like this:
Ваш друг %s обогнал Вас в пазле %s
{C}%s = Placeholder for string (stream of characters)

%d = Placeholder for number

There are currently 751 strings. One estimate was it takes around 10 to 20 hours (or less) to translate. The time taken depends if you know the biological terms (e.g. helix, sheets, amino acids).

Translation may be semi-automated by using translation memory (http://www.opentag.com/tm.htm)


Chapter 3 - Merging translation with new file

Open your translation in Poedit

catalog, update from a pot file, open here the new file.

The lines will be added.


Chapter 4 - To Do's and Miscellaneous

  • Need discussion of UTF-8 and different OS'
  • Need discussion of testing a new translation (mo file: binary from po file) = http://fold.it/portal/create_mo (.mo = machine object)
  • Linux notes:
    • It may be prudent to save the current foldit.pot in the same directory as language.po so changes can be detected. Use msgmerge to update language.po file with the newer foldit.pot. Check the head of the file for "POT-Creation-Date"
    • msgfmt converts language.po to language.mo
    • GNU gettext documentation has in-depth information
    • It is possible to combine multiple *.po files into a compendium using msgcat. This has not yet been tested
    • Use msggrep to match patterns in *.po files
    • Use msgfilter to take an existing language file and adapt for another dialect
    • To determine translation string count: egrep -c msgid cmp-resources-????????????????????????????????/resources/locale/foldit.pot
    • Subtract 1 since the first msgid is blank

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.