Translation: messages missing from template file

Case number:845833-2009448
Topic:Game: Display
Opened by:LociOiling
Opened on:Monday, April 13, 2020 - 02:16
Last modified:Saturday, June 27, 2020 - 20:25

The recent Brazilian Portuguese translation revealed some problems.

One problem is that many messages in Foldit don't get translated.

With a little experimentation, I found that for some messages, adding the English text to the template file (foldit.pot) and then the translation file (foldit.xx.po) results in the translated text being displayed in the game.

See additional messages for translation on the wiki for the missing messages in easy copy-paste format.

Unfortunately, there are still a number of messages where updating the .pot file does not work.

I'll post my updated .pot file and a sample translation file in a reply.

(Mon, 04/13/2020 - 02:16  |  10 comments)

LociOiling's picture
User offline. Last seen 3 hours 9 min ago. Offline
Joined: 12/27/2012
Groups: Beta Folders

Here are the files mentioned in the previous post.

  • foldit.base_.pot_.20200412.txt can be renamed to foldit.pot
  • foldit.sl_.po_.20200412.txt can be renamed to

The updated foldit.pot has the previously missing messages grouped near the top.

The file can be copied to the current resources/locale directory, for example:


Under "Set language" on the Foldit login screen, it will show up as Slovene, or "Slovenski jezik", with language code "SL". It's not a real translation, but simply every message in foldit.pot with the prefix "SL:" added. This makes it easier to identify missing messages.

This update found messages for a lot of the more recent features, with terms like "Rama Map" and "Blueprint". Many still remain unresolved.

I haven't tried delving into the intro puzzles yet. A quick check showed a number of problems with untranslated messages.

Joined: 03/08/2020
Groups: None


Thanks for your feedback about the Portuguese translation. I will provide the translation for additional messages and upload the new file soon.


LociOiling's picture
User offline. Last seen 3 hours 9 min ago. Offline
Joined: 12/27/2012
Groups: Beta Folders

Here are some more updates to both foldit.pot and the test "Slovene" translation,

There are added messages for the intro puzzles, including the names of all puzzles. I have reviewed the messages for all the puzzles up to "Remix". I was able to add several missing messages.

I have also added several new messages which appear in other parts of the game.

Most of the new messages are grouped together near the top of the file, but after the messages previously added. One exception is the "Pick Sidechains" message, which is now on two lines.

In some cases the additions don't work. I've marked these messages with the comment:

# TODO: msgid not picked up

in foldit.pot, indicating that the "msgid" doesn't seem to be correct. As a result, the translated "msgstr" doesn't appear in Foldit.

Slight differences in how "msgid" is formatted, such as where newlines ("\n") are inserted, may explain why these messages aren't working. Many simple messages aren't working, however, so there may be other problems.

I noticed that there are two messages, " translation by ", and " translation". Translators can use these messages to sign their work. The "msgstr" values appear on the Foldit start screen and perhaps other places.

LociOiling's picture
User offline. Last seen 3 hours 9 min ago. Offline
Joined: 12/27/2012
Groups: Beta Folders

The additions to foldit.pot also appear on the wiki as additional messages for translation and additional intro puzzle messages for translation.

rmoretti's picture
User offline. Last seen 3 days 10 hours ago. Offline
Joined: 01/15/2010
Groups: Foldit Staff

We actually just recently added a feature to the internal development version which should help somewhat in these cases.

What it does is add an option to log all the instances where a translation is being called for in-code, but a translation isn't being provided by the currently active translation file. This should help translators figure out what translations they may be missing.

The two drawbacks are that it only logs the translation if you encounter the message during a play through. It also won't catch cases where the message for some reason isn't being presented to the translation system at all. In the latter cases - where a message isn't being translated and doesn't show up in the untranslated log - it's the case that you'd need to let the developers know, so they can hook that missed message into the translation system.

We hope to send out the logging feature with the next fresh devprev update, which should hopefully be in not too long.

LociOiling's picture
User offline. Last seen 3 hours 9 min ago. Offline
Joined: 12/27/2012
Groups: Beta Folders

That sounds good, but it doesn't solve the other half of the problem. It seems like the template file foldit.pot hasn't been updated in years. So there are lots of messages that aren't there for translators to translate in the first place.

In many cases, a translator (me, for example) can add the message by observing the text on the screen. This works for many messages, but it's kind of tedious.

For many other messages, copying the text off the screen doesn't work. There may be slight differences in formatting, such a space here or there or a "\n" newline character, that prevent the copied text from matching what's in the translation system.

The next step is to make sure that foldit.pot is updated and distributed.

LociOiling's picture
User offline. Last seen 3 hours 9 min ago. Offline
Joined: 12/27/2012
Groups: Beta Folders

As an example, I have this file and directory:


The resources directory is dated 16 March 2016.

The file is the binary same as the current version:


where the directory is dated 29 October 2019.

None of the messages contain the words "remix" or "Remix". '

There are a couple of related issues. All the files in the locale directory are dated 19 July 2008, regardless of the cmp-resources version.

The "POT-Creation-Date" keyword in foldit.pot is "2013-04-29 14:51-0700" in this version.

I have an older one:


with the directory dated 15 June 2013.

This version has several minor differences from the current version, mostly correcting typos. All the locale files are still dated 19 July 2008, and "POT-Creation-Date" is "2013-04-29 14:51-0700", which might be accurate in this case.

LociOiling's picture
User offline. Last seen 3 hours 9 min ago. Offline
Joined: 12/27/2012
Groups: Beta Folders

Here is the latest and probably final round of additions to the template file foldit.pot and the simulated Slovene translation As before, you'll need to rename the attached files.

This round finishes up the intro puzzles, starting with "Insertion and Deletion". In many cases, the added messages still don't work, probably due to slight differences in the format.

Despite the current problems, these non-matching messages should still be included in a translation. A future "official" version of foldit.pot may include the correct msgid keywords for these message. Poedit or a similar program will be able to match the new msgids to the ones found in my version of foldit.pot.

The added messages that aren't matching are marked with a "# TODO" comment in foldit.pot, and now in as well.

Aside from the intro puzzles, there are a couple of added messages under the Objective dropdown. There were also some other minor changes. In general, should now match foldit.po more closely.

In a few cases, I've commented out messages in that appeared to be duplicates of the ones I added. I tried various formatting changes for the added messages, but none of this helped.

LociOiling's picture
User offline. Last seen 3 hours 9 min ago. Offline
Joined: 12/27/2012
Groups: Beta Folders

It's been two months, but there is some translation news to report.

First, there's a new feature in the current release of Foldit which identifies messages which don't have a translation. The output from the "log untranslated" feature can be added to "foldit.pot" or an existing translation file such as "" and translated.

Second, one trick when adding messages by hand is that commas must be "escaped" using a backslash character. The new untranslated message output shows the correct format:

msgid "Automatically determine sheets\, helices\, and loops."
msgstr ""

The commas are escaped as backslash comma or "\,".

I'd tried entering this message manually without the backslashes, and it didn't work. Adding the backslashes should fix many of the intro puzzle messages.

It's not immediately clear which other characters require a backslash.

The backslash is only required on the English text in the msgid field, not in the translation in the msgstr field.

If you use the new untranslated log feature, no need worry, each msgid should have the necessary escape characters.

LociOiling's picture
User offline. Last seen 3 hours 9 min ago. Offline
Joined: 12/27/2012
Groups: Beta Folders

Here are updated versions of foldit.pot and the simulated Slovene translation

The template file foldit.pot can be used to create a new translation or update an existing one. The file simply demonstrates what a translation looks like.

As before, you'll need to rename the attached files and move or copy them to your resources/locale directory, which is currently be something like:


The new version includes new messages found in the latest release, captured in part using the new "log untranslated" setting. The new version also fixes many cases where a translation was not being picked up, especially in the intro puzzle hints. As described in a previous post, the trick is to "escape" any commas in the msgid keyword with a backslash.

This update seems to cover all of the intro puzzle hint messages, and most or all of the new messages, such as the tips that show up while a puzzle is loading. Since these new tips seem to be random, it's possible that some may not have been captured yet.

There are some areas that require a software updates. The cookbook, the view options, the wiggle power settings, and some of the keyboard shortcuts are in this category. The current template file includes many or all of the needed messages, but they won't be picked up until a future software update is available.

The issue with escaped commas may present a problem if you're using Poedit to work with your translations. I found that the precompiled free version of Poedit updates the template file so that the escape character is escaped. So "hello\, world" would become "hello\\, world". This substitution won't work in a translation file.

If you use Poedit, you'll need to clean up the translation file at the end, making sure that any commas in the msgid fields are escaped with a single backslash. The escape character is not required in the translated values in the msgstr keyword.

I'll open a separate feedback about the escaped commas issue. Some of the msgid keywords in the old part of foldit.pot have commas without the escape character. Translations for these unescaped messages aren't picked up at runtime. It seems like the escape logic was added to the translation system at some point, possibly in error.


Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, Boehringer Ingelheim, RosettaCommons