lang-check: respect --no-warning
This commit is contained in:
parent
fe32d42101
commit
2ceb3897f1
1 changed files with 9 additions and 8 deletions
|
@ -113,14 +113,15 @@ def parse_txt(lang, no_warning):
|
||||||
#End wrap text
|
#End wrap text
|
||||||
|
|
||||||
# Check for potential errors in the definition
|
# Check for potential errors in the definition
|
||||||
if rows == 1 and (len(source) > cols or rows_count_source > rows):
|
if not no_warning:
|
||||||
print(yellow('[W]: Source text longer than %d cols as defined on line %d:' % (cols, lines)))
|
if rows == 1 and (len(source) > cols or rows_count_source > rows):
|
||||||
print_truncated(source, cols)
|
print(yellow('[W]: Source text longer than %d cols as defined on line %d:' % (cols, lines)))
|
||||||
print()
|
print_truncated(source, cols)
|
||||||
elif rows_count_source > rows:
|
print()
|
||||||
print(yellow('[W]: Wrapped source text longer than %d rows as defined on line %d:' % (rows, lines)))
|
elif rows_count_source > rows:
|
||||||
print_wrapped(wrapped_source, rows, cols)
|
print(yellow('[W]: Wrapped source text longer than %d rows as defined on line %d:' % (rows, lines)))
|
||||||
print()
|
print_wrapped(wrapped_source, rows, cols)
|
||||||
|
print()
|
||||||
|
|
||||||
# Check for translation lenght
|
# Check for translation lenght
|
||||||
if (rows_count_translation > rows) or (rows == 1 and len(translation) > cols):
|
if (rows_count_translation > rows) or (rows == 1 and len(translation) > cols):
|
||||||
|
|
Loading…
Add table
Reference in a new issue