mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Fix verification of single locale (#10262)
The `verify-locale-strings.js` script would blow up if you tried to verify a single locale. It now works.
This commit is contained in:
parent
7ebab83e40
commit
5b1da2cd4b
@ -54,13 +54,17 @@ main().catch((error) => {
|
||||
async function main() {
|
||||
if (specifiedLocale) {
|
||||
log.info(`Verifying selected locale "${specifiedLocale}":\n`)
|
||||
const locale = localeIndex.find(
|
||||
const localeEntry = localeIndex.find(
|
||||
(localeMeta) => localeMeta.code === specifiedLocale,
|
||||
)
|
||||
if (!localeEntry) {
|
||||
throw new Error(`No localize entry found for ${specifiedLocale}`)
|
||||
}
|
||||
|
||||
const failed =
|
||||
locale.code === 'en'
|
||||
specifiedLocale === 'en'
|
||||
? await verifyEnglishLocale()
|
||||
: await verifyLocale(locale)
|
||||
: await verifyLocale(specifiedLocale)
|
||||
if (failed) {
|
||||
process.exit(1)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user