[Bf-blender-cvs] [5a541cfcecc] master: Cleanup: resolve static analyzer warnings in bl_i18n_utils

Campbell Barton noreply at git.blender.org
Thu Jan 30 01:54:08 CET 2020


Commit: 5a541cfceccea2bad1cd39466404e7b08d289e17
Author: Campbell Barton
Date:   Thu Jan 30 11:45:36 2020 +1100
Branches: master
https://developer.blender.org/rB5a541cfceccea2bad1cd39466404e7b08d289e17

Cleanup: resolve static analyzer warnings in bl_i18n_utils

Reported in T73504

===================================================================

M	release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
M	release/scripts/modules/bl_i18n_utils/utils.py

===================================================================

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 4aaa30a0508..2034b2ac55c 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -599,8 +599,8 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
     # We manually add funcs from bpy.app.translations
     for func_id, func_ids in pgettext_variants:
         func_translate_args[func_id] = pgettext_variants_args
-        for func_id in func_ids:
-            func_translate_args[func_id] = pgettext_variants_args
+        for sub_func_id in func_ids:
+            func_translate_args[sub_func_id] = pgettext_variants_args
     # print(func_translate_args)
 
     # Break recursive nodes look up on some kind of nodes.
diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py
index 2cca4171193..7c22a86d687 100644
--- a/release/scripts/modules/bl_i18n_utils/utils.py
+++ b/release/scripts/modules/bl_i18n_utils/utils.py
@@ -1413,8 +1413,8 @@ class I18n:
                 "#       and edit the translations by hand.",
                 "#       Just carefully respect the format of the tuple!",
                 "",
-                "# Tuple of tuples "
-                "((msgctxt, msgid), (sources, gen_comments), (lang, translation, (is_fuzzy, comments)), ...)",
+                "# Tuple of tuples:",
+                "# ((msgctxt, msgid), (sources, gen_comments), (lang, translation, (is_fuzzy, comments)), ...)",
                 "translations_tuple = (",
             ]
             # First gather all keys (msgctxt, msgid) - theoretically, all translations should share the same, but...



More information about the Bf-blender-cvs mailing list