From aeec244087dd32b4d4400bf56e36ff0b4b695b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sat, 15 Apr 2023 21:27:03 +0800 Subject: [PATCH] fix: extract locale regex (#63) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * optimize: 精简未用到的配置项并在特征提取初步引入mps * add cmd argument: --noautoopen * fix: i18n * fix * fix * add genlocale workflow * add unitest * fix * fix * fix * 优化笔记本 * reintroduce Push changes * disable genlocale on non-main branch * 将笔记本checkout改为stable * 优化代码结构 * make lint happy * make lint happy * 优化 * 优化 * 优化 * fix path on windows okey pack * fix * fix * revert * revert * revert * fix: extract locale regex --- extract_locale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extract_locale.py b/extract_locale.py index a6f1c69..bd64cd9 100644 --- a/extract_locale.py +++ b/extract_locale.py @@ -2,7 +2,7 @@ import json import re # Define regular expression patterns -pattern = r"""i18n\((["'][^"']+["'])\)""" +pattern = r"""i18n\([\s\n\t]*(["'][^"']+["'])[\s\n\t]*\)""" # Initialize the dictionary to store key-value pairs data = {}