changeset 36686:8715803f09e8

Enhance the tool for checking translated messages header files. Report redefinitions. Additionally, update documentation.
author ib
date Sun, 02 Feb 2014 21:30:05 +0000
parents b4e07b1a6eee
children 6f91b66662e3
files DOCS/tech/translations.txt TOOLS/mphelp_check.py
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/tech/translations.txt	Sun Feb 02 21:02:34 2014 +0000
+++ b/DOCS/tech/translations.txt	Sun Feb 02 21:30:05 2014 +0000
@@ -101,9 +101,10 @@
 Additionally, please make sure that your translated messages fit on an 80
 character wide display to avoid overflowing output.
 
-TOOLS/mphelp_check.py is a small tool to check translated files. It will report
-conflicting arguments, strings not present in the master file and (optionally)
-strings missing from the translation. Running it as
+You are strongly encouraged to use TOOLS/mphelp_check.py, a small tool to
+check translated files. It will report conflicting definitions, mismatching
+arguments, extra definitions not present in the master file and (optionally)
+definitions missing from the translation. Running it as
 
   TOOLS/mphelp_check.py help/help_mp-en.h help/help_mp-XX.h
 
--- a/TOOLS/mphelp_check.py	Sun Feb 02 21:02:34 2014 +0000
+++ b/TOOLS/mphelp_check.py	Sun Feb 02 21:30:05 2014 +0000
@@ -25,6 +25,11 @@
         while line[-1] == '\\':
             line = it.next().strip()
             value += line.rstrip('\\').strip('"')
+        if name in r:
+            print 'Conflict: ', name
+            print r[name]
+            print value
+            print
         r[name] = value
     f.close()
     return r