mirror of
https://github.com/torproject/lego.git
synced 2024-11-26 19:20:22 +00:00
Patch lektor i18n to work with python >= 3.8
This commit is contained in:
parent
8245dc7df2
commit
f611a89233
@ -399,7 +399,9 @@ class I18NPlugin(Plugin):
|
||||
lines = []
|
||||
for line in content.split('\n'):
|
||||
line_stripped = line.strip()
|
||||
trans_stripline = trans(translator, line_stripped) # trnanslate the stripped version
|
||||
trans_stripline = ''
|
||||
if line_stripped:
|
||||
trans_stripline = trans(translator, line_stripped) # translate the stripped version
|
||||
# and re-inject the stripped translation into original line (not stripped)
|
||||
lines.append(line.replace(line_stripped,
|
||||
trans_stripline, 1))
|
||||
|
Loading…
Reference in New Issue
Block a user