akkoma-fe/src/i18n/messages.js

38 lines
1.6 KiB
JavaScript
Raw Normal View History

2018-09-09 15:54:23 +00: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
// Also, when adding a new language to "messages" variable, please do it alphabetically by language code so that users can search or check their custom language easily.
2018-09-09 15:54:23 +00:00
// For anyone contributing to old huge messages.js and in need to quickly convert it to JSON
2018-09-06 16:39:56 +00: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-09 15:54:23 +00:00
// There's only problem that apostrophe character ' gets replaced by \\ so you have to fix it manually, sorry.
2017-11-11 04:21:49 +00:00
2017-11-07 14:14:37 +00:00
const messages = {
2018-10-21 08:51:22 +00:00
ar: require('./ar.json'),
ca: require('./ca.json'),
2019-03-02 17:25:49 +00:00
cs: require('./cs.json'),
2018-09-09 15:54:23 +00:00
de: require('./de.json'),
en: require('./en.json'),
2018-09-09 15:54:23 +00:00
eo: require('./eo.json'),
es: require('./es.json'),
et: require('./et.json'),
fi: require('./fi.json'),
fr: require('./fr.json'),
ga: require('./ga.json'),
he: require('./he.json'),
hu: require('./hu.json'),
it: require('./it.json'),
ja: require('./ja.json'),
2019-01-10 05:56:05 +00:00
ko: require('./ko.json'),
nb: require('./nb.json'),
2019-01-27 18:44:17 +00:00
nl: require('./nl.json'),
2018-09-09 15:54:23 +00:00
oc: require('./oc.json'),
pl: require('./pl.json'),
2018-09-09 15:54:23 +00:00
pt: require('./pt.json'),
ro: require('./ro.json'),
2018-11-09 05:42:32 +00:00
ru: require('./ru.json'),
2018-11-09 06:15:55 +00:00
zh: require('./zh.json')
2017-11-07 14:14:37 +00:00
}
export default messages