From 93cc105a40e3d3d71ba12fb344f6dee4eaeb3807 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Wed, 4 Apr 2018 18:48:59 -0400 Subject: [PATCH] travis: Avoid locale problems --- po/validate-textevent-translations | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/po/validate-textevent-translations b/po/validate-textevent-translations index c61f9413..e719d3aa 100755 --- a/po/validate-textevent-translations +++ b/po/validate-textevent-translations @@ -7,21 +7,29 @@ import sys ret = 0 +def log(prefix, suffix, fallback): + try: + print(prefix, suffix) # Non-utf8 output... + except UnicodeEncodeError: + print(prefix, fallback) + + def validate_translation(input, translation): if not translation: return True if re.findall(r'(?:(? 256 for i in in_ascii): - print('Translation contains invalid ascii value:') + log('Translation contains invalid ascii value:', translation, input) return False # We could try to validate colors but that is pretty flexible