pleroma-fe/src/i18n/messages.js

30 lines
1.3 KiB
JavaScript
Raw Normal View History

2018-09-10 01:54:23 +10:00
// When contributing, please sort JSON before committing so it would be easier to see what's missing and what's being added compared to English and other languages. It's not obligatory, but just an advice.
// To sort json use jq https://stedolan.github.io/jq and invoke it like `jq -S . xx.json > xx.sorted.json`, AFAIK, there's no inplace edit option like in sed
// For anyone contributing to old huge messages.js and in need to quickly convert it to JSON
2018-09-07 02:39:56 +10:00
// sed command for converting currently formatted JS to JSON:
// sed -i -e "s/'//gm" -e 's/"/\\"/gm' -re 's/^( +)(.+?): ((.+?))?(,?)(\{?)$/\1"\2": "\4"/gm' -e 's/\"\{\"/{/g' -e 's/,"$/",/g' file.json
2018-09-10 01:54:23 +10:00
// There's only problem that apostrophe character ' gets replaced by \\ so you have to fix it manually, sorry.
2017-11-11 15:21:49 +11:00
2017-11-08 01:14:37 +11:00
const messages = {
2018-09-10 01:54:23 +10:00
de: require('./de.json'),
fi: require('./fi.json'),
en: require('./en.json'),
2018-09-10 01:54:23 +10:00
eo: require('./eo.json'),
et: require('./et.json'),
hu: require('./hu.json'),
ro: require('./ro.json'),
ja: require('./ja.json'),
fr: require('./fr.json'),
it: require('./it.json'),
2018-09-10 01:54:23 +10:00
oc: require('./oc.json'),
pl: require('./pl.json'),
es: require('./es.json'),
2018-09-10 01:54:23 +10:00
pt: require('./pt.json'),
ru: require('./ru.json'),
nb: require('./nb.json'),
he: require('./he.json')
2017-11-08 01:14:37 +11:00
}
export default messages