Merge pull request #1915 from 3d-gussner/MK3-fix_lang-check

Fix length false positives in lang-check.py
This commit is contained in:
Marek Běl 2019-06-13 18:21:10 +02:00 committed by GitHub
commit 0a59e0a533
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ def parse_txt(lang, no_warning):
if rows is None: if rows is None:
rows = 1 rows = 1
if len(translation) > cols*rows: if len(translation)-2 > cols*rows:
stderr.write( stderr.write(
"[E]: Text %s is longer then definiton on line %d\n" % "[E]: Text %s is longer then definiton on line %d\n" %
(translation, lines)) (translation, lines))
@ -56,7 +56,7 @@ def main():
usage="$(prog)s lang") usage="$(prog)s lang")
parser.add_argument( parser.add_argument(
"lang", nargs='?', default="en", type=str, "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( parser.add_argument(
"--no-warning", action="store_true", "--no-warning", action="store_true",
help="Disable warnings") help="Disable warnings")