mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 16:27:13 +03:00
[1812] Adapt Localized String Search
This commit is contained in:
parent
26c8a8be6e
commit
4a1a107e03
@ -38,8 +38,9 @@ def find_calls_in_stmt(statement: ast.AST) -> list[ast.Call]:
|
|||||||
out = []
|
out = []
|
||||||
for n in ast.iter_child_nodes(statement):
|
for n in ast.iter_child_nodes(statement):
|
||||||
out.extend(find_calls_in_stmt(n))
|
out.extend(find_calls_in_stmt(n))
|
||||||
if isinstance(statement, ast.Call) and get_func_name(statement.func) == '_':
|
if isinstance(statement, ast.Call) and get_func_name(statement.func) in ('tr', 'translations'):
|
||||||
out.append(statement)
|
if ast.unparse(statement).find('.tl') != -1 or ast.unparse(statement).find('translate') != -1:
|
||||||
|
out.append(statement)
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user