About custom translation

I am doing the custom translation work now, but I found that the format of “msgid” and “msgstr” in this file is not fixed, some are inside the double quotation marks, some are under the double quotation marks, may I ask why? Can I change everything outside the double quotation marks to inside the double quotation marks


It is formatted that way to split long sentences into several lines without using word wrapping. You do not have to use that format for the translation string placed in msgstr.

Also, you should not touch the msgid field as it is generated by the i18n_tool.

You are free to change the msgstr to place your translation. However, you have to include the variables in the curly braces in your translation, otherwise, the translations will be broken.

Additionally, if you encounter entries in the form of msgid and msgid_plural [1], those are different versions of the entry to handle singular vs plural differences.

You should place your translation in msgstr[0] for singular and msgstr[1] for plural. You can simply use msgstr[0] and ignore msgstr[1] if there is no difference.

  1. edx-platform/django.po at master · openedx/edx-platform · GitHub ↩︎

Thank you very much. I’ll do it right now