Language files issues

I want to make a British translation of the game (because reasons). The problem is, I can’t do it. I’ve tried editing the cataclysm-dda.pot file, making a new en_GB.po file among some other stuff. I’ve requested the translation on Transifex. The question is, is there any way I can manually add a language to the game?

Sounds like you found it, but just in case here’s the main documentation:

The project uses gettext, here are the gettext instructions for creating a new language file:
https://www.gnu.org/software/gettext/manual/gettext.html#Creating

Do I need to recompile the game in order to see the new language?

I can’t recall for sure if the config for languages used is present in a json file or hard-coded somewhere. If it’s pulled from config updating that should be sufficient, if it’s hardcoded it will require a compile.

Edit: looks like it’s hard-coded here: https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/options.cpp#L932

But if you can arrange for it to recognize your system language as en_GB it should pick it up. I have to warn you that bit is fragile and system-dependent, which is why we have the options there in the first place.

Will adding ‘en_GB (English (UK)’ entry to /src/options.cpp, making the .po file, compiling the .mo files and then the game prove enough?

I think that’s it, but I’m notc100% sure. All you need to do to certify it is change one word in the interface in your .po file.

BTW, is there any tool for .po file editing for Ubuntu? As in, I want to edit the translated text only, but I don’t want to manually replace every instance of the stuff that I want to translate.

This stubborn piece of… whatever still doesn’t want to translate! I’ve updated the .pot, compiled .mo, what am I doing wrong?

You know what? I’m just going to leave it as-is and finally get to the darn game!