Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

i18n: Add regex for nested handlebars i18n.

Tim Abbott3a46f6eccab0
diff --git a/zerver/management/commands/makemessages.py b/zerver/management/commands/makemessages.py
index 69ac464471e..9a6aa9ad225 100644
--- a/zerver/management/commands/makemessages.py
+++ b/zerver/management/commands/makemessages.py
@@ -46,6 +46,7 @@ strip_whitespace_left = re.compile(f"\\s+({BLOCK_TAG_START}-\\s*(endtrans|plural
regexes = [r'{{#tr .*?}}([\s\S]*?){{/tr}}', # '.' doesn't match '\n' by default
r'{{\s*t "(.*?)"\W*}}',
r"{{\s*t '(.*?)'\W*}}",
+ r'\(t "(.*?)"\)',
r'=\(t "(.*?)"\)(?=[^{]*}})',
r"=\(t '(.*?)'\)(?=[^{]*}})",
r"i18n\.t\('([^']*?)'\)",