mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Added Comprehension to Improve Performance
This commit is contained in:
parent
5eaa2a08d4
commit
60bb54093b
@ -49,13 +49,14 @@ def translate_impl(text, target_language=None):
|
||||
|
||||
|
||||
def translate(text, target_language=None):
|
||||
result = []
|
||||
for part in re.split(curly_braces_re, text):
|
||||
if part.startswith('{') and part.endswith('}'):
|
||||
result.append(part)
|
||||
else:
|
||||
result.append(translate_impl(part, target_language=target_language))
|
||||
return ''.join(result)
|
||||
return "".join(
|
||||
[
|
||||
part
|
||||
if part.startswith("{") and part.endswith("}")
|
||||
else translate_impl(part, target_language=target_language)
|
||||
for part in re.split(curly_braces_re, text)
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def translate_toc(root, lang):
|
||||
|
Loading…
Reference in New Issue
Block a user