Blender Git Loki

Git Commits -> Revision 0dafa97

Revision 0dafa97 by Bastien Montagne (master)
July 9, 2012, 14:25 (GMT)
UI translation from inside Blender UI: first part.

This commit reshapes a bit runtime button info getter, by adding a new uiButGetStrInfo() which accepts a variable number of uiStringInfo parameters, and tries to fill them with the requested strings, for the given button (label, tip, context, RNA identifier, keymap, etc.). Currently used mostly by existing ui_tooltip_create(), and new UI_OT_edittranslation_init operator.

It also adds a few getters (to get RNA i18n context, and current language iso code).

Finally, it adds to C operators needed for the py ui_translation addon:
*UI_OT_edittranslation_init, which gathers requested data and launch the py operator.
*UI_OT_reloadtranslation, which forces a full reload of the whole UI translation (including rechecking the directory containing mo files).

For the first operator to work, it also adds a new user preferences path: i18n_branches_directory, to point to the /branch part of a bf-translation checkout.

Commit Details:

Full Hash: 0dafa97ea3f6d9662299579e5be1875cd28baaae
SVN Revision: 48757
Parent Commit: facb151
Lines Changed: +436, -17

12 Modified Paths:

/release/scripts/startup/bl_ui/space_userpref.py (+2, -0) (Diff)
/source/blender/blenfont/BLF_translation.h (+2, -0) (Diff)
/source/blender/blenfont/intern/blf_lang.c (+12, -1) (Diff)
/source/blender/editors/include/UI_interface.h (+28, -0) (Diff)
/source/blender/editors/interface/interface.c (+128, -0) (Diff)
/source/blender/editors/interface/interface_handlers.c (+15, -6) (Diff)
/source/blender/editors/interface/interface_ops.c (+161, -4) (Diff)
/source/blender/editors/interface/interface_regions.c (+68, -6) (Diff)
/source/blender/makesdna/DNA_userdef_types.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_access.c (+11, -0) (Diff)
/source/blender/makesrna/intern/rna_userdef.c (+6, -0) (Diff)
/source/blender/makesrna/RNA_access.h (+2, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021