From 00896f36fefd2d464c069252b7869ab8c9c0bff3 Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Wed, 13 Jan 2021 20:46:27 +0530 Subject: [PATCH] revert: "fix: improve translation pattern" (#12205) --- .github/helper/translation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/helper/translation.py b/.github/helper/translation.py index 9220c8b605..340f4f8772 100644 --- a/.github/helper/translation.py +++ b/.github/helper/translation.py @@ -2,7 +2,7 @@ import re import sys errors_encounter = 0 -pattern = re.compile(r"_{1,2}\(\s*([\"'`])(?P((?!\1).)+?)\1(\s*,\s*context\s*=\s*([\"'])(?P((?!\5).)+?)\5)?(\s*,\s*(\[[\s\S]*\])?(null)?(\s*,\s*([\"'`])(?P((?!\12).)+?)\12)?)?\s*\)") # noqa: E501 +pattern = re.compile(r"_\(([\"']{,3})(?P((?!\1).)*)\1(\s*,\s*context\s*=\s*([\"'])(?P((?!\5).)*)\5)*(\s*,\s*(.)*?\s*(,\s*([\"'])(?P((?!\11).)*)\11)*)*\)") 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[\"']")