Skip to content

Commit

Permalink
Merge pull request web2py#1532 from vinyldarkscratch/translations
Browse files Browse the repository at this point in the history
Fix T.M() not adding to language files
  • Loading branch information
mdipierro authored Nov 21, 2016
2 parents ad9ebea + 90ee6f3 commit c600854
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gluon/languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,9 @@ 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):
if x[0:3] in ["'''", '"""']: items.append("%s@markmin\x01%s" %(x[0:3], x[3:]))
else: items.append("%s@markmin\x01%s" %(x[0], x[1:]))
for item in items:
try:
message = safe_eval(item)
Expand Down

0 comments on commit c600854

Please sign in to comment.