fix: improve translation pattern
This commit is contained in:
parent
aadbdfbd84
commit
46edda896e
1 changed files with 1 additions and 1 deletions
2
.github/helper/translation.py
vendored
2
.github/helper/translation.py
vendored
|
|
@ -2,7 +2,7 @@ import re
|
|||
import sys
|
||||
|
||||
errors_encounter = 0
|
||||
pattern = re.compile(r"_\(([\"']{,3})(?P<message>((?!\1).)*)\1(\s*,\s*context\s*=\s*([\"'])(?P<py_context>((?!\5).)*)\5)*(\s*,\s*(.)*?\s*(,\s*([\"'])(?P<js_context>((?!\11).)*)\11)*)*\)")
|
||||
pattern = re.compile(r"_{1,2}\(([\"'`]{1,3})(?P<message>((?!\1)[\s\S])*)\1(\s*,\s*context\s*=\s*([\"']{1,3})(?P<py_context>((?!\5)[\s\S])*)\5){0,1}(\s*,\s*([\s\S])*\s*(,\s*([\"'`])(?P<js_context>((?!\11).)*)\11)*){0,1}\)")
|
||||
words_pattern = re.compile(r"_{1,2}\([\"'`]{1,3}.*?[a-zA-Z]")
|
||||
start_pattern = re.compile(r"_{1,2}\([f\"'`]{1,3}")
|
||||
f_string_pattern = re.compile(r"_\(f[\"']")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue