Blender Git Loki
Git Commits -> Revision 39fd8fa
Revision 39fd8fa by Sergey Sharybin (master) December 22, 2011, 18:25 (GMT) |
Translation context for RNA properties This commit implements a way to define context of property which is used by localization stuff and which is needed to resolve translation context when some word wit the same english spelling is used in different meanings (like Manual in meaning of tutorial, and Manual in meaning of something is setting up by hand). To define property's context there's a function RNA_def_property_translation_context. If property doesn't have context, regular BLF_gettext function is used to get translation of property name, otherwise BLF_pgettext is used for this. Hence, for correct translation, messages in .po files should be marked by "msgctxt" context, otherwise property with context declared wouldn't be translated at all. Toolchain scripts from bf-translation project would be updated soon. If context for some values of enumerator property, property itself should be moved to other context and all items from this enum would be moved to this context automatically (it's impossible to move one few items to another context). P.S. Think context like "BRUSH" or "MODIFIER" are preferable than "NOUN" and "VERB" because in some cases the same english noun used in different areas better be translated differently to make translation more native. |
Commit Details:
Full Hash: 39fd8fa4002391b24d6154ba5489cf1a5a05f5bd
SVN Revision: 42829
Parent Commit: e06a0ba
Lines Changed: +93, -11
9 Modified Paths:
/source/blender/blenfont/BLF_translation.h (+4, -1) (Diff)
/source/blender/blenfont/intern/blf_lang.c (+4, -5) (Diff)
/source/blender/blenfont/intern/blf_translation.c (+44, -1) (Diff)
/source/blender/makesrna/intern/makesrna.c (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_access.c (+12, -4) (Diff)
/source/blender/makesrna/intern/rna_define.c (+5, -0) (Diff)
/source/blender/makesrna/intern/rna_internal_types.h (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_rna.c (+19, -0) (Diff)
/source/blender/makesrna/RNA_define.h (+2, -0) (Diff)
/source/blender/blenfont/intern/blf_lang.c (+4, -5) (Diff)
/source/blender/blenfont/intern/blf_translation.c (+44, -1) (Diff)
/source/blender/makesrna/intern/makesrna.c (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_access.c (+12, -4) (Diff)
/source/blender/makesrna/intern/rna_define.c (+5, -0) (Diff)
/source/blender/makesrna/intern/rna_internal_types.h (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_rna.c (+19, -0) (Diff)
/source/blender/makesrna/RNA_define.h (+2, -0) (Diff)