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

feature/default_network_editable
Whymarrh Whitby 5 years ago committed by GitHub
parent cfd041b364
commit 13a1de061d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      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])
}
}

Loading…
Cancel
Save