Pushing templates with translations

Hello!

I have been considering implementing a script that iterates over our pots and “translates” message that don’t need translation. I would like to have a good idea as to what will happen to those messages, will they be listed as normal? It should be translated for all languages, correct?

Thanks
Stan

Hello @StanFromIreland,

By default, when downloading a translated version of PO files, Transifex will fill in any untranslated strings with the source string, so it’s possible that you don’t need to go through that step.

You can also mark strings in Transifex with a notranslate tag, which will autofill the translation with the source string.

Lastly, you can use shortcuts in the editor to quickly fill the translation with a source string (CTRL/CMD+G) and go to the next string by pressing TAB. This is a quick way to handle those strings without relying on external means, but it may become tedious if you’re dealing with a large enough number of strings that need the same text as the source.

Please let me know if that helps or if you’re looking for something more specific.

1 Like

Hello @Mylon

I would kindly like an answer to my actual question.

Yes, I am familiar with gettext and the Transifex interface. I am simply looking for a more efficient way, my CI with a few regex patterns can cover several hundred messages, in seconds, saving valuable translator time.

1 Like

Hello @StanFromIreland,

Thanks for clarifying.

To answer your question, those untranslated strings must be “translated” with the source text for each target language.

  • Strings that don’t need translation should be filled with their source text
  • Each target language file will need these same source strings as translations
  • When uploaded to Transifex, these will appear as “translated” in the editor, and translators will be able to filter them out, focusing on untranslated content

These files must be uploaded as translation files to the corresponding resource and language in Transifex.

Please let me know if this answers your question, and if you need anything else, I will be happy to assist.

2 Likes

Thank you, I will try it and see how it goes :slight_smile:

1 Like

It rejects the file with the translations:-( :

python-newest.library--grp - failed to upload of resource 'o:python-doc:p:python-newest:r:library--grp' - parse_error: A non-empty msgstr was found on the entry with msgid '0'. Remove and try again

Is there a workaround?

1 Like

Hello Stan, have you tried removing the msgstr that the error message mentions?

1 Like

That would defeat the purpose? Did you miss the title of this thread, it is generally useful information.

I give up on this:-(

1 Like