lang-check: add missing rulers

This commit is contained in:
Yuri D'Elia 2021-04-29 12:51:57 +02:00
parent 8edecc911b
commit a98bc1616a

View File

@ -159,12 +159,15 @@ def parse_txt(lang, no_warning):
# Check for potential errors in the definition # Check for potential errors in the definition
if not no_warning: if not no_warning:
# Incorrect number of rows/cols on the definition
if rows == 1 and (len(source) > cols or rows_count_source > rows): if rows == 1 and (len(source) > cols or rows_count_source > rows):
print(yellow('[W]: Source text longer than %d cols as defined on line %d:' % (cols, lines))) print(yellow('[W]: Source text longer than %d cols as defined on line %d:' % (cols, lines)))
print_ruler(4, cols);
print_truncated(source, cols) print_truncated(source, cols)
print() print()
elif rows_count_source > rows: elif rows_count_source > rows:
print(yellow('[W]: Wrapped source text longer than %d rows as defined on line %d:' % (rows, lines))) print(yellow('[W]: Wrapped source text longer than %d rows as defined on line %d:' % (rows, lines)))
print_ruler(6, cols);
print_wrapped(wrapped_source, rows, cols) print_wrapped(wrapped_source, rows, cols)
print() print()