1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

Allow translation keys to be in single- or double-quotes (#7588)

This commit is contained in:
Whymarrh Whitby 2019-11-27 18:50:00 -03:30 committed by GitHub
parent cfd041b364
commit 13a1de061d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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])
}
}