RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

How translations are made

Open egrueda opened this issue 9 years ago • 2 comments

I'd like to improve spanish translation as there are still many untranslated strings. But I'm not sure how translation files should be. If I take a look at the intl directory I see two kind of files:

  • msg_hash_XX.c
  • msg_hash_XX.h

When I open msg_hash_us.c and compare with other languages, I see too many differences. Not even the #include lines are the same.

And then there are .h files, more like translation files I'm used to, but not for every language.

So questions are:

  1. How should I work out to make a compatible translation? Is there any documentation, format template or so? Should I duplicate msg_hash_us.c? msg_hash_us.h? both?

  2. How can I check my translation is working fine? Is it needed to compile for translation testing?

Thanks for your help. Best regards.

egrueda avatar Jan 03 '17 06:01 egrueda

Hi @egrueda,

The .h files are part of a newer format we are transitioning to (which still requires a .c but does not contain any translations), however language files that are only a .c still use the old format where the translations are embedded inside. It is still safe however to add new translations to the old .c files until they are converted.

Also keep in mind that many people have been adding new strings only to the us.h file without also adding anything to the existing languages, so currently the burden of figuring out what strings are missing (and then adding them) lies mostly with the translator. In other words, even if the current spanish .c file is 100% translated, it could still be missing many new strings.

And yes, it would be necessary to compile RetroArch to check your translations.

Hope this helps.

ghost avatar Jan 03 '17 17:01 ghost

Understood, thanks for the answer. I'll pick us.h as a sample, so I can move all existing es-ES translations to the new format. It's easier for translator softwares using a simple structure as shown in .h files. So for my testing I'll make an empty .c file pointing to the .h file and will let you know when ready. Thanks very much!

egrueda avatar Jan 03 '17 17:01 egrueda