From d51ea90e1838ffde0481137b708f2538c4ff3eb8 Mon Sep 17 00:00:00 2001 From: Vinyl Darkscratch Date: Fri, 11 Nov 2016 15:49:28 -0800 Subject: [PATCH] Code fix to allow adding markmin translations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Playing with this file made me realize that the quotes defining the strings themselves are added to the regex searches, and that my previous addition caused invalid syntax. So, I decided to fix this by placing the first quote before the markmin decorator. (Triple quotes won’t work, however…) --- gluon/languages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/languages.py b/gluon/languages.py index afc5b3324..ff9ff4cf6 100644 --- a/gluon/languages.py +++ b/gluon/languages.py @@ -962,7 +962,7 @@ def findT(path, language=DEFAULT_LANGUAGE): + listdir(vp, '^.+\.html$', 0) + listdir(mop, '^.+\.py$', 0): data = to_native(read_locked(filename)) items = regex_translate.findall(data) - items += ["@markmin\x01%s" %x for x in regex_translate_m.findall(data)] + for x in regex_translate_m.findall(data): items.append("%s@markmin\x01%s" %(x[0], x[1:])) for item in items: try: message = safe_eval(item)