orca/config/scripts/locale-ko-key-overrides.mjs

18 lines
727 B
JavaScript

import fs from 'node:fs'
import path from 'node:path'
// Korean key-specific overrides (reviewed in full UI context: product names, git terms, and
// labels MT mistranslated). Stored as a JSON data file — too many entries to inline under the
// .mjs max-lines limit — and loaded here so the catalog scripts keep a single ko key-override source.
const jsonPath = path.join(import.meta.dirname, 'locale-ko-key-overrides.json')
let parsed
try {
parsed = JSON.parse(fs.readFileSync(jsonPath, 'utf8'))
} catch (error) {
// Name the file: a bare JSON.parse SyntaxError doesn't say which file failed.
throw new Error(`Failed to load ${path.basename(jsonPath)}: ${error.message}`)
}
export const KO_KEY_OVERRIDES = parsed