How to force use of english .po translation files?

Is there an extra step to make Gramps use the PO translation files?

My OS defaults US english and has no other languages enabled. I’ve installed my first Gramps Add-on where the Python calls, variables and strings are in a different language but where there is an english .po file: PersonFamilySearch in esperanto.

(Even though the Isotammi addons are built for a Finnish audience, the code tends to use English and .po files are created for Finnish and/or Swedish afterwards. Some have strings in Finnish that have not yet been translated.)

However, Gramps is not leveraging this english translation file.

Do I need to set a language parameter to ‘english’ somewhere to enable the translation?

(Gramps 5.1.5 on Fedora 37)

Yes indeed. A PO file needs to be compiled, into a MO file, and it looks like the addon.mo file for English is not included in the download. The author made several shell scripts that can be used to make those, but if he doesn’t run them before release, you won’t find these in the ZIP file, assuming that you downloaded that, and didn’t follow the yellow brick developers road.

These scripts are very powerful, but with comments in Esperanto. they may be hard to grasp. I tried a few here, and now have a fully working translation in English, I guess, and I even found a way to make a Dutch one. I figured out that there is one script that accepts a language parameter, and when I gave that (nl), it used Google translate to create a PO file for Dutch and compiled that.

It’s pretty neat, if you know what to do, and install the right tools.

Here’s another hint. If you’re unhappy about the file that I mailed, you can always use the msgfmt command to create a new one, after editing the PO file, either with a standard text editor, or the specialized editor called ‘poedit’.

To do this, open a terminal, and change to your language directory

~/.gramps/gramps51/plugins/PersonFS/locale/en/LC_MESSAGES

where you type

msgfmt PersonFS.po -o addon.mo

You may try running the command without parameters first, to figure out whether you have it already. And if not, your Linux will tell you how to install it. The same goes for poedit itself.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.