Added Czech language.

This commit is contained in:
Mike Cao 2020-10-22 10:36:08 -07:00
parent 6151282d46
commit 5b84378731
4 changed files with 26 additions and 15 deletions

View File

@ -1,4 +1,5 @@
{
"cs-CZ": ["label.reset", "metrics.device.tablet"],
"de-DE": [
"label.administrator",
"label.name",

View File

@ -1,24 +1,25 @@
import { format } from 'date-fns';
import {
enUS,
nl,
zhCN,
zhTW,
tr,
ru,
de,
ja,
es,
fr,
cs,
da,
sv,
de,
el,
enUS,
es,
fi,
fr,
id,
ja,
nb,
nl,
pt,
ro,
nb,
id,
ru,
sv,
tr,
uk,
fi,
zhCN,
zhTW,
} from 'date-fns/locale';
import enMessages from 'lang-compiled/en-US.json';
import nlMessages from 'lang-compiled/nl-NL.json';
@ -41,6 +42,7 @@ import nbNOMessages from 'lang-compiled/nb-NO.json';
import idMessages from 'lang-compiled/id-ID.json';
import ukMessages from 'lang-compiled/uk-UA.json';
import fiMessages from 'lang-compiled/fi-FI.json';
import csMessages from 'lang-compiled/cs-CZ.json';
export const messages = {
'en-US': enMessages,
@ -64,6 +66,7 @@ export const messages = {
'id-ID': idMessages,
'uk-UA': ukMessages,
'fi-FI': fiMessages,
'cs-CZ': csMessages,
};
export const dateLocales = {
@ -88,11 +91,13 @@ export const dateLocales = {
'id-ID': id,
'uk-UA': uk,
'fi-FI': fi,
'cs-CZ': cs,
};
export const menuOptions = [
{ label: '中文', value: 'zh-CN', display: 'cn' },
{ label: '中文(繁體)', value: 'zh-TW', display: 'tw' },
{ label: 'Čeština', value: 'cs-CZ', display: 'cs' },
{ label: 'Dansk', value: 'da-DK', display: 'da' },
{ label: 'Deutsch', value: 'de-DE', display: 'de' },
{ label: 'English', value: 'en-US', display: 'en' },

View File

@ -1,6 +1,6 @@
{
"name": "umami",
"version": "1.0.0",
"version": "1.1.0",
"description": "A simple, fast, website analytics alternative to Google Analytics. ",
"author": "Mike Cao <mike@mikecao.com>",
"license": "MIT",

View File

@ -7,12 +7,17 @@ const ignore = require('../lang-ignore.json');
const dir = path.resolve(__dirname, '../lang');
const files = fs.readdirSync(dir);
const keys = Object.keys(messages).sort();
const filter = process.argv?.[2];
files.forEach(file => {
if (file !== 'en-US.json') {
const lang = require(`../lang/${file}`);
const id = file.replace('.json', '');
if (filter && filter !== id) {
return;
}
console.log(chalk.yellowBright(`\n## ${file.replace('.json', '')}`));
let count = 0;
keys.forEach(key => {