Merge pull request #3163 from overleaf/as-jpa-i18n-cleanup

[misc] Translations cleanup

GitOrigin-RevId: 46bf1142bb9415eeebf638c120597996aaa55f8b
This commit is contained in:
Jakob Ackermann
2020-09-18 02:04:41 +00:00
committed by Copybot
parent 1b72640b5c
commit 435af75ef7
11 changed files with 142 additions and 3711 deletions
@@ -27,16 +27,12 @@ async function run() {
lang.translation[key] = sanitize(value)
}
const outputLngCode = code === 'en-GB' ? 'en' : code
await fs.writeFile(
`../../locales/${code}.json`,
`${__dirname}/../../locales/${outputLngCode}.json`,
JSON.stringify(lang.translation, null, 2)
)
}
// Copy files, so we have appropriate dialects
await fs.copyFile('../../locales/en-GB.json', '../../locales/en-US.json')
await fs.copyFile('../../locales/en-GB.json', '../../locales/en.json')
await fs.copyFile('../../locales/zh-CN.json', '../../locales/cn.json')
} catch (error) {
console.error(error)
process.exit(1)