Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2013-02-13 15:52:01 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-02-13 15:52:01 +0400
commit43f4f807d986f0c50a336d73b10ebcb243b142a8 (patch)
treecd82ac3b02e385122e64ffa73c391a99a6528e61 /source/blender/blenfont/intern
parent4061f96d94aa410dd8550bb6b3ed8f6f87beb5de (diff)
Fix physics' name not translated in main physics panel (reported on bf-translations ML).
This also revealed another bug, as you could not explicitely set default context to text_ctxt UI func parameter (None is not accpeted by RNA string props), so I had to change default context from py POV to "*" instead of None. Anyway, that physics UI translation remains weak, as the trick used here (helper func) prevents message extractor script to directly find them. Currently it works because specified labels are also defined elsewhere, but it would be nice to have some kind of "translation markers" in py code too (similar to our N_/CTX_N_ C macros, unfortunately python does not have preprocessing ;) )...
Diffstat (limited to 'source/blender/blenfont/intern')
-rw-r--r--source/blender/blenfont/intern/blf_translation.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blenfont/intern/blf_translation.c
index a77b464822b..b5b72b68677 100644
--- a/source/blender/blenfont/intern/blf_translation.c
+++ b/source/blender/blenfont/intern/blf_translation.c
@@ -94,9 +94,9 @@ const char *BLF_pgettext(const char *msgctxt, const char *msgid)
const char *ret;
/*if (msgctxt && !strcmp(msgctxt, BLF_I18NCONTEXT_DEFAULT_BPY_INTERN)) { */
- if (msgctxt && !msgctxt[0]) {
- /* BLF_I18NCONTEXT_DEFAULT_BPY_INTERN context is reserved and considered the same as default NULL one. */
- msgctxt = NULL;
+ if (msgctxt && msgctxt[0] == BLF_I18NCONTEXT_DEFAULT_BPY[0]) {
+ /* BLF_I18NCONTEXT_DEFAULT_BPY context is reserved and considered the same as default NULL one. */
+ msgctxt = BLF_I18NCONTEXT_DEFAULT;
}
ret = bl_locale_pgettext(msgctxt, msgid);
/* We assume if the returned string is the same (memory level) as the msgid, no translation was found,