Merge remote-tracking branch 'upstream/master'
commit
daac7ba58e
|
@ -58,15 +58,19 @@ export default function AccountEditForm({ values, onSave, onClose }) {
|
|||
<label htmlFor="username">
|
||||
<FormattedMessage id="label.username" defaultMessage="Username" />
|
||||
</label>
|
||||
<Field name="username" type="text" />
|
||||
<FormError name="username" />
|
||||
<div>
|
||||
<Field name="username" type="text" />
|
||||
<FormError name="username" />
|
||||
</div>
|
||||
</FormRow>
|
||||
<FormRow>
|
||||
<label htmlFor="password">
|
||||
<FormattedMessage id="label.password" defaultMessage="Password" />
|
||||
</label>
|
||||
<Field name="password" type="password" />
|
||||
<FormError name="password" />
|
||||
<div>
|
||||
<Field name="password" type="password" />
|
||||
<FormError name="password" />
|
||||
</div>
|
||||
</FormRow>
|
||||
<FormButtons>
|
||||
<Button type="submit" variant="action">
|
||||
|
|
|
@ -66,22 +66,28 @@ export default function ChangePasswordForm({ values, onSave, onClose }) {
|
|||
<label htmlFor="current_password">
|
||||
<FormattedMessage id="label.current-password" defaultMessage="Current password" />
|
||||
</label>
|
||||
<Field name="current_password" type="password" />
|
||||
<FormError name="current_password" />
|
||||
<div>
|
||||
<Field name="current_password" type="password" />
|
||||
<FormError name="current_password" />
|
||||
</div>
|
||||
</FormRow>
|
||||
<FormRow>
|
||||
<label htmlFor="new_password">
|
||||
<FormattedMessage id="label.new-password" defaultMessage="New password" />
|
||||
</label>
|
||||
<Field name="new_password" type="password" />
|
||||
<FormError name="new_password" />
|
||||
<div>
|
||||
<Field name="new_password" type="password" />
|
||||
<FormError name="new_password" />
|
||||
</div>
|
||||
</FormRow>
|
||||
<FormRow>
|
||||
<label htmlFor="confirm_password">
|
||||
<FormattedMessage id="label.confirm-password" defaultMessage="Confirm password" />
|
||||
</label>
|
||||
<Field name="confirm_password" type="password" />
|
||||
<FormError name="confirm_password" />
|
||||
<div>
|
||||
<Field name="confirm_password" type="password" />
|
||||
<FormError name="confirm_password" />
|
||||
</div>
|
||||
</FormRow>
|
||||
<FormButtons>
|
||||
<Button type="submit" variant="action">
|
||||
|
|
|
@ -73,8 +73,10 @@ export default function DeleteForm({ values, onSave, onClose }) {
|
|||
/>
|
||||
</p>
|
||||
<FormRow>
|
||||
<Field name="confirmation" type="text" />
|
||||
<FormError name="confirmation" />
|
||||
<div>
|
||||
<Field name="confirmation" type="text" />
|
||||
<FormError name="confirmation" />
|
||||
</div>
|
||||
</FormRow>
|
||||
<FormButtons>
|
||||
<Button
|
||||
|
|
|
@ -71,15 +71,19 @@ export default function LoginForm() {
|
|||
<label htmlFor="username">
|
||||
<FormattedMessage id="label.username" defaultMessage="Username" />
|
||||
</label>
|
||||
<Field name="username" type="text" />
|
||||
<FormError name="username" />
|
||||
<div>
|
||||
<Field name="username" type="text" />
|
||||
<FormError name="username" />
|
||||
</div>
|
||||
</FormRow>
|
||||
<FormRow>
|
||||
<label htmlFor="password">
|
||||
<FormattedMessage id="label.password" defaultMessage="Password" />
|
||||
</label>
|
||||
<Field name="password" type="password" />
|
||||
<FormError name="password" />
|
||||
<div>
|
||||
<Field name="password" type="password" />
|
||||
<FormError name="password" />
|
||||
</div>
|
||||
</FormRow>
|
||||
<FormButtons>
|
||||
<Button type="submit" variant="action">
|
||||
|
|
|
@ -63,15 +63,19 @@ export default function WebsiteEditForm({ values, onSave, onClose }) {
|
|||
<label htmlFor="name">
|
||||
<FormattedMessage id="label.name" defaultMessage="Name" />
|
||||
</label>
|
||||
<Field name="name" type="text" />
|
||||
<FormError name="name" />
|
||||
<div>
|
||||
<Field name="name" type="text" />
|
||||
<FormError name="name" />
|
||||
</div>
|
||||
</FormRow>
|
||||
<FormRow>
|
||||
<label htmlFor="domain">
|
||||
<FormattedMessage id="label.domain" defaultMessage="Domain" />
|
||||
</label>
|
||||
<Field name="domain" type="text" />
|
||||
<FormError name="domain" />
|
||||
<div>
|
||||
<Field name="domain" type="text" />
|
||||
<FormError name="domain" />
|
||||
</div>
|
||||
</FormRow>
|
||||
<FormRow>
|
||||
<label></label>
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.row > div {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
@ -33,9 +37,9 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
left: calc(100% + 16px);
|
||||
bottom: 0;
|
||||
margin-left: 16px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.msg {
|
||||
|
@ -68,3 +72,15 @@
|
|||
color: var(--gray50);
|
||||
background: var(--gray800);
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 576px) {
|
||||
.error {
|
||||
align-items: flex-start;
|
||||
top: calc(100% + 7px);
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.error:after {
|
||||
left: 10px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.title {
|
||||
color: var(--gray-900);
|
||||
color: var(--gray900);
|
||||
font-size: var(--font-size-large);
|
||||
line-height: var(--font-size-large);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"cs-CZ": ["label.reset", "metrics.device.tablet"],
|
||||
"de-DE": [
|
||||
"label.administrator",
|
||||
"label.name",
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
{
|
||||
"label.accounts": "Účty",
|
||||
"label.add-account": "Přidat účet",
|
||||
"label.add-website": "Přidat web",
|
||||
"label.administrator": "Administrátor",
|
||||
"label.all": "Vše",
|
||||
"label.all-websites": "Všechny weby",
|
||||
"label.back": "Zpět",
|
||||
"label.cancel": "Zrušit",
|
||||
"label.change-password": "Změnit heslo",
|
||||
"label.confirm-password": "Potvrdit heslo",
|
||||
"label.copy-to-clipboard": "Kopírovat do schránky",
|
||||
"label.current-password": "Aktuální heslo",
|
||||
"label.custom-range": "Vlastní rozsah",
|
||||
"label.dashboard": "Přehled",
|
||||
"label.date-range": "Období",
|
||||
"label.default-date-range": "Výchozí období",
|
||||
"label.delete": "Smazat",
|
||||
"label.delete-account": "Smazat účet",
|
||||
"label.delete-website": "Smazat web",
|
||||
"label.dismiss": "Odejít",
|
||||
"label.domain": "Doména",
|
||||
"label.edit": "Upravit",
|
||||
"label.edit-account": "Upravit účet",
|
||||
"label.edit-website": "Upravit web",
|
||||
"label.enable-share-url": "Povolit sdílení URL",
|
||||
"label.invalid": "Neplatný",
|
||||
"label.invalid-domain": "Neplatná doména",
|
||||
"label.last-days": "Posledních {x} dnů",
|
||||
"label.last-hours": "Posledních {x} hodin",
|
||||
"label.logged-in-as": "Přihlášený jako {username}",
|
||||
"label.login": "Přihlásit",
|
||||
"label.logout": "Odhlásit",
|
||||
"label.more": "Více",
|
||||
"label.name": "Jméno",
|
||||
"label.new-password": "Nové heslo",
|
||||
"label.password": "Heslo",
|
||||
"label.passwords-dont-match": "Hesla se neschodují",
|
||||
"label.profile": "Profil",
|
||||
"label.realtime": "Aktuálně",
|
||||
"label.realtime-logs": "Aktuální záznamy",
|
||||
"label.refresh": "Obnovit",
|
||||
"label.required": "Vyžadováno",
|
||||
"label.reset": "Reset",
|
||||
"label.save": "Uložit",
|
||||
"label.settings": "Nastavení",
|
||||
"label.share-url": "Sdílet URL",
|
||||
"label.single-day": "Jeden den",
|
||||
"label.this-month": "Tento měsíc",
|
||||
"label.this-week": "Tento týden",
|
||||
"label.this-year": "Tento rok",
|
||||
"label.timezone": "Časová zóna",
|
||||
"label.today": "Dnes",
|
||||
"label.tracking-code": "Sledovací kód",
|
||||
"label.unknown": "Neznámý",
|
||||
"label.username": "Uživatelské jméno",
|
||||
"label.view-details": "Zobrazit detaily",
|
||||
"label.websites": "Weby",
|
||||
"message.active-users": "{x} aktuálně {x, plural, one {návštěvník} other {návštěvníci}}",
|
||||
"message.confirm-delete": "Opravdu smazat {target}?",
|
||||
"message.copied": "Zkopírováno!",
|
||||
"message.delete-warning": "Všechna související data budou také smazána.",
|
||||
"message.failure": "Něco se pokazilo.",
|
||||
"message.get-share-url": "Získat sdílené URL",
|
||||
"message.get-tracking-code": "Získat měřící kód",
|
||||
"message.go-to-settings": "Jít do nastavení",
|
||||
"message.incorrect-username-password": "Nesprávné jméno/heslo.",
|
||||
"message.log.visitor": "Návštěvník z {country} s prohlížečem {browser} na {os} {device}",
|
||||
"message.new-version-available": "Nová verze umami {version} je k dispozici!",
|
||||
"message.no-data-available": "Žádná data.",
|
||||
"message.no-websites-configured": "Nemáte nastavený žádný web.",
|
||||
"message.page-not-found": "Stránka nenalezena.",
|
||||
"message.powered-by": "Běží na {name}",
|
||||
"message.save-success": "Úspěšně uloženo.",
|
||||
"message.share-url": "Toto je sdílené URL pro {target}.",
|
||||
"message.track-stats": "Pro sledování návštěv na {target}, přidejte následující kód do {head} části vašeho webu.",
|
||||
"message.type-delete": "Napište {delete} pro potvrzení.",
|
||||
"metrics.actions": "Akce",
|
||||
"metrics.average-visit-time": "Průměrný čas návštěvy",
|
||||
"metrics.bounce-rate": "Okamžité opuštění",
|
||||
"metrics.browsers": "Prohlížeč",
|
||||
"metrics.countries": "Země",
|
||||
"metrics.device.desktop": "Stolní počítač",
|
||||
"metrics.device.laptop": "Přenosný počítač",
|
||||
"metrics.device.mobile": "Mobilní telefon",
|
||||
"metrics.device.tablet": "Tablet",
|
||||
"metrics.devices": "Zařízení",
|
||||
"metrics.events": "Události",
|
||||
"metrics.filter.combined": "Kombinace",
|
||||
"metrics.filter.domain-only": "Domény",
|
||||
"metrics.filter.raw": "Nezpracované",
|
||||
"metrics.operating-systems": "Operační systém",
|
||||
"metrics.page-views": "Zobrazení stránek",
|
||||
"metrics.pages": "Stránky",
|
||||
"metrics.referrers": "Odkazy",
|
||||
"metrics.unique-visitors": "Jedinečné návštěvy",
|
||||
"metrics.views": "Zobrazení",
|
||||
"metrics.visitors": "Návštěvy"
|
||||
}
|
|
@ -3,8 +3,8 @@
|
|||
"label.add-account": "Adicionar conta",
|
||||
"label.add-website": "Adicionar website",
|
||||
"label.administrator": "Administrador",
|
||||
"label.all": "All",
|
||||
"label.all-websites": "All websites",
|
||||
"label.all": "Todos",
|
||||
"label.all-websites": "Todos os websites",
|
||||
"label.back": "Voltar",
|
||||
"label.cancel": "Cancelar",
|
||||
"label.change-password": "Alterar palavra-passe",
|
||||
|
@ -37,8 +37,8 @@
|
|||
"label.password": "Palavra-passe",
|
||||
"label.passwords-dont-match": "Palavra-passes não correspondem",
|
||||
"label.profile": "Perfil",
|
||||
"label.realtime": "Realtime",
|
||||
"label.realtime-logs": "Realtime logs",
|
||||
"label.realtime": "Tempo real",
|
||||
"label.realtime-logs": "Relatório em tempo real",
|
||||
"label.refresh": "Atualizar",
|
||||
"label.required": "Obrigatório",
|
||||
"label.reset": "Repor",
|
||||
|
@ -65,7 +65,7 @@
|
|||
"message.get-tracking-code": "Obter código de tracking",
|
||||
"message.go-to-settings": "Ir para as definições",
|
||||
"message.incorrect-username-password": "Nome de utilizador/palavra-passe incorretos.",
|
||||
"message.log.visitor": "Visitor from {country} using {browser} on {os} {device}",
|
||||
"message.log.visitor": "Visitante de {country} a usar {browser} no {device} {os}",
|
||||
"message.new-version-available": "Uma nova versão de umami {version} está disponível!",
|
||||
"message.no-data-available": "Sem dados disponíveis.",
|
||||
"message.no-websites-configured": "Não tens nenhum website configurado.",
|
||||
|
|
33
lib/lang.js
33
lib/lang.js
|
@ -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' },
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "umami",
|
||||
"version": "1.0.0",
|
||||
"version": "1.2.0",
|
||||
"description": "A simple, fast, website analytics alternative to Google Analytics. ",
|
||||
"author": "Mike Cao <mike@mikecao.com>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
const cli = require('next/dist/cli/next-start');
|
||||
|
||||
cli.nextStart(['-p', process.env.PORT || 3000, '-H', process.env.HOSTNAME || 'localhost']);
|
||||
cli.nextStart(['-p', process.env.PORT || 3000, '-H', process.env.HOSTNAME || '0.0.0.0']);
|
||||
|
|
Loading…
Reference in New Issue