[gimp-help] tools: detect and warn about duplicate help id's



commit 05173a40db4a01c741830d62b09094243c0c7b07
Author: Jacob Boerema <jgboerema gmail com>
Date:   Sun Oct 16 18:28:16 2022 -0400

    tools: detect and warn about duplicate help id's
    
    (cherry picked from commit 950403e5fd54ac7d5b4245aed1989559607961d3)

 tools/show_translation_progress.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/tools/show_translation_progress.py b/tools/show_translation_progress.py
index 661e9f1e9..1d6cd0a4e 100644
--- a/tools/show_translation_progress.py
+++ b/tools/show_translation_progress.py
@@ -66,7 +66,10 @@ class GIMPHelpHeaderParser(object):
         for line in h_file.readlines():
             try:
                 str = self.helpid.search(line).group()
-                self.ids.append(str)
+                if str in self.ids:
+                    print(f"Duplicate help id found: {str}")
+                else:
+                    self.ids.append(str)
                 if be_verbose:
                     print(str)
             except AttributeError:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]