mirror of
https://github.com/torproject/lego.git
synced 2024-11-26 19:20:22 +00:00
Merge branch 'team#21' into 'main'
Patch lektor i18n to work with python >= 3.8 See merge request tpo/web/lego!91
This commit is contained in:
commit
675867672c
@ -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