[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3610] trunk/py/scripts/addons/ ui_translate/utils.py: Fix for another dummy mistake ( was preventing RNA label to show up the first time, because of context overwriting...)
Bastien Montagne
montagne29 at wanadoo.fr
Tue Jul 10 15:59:06 CEST 2012
Revision: 3610
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3610
Author: mont29
Date: 2012-07-10 13:59:06 +0000 (Tue, 10 Jul 2012)
Log Message:
-----------
Fix for another dummy mistake (was preventing RNA label to show up the first time, because of context overwriting...)
Modified Paths:
--------------
trunk/py/scripts/addons/ui_translate/utils.py
Modified: trunk/py/scripts/addons/ui_translate/utils.py
===================================================================
--- trunk/py/scripts/addons/ui_translate/utils.py 2012-07-10 12:21:09 UTC (rev 3609)
+++ trunk/py/scripts/addons/ui_translate/utils.py 2012-07-10 13:59:06 UTC (rev 3610)
@@ -59,7 +59,7 @@
return src, src_rna, src_enum
-def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, ctxt, rstruct, rprop, renum):
+def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruct, rprop, renum):
comm_prfx = settings.COMMENT_PREFIX_SOURCE + "bpy.types."
# Build helper mappings.
@@ -111,7 +111,7 @@
rlbl = getattr(obj, msgmap["rna_label"]["msgstr"])
print("rna label: '"+rlbl+"'", rlbl in msgid_to_msg, rlbl in msgstr_to_msg)
if rlbl:
- k = ctxt_to_msg[ctxt].copy()
+ k = ctxt_to_msg[rna_ctxt].copy()
if k and rlbl in msgid_to_msg:
k &= msgid_to_msg[rlbl]
elif k and rlbl in msgstr_to_msg:
@@ -128,7 +128,7 @@
# Num buttons report their label with a trailing ': '...
blbls.append(blbl[:-len(NUM_BUTTON_SUFFIX)])
print("button label: '"+blbl+"'")
- if blbl and elbl not in blbls and (rlbl not in blbls or ctxt != BLF_I18NCONTEXT_DEFAULT):
+ if blbl and elbl not in blbls and (rlbl not in blbls or rna_ctxt != BLF_I18NCONTEXT_DEFAULT):
# Always Default context for button label :/
k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
found = False
More information about the Bf-extensions-cvs
mailing list