[Bf-blender-cvs] [2eb0c99] master: i18n extraction tools: keep even better order of entries in PO files.

Bastien Montagne noreply at git.blender.org
Mon Sep 28 20:32:39 CEST 2015


Commit: 2eb0c990f13c82f3f2ad368712669b9ff298b953
Author: Bastien Montagne
Date:   Mon Sep 28 20:19:54 2015 +0200
Branches: master
https://developer.blender.org/rB2eb0c990f13c82f3f2ad368712669b9ff298b953

i18n extraction tools: keep even better order of entries in PO files.

Important to avoid too much changes, especially on the git repo (we are still getting
way too much changes there currently...).

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

M	release/scripts/modules/bl_i18n_utils/bl_extract_messages.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 43a09a1..baa9140 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -304,7 +304,8 @@ def dump_rna_messages(msgs, reports, settings, verbose=False):
         else:
             bl_rna_base_props = set()
 
-        for prop in bl_rna.properties:
+        props = sorted(bl_rna.properties, key=lambda p: p.identifier)
+        for prop in props:
             # Only write this property if our parent hasn't got it.
             if prop in bl_rna_base_props:
                 continue
@@ -456,7 +457,7 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
 
     def extract_strings_split(node):
         """
-        Returns a list args as returned by 'extract_strings()', But split into groups based on separate_nodes, this way
+        Returns a list args as returned by 'extract_strings()', but split into groups based on separate_nodes, this way
         expressions like ("A" if test else "B") wont be merged but "A" + "B" will.
         """
         estr_ls = []




More information about the Bf-blender-cvs mailing list