(keys)
| 20 | const locale = require('./app/locale/locale') |
| 21 | const localeKeys = Object.keys(locale) |
| 22 | const possibleLocaleKeysFn = (keys) => { |
| 23 | const current = [...keys] |
| 24 | keys.forEach((key) => { |
| 25 | if (key.includes('-')) { |
| 26 | const langs = { |
| 27 | 'zh-HANS': 'zh-cn', |
| 28 | 'zh-HANT': 'zh-tw' |
| 29 | } |
| 30 | if (langs[key]) { |
| 31 | current.push(langs[key]) |
| 32 | } |
| 33 | const possible = key.split('-') |
| 34 | const temp = [] |
| 35 | for (let i = 0; i < possible.length - 1; i++) { |
| 36 | temp.push(possible[i]) |
| 37 | current.push(temp.join('-')) |
| 38 | } |
| 39 | } |
| 40 | }) |
| 41 | return current |
| 42 | } |
| 43 | const possibleLocaleKeys = possibleLocaleKeysFn(localeKeys) |
| 44 | |
| 45 | console.log(`Starting Webpack for product ${product}`) |
no outgoing calls
no test coverage detected