mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-12 15:27:14 +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 = []
|
||||
for n in ast.iter_child_nodes(statement):
|
||||
out.extend(find_calls_in_stmt(n))
|
||||
if isinstance(statement, ast.Call) and get_func_name(statement.func) == '_':
|
||||
out.append(statement)
|
||||
if isinstance(statement, ast.Call) and get_func_name(statement.func) in ('tr', 'translations'):
|
||||
if ast.unparse(statement).find('.tl') != -1 or ast.unparse(statement).find('translate') != -1:
|
||||
out.append(statement)
|
||||
return out
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user