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-03-10 20:14:29 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-03-10 20:14:29 +0400
commit7a94ad94089377c541836fa880748166aa4278c5 (patch)
tree523c721a56faf3eee309a84d85c6f0bb587a86f8 /release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
parent9fe858264c698844c6734ed8eeeb0cd2373b4b4a (diff)
More UI message i18n fixes and improvements...
Diffstat (limited to 'release/scripts/modules/bl_i18n_utils/bl_extract_messages.py')
-rw-r--r--release/scripts/modules/bl_i18n_utils/bl_extract_messages.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
index 21c0a943984..bda2a15f44a 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -503,6 +503,7 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
),
"msgid": ((("msgctxt",), _ctxt_to_ctxt),
),
+ "message": (),
}
context_kw_set = {}
@@ -538,6 +539,12 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
for msgid, msgctxts in context_kw_set.items():
if arg_kw in msgctxts:
func_translate_args[func_id][msgid][1][arg_kw] = arg_pos
+ # The report() func of operators.
+ for func_id, func in bpy.types.Operator.bl_rna.functions.items():
+ # check it has one or more arguments as defined in translate_kw
+ for arg_pos, (arg_kw, arg) in enumerate(func.parameters.items()):
+ if ((arg_kw in translate_kw) and (not arg.is_output) and (arg.type == 'STRING')):
+ func_translate_args.setdefault(func_id, {})[arg_kw] = (arg_pos, {})
# We manually add funcs from bpy.app.translations
for func_id, func_ids in pgettext_variants:
func_translate_args[func_id] = pgettext_variants_args