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.
Here are the files mentioned in the previous post.
Hi,
Thanks for your feedback about the Portuguese translation. I will provide the translation for additional messages and upload the new file soon.
socramdm
Here are some more updates to both foldit.pot and the test "Slovene" translation, foldit.sl.po.
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.
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.
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.
Here is the latest and probably final round of additions to the template file foldit.pot and the simulated Slovene translation foldit.sl.po. 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 foldit.sl.po 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, foldit.sl.po should now match foldit.po more closely.
In a few cases, I've commented out messages in foldit.sl.po that appeared to be duplicates of the ones I added. I tried various formatting changes for the added messages, but none of this helped.
As an example, I have this file and directory:
cmp-resources-f3f5689675a05a73fb3d5d1f6e8950e6\resources\locale\foldit.pot
The resources directory is dated 16 March 2016.
The file is the binary same as the current version:
cmp-resources-1e8bcb69156e40a1336e1f920fdaa0a0\resources\locale\foldit.pot
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:
cmp-resources-1212e4946af5bcc6bcc71556b4159025\resources\locale\foldit.pot
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.
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 "foldit.br.po" 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.