Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Update locale files and scripts.
Mike Cao0d4a2e2a0ea8
diff --git a/lang/de-DE.json b/lang/de-DE.jsonindex 0128943ec..df6adaa14 100644--- a/lang/de-DE.json+++ b/lang/de-DE.json@@ -12,12 +12,14 @@"button.more": "Mehr","button.save": "Speichern","button.view-details": "Details anzeigen",+ "button.websites": "Webseiten","footer.powered-by": "Powered by","header.nav.dashboard": "Übersicht","header.nav.settings": "Einstellungen","label.administrator": "Administrator","label.confirm-password": "Passwort wiederholen","label.current-password": "Derzeitiges Passwort",+ "label.custom-range": "Custom range","label.domain": "Domain","label.enable-share-url": "Freigabe-URL aktivieren","label.invalid": "Ungültig",diff --git a/lang/en-US.json b/lang/en-US.jsonindex e9ebdf6b6..e24b93477 100644--- a/lang/en-US.json+++ b/lang/en-US.json@@ -12,12 +12,14 @@"button.more": "More","button.save": "Save","button.view-details": "View details",+ "button.websites": "Websites","footer.powered-by": "Powered by","header.nav.dashboard": "Dashboard","header.nav.settings": "Settings","label.administrator": "Administrator","label.confirm-password": "Confirm password","label.current-password": "Current password",+ "label.custom-range": "Custom range","label.domain": "Domain","label.enable-share-url": "Enable share URL","label.invalid": "Invalid",diff --git a/lang/es-MX.json b/lang/es-MX.jsonindex 783992d87..e089ef7fc 100644--- a/lang/es-MX.json+++ b/lang/es-MX.json@@ -12,12 +12,14 @@"button.more": "Más","button.save": "Guardar","button.view-details": "Ver detalles",+ "button.websites": "Sitios","footer.powered-by": "Desarrollado con","header.nav.dashboard": "Panel de control","header.nav.settings": "Configuraciones","label.administrator": "Administrador","label.confirm-password": "Confirmar contraseña","label.current-password": "Contraseña actual",+ "label.custom-range": "Custom range","label.domain": "Dominio","label.enable-share-url": "Habilitar compartir URL","label.invalid": "Inválido",@@ -42,6 +44,7 @@"message.failure": "Algo falló.","message.incorrect-username-password": "Nombre de usuario o contraseña incorrectos.","message.no-data-available": "Sin información disponible.",+ "message.page-not-found": "Page not found","message.save-success": "Guardado exitosamente.","message.share-url": "Esta es la URL compartida públicamente para {target}.","message.track-stats": "Para registrar estadísticas para {target}, copia el siguiente código dentro de la etiqueta {head} de tu sitio.",diff --git a/lang/ja-JP.json b/lang/ja-JP.jsonindex 7d2864283..cdeec4c89 100644--- a/lang/ja-JP.json+++ b/lang/ja-JP.json@@ -12,12 +12,14 @@"button.more": "さらに表示","button.save": "保存","button.view-details": "詳細表示",+ "button.websites": "Webサイト","footer.powered-by": "Powered by","header.nav.dashboard": "ダッシュボード","header.nav.settings": "設定","label.administrator": "管理者","label.confirm-password": "パスワード(確認)","label.current-password": "現在のパスワード",+ "label.custom-range": "Custom range","label.domain": "ドメイン","label.enable-share-url": "共有リンクを有効にする","label.invalid": "無効",diff --git a/lang/nl-NL.json b/lang/nl-NL.jsonindex 5e02d4938..8d97ca436 100644--- a/lang/nl-NL.json+++ b/lang/nl-NL.json@@ -12,12 +12,14 @@"button.more": "Toon meer","button.save": "Opslaan","button.view-details": "Meer details",+ "button.websites": "Websites","footer.powered-by": "mogelijk gemaakt door","header.nav.dashboard": "Dashboard","header.nav.settings": "Instellingen","label.administrator": "Administrator","label.confirm-password": "Wachtwoord bevestigen","label.current-password": "Huidig wachtwoord",+ "label.custom-range": "Custom range","label.domain": "Domein","label.enable-share-url": "Sta delen via openbare URL toe","label.invalid": "Ongeldig",diff --git a/lang/ru-RU.json b/lang/ru-RU.jsonindex a173c970b..5c6e9df7c 100644--- a/lang/ru-RU.json+++ b/lang/ru-RU.json@@ -12,12 +12,14 @@"button.more": "Больше","button.save": "Сохранить","button.view-details": "Посмотреть детали",+ "button.websites": "Сайты","footer.powered-by": "на движке","header.nav.dashboard": "Информационная панель","header.nav.settings": "Настройки","label.administrator": "Администратор","label.confirm-password": "Подтвердить пароль","label.current-password": "Текущий пароль",+ "label.custom-range": "Custom range","label.domain": "Домен","label.enable-share-url": "Разрешить делиться ссылкой","label.invalid": "Некорректный",diff --git a/lang/tr-TR.json b/lang/tr-TR.jsonindex 20a1c4410..8e9f100ca 100644--- a/lang/tr-TR.json+++ b/lang/tr-TR.json@@ -12,12 +12,14 @@"button.more": "Detaylı göster","button.save": "Kaydet","button.view-details": "Detayı incele",+ "button.websites": "Web siteleri","footer.powered-by": "Sağlayıcı:","header.nav.dashboard": "Kontrol Paneli","header.nav.settings": "Ayarlar","label.administrator": "Yönetici","label.confirm-password": "Parolayı onayla","label.current-password": "Mevcut parola",+ "label.custom-range": "Custom range","label.domain": "Alan adı","label.enable-share-url": "Anonim paylaşım URL'i aktif","label.invalid": "Geçeriz",diff --git a/lang/zh-CN.json b/lang/zh-CN.jsonindex c050e6a6b..1f21eb0f8 100644--- a/lang/zh-CN.json+++ b/lang/zh-CN.json@@ -12,12 +12,14 @@"button.more": "更多","button.save": "保存","button.view-details": "查看更多",+ "button.websites": "网站","footer.powered-by": "运行","header.nav.dashboard": "仪表板","header.nav.settings": "设置","label.administrator": "管理员","label.confirm-password": "确认密码","label.current-password": "目前密码",+ "label.custom-range": "Custom range","label.domain": "域名","label.enable-share-url": "激活共享链接","label.invalid": "输入无效",diff --git a/lib/lang.js b/lib/lang.jsindex f66aa0ac2..3f097a2eb 100644--- a/lib/lang.js+++ b/lib/lang.js@@ -33,12 +33,12 @@ export const dateLocales = {export const menuOptions = [{ label: 'English', value: 'en', display: 'EN' },- { label: '中文 (Chinese Simplified)', value: 'zh-CN', display: '中文' },- { label: 'Nederlands (Dutch)', value: 'nl-NL', display: 'NL' },- { label: 'Deutsch (German)', value: 'de-DE', display: 'DE' },- { label: '日本語 (Japanese)', value: 'ja-JP', display: '日本語' },- { label: 'Español (Mexicano)', value: 'es-MX', display: 'ES' },- { label: 'Русский (Russian)', value: 'ru-RU', display: 'РУ' },+ { label: '中文', value: 'zh-CN', display: 'CN' },+ { label: 'Deutsch', value: 'de-DE', display: 'DE' },+ { label: 'Español', value: 'es-MX', display: 'ES' },+ { label: '日本語', value: 'ja-JP', display: 'JP' },+ { label: 'Nederlands', value: 'nl-NL', display: 'NL' },+ { label: 'Русский', value: 'ru-RU', display: 'RU' },{ label: 'Turkish', value: 'tr-TR', display: 'TR' },];diff --git a/package.json b/package.jsonindex f9541179a..25c50c7dd 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "umami",- "version": "0.31.0",+ "version": "0.32.0","description": "A simple, fast, website analytics alternative to Google Analytics. ","author": "Mike Cao <[email protected]>","license": "MIT",@@ -23,10 +23,10 @@"build-postgresql-schema": "dotenv prisma introspect -- --schema=./prisma/schema.postgresql.prisma","build-postgresql-client": "dotenv prisma generate -- --schema=./prisma/schema.postgresql.prisma","build-lang": "npm-run-all format-lang compile-lang",- "extract-lang": "formatjs extract {pages,components}/**/*.js --out-file lang/en-US.json",+ "extract-lang": "formatjs extract {pages,components}/**/*.js --out-file build/messages.json","merge-lang": "node scripts/merge-lang.js","format-lang": "node scripts/format-lang.js",- "compile-lang": "formatjs compile-folder --ast lang-formatted lang-compiled"+ "compile-lang": "formatjs compile-folder --ast build lang-compiled"},"lint-staged": {"**/*.js": [diff --git a/scripts/format-lang.js b/scripts/format-lang.jsindex f26c02499..5b03239ea 100644--- a/scripts/format-lang.js+++ b/scripts/format-lang.js@@ -3,7 +3,7 @@ const path = require('path');const prettier = require('prettier');const src = path.resolve(__dirname, '../lang');-const dest = path.resolve(__dirname, '../lang-formatted');+const dest = path.resolve(__dirname, '../build');const files = fs.readdirSync(src);if (!fs.existsSync(dest)) {diff --git a/scripts/merge-lang.js b/scripts/merge-lang.jsindex 885bf7597..f1b86df98 100644--- a/scripts/merge-lang.js+++ b/scripts/merge-lang.js@@ -1,11 +1,11 @@const fs = require('fs');const path = require('path');const prettier = require('prettier');-const root = require('../lang/en-US.json');+const messages = require('../build/messages.json');-const dir = path.resolve(__dirname, '../lang');-const files = fs.readdirSync(dir);-const keys = Object.keys(root).sort();+const dest = path.resolve(__dirname, '../lang');+const files = fs.readdirSync(dest);+const keys = Object.keys(messages).sort();files.forEach(file => {const lang = require(`../lang/${file}`);@@ -15,7 +15,7 @@ files.forEach(file => {const merged = keys.reduce((obj, key) => {const message = lang[key];- obj[key] = message || root[key];+ obj[key] = message || messages[key].defaultMessage;if (!message) {console.log(`* Added key ${key}`);@@ -26,5 +26,5 @@ files.forEach(file => {const json = prettier.format(JSON.stringify(merged), { parser: 'json' });- fs.writeFileSync(path.resolve(dir, file), json);+ fs.writeFileSync(path.resolve(dest, file), json);});