Adding comments in .po files

Hi Guys,

How do we make sure the generated .po localization files have comments in them to give the translators hints when they get to translate them?

We have everything set up already, and have our .po/.manifest/.locres files generating and working in the game. We just need to add comments on some of the entries.

I’ve seen it mentioned on the web that adding a ‘///’ comment above the text to be localised in the code should add that as a comment in the generated .po file, but that doesn’t seem to be the case in Unreal.

It would be a massive pain to add the comments afterwards as that would mean doing it once for each locale. Does anyone know how we do this?


Right now the only “comments” provided to the translators through the .po files is the information we have at gather. This includes the namespace and key, which is great for source code extracted text but not useful for asset extracted as we don’t yet allow manual setting of these values, as well as the asset/property/source code file and line the text was gathered from.

We don’t currently support a “notes” or comment system within the the loc system unfortunately. You have a couple options.

  1. You could extend the system yourselves. You would extend the gather logic to additionally gather notes and insert that into the .manifest file. You would also need to update the .po export cmdlet to include that information.
  2. You could break you localization into smaller targets. Right now you probably have a single target called Game. But you could break that into UI, Loot, Abilities, etc… which gives the translators a bit more information and helps put similar content next to each other. The target system was originally designed for DLC, but also works fine as a physical grouping method.
  3. You could rely on other tools. Some tools, such as OneSky, allow you to upload images and associate text with locations on those images. Doing this for all your screens would provide the translators with significant context for your most important text.
  4. I’m unsure how functional the translation picker is in your build, but depending on your localization flow you could allow some of the translators to translate through the picker. This let’s them translate the live project, giving them perfect context for all of your most valuable text.

In the near future, we’ll be extending the system to allow for injecting more context through the use of notes and conceptual grouping, through the use of tags.

Thanks for the info.

@Sarge Coming at you from the not-so-near future - any movement on comments? Seems like a pretty essential feature - ideally we’d just be able to type a localisation comment in on any text variable here