From e46cc30c61aa624811dfcdc8a425a44f44bdb2de Mon Sep 17 00:00:00 2001 From: 3d-gussner <3d.gussner@gmail.com> Date: Thu, 13 Jun 2019 18:00:31 +0200 Subject: [PATCH] Fix length false positives... - Just reading the length of the translation line gives false positives as the " are included in the length BUT not displayed on the LCD. - added missing argument 'pl' --- lang/lang-check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/lang-check.py b/lang/lang-check.py index 6b918df8..f592798e 100644 --- a/lang/lang-check.py +++ b/lang/lang-check.py @@ -38,7 +38,7 @@ def parse_txt(lang, no_warning): if rows is None: rows = 1 - if len(translation) > cols*rows: + if len(translation)-2 > cols*rows: stderr.write( "[E]: Text %s is longer then definiton on line %d\n" % (translation, lines)) @@ -56,7 +56,7 @@ def main(): usage="$(prog)s lang") parser.add_argument( "lang", nargs='?', default="en", type=str, - help="Check lang file (en|cs|de|es|fr|it)") + help="Check lang file (en|cs|de|es|fr|it|pl)") parser.add_argument( "--no-warning", action="store_true", help="Disable warnings")