i18n: Add regex for nested handlebars i18n.

This is required for our i18n search code to find the "Upload icon"
category of strings we're about to restore recently regressed i18n
for.
This commit is contained in:
Tim Abbott
2020-06-17 17:53:02 -07:00
parent 3cef5abaf0
commit 3a46f6ecca

View File

@@ -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\('([^']*?)'\)",