quintodrome/ui/src/i18n/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
623 B
JavaScript
Raw Normal View History

import deepmerge from 'deepmerge'
2020-02-07 05:40:52 -09:00
import en from './en'
import zh from './zh'
2020-04-25 07:59:37 -08:00
import fr from './fr'
2020-04-17 00:49:45 -08:00
import it from './it'
2020-04-26 05:57:09 -08:00
import nl from './nl'
import pt from './pt'
2020-02-07 05:40:52 -09:00
const addLanguages = (lang) => {
Object.keys(lang).forEach((l) => (languages[l] = deepmerge(en, lang[l])))
}
const languages = { en }
2020-04-29 13:38:03 -08:00
// Add new languages to the object below (please keep alphabetic sort)
2020-05-01 06:48:28 -08:00
addLanguages({ fr, it, nl, pt, zh })
// "Hack" to make "albumSongs" resource use the same translations as "song"
Object.keys(languages).forEach(
(k) => (languages[k].resources.albumSong = languages[k].resources.song)
)
export default languages