Upload of .po translation file not working

Case number:845813-2009392
Topic:Game: Tools
Opened by:LociOiling
Status:Open
Type:Bug
Opened on:Monday, April 6, 2020 - 22:13
Last modified:Sunday, April 19, 2020 - 20:55

As reported by socramdm in the forum thread Error "msgfmt not found" uploading or testing po file translation, uploading a translation file with the .po extension is not working.

The messages

Your .po file has errors. Remove it, fix it and upload again.
sh: 1: msgfmt: not found

appear, and nothing happens.

(Mon, 04/06/2020 - 22:13  |  14 comments)


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

Here's my .po file.

Use the "Browse" and "Attach" buttons in the "File Attachments" box below to add your own in a new reply.

You'll also need to add ".txt" to the file name for the attachment to work.

Joined: 03/08/2020
Groups: None

Hi LociOiling,

Thanks for instructions.

Here's my po file.

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

I renamed the attached file to pt_BR.po, and opened it in Poedit.

Everything looks good, and it even appears to be a complete translation.

As mentioned elsewhere in the feedback, it's possible that the "msgfmt" program is not installed on the Foldit server. Foldit moved to a new server last year, and it's possible msgfmt and some related items were overlooked.

Somebody said "puxa cara, aprenda mais uma idioma" over on intro puzzles page on the wiki a few years back. Now we are so close to having the game translated, maybe only a tarball or RPM or whatever away.

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

Just for completeness, I tried renaming my file to match existing names like "foldit.fr.po".

I tried uploading "foldit.lo.po", but got the same error.

I also noticed this message in the upload area toward the bottom of the add client translation page:

For security reasons, your upload has been renamed to foldit.lo_.po.

I also changed the "lo" to a real country code, "pr", but this produced the same errors and messages.

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

Another great thought: "msgfmt" is a utility program, part of the "gettext" package.

I'm thinking the "msgfmt not found error" means exactly what it says, the system can't find the program.

So maybe something needs to be installed, or a path needs to be adjusted.

Joined: 03/08/2020
Groups: None

Yes. But.. Who it's responsible for the Foldit server (sysadmin)? How to contact him to explain the error?

jeff101's picture
User offline. Last seen 4 hours 13 min ago. Offline
Joined: 04/20/2012
Groups: Go Science

The Foldit Team often reads these Feedbacks.
Perhaps one (like agcohn821) will respond
directly. They have green and white Foldit
icons by their user names.

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

Yes to what jeff101 says, and I've also notified the Foldit developers directly.

Meanwhile, the good news is that users can install this translation file on their own.

The first step is to download pt_BR.po_.txt from the reply above: https://fold.it/portal/node/2009392#comment-40916

Rename the file to foldit.pt.po

Copy the file to this directory:

C:\Foldit\cmp-resources-1e8bcb69156e40a1336e1f920fdaa0a0\resources\locale

Change C:\Foldit to the correct location on your system.

This is the current resource directory. The resource directory is sometimes replaced when Foldit installs an update. Be sure to save a copy of foldit.pt.po in a separate spot.

Now when you start Foldit, go to "Set language" on the login screen. You'll see "[pt] Português" as one of the languages. Double-click on it, or single click and click "Apply Language". Foldit then restarts with the language pack installed.

While this isn't quite as good as having the translation already installed, it's better than nothing. Hopefully, the team will get the upload process fixed before too long.

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

See Portuguese translation on the Foldit wiki for instructions on how to install the translation manually.

Joined: 03/08/2020
Groups: None

Great job!

Joined: 11/05/2019
Groups: None

Thank you!

Hey Loci--thank you so much for sending this along to everyone!

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

See also this feedback: messages missing from template file.

A lot of messages aren't getting translated.

For at least some messages, you can just add the English text and the translation to the translate file.

There are other untranslated messages where this doesn't seem to work, however.

Joined: 03/08/2020
Groups: None

Hi all,

Here's the new version of Portuguese Translation with additional messages.

socramdm

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

For the Foldit developers, here's a list of intro puzzle messages that I wasn't able to translate. ("Translate" means adding a fixed keyword to each message, just to identify what *could* be translated.)

There are also some notes on how the translation is supposed to work. Foldit appears to be using the Gnu "gettext" package.

I've been able to add a few more messages since the last update. I'll upload the new files soon.

Foldit has several others areas where messages can't be translated. For example, I haven't been able to translate the "Objectives" area. This gap leads to other problems, such as one intro puzzle message referencing the "show" check box on one of the objectives.

Sitemap

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, RosettaCommons