Skip to content
Snippets Groups Projects
Commit f0c73a26 authored by Bastien Montagne's avatar Bastien Montagne
Browse files

Fix for another dummy mistake (was preventing RNA label to show up the first...

Fix for another dummy mistake (was preventing RNA label to show up the first time, because of context overwriting...)
parent c6a3000d
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ def bpy_path(rstruct, rprop, renum): ...@@ -59,7 +59,7 @@ def bpy_path(rstruct, rprop, renum):
return src, src_rna, src_enum 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." comm_prfx = settings.COMMENT_PREFIX_SOURCE + "bpy.types."
# Build helper mappings. # Build helper mappings.
...@@ -111,7 +111,7 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, ctxt, rstruct, r ...@@ -111,7 +111,7 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, ctxt, rstruct, r
rlbl = getattr(obj, msgmap["rna_label"]["msgstr"]) rlbl = getattr(obj, msgmap["rna_label"]["msgstr"])
print("rna label: '"+rlbl+"'", rlbl in msgid_to_msg, rlbl in msgstr_to_msg) print("rna label: '"+rlbl+"'", rlbl in msgid_to_msg, rlbl in msgstr_to_msg)
if rlbl: if rlbl:
k = ctxt_to_msg[ctxt].copy() k = ctxt_to_msg[rna_ctxt].copy()
if k and rlbl in msgid_to_msg: if k and rlbl in msgid_to_msg:
k &= msgid_to_msg[rlbl] k &= msgid_to_msg[rlbl]
elif k and rlbl in msgstr_to_msg: elif k and rlbl in msgstr_to_msg:
...@@ -128,7 +128,7 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, ctxt, rstruct, r ...@@ -128,7 +128,7 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, ctxt, rstruct, r
# Num buttons report their label with a trailing ': '... # Num buttons report their label with a trailing ': '...
blbls.append(blbl[:-len(NUM_BUTTON_SUFFIX)]) blbls.append(blbl[:-len(NUM_BUTTON_SUFFIX)])
print("button label: '"+blbl+"'") 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 :/ # Always Default context for button label :/
k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy() k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
found = False found = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment