Page MenuHome

Helps with translation context
Closed, InvalidPublic

Description

With the need for different translation string for different context, I think I need to understand how the translation context works and how can I display or find out, if a translating string is under a certain context. I saw a block of "BLT_I18NCONTEXT_PLURAL" at the end of the file "source/blender/blentranslation/BLT_translation.h", but unsure how do I use these strings defined here. Do I just add in "msgctxt" and using those strings in the po file?

Do I have to use a Python script to display the string of context, say if I got to that UI screen? if it is, how and "where can I find such a script? Can I just add the group of "msgctxt, msgid, msgstr" by myself or someone else will have to do it for me?

If there are guides or further information on it, could someone please point me to the right direction, please?

I did read the instruction at the (https://wiki.blender.org/index.php/Dev:Doc/Process/Translate_Blender) and saw how the add-on works, but the image is out of date (I think) and I'm not sure how would I setup "source" and "translation" roots. I'm aware also that it has its own limitation, so I would rather stick to the "po" file.

At the moment I am working on a local source (2.78a) but comparing and updating the vi.po with master source regularly. I'm planning to finish checking translation and corrections for all the lines before sumitting to the master branch, so on my machine I do have the the git source and I can run "git pull". However, I do want to keep my local vi.po file separated from that. In this setting, how do I set source/translation roots for the add-on (if that's what I have to use in order to obtain the context string)?

I probably just need to know if there is a script that I could run to find the all context strings for a certain "msgid" then that could suffice my need.

Regards,
Hoang Tran

Details

Type
Bug

Event Timeline

Please use this bug tracker for reporting bugs. General discussion and inquiries like that shall go through IRC (#blendercoders on freenode.net) or ML (bf-translations@blender.org).

Contexts are defined by the source code (Blender one) and are only editable in source code, just like original English messages.

Any decent PO editor will show you the translation context of message, though…