diff --git a/scripts/extract_editor.py b/scripts/extract_editor.py index f3ac478..4e15290 100644 --- a/scripts/extract_editor.py +++ b/scripts/extract_editor.py @@ -48,14 +48,14 @@ msgstr "" # Regex "(?P([^"\\]|\\.)*)" creates a group named `name` that matches a string. message_patterns = { - re.compile(r'RTR\("(?P([^"\\]|\\.)*)"(, "(?P([^"\\]|\\.)*)")?\)'): ExtractType.TEXT, - re.compile(r'TTR\("(?P([^"\\]|\\.)*)"(, "(?P([^"\\]|\\.)*)")?\)'): ExtractType.TEXT, - re.compile(r'TTRC\("(?P([^"\\]|\\.)*)"\)'): ExtractType.TEXT, + re.compile(r'RTR\(U?"(?P([^"\\]|\\.)*)"(, "(?P([^"\\]|\\.)*)")?\)'): ExtractType.TEXT, + re.compile(r'TTR\(U?"(?P([^"\\]|\\.)*)"(, "(?P([^"\\]|\\.)*)")?\)'): ExtractType.TEXT, + re.compile(r'TTRC\(U?"(?P([^"\\]|\\.)*)"\)'): ExtractType.TEXT, re.compile( - r'TTRN\("(?P([^"\\]|\\.)*)", "(?P([^"\\]|\\.)*)",[^,)]+?(, "(?P([^"\\]|\\.)*)")?\)' + r'TTRN\(U?"(?P([^"\\]|\\.)*)", "(?P([^"\\]|\\.)*)",[^,)]+?(, "(?P([^"\\]|\\.)*)")?\)' ): ExtractType.TEXT, re.compile( - r'RTRN\("(?P([^"\\]|\\.)*)", "(?P([^"\\]|\\.)*)",[^,)]+?(, "(?P([^"\\]|\\.)*)")?\)' + r'RTRN\(U?"(?P([^"\\]|\\.)*)", "(?P([^"\\]|\\.)*)",[^,)]+?(, "(?P([^"\\]|\\.)*)")?\)' ): ExtractType.TEXT, } theme_property_patterns: Dict[re.Pattern[str], ExtractType] = {}