Skip to content

Commit

Permalink
Merge branch 'dev' into local-fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao authored May 21, 2021
2 parents ea59804 + 8830c0b commit e8fad82
Show file tree
Hide file tree
Showing 16 changed files with 757 additions and 336 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Build image
FROM node:12.18-alpine AS build
ARG BASE_PATH
ARG DATABASE_TYPE
ENV BASE_PATH=$BASE_PATH
ENV DATABASE_URL "postgresql://umami:umami@db:5432/umami" \
DATABASE_TYPE=$DATABASE_TYPE
WORKDIR /build
Expand Down
6 changes: 5 additions & 1 deletion components/layout/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ import { FormattedMessage } from 'react-intl';
import Link from 'components/common/Link';
import styles from './Footer.module.css';
import useVersion from 'hooks/useVersion';
import useLocale from 'hooks/useLocale';
import { rtlLocales } from 'lib/lang';

export default function Footer() {
const { current } = useVersion();
const [locale] = useLocale();

return (
<footer className="container">
<footer className="container" dir={rtlLocales.includes(locale) ? 'rtl' : 'ltr'}>
<div className={classNames(styles.footer, 'row')}>
<div className="col-12 col-md-4" />
<div className="col-12 col-md-4">
Expand Down
5 changes: 4 additions & 1 deletion components/layout/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ import UpdateNotice from 'components/common/UpdateNotice';
import UserButton from 'components/settings/UserButton';
import Logo from 'assets/logo.svg';
import styles from './Header.module.css';
import useLocale from 'hooks/useLocale';
import { rtlLocales } from 'lib/lang';

export default function Header() {
const user = useSelector(state => state.user);
const [active, setActive] = useState(false);
const [locale] = useLocale();

function handleClick() {
setActive(state => !state);
}

return (
<nav className="container">
<nav className="container" dir={rtlLocales.includes(locale) ? 'rtl' : 'ltr'}>
{user?.is_admin && <UpdateNotice />}
<div className={classNames(styles.header, 'row align-items-center')}>
<div className={styles.nav}>
Expand Down
9 changes: 8 additions & 1 deletion components/layout/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@ import React from 'react';
import Head from 'next/head';
import Header from 'components/layout/Header';
import Footer from 'components/layout/Footer';
import useLocale from 'hooks/useLocale';
import { rtlLocales } from 'lib/lang';

export default function Layout({ title, children, header = true, footer = true }) {
const [locale] = useLocale();

return (
<>
<Head>
<title>umami{title && ` - ${title}`}</title>
</Head>

{header && <Header />}
<main className="container">{children}</main>
<main className="container" dir={rtlLocales.includes(locale) ? 'rtl' : 'ltr'}>
{children}
</main>
{footer && <Footer />}
<div id="__modals" />
</>
Expand Down
100 changes: 100 additions & 0 deletions lang/ar-SA.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"label.accounts": "الحسابات",
"label.add-account": "إضافة حساب",
"label.add-website": "إضافة موقع",
"label.administrator": "مدير عام؟",
"label.all": "الكل",
"label.all-events": "كافة الأحداث",
"label.all-websites": "كافة المواقع",
"label.back": "للخلف",
"label.cancel": "إلغاء",
"label.change-password": "تغيير كلمة المرور",
"label.confirm-password": "تأكيد كلمة المرور",
"label.copy-to-clipboard": "نسخ للحافظة",
"label.current-password": "كلمة المرور الحالية",
"label.custom-range": "فترة مخصصة",
"label.dashboard": "الشاشة الرئيسية",
"label.date-range": "فترة مخصصة",
"label.default-date-range": "الفترة المخصصة الافتراضية",
"label.delete": "حذف",
"label.delete-account": "حذف الحساب",
"label.delete-website": "حذف الموقع",
"label.dismiss": "اخفاء",
"label.domain": "نطاق",
"label.edit": "تعديل",
"label.edit-account": "تعديل الحساب",
"label.edit-website": "تعديل الموقع",
"label.enable-share-url": "تفعيل مشاركة الرابط",
"label.invalid": "غير صحيح",
"label.invalid-domain": "النطاق غير صحيح",
"label.last-days": "اخر {x} يوم/ايام",
"label.last-hours": "اخر {x} ساعة/ساعات",
"label.logged-in-as": "تم تسجيل الدخول كـ {username}",
"label.login": "تسجيل الدخول",
"label.logout": "تسجيل الخروج",
"label.more": "المزيد",
"label.name": "الإسم",
"label.new-password": "كلمة مرور جديدة",
"label.password": "كلمة المرور",
"label.passwords-dont-match": "كلمة المرور غير متطابقة",
"label.profile": "الملف الشخصي",
"label.realtime": "الوقت الفعلي",
"label.realtime-logs": "سجلات الوقت الفعلي",
"label.refresh": "تحديث",
"label.required": "اجباري",
"label.reset": "اعادة تعيين",
"label.save": "حفظ",
"label.settings": "اعدادات",
"label.share-url": "مشاركة الرابط",
"label.single-day": "يوم واحد",
"label.this-month": "الشهر الحالي",
"label.this-week": "الاسبوع الحالي",
"label.this-year": "السنة الحالية",
"label.timezone": "المنطقة الزمنية",
"label.today": "اليوم",
"label.tracking-code": "كود التتبع",
"label.unknown": "غير معروف",
"label.username": "اسم المستخدم",
"label.view-details": "عرض التفاصيل",
"label.websites": "المواقع",
"message.active-users": "{x} حاليا {x, plural, one {زائر واحد} other {زوار}}",
"message.confirm-delete": "هل أنت متأكد من حذف {target}?",
"message.copied": "تم النسخ!",
"message.delete-warning": "كافة البيانات المرتبطة سيم حذفها ايضا.",
"message.failure": "حدث خطأ ما.",
"message.get-share-url": "احصل على رابط المشاركة",
"message.get-tracking-code": "احصل على كود التتبع",
"message.go-to-settings": "الذهاب إلى الإعدادات",
"message.incorrect-username-password": "اسم المستخدم او كلمة المرور غير صحيحة.",
"message.log.visitor": "زائر من {country} يستخدم {browser} على {os} {device}",
"message.new-version-available": "توجد نسخة جديدة من umami رقم {version} سارع بالتحديث!",
"message.no-data-available": "لا توجد بيانات متاحة.",
"message.no-websites-configured": "لم تقم بإعداد اي موقع.",
"message.page-not-found": "الصفحة غير موجودة.",
"message.powered-by": "مشغل بواسطة {name}",
"message.save-success": "تم الحفظ بنجاح.",
"message.share-url": "هذا الرابط الذي تم مشاركته بشكل عام لـ {target}.",
"message.track-stats": "لتتبع الاحصاىيات لـ {target}, ضع الكود التالي في منطقة {head} في موقعك.",
"message.type-delete": "اكتب {delete} في الحقل التالي لتأكيد الحذف.",
"metrics.actions": "اجراءات",
"metrics.average-visit-time": "متوسط وقت الزيارة",
"metrics.bounce-rate": "معدل الارتداد",
"metrics.browsers": "المتصفحات",
"metrics.countries": "الدول",
"metrics.device.desktop": "كمبيوتر",
"metrics.device.laptop": "لابتوب",
"metrics.device.mobile": "جوال",
"metrics.device.tablet": "تابلت",
"metrics.devices": "الأجهزة",
"metrics.events": "الأحداث",
"metrics.filter.combined": "مجمعة",
"metrics.filter.domain-only": "نطاق فقط",
"metrics.filter.raw": "مفصلة",
"metrics.operating-systems": "نظام التشغيل",
"metrics.page-views": "مشاهدات الصفحة",
"metrics.pages": "الصفحات",
"metrics.referrers": "التحويلات",
"metrics.unique-visitors": "زائرون فريدون",
"metrics.views": "مشاهدات",
"metrics.visitors": "زوار"
}
100 changes: 100 additions & 0 deletions lang/ca-ES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"label.accounts": "Comptes",
"label.add-account": "Afegeix compte",
"label.add-website": "Afegeix lloc web",
"label.administrator": "Administrador",
"label.all": "Tots",
"label.all-events": "Tots els esdeveniments",
"label.all-websites": "Tots els llocs web",
"label.back": "Enrere",
"label.cancel": "Cancel·la",
"label.change-password": "Canvia la contrasenya",
"label.confirm-password": "Confirma la contrasenya",
"label.copy-to-clipboard": "Copia al porta-retalls",
"label.current-password": "Contrasenya actual",
"label.custom-range": "Rang personalitzat",
"label.dashboard": "Panell",
"label.date-range": "Interval de dates",
"label.default-date-range": "Interval de dates per defecte",
"label.delete": "Esborra",
"label.delete-account": "Esborra el compte",
"label.delete-website": "Esborra el lloc web",
"label.dismiss": "Descarta",
"label.domain": "Domini",
"label.edit": "Edita",
"label.edit-account": "Edita el compte",
"label.edit-website": "Edita el lloc web",
"label.enable-share-url": "Activa l'enllaç per compartir",
"label.invalid": "Invàlid",
"label.invalid-domain": "Domini invàlid",
"label.last-days": "Últims {x} dies",
"label.last-hours": "Últimes {x} hores",
"label.logged-in-as": "Connectat com {username}",
"label.login": "Connecta't",
"label.logout": "Desconnecta't",
"label.more": "Més",
"label.name": "Nom",
"label.new-password": "Contrasenya nova",
"label.password": "Contrasenya",
"label.passwords-dont-match": "Les contrasenyes no coincideixen",
"label.profile": "Perfil",
"label.realtime": "Temps real",
"label.realtime-logs": "Registres a temps real",
"label.refresh": "Refresca",
"label.required": "Obligatori",
"label.reset": "Restableix",
"label.save": "Desa",
"label.settings": "Configuració",
"label.share-url": "Enllaç per compartir",
"label.single-day": "Un sol dia",
"label.this-month": "Aquest mes",
"label.this-week": "Aquesta setmana",
"label.this-year": "Aquest any",
"label.timezone": "Zona horària",
"label.today": "Avui",
"label.tracking-code": "Codi de seguiment",
"label.unknown": "Desconegut",
"label.username": "Nom d'usuari",
"label.view-details": "Veure els detalls",
"label.websites": "Llocs web",
"message.active-users": "{x} {x, plural, one {visitant actual} other {visitants actuals}}",
"message.confirm-delete": "Segur que vols esborrar {target}?",
"message.copied": "S'ha copiat",
"message.delete-warning": "També s'esborraran totes les dades relacionades.",
"message.failure": "S'ha produït un error.",
"message.get-share-url": "Obté l'enllaç per compartir",
"message.get-tracking-code": "Obté el codi de seguiment",
"message.go-to-settings": "Vés a la configuració",
"message.incorrect-username-password": "Nom d'usuari o contrasenya incorrectes.",
"message.log.visitor": "Visitant de {country} usant {browser} a {os} {device}",
"message.new-version-available": "Hi ha disponible una nova versió d'umami {version}!",
"message.no-data-available": "No hi ha dades disponibles.",
"message.no-websites-configured": "No hi ha cap lloc web configurat.",
"message.page-not-found": "No s'ha trobat la pàgina.",
"message.powered-by": "Funciona amb {name}",
"message.save-success": "S'ha desat amb èxit.",
"message.share-url": "Aquest és l'enllaç públic per compartir de {target}.",
"message.track-stats": "Per seguir les estadístiques de {target}, col·loca el codi següent a la secció {head} del teu lloc web.",
"message.type-delete": "Escriu {delete} al quadre següent per confirmar.",
"metrics.actions": "Accions",
"metrics.average-visit-time": "Temps mitjà de visita",
"metrics.bounce-rate": "Percentatge de rebot",
"metrics.browsers": "Navegadors",
"metrics.countries": "Països",
"metrics.device.desktop": "Escriptori",
"metrics.device.laptop": "Portàtil",
"metrics.device.mobile": "Mòbil",
"metrics.device.tablet": "Tauleta",
"metrics.devices": "Dispositius",
"metrics.events": "Esdeveniments",
"metrics.filter.combined": "Combinat",
"metrics.filter.domain-only": "Només domini",
"metrics.filter.raw": "En cru",
"metrics.operating-systems": "Sistemes operatius",
"metrics.page-views": "Pàgines vistes",
"metrics.pages": "Pàgines",
"metrics.referrers": "Referents",
"metrics.unique-visitors": "Visitants únics",
"metrics.views": "Vistes",
"metrics.visitors": "Visitants"
}
Loading

0 comments on commit e8fad82

Please sign in to comment.