Skip to content

Commit

Permalink
[1812] Adapt Localized String Search
Browse files Browse the repository at this point in the history
  • Loading branch information
Rixxan committed Apr 24, 2024
1 parent 26c8a8b commit 4a1a107
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/find_localised_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 4a1a107

Please sign in to comment.