How to detect msgstr stings?

Hi, some of my files are translated greatly, and some of them don’t. I guess it’s because I’m using specific formats. For example, .json is working perfectly, but I’m having trouble making Crowdin work with Maketext .po files, “msgstr” fields, the system doesn’t recognize them, I can’t see any of them in Crowdin’s Editor.

How can I solve it?

@FranckyRizz hi!

Crowdin takes source text only from msgid node by default. If you want to translate text in Crowdin from msgstr node, it is necessary to add the custom attribute inside the file and re-upload file (new version):
“X-Crowdin-SourceKey: msgstr\n”

If you have some integration, like Github, whe workflow would look like this one:

  1. Pause your integration in Crowdin via Integrations tab → GitHub → Pause Sync

  2. Add the “X-Crowdin-SourceKey: msgstr\n” attribute to your file manually

  3. Delete existed .po file in Crowdin via UI (Content Tab → Three bullet points near file → Delete)

  4. Resume your integration in Crowdin via (same way as pt.1)

Sounds like a nice solution to me. Guess I’ll give it a try. Thanks!

@Dima I’m trying out your tip on detecting the msgstr strings for localization and I’m either getting error messages or nothing changes. Could you tell me where exactly in the .po file I would need to place the custom attribute? Thank you!

Hello @mneustadt it’s this one

Should be added in the header, so it looks like this one:

msgid ""
msgstr ""
"Language: es_ES\n"
"Plural-Forms: (here you add all your plurals)\n"
"X-Crowdin-SourceKey: msgstr\n"

msgid "SELECT_ONE_CHECKBOX"
msgstr "Especifique al menos una marca"

msgid "FOR_ALL_SEGMENTS"
msgstr "Todos los segmentos"