PO file handling problem

Hi All,

I have received .po file & tried to process in Studio 2019. But 3-4 strings of "msgid" & "msgstr" combines into 1.

msgid ""
"<p>This page provides the ability to add common languages to your "
"site.</p><p>If the desired language is not available, you can add a "
"custom language.</p>"
msgstr ""
msgid ""
"<p>Choose a language from the list, or choose \"Custom language...\" "
"at the end of the list.</p><p>Click the \"Add language\" button when "
"you are done choosing your language.</p><p>When adding a custom "
"language, you will get an additional form where you can provide the "
"name, code, and direction of the language.</p>"
msgstr ""
msgid "Continuing on"
msgstr ""
msgid ""
"<p>Now that you have an overview of the \"Add languages\" feature, you "
"can continue by:<ul><li>Adding a language</li><li>Adding a custom "
"language</li><li><a "
"href=\"[site:url]admin/config/regional/language\">Viewing configured "
"languages</a></li></ul></p>"

Screenshot of Trados Studio 2019 showing combined msgid and msgstr strings in a .po file with no visible errors.Screenshot of Trados Studio 2019 Editor view displaying the translation of msgid strings into msgstr with comments and no visible errors.



Generated Image Alt-Text
[edited by: Trados AI at 8:21 PM (GMT 0) on 28 Feb 2024]
emoji
Parents Reply
  • I think it's about time you go back to your client and explain that their file has not been constructed correctly.  Aside from the problems caused by not leaving a blank line between entries (debatable whether this is a requirement or not but it certainly makes the file more readable), the reason you don't see all the plural forms is because the file is not constructed correctly.

    The header is there, so this isn't the problem (in my opinion).  But you have things like this:

    msgid "@count contextual link"
    msgid_plural "@count contextual links"
    msgstr[0] ""

    I believe it should probably be this to ensure you get the plural:

    msgid "@count contextual link"
    msgid_plural "@count contextual links"
    msgstr[0] ""
    msgstr[1] ""

    If you make these corrections in your sample file then they are all extracted.

    Paul Filkin | RWS

    Design your own training!
    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Children