From 13a1de061dd1e8e72a64676e1d0ef8ce4afc9d62 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Wed, 27 Nov 2019 18:50:00 -0330 Subject: [PATCH] Allow translation keys to be in single- or double-quotes (#7588) --- development/verify-locale-strings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/development/verify-locale-strings.js b/development/verify-locale-strings.js index aa0c4503f..c6875b36c 100644 --- a/development/verify-locale-strings.js +++ b/development/verify-locale-strings.js @@ -161,11 +161,11 @@ async function verifyEnglishLocale (fix = false) { const englishLocale = await getLocale('en') const javascriptFiles = await findJavascriptFiles(path.resolve(__dirname, '..', 'ui')) - const regex = /'(\w+)'/g + const regex = /'(\w+)'|"(\w+)"/g const usedMessages = new Set() for await (const fileContents of getFileContents(javascriptFiles)) { for (const match of matchAll.call(fileContents, regex)) { - usedMessages.add(match[1]) + usedMessages.add(match[1] || match[2]) } }