From eed89f02a9219417fa5f94c0d6c08f5981d23823 Mon Sep 17 00:00:00 2001 From: rahighi Date: Thu, 26 Aug 2021 11:46:48 +0430 Subject: added multiple language support with related layout directions --- modern/.env | 2 +- modern/.vscode/settings.json | 7 + modern/package.json | 1 + modern/public/fonts/IRANSansWeb(FaNum).ttf | Bin 0 -> 59524 bytes modern/public/index.html | 2 +- modern/public/styles.css | 5 + modern/src/App.js | 6 +- modern/src/GeofencesPage.js | 7 +- modern/src/MainPage.js | 13 +- modern/src/common/localization.js | 181 ++++++++++++++------- modern/src/components/registration/LoginForm.js | 30 ++-- modern/src/components/registration/RegisterForm.js | 6 +- modern/src/map/CurrentLocationMap.js | 9 +- modern/src/map/Map.js | 34 +++- modern/src/reports/ReportLayout.js | 6 +- modern/src/settings/OptionsLayout/index.js | 5 +- modern/src/theme/index.js | 4 + 17 files changed, 220 insertions(+), 98 deletions(-) create mode 100644 modern/.vscode/settings.json create mode 100644 modern/public/fonts/IRANSansWeb(FaNum).ttf (limited to 'modern') diff --git a/modern/.env b/modern/.env index 69efd744..209ce898 100644 --- a/modern/.env +++ b/modern/.env @@ -1,2 +1,2 @@ SKIP_PREFLIGHT_CHECK=true -REACT_APP_URL_NAME='localhost:8082' +REACT_APP_URL_NAME='192.168.1.105:8082' diff --git a/modern/.vscode/settings.json b/modern/.vscode/settings.json new file mode 100644 index 00000000..5767cf1e --- /dev/null +++ b/modern/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "workbench.colorCustomizations": { + "activityBar.background": "#183407", + "titleBar.activeBackground": "#224909", + "titleBar.activeForeground": "#F4FDEE" + } +} \ No newline at end of file diff --git a/modern/package.json b/modern/package.json index 66066499..ad4a3d3d 100644 --- a/modern/package.json +++ b/modern/package.json @@ -13,6 +13,7 @@ "@turf/circle": "^6.5.0", "@turf/turf": "^6.4.0", "canvas-tint-image": "^2.0.1", + "jss-rtl": "^0.3.0", "mapbox-gl": "^1.13.1", "maplibre-gl": "^1.15.0", "moment": "^2.29.1", diff --git a/modern/public/fonts/IRANSansWeb(FaNum).ttf b/modern/public/fonts/IRANSansWeb(FaNum).ttf new file mode 100644 index 00000000..168a908e Binary files /dev/null and b/modern/public/fonts/IRANSansWeb(FaNum).ttf differ diff --git a/modern/public/index.html b/modern/public/index.html index 78138ed5..6d2eb7a0 100644 --- a/modern/public/index.html +++ b/modern/public/index.html @@ -9,7 +9,7 @@ Traccar - + diff --git a/modern/public/styles.css b/modern/public/styles.css index 147c3e3f..aca9e464 100644 --- a/modern/public/styles.css +++ b/modern/public/styles.css @@ -14,3 +14,8 @@ canvas { .maplibregl-popup { max-width: 330px !important; } + +@font-face { + font-family: IranSans; + src: url('fonts/IRANSansWeb\(FaNum\).ttf'); +} \ No newline at end of file diff --git a/modern/src/App.js b/modern/src/App.js index ac7cdb26..228fe554 100644 --- a/modern/src/App.js +++ b/modern/src/App.js @@ -38,12 +38,13 @@ import ResetPasswordForm from './components/registration/ResetPasswordForm'; import theme from './theme'; import GeofencesPage from './GeofencesPage'; import GeofencePage from './GeofencePage'; +import { LocalizationProvider } from './common/localization'; const App = () => { const initialized = useSelector((state) => !!state.session.server && !!state.session.user); return ( - + @@ -84,7 +85,8 @@ const App = () => { )} - + + ); }; diff --git a/modern/src/GeofencesPage.js b/modern/src/GeofencesPage.js index 71219c16..4d23d106 100644 --- a/modern/src/GeofencesPage.js +++ b/modern/src/GeofencesPage.js @@ -1,6 +1,6 @@ import React from 'react'; import { - Divider, isWidthUp, makeStyles, withWidth, Typography, IconButton, + Divider, isWidthUp, makeStyles, withWidth, Typography, IconButton, useTheme, } from '@material-ui/core'; import Drawer from '@material-ui/core/Drawer'; import ContainerDimensions from 'react-container-dimensions'; @@ -9,6 +9,8 @@ import Map from './map/Map'; import CurrentLocationMap from './map/CurrentLocationMap'; import GeofenceEditMap from './map/GeofenceEditMap'; import GeofencesList from './GeofencesList'; +import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; + import t from './common/localization'; @@ -49,6 +51,7 @@ const useStyles = makeStyles((theme) => ({ const GeofencesPage = ({ width }) => { const classes = useStyles(); + const theme = useTheme(); return (
@@ -60,7 +63,7 @@ const GeofencesPage = ({ width }) => { >
- + {theme.direction === 'rtl' ? : } {t('sharedGeofences')} diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js index e0707404..97f42ea3 100644 --- a/modern/src/MainPage.js +++ b/modern/src/MainPage.js @@ -9,6 +9,7 @@ import useMediaQuery from '@material-ui/core/useMediaQuery'; import AddIcon from '@material-ui/icons/Add'; import CloseIcon from '@material-ui/icons/Close'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; +import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import ListIcon from '@material-ui/icons/ViewList'; import DevicesList from './DevicesList'; @@ -131,9 +132,9 @@ const MainPage = () => { {isTablet && ( - - - + + {theme.direction === 'rtl' ? : } + )} { {!isTablet && ( - - - + + + )} diff --git a/modern/src/common/localization.js b/modern/src/common/localization.js index 9e2123a9..3b2f04b3 100644 --- a/modern/src/common/localization.js +++ b/modern/src/common/localization.js @@ -1,3 +1,8 @@ +import React, { useState, createContext, useContext, useEffect } from "react"; +import { create } from 'jss'; +import rtl from 'jss-rtl'; +import { StylesProvider, jssPreset, useTheme, ThemeProvider } from '@material-ui/core/styles'; + import af from '../../../web/l10n/af.json'; import ar from '../../../web/l10n/ar.json'; import az from '../../../web/l10n/az.json'; @@ -52,71 +57,77 @@ import uz from '../../../web/l10n/uz.json'; import vi from '../../../web/l10n/vi.json'; import zh from '../../../web/l10n/zh.json'; import zh_TW from '../../../web/l10n/zh_TW.json'; +import theme from "../theme"; const supportedLanguages = { - af: { data: af, name: 'Afrikaans' }, - ar: { data: ar, name: 'العربية' }, - az: { data: az, name: 'Azərbaycanca' }, - bg: { data: bg, name: 'Български' }, - bn: { data: bn, name: 'বাংলা' }, - cs: { data: cs, name: 'Čeština' }, - de: { data: de, name: 'Deutsch' }, - da: { data: da, name: 'Dansk' }, - el: { data: el, name: 'Ελληνικά' }, - en: { data: en, name: 'English' }, - es: { data: es, name: 'Español' }, - fa: { data: fa, name: 'فارسی' }, - fi: { data: fi, name: 'Suomi' }, - fr: { data: fr, name: 'Français' }, - he: { data: he, name: 'עברית' }, - hi: { data: hi, name: 'हिन्दी' }, - hr: { data: hr, name: 'Hrvatski' }, - hu: { data: hu, name: 'Magyar' }, - id: { data: id, name: 'Bahasa Indonesia' }, - it: { data: it, name: 'Italiano' }, - ja: { data: ja, name: '日本語' }, - ka: { data: ka, name: 'ქართული' }, - kk: { data: kk, name: 'Қазақша' }, - ko: { data: ko, name: '한국어' }, - km: { data: km, name: 'ភាសាខ្មែរ' }, - lo: { data: lo, name: 'ລາວ' }, - lt: { data: lt, name: 'Lietuvių' }, - lv: { data: lv, name: 'Latviešu' }, - ml: { data: ml, name: 'മലയാളം' }, - mn: { data: mn, name: 'Монгол хэл' }, - ms: { data: ms, name: 'بهاس ملايو' }, - nb: { data: nb, name: 'Norsk bokmål' }, - ne: { data: ne, name: 'नेपाली' }, - nl: { data: nl, name: 'Nederlands' }, - nn: { data: nn, name: 'Norsk nynorsk' }, - pl: { data: pl, name: 'Polski' }, - pt: { data: pt, name: 'Português' }, - pt_BR: { data: pt_BR, name: 'Português (Brasil)' }, - ro: { data: ro, name: 'Română' }, - ru: { data: ru, name: 'Русский' }, - si: { data: si, name: 'සිංහල' }, - sk: { data: sk, name: 'Slovenčina' }, - sl: { data: sl, name: 'Slovenščina' }, - sq: { data: sq, name: 'Shqipëria' }, - sr: { data: sr, name: 'Srpski' }, - sv: { data: sv, name: 'Svenska' }, - ta: { data: ta, name: 'தமிழ்' }, - th: { data: th, name: 'ไทย' }, - tr: { data: tr, name: 'Türkçe' }, - uk: { data: uk, name: 'Українська' }, - uz: { data: uz, name: 'Oʻzbekcha' }, - vi: { data: vi, name: 'Tiếng Việt' }, - zh: { data: zh, name: '中文' }, - zh_TW: { data: zh_TW, name: '中文 (Taiwan)' }, + 'af': { data: af, name: 'Afrikaans' }, + 'ar': { data: ar, name: 'العربية' }, + 'az': { data: az, name: 'Azərbaycanca' }, + 'bg': { data: bg, name: 'Български' }, + 'bn': { data: bn, name: 'বাংলা' }, + 'cs': { data: cs, name: 'Čeština' }, + 'de': { data: de, name: 'Deutsch' }, + 'da': { data: da, name: 'Dansk' }, + 'el': { data: el, name: 'Ελληνικά' }, + 'en': { data: en, name: 'English' }, + 'es': { data: es, name: 'Español' }, + 'fa': { data: fa, name: 'فارسی' }, + 'fi': { data: fi, name: 'Suomi' }, + 'fr': { data: fr, name: 'Français' }, + 'he': { data: he, name: 'עברית' }, + 'hi': { data: hi, name: 'हिन्दी' }, + 'hr': { data: hr, name: 'Hrvatski' }, + 'hu': { data: hu, name: 'Magyar' }, + 'id': { data: id, name: 'Bahasa Indonesia' }, + 'it': { data: it, name: 'Italiano' }, + 'ja': { data: ja, name: '日本語' }, + 'ka': { data: ka, name: 'ქართული' }, + 'kk': { data: kk, name: 'Қазақша' }, + 'ko': { data: ko, name: '한국어' }, + 'km': { data: km, name: 'ភាសាខ្មែរ' }, + 'lo': { data: lo, name: 'ລາວ' }, + 'lt': { data: lt, name: 'Lietuvių' }, + 'lv': { data: lv, name: 'Latviešu' }, + 'ml': { data: ml, name: 'മലയാളം' }, + 'mn': { data: mn, name: 'Монгол хэл' }, + 'ms': { data: ms, name: 'بهاس ملايو' }, + 'nb': { data: nb, name: 'Norsk bokmål' }, + 'ne': { data: ne, name: 'नेपाली' }, + 'nl': { data: nl, name: 'Nederlands' }, + 'nn': { data: nn, name: 'Norsk nynorsk' }, + 'pl': { data: pl, name: 'Polski' }, + 'pt': { data: pt, name: 'Português' }, + 'pt_BR': { data: pt_BR, name: 'Português (Brasil)' }, + 'ro': { data: ro, name: 'Română' }, + 'ru': { data: ru, name: 'Русский' }, + 'si': { data: si, name: 'සිංහල' }, + 'sk': { data: sk, name: 'Slovenčina' }, + 'sl': { data: sl, name: 'Slovenščina' }, + 'sq': { data: sq, name: 'Shqipëria' }, + 'sr': { data: sr, name: 'Srpski' }, + 'sv': { data: sv, name: 'Svenska' }, + 'ta': { data: ta, name: 'தமிழ்' }, + 'th': { data: th, name: 'ไทย' }, + 'tr': { data: tr, name: 'Türkçe' }, + 'uk': { data: uk, name: 'Українська' }, + 'uz': { data: uz, name: 'Oʻzbekcha' }, + 'vi': { data: vi, name: 'Tiếng Việt' }, + 'zh': { data: zh, name: '中文' }, + 'zh_TW': { data: zh_TW, name: '中文 (Taiwan)' } }; -const languages = window.navigator.languages !== undefined ? window.navigator.languages.slice() : []; -let language = window.navigator.userLanguage || window.navigator.language; +export const languageList = Object.entries(supportedLanguages).map((values) => ({ code: values[0], name: values[1].name })); + +const languages = localStorage.getItem('language') ? [localStorage.getItem('language')] : (window.navigator.languages !== undefined ? window.navigator.languages.slice() : []); + +let language = localStorage.getItem('language') || window.navigator.userLanguage || window.navigator.language; + languages.push(language); languages.push(language.substring(0, 2)); languages.push('en'); for (let i = 0; i < languages.length; i++) { language = languages[i].replace('-', '_'); + if (language in supportedLanguages) { break; } @@ -128,8 +139,60 @@ for (let i = 0; i < languages.length; i++) { } } -const selectedLanguage = supportedLanguages[language]; +let selectedLanguage = supportedLanguages[language]; + +export const findStringKeys = (predicate) => { + return Object.keys(selectedLanguage.data).filter(predicate); +} + +export default key => { + return selectedLanguage.data[key]; +}; + +const rtlLangueges = ['ar', 'he', 'fa']; +const isRtl = (language) => rtlLangueges.indexOf(language) > -1; + +export const setSelectedLanguage = (language) => { + selectedLanguage = supportedLanguages[language]; + localStorage.setItem('language', language); + localStorage.setItem('direction', isRtl(language) ? 'rtl' : 'ltr'); +} + +export const defaultLanguage = language; +const defaultDirection = localStorage.getItem('direction') || 'ltr'; + +export const LocalizationContext = createContext({ + direction: defaultDirection, + language +}); + +const jss = create({ plugins: [...jssPreset().plugins, rtl()] }); -export const findStringKeys = (predicate) => Object.keys(selectedLanguage.data).filter(predicate); +export function LocalizationProvider(props) { + const [language, setLanguage] = useState(defaultLanguage); + + const [direction, setDirection] = useState(defaultDirection); + + const handleLanguageChange = (nextLanguage) => { + setSelectedLanguage(nextLanguage); + setLanguage(nextLanguage); + setDirection(isRtl(nextLanguage) ? 'rtl' : 'ltr'); + }; + + useEffect(() => { + theme.direction = direction; + window.document.body.dir = direction + }, [direction]) + + return + + + {props.children} + + + +} -export default (key) => selectedLanguage.data[key]; +export const useLocalization = () => { + return useContext(LocalizationContext); +} \ No newline at end of file diff --git a/modern/src/components/registration/LoginForm.js b/modern/src/components/registration/LoginForm.js index e6da05e3..c5c1d6f2 100644 --- a/modern/src/components/registration/LoginForm.js +++ b/modern/src/components/registration/LoginForm.js @@ -6,7 +6,7 @@ import { useTheme } from '@material-ui/core/styles'; import { useDispatch, useSelector } from 'react-redux'; import { useHistory } from 'react-router-dom'; import { sessionActions } from '../../store'; -import t from '../../common/localization'; +import t, { useLocalization } from '../../common/localization'; import StartPage from '../../StartPage'; const useStyles = makeStyles((theme) => ({ @@ -24,6 +24,7 @@ const LoginForm = () => { const dispatch = useDispatch(); const history = useHistory(); const theme = useTheme(); + const { language, languageList, setLanguage } = useLocalization(); const [failed, setFailed] = useState(false); const [email, setEmail] = useState(''); @@ -61,16 +62,20 @@ const LoginForm = () => { } }; + const handleLanguageChange = e => { + setLanguage(e.target.value); + } + return ( {useMediaQuery(theme.breakpoints.down('md')) && ( - - - - - + + + + + )} { {t('loginLanguage')} - + {languageList.map(lang => {lang.name})} {emailEnabled && ( - - - history.push('/reset-password')} className={classes.resetPassword} underline="none">{t('loginReset')} + + + history.push('/reset-password')} className={classes.resetPassword} underline="none">{t('loginReset')} + - )} ); + }; export default LoginForm; diff --git a/modern/src/components/registration/RegisterForm.js b/modern/src/components/registration/RegisterForm.js index 06f53551..3a249c60 100644 --- a/modern/src/components/registration/RegisterForm.js +++ b/modern/src/components/registration/RegisterForm.js @@ -1,11 +1,12 @@ import React, { useState } from 'react'; import { - Grid, Button, TextField, Typography, Link, makeStyles, Snackbar, + Grid, Button, TextField, Typography, Link, makeStyles, Snackbar, useTheme, } from '@material-ui/core'; import { useHistory } from 'react-router-dom'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; import StartPage from '../../StartPage'; import t from '../../common/localization'; +import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; const useStyles = makeStyles((theme) => ({ register: { @@ -30,6 +31,7 @@ const RegisterForm = () => { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [snackbarOpen, setSnackbarOpen] = useState(false); + const theme = useTheme(); const submitDisabled = () => !name || !/(.+)@(.+)\.(.{2,})/.test(email) || !password; @@ -59,7 +61,7 @@ const RegisterForm = () => { history.push('/login')}> - + {theme.direction === 'rtl' ? : } diff --git a/modern/src/map/CurrentLocationMap.js b/modern/src/map/CurrentLocationMap.js index 69724ce1..c875662d 100644 --- a/modern/src/map/CurrentLocationMap.js +++ b/modern/src/map/CurrentLocationMap.js @@ -1,9 +1,14 @@ import maplibregl from 'maplibre-gl'; import { useEffect } from 'react'; +import { useLocalization } from '../common/localization'; import { map } from './Map'; const CurrentLocationMap = () => { + const {direction} = useLocalization(); + useEffect(() => { + const controlsPosition = direction ==='rtl' ? 'top-left' : 'top-right'; + const control = new maplibregl.GeolocateControl({ positionOptions: { enableHighAccuracy: true, @@ -11,9 +16,9 @@ const CurrentLocationMap = () => { }, trackUserLocation: true, }); - map.addControl(control); + map.addControl(control,controlsPosition); return () => map.removeControl(control); - }, []); + }, [direction]); return null; }; diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js index 7dd1c2a8..16470ad6 100644 --- a/modern/src/map/Map.js +++ b/modern/src/map/Map.js @@ -8,7 +8,7 @@ import { SwitcherControl } from './switcher/switcher'; import deviceCategories from '../common/deviceCategories'; import { prepareIcon, loadImage } from './mapUtil'; import { styleCarto, styleMapbox, styleOsm } from './mapStyles'; -import t from '../common/localization'; +import t, { useLocalization } from '../common/localization'; import { useAttributePreference } from '../common/preferences'; import palette from '../theme/palette'; @@ -60,11 +60,7 @@ const initMap = async () => { map.on('load', initMap); -map.addControl(new maplibregl.NavigationControl({ - showCompass: false, -})); - -map.addControl(new SwitcherControl( +const switchingControl = new SwitcherControl( [ { title: t('mapOsm'), uri: styleOsm() }, { title: t('mapCarto'), uri: styleCarto() }, @@ -84,15 +80,37 @@ map.addControl(new SwitcherControl( }; waiting(); }, -)); +); + +const navigationControl = new maplibregl.NavigationControl({ + showCompass: false, +}) + +const addPrimaryControls = position => { + map.addControl(navigationControl, position); + map.addControl(switchingControl, position); +} + +const removePrimaryControls =()=> { + map.removeControl(navigationControl); + map.removeControl(switchingControl); +} + + const Map = ({ children }) => { const containerEl = useRef(null); - + const {direction} = useLocalization(); const [mapReady, setMapReady] = useState(false); const mapboxAccessToken = useAttributePreference('mapboxAccessToken'); + useEffect(()=>{ + const controlsPosition = direction ==='rtl' ? 'top-left' : 'top-right'; + addPrimaryControls(controlsPosition); + return removePrimaryControls; + },[direction]) + useEffect(() => { maplibregl.accessToken = mapboxAccessToken; }, [mapboxAccessToken]); diff --git a/modern/src/reports/ReportLayout.js b/modern/src/reports/ReportLayout.js index c231cd80..48e77451 100644 --- a/modern/src/reports/ReportLayout.js +++ b/modern/src/reports/ReportLayout.js @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; import { - Grid, Typography, Divider, Drawer, makeStyles, IconButton, Hidden, + Grid, Typography, Divider, Drawer, makeStyles, IconButton, Hidden, useTheme, } from '@material-ui/core'; import TimelineIcon from '@material-ui/icons/Timeline'; import PauseCircleFilledIcon from '@material-ui/icons/PauseCircleFilled'; @@ -10,6 +10,7 @@ import NotificationsActiveIcon from '@material-ui/icons/NotificationsActive'; import FormatListBulletedIcon from '@material-ui/icons/FormatListBulleted'; import TrendingUpIcon from '@material-ui/icons/TrendingUp'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; +import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import SideNav from '../components/SideNav'; import NavBar from '../components/NavBar'; @@ -66,6 +67,7 @@ const ReportLayout = ({ children, filter }) => { const location = useLocation(); const [openDrawer, setOpenDrawer] = useState(false); const [reportTitle, setReportTitle] = useState(); + const theme = useTheme(); useEffect(() => { routes.forEach((route) => { @@ -103,7 +105,7 @@ const ReportLayout = ({ children, filter }) => { history.push('/')} > - + {theme.direction === 'rtl' ? : } {t('reportTitle')} diff --git a/modern/src/settings/OptionsLayout/index.js b/modern/src/settings/OptionsLayout/index.js index 4a42e583..34721680 100644 --- a/modern/src/settings/OptionsLayout/index.js +++ b/modern/src/settings/OptionsLayout/index.js @@ -7,9 +7,11 @@ import { makeStyles, IconButton, Hidden, + useTheme, } from '@material-ui/core'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; +import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import SideNav from '../../components/SideNav'; import NavBar from '../../components/NavBar'; @@ -56,6 +58,7 @@ const OptionsLayout = ({ children }) => { const [openDrawer, setOpenDrawer] = useState(false); const [optionTitle, setOptionTitle] = useState(); const routes = useRoutes(); + const theme = useTheme(); useEffect(() => { const activeRoute = routes.find( @@ -87,7 +90,7 @@ const OptionsLayout = ({ children }) => { >
- + {theme.direction === 'rtl' ? : } {t('settingsTitle')} diff --git a/modern/src/theme/index.js b/modern/src/theme/index.js index dc0a35bf..bce3960b 100644 --- a/modern/src/theme/index.js +++ b/modern/src/theme/index.js @@ -7,6 +7,10 @@ const theme = createMuiTheme({ palette, overrides, dimensions, + typography : { + fontFamily : 'IranSans' + } + // direction : 'rtl' }); export default theme; -- cgit v1.2.3 From b18da8ebebca5d40fb58fa270530cb9b048ff6ec Mon Sep 17 00:00:00 2001 From: rahighi Date: Thu, 26 Aug 2021 12:07:45 +0430 Subject: removed font styles --- modern/.env | 2 +- modern/public/styles.css | 5 ----- modern/src/theme/index.js | 4 ---- 3 files changed, 1 insertion(+), 10 deletions(-) (limited to 'modern') diff --git a/modern/.env b/modern/.env index 209ce898..69efd744 100644 --- a/modern/.env +++ b/modern/.env @@ -1,2 +1,2 @@ SKIP_PREFLIGHT_CHECK=true -REACT_APP_URL_NAME='192.168.1.105:8082' +REACT_APP_URL_NAME='localhost:8082' diff --git a/modern/public/styles.css b/modern/public/styles.css index aca9e464..147c3e3f 100644 --- a/modern/public/styles.css +++ b/modern/public/styles.css @@ -14,8 +14,3 @@ canvas { .maplibregl-popup { max-width: 330px !important; } - -@font-face { - font-family: IranSans; - src: url('fonts/IRANSansWeb\(FaNum\).ttf'); -} \ No newline at end of file diff --git a/modern/src/theme/index.js b/modern/src/theme/index.js index bce3960b..dc0a35bf 100644 --- a/modern/src/theme/index.js +++ b/modern/src/theme/index.js @@ -7,10 +7,6 @@ const theme = createMuiTheme({ palette, overrides, dimensions, - typography : { - fontFamily : 'IranSans' - } - // direction : 'rtl' }); export default theme; -- cgit v1.2.3 From d4c38aa96f8404f3178031592e773a72b30df533 Mon Sep 17 00:00:00 2001 From: rahighi Date: Thu, 26 Aug 2021 13:11:23 +0430 Subject: Merge branch 'master' of https://github.com/traccar/traccar-web --- .eslintignore | 1 + .github/workflows/old.yml | 2 +- .gitignore | 1 + modern/src/map/AccuracyMap.js | 8 +++- modern/src/map/GeofenceMap.js | 16 ++++++-- modern/src/map/Map.js | 6 +-- modern/src/map/PositionsMap.js | 12 ++++-- modern/src/map/ReplayPathMap.js | 8 +++- modern/src/map/switcher/switcher.js | 11 +++++- package.json | 9 +++++ tools/minify.bat | 5 --- tools/minify.sh | 15 -------- tools/package.sh | 8 +++- web/app/view/map/BaseMap.js | 1 + web/l10n/af.json | 1 + web/l10n/ar.json | 1 + web/l10n/az.json | 1 + web/l10n/bg.json | 1 + web/l10n/bn.json | 1 + web/l10n/cs.json | 1 + web/l10n/da.json | 77 +++++++++++++++++++------------------ web/l10n/de.json | 1 + web/l10n/el.json | 1 + web/l10n/en.json | 2 + web/l10n/es.json | 1 + web/l10n/fa.json | 1 + web/l10n/fi.json | 1 + web/l10n/fr.json | 57 +++++++++++++-------------- web/l10n/he.json | 1 + web/l10n/hi.json | 1 + web/l10n/hr.json | 1 + web/l10n/hu.json | 1 + web/l10n/id.json | 1 + web/l10n/it.json | 1 + web/l10n/ja.json | 1 + web/l10n/ka.json | 1 + web/l10n/kk.json | 1 + web/l10n/km.json | 1 + web/l10n/ko.json | 1 + web/l10n/lo.json | 1 + web/l10n/lt.json | 1 + web/l10n/lv.json | 1 + web/l10n/ml.json | 1 + web/l10n/mn.json | 1 + web/l10n/ms.json | 1 + web/l10n/nb.json | 1 + web/l10n/ne.json | 1 + web/l10n/nl.json | 7 ++-- web/l10n/nn.json | 1 + web/l10n/pl.json | 1 + web/l10n/pt.json | 1 + web/l10n/pt_BR.json | 11 +++--- web/l10n/ro.json | 1 + web/l10n/ru.json | 47 +++++++++++----------- web/l10n/si.json | 1 + web/l10n/sk.json | 1 + web/l10n/sl.json | 1 + web/l10n/sq.json | 1 + web/l10n/sr.json | 1 + web/l10n/sv.json | 1 + web/l10n/ta.json | 1 + web/l10n/th.json | 1 + web/l10n/tr.json | 1 + web/l10n/uk.json | 1 + web/l10n/uz.json | 1 + web/l10n/vi.json | 1 + web/l10n/zh.json | 59 ++++++++++++++-------------- web/l10n/zh_TW.json | 45 +++++++++++----------- web/load.js | 36 ++++++----------- 69 files changed, 279 insertions(+), 211 deletions(-) delete mode 100644 tools/minify.bat delete mode 100755 tools/minify.sh (limited to 'modern') diff --git a/.eslintignore b/.eslintignore index 84a8630d..efc30224 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,3 +2,4 @@ web/simple/app.js web/app.min.js web/load.js web/modern +web/lib diff --git a/.github/workflows/old.yml b/.github/workflows/old.yml index 2f9f39f0..747ddca0 100644 --- a/.github/workflows/old.yml +++ b/.github/workflows/old.yml @@ -14,5 +14,5 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 - - run: npm install + - run: npm install --ignore-scripts - run: npm run lint diff --git a/.gitignore b/.gitignore index 20824308..a9a9198e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ nbproject/ web/app.min.js web/modern +web/lib sencha-error-* node_modules package-lock.json diff --git a/modern/src/map/AccuracyMap.js b/modern/src/map/AccuracyMap.js index 4baa1054..5734ee82 100644 --- a/modern/src/map/AccuracyMap.js +++ b/modern/src/map/AccuracyMap.js @@ -36,8 +36,12 @@ const AccuracyMap = () => { }); return () => { - map.removeLayer(id); - map.removeSource(id); + if (map.getLayer(id)) { + map.removeLayer(id); + } + if (map.getSource(id)) { + map.removeSource(id); + } }; }, []); diff --git a/modern/src/map/GeofenceMap.js b/modern/src/map/GeofenceMap.js index d00cbb18..c0ecef40 100644 --- a/modern/src/map/GeofenceMap.js +++ b/modern/src/map/GeofenceMap.js @@ -56,10 +56,18 @@ const GeofenceMap = () => { }); return () => { - map.removeLayer('geofences-fill'); - map.removeLayer('geofences-line'); - map.removeLayer('geofences-title'); - map.removeSource(id); + if (map.getLayer('geofences-fill')) { + map.removeLayer('geofences-fill'); + } + if (map.getLayer('geofences-line')) { + map.removeLayer('geofences-line'); + } + if (map.getLayer('geofences-title')) { + map.removeLayer('geofences-title'); + } + if (map.getSource(id)) { + map.removeSource(id); + } }; }, []); diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js index 16470ad6..bcd9b9f0 100644 --- a/modern/src/map/Map.js +++ b/modern/src/map/Map.js @@ -60,7 +60,7 @@ const initMap = async () => { map.on('load', initMap); -const switchingControl = new SwitcherControl( +const switcher = new SwitcherControl( [ { title: t('mapOsm'), uri: styleOsm() }, { title: t('mapCarto'), uri: styleCarto() }, @@ -88,12 +88,12 @@ const navigationControl = new maplibregl.NavigationControl({ const addPrimaryControls = position => { map.addControl(navigationControl, position); - map.addControl(switchingControl, position); + map.addControl(switcher, position); } const removePrimaryControls =()=> { map.removeControl(navigationControl); - map.removeControl(switchingControl); + map.removeControl(switcher); } diff --git a/modern/src/map/PositionsMap.js b/modern/src/map/PositionsMap.js index 9719b45b..8d100534 100644 --- a/modern/src/map/PositionsMap.js +++ b/modern/src/map/PositionsMap.js @@ -148,9 +148,15 @@ const PositionsMap = ({ positions }) => { map.off('click', id, onMarkerClick); map.off('click', clusters, onClusterClick); - map.removeLayer(id); - map.removeLayer(clusters); - map.removeSource(id); + if (map.getLayer(id)) { + map.removeLayer(id); + } + if (map.getLayer(clusters)) { + map.removeLayer(clusters); + } + if (map.getSource(id)) { + map.removeSource(id); + } }; }, [onMarkerClick]); diff --git a/modern/src/map/ReplayPathMap.js b/modern/src/map/ReplayPathMap.js index 62b3f279..022548b7 100644 --- a/modern/src/map/ReplayPathMap.js +++ b/modern/src/map/ReplayPathMap.js @@ -31,8 +31,12 @@ const ReplayPathMap = ({ positions }) => { }); return () => { - map.removeLayer(id); - map.removeSource(id); + if (map.getLayer(id)) { + map.removeLayer(id); + } + if (map.getSource(id)) { + map.removeSource(id); + } }; }, []); diff --git a/modern/src/map/switcher/switcher.js b/modern/src/map/switcher/switcher.js index e9076aa6..cb7326f4 100644 --- a/modern/src/map/switcher/switcher.js +++ b/modern/src/map/switcher/switcher.js @@ -5,12 +5,17 @@ export class SwitcherControl { this.beforeSwitch = beforeSwitch; this.afterSwitch = afterSwitch; this.onDocumentClick = this.onDocumentClick.bind(this); + this.variables = {}; } getDefaultPosition() { return 'top-right'; } + setVariable(key, value) { + this.variables[key] = value; + } + onAdd(map) { this.map = map; this.controlContainer = document.createElement('div'); @@ -32,7 +37,11 @@ export class SwitcherControl { return; } this.beforeSwitch(); - this.map.setStyle(JSON.parse(srcElement.dataset.uri)); + let uri = JSON.parse(srcElement.dataset.uri); + if (typeof uri === 'string') { + Object.entries(this.variables).forEach(([key, value]) => uri = uri.replaceAll(`\{${key}}`, value)); + } + this.map.setStyle(uri); this.afterSwitch(); this.mapStyleContainer.style.display = 'none'; this.styleButton.style.display = 'block'; diff --git a/package.json b/package.json index 9e318572..eb87b1ac 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,18 @@ { "name": "traccar-web", + "dependencies": { + "extjs-gpl": "^6.2.0", + "ol": "^6.6.1", + "ol-layerswitcher": "^3.8.3", + "openlayers-dist": "^6.6.1", + "proj4": "^2.7.5" + }, "devDependencies": { "eslint": "^4.4.1" }, "scripts": { + "postinstall": "/bin/bash -c 'mkdir -p web/lib/{ol,ol-layerswitcher,proj4,extjs} && cp node_modules/openlayers-dist/{ol.js,ol.css} web/lib/ol/ && cp node_modules/ol-layerswitcher/dist/{ol-layerswitcher.js,ol-layerswitcher.css} web/lib/ol-layerswitcher/ && cp node_modules/proj4/dist/proj4.js web/lib/proj4/ && cp node_modules/extjs-gpl/build/ext-all.js web/lib/extjs/ && mkdir -p web/lib/extjs/classic && cp -r node_modules/extjs-gpl/build/classic/locale web/lib/extjs/classic/locale && cp -r node_modules/extjs-gpl/build/classic/theme-triton web/lib/extjs/classic/theme-triton && mkdir -p web/lib/extjs/packages/charts && cp -r node_modules/extjs-gpl/build/packages/charts/classic web/lib/extjs/packages/charts/classic'", + "build": "sencha compile --classpath=web/app.js,web/app,node_modules/extjs-gpl/packages/core/src,node_modules/extjs-gpl/packages/core/overrides,node_modules/extjs-gpl/classic/classic/src,node_modules/extjs-gpl/classic/classic/overrides exclude -all and include -recursive -file web/app.js and exclude -namespace=Ext and concatenate -closure web/app.min.js", "lint": "./node_modules/.bin/eslint web/." } } diff --git a/tools/minify.bat b/tools/minify.bat deleted file mode 100644 index bb350bf5..00000000 --- a/tools/minify.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -cd C:\[traccar path]\traccar\web -set SDK=C:\[sencha path]\ext-6.2.0 - -sencha -sdk %SDK% compile -classpath=app.js,app,%SDK%\packages\core\src,%SDK%\packages\core\overrides,%SDK%\classic\classic\src,%SDK%\classic\classic\overrides exclude -all and include -recursive -file app.js and exclude -namespace=Ext and concatenate -closure app.min.js diff --git a/tools/minify.sh b/tools/minify.sh deleted file mode 100755 index 0579d8ca..00000000 --- a/tools/minify.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -cd $(dirname $0)/../web - -# Use the value of $EXTJS_PATH if it is defined, '../../../ext-6.2.0' otherwise -EXT=${EXTJS_PATH:-'../../../ext-6.2.0'} - -sencha compile --classpath=app.js,app,$EXT/packages/core/src,$EXT/packages/core/overrides,$EXT/classic/classic/src,$EXT/classic/classic/overrides \ - exclude -all \ - and \ - include -recursive -file app.js \ - and \ - exclude -namespace=Ext \ - and \ - concatenate -closure app.min.js diff --git a/tools/package.sh b/tools/package.sh index 14be2a20..858d2405 100755 --- a/tools/package.sh +++ b/tools/package.sh @@ -2,9 +2,13 @@ cd $(dirname $0) -./minify.sh +cd .. -cd ../modern +rm -r web/lib +npm install --unsafe-perm +npm run build + +cd modern rm -r ../web/modern npm install diff --git a/web/app/view/map/BaseMap.js b/web/app/view/map/BaseMap.js index 0107acdc..b7c27ce1 100644 --- a/web/app/view/map/BaseMap.js +++ b/web/app/view/map/BaseMap.js @@ -183,6 +183,7 @@ Ext.define('Traccar.view.map.BaseMap', { if (typeof target === 'string') { target = Ext.get(target).dom; } + target.focus(); this.map.on('pointermove', function (e) { var hit = this.forEachFeatureAtPixel(e.pixel, function () { diff --git a/web/l10n/af.json b/web/l10n/af.json index d3589f39..0042f7a0 100644 --- a/web/l10n/af.json +++ b/web/l10n/af.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Sirkel", "mapShapePolyline": "Veelhoeklyn", "mapLiveRoutes": "Lewendige Routes", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Vlak", "stateTitle": "Toestand", "stateName": "Attribuut", diff --git a/web/l10n/ar.json b/web/l10n/ar.json index 4d636bd9..35a0654b 100644 --- a/web/l10n/ar.json +++ b/web/l10n/ar.json @@ -265,6 +265,7 @@ "mapShapeCircle": "دائرة", "mapShapePolyline": "متعدد الضلوع", "mapLiveRoutes": "مسار حي", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "طبقة POI نقاط الإهتمام", "stateTitle": "حالة", "stateName": "خاصية", diff --git a/web/l10n/az.json b/web/l10n/az.json index bf596978..ccc33ae7 100644 --- a/web/l10n/az.json +++ b/web/l10n/az.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Dairə", "mapShapePolyline": "Xətt", "mapLiveRoutes": "Canlı marşrutlar", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI təbəqə", "stateTitle": "Vəziyyət", "stateName": "Parametr", diff --git a/web/l10n/bg.json b/web/l10n/bg.json index a65b8b00..b299d375 100644 --- a/web/l10n/bg.json +++ b/web/l10n/bg.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Кръг", "mapShapePolyline": "Линия", "mapLiveRoutes": "Маршрут", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI слой", "stateTitle": "Състояние", "stateName": "Параметър", diff --git a/web/l10n/bn.json b/web/l10n/bn.json index 18dad38a..293f4425 100644 --- a/web/l10n/bn.json +++ b/web/l10n/bn.json @@ -265,6 +265,7 @@ "mapShapeCircle": "বৃত্ত / বৃত্তাকার", "mapShapePolyline": "পলিলাইন", "mapLiveRoutes": "Live Routes", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "State", "stateName": "বৈশিষ্ট্যাবলী / গুণাবলী", diff --git a/web/l10n/cs.json b/web/l10n/cs.json index 291c2e3e..d88620da 100644 --- a/web/l10n/cs.json +++ b/web/l10n/cs.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Kruh", "mapShapePolyline": "Křivka", "mapLiveRoutes": "Trasy živě", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "Vrstva s POI", "stateTitle": "Stav", "stateName": "Atribut", diff --git a/web/l10n/da.json b/web/l10n/da.json index 5868ace4..61ac5cd7 100644 --- a/web/l10n/da.json +++ b/web/l10n/da.json @@ -48,7 +48,7 @@ "sharedGallonAbbreviation": "gal", "sharedLiter": "Liter", "sharedImpGallon": "Motorhjelm", - "sharedUsGallon": "U.S. Gallon", + "sharedUsGallon": "Amerikansk gallon", "sharedLiterPerHourAbbreviation": "l/time", "sharedGetMapState": "Kort status", "sharedComputedAttribute": "Udregnet attribut", @@ -79,17 +79,17 @@ "sharedShowDetails": "Flere detailer", "sharedDisabled": "Deaktiveret", "sharedMaintenance": "Vedligeholdelse", - "sharedDeviceAccumulators": "Accumulators", + "sharedDeviceAccumulators": "Akkumulatorer", "sharedAlarms": "Alarmer", "sharedLocation": "Beliggenhed", "sharedImport": "Importer", "attributeSpeedLimit": "Hastigheds grænse", - "attributePolylineDistance": "Polyline Distance", + "attributePolylineDistance": "Polyline afstand", "attributeReportIgnoreOdometer": "Rapport: Ignorer odometer", "attributeWebReportColor": "Web : Rapport farve", "attributeDevicePassword": "Enheds kodeord", - "attributeDeviceInactivityStart": "Device Inactivity Start", - "attributeDeviceInactivityPeriod": "Device Inactivity Period", + "attributeDeviceInactivityStart": "Start af enhedens inaktivitet", + "attributeDeviceInactivityPeriod": "Enheds inaktivitetsperiode", "attributeProcessingCopyAttributes": "Bearbejder: Kopier attribut", "attributeColor": "Farve", "attributeWebLiveRouteLength": "Web: live rute længde", @@ -119,7 +119,7 @@ "errorGeneral": "ulovlig parameter ", "errorConnection": "Tilslutning fejl", "errorSocket": "Web tilslutnings fejl", - "errorZero": "Can't be zero", + "errorZero": "Kan ikke være nul", "userEmail": "Email", "userPassword": "Kodeord", "userAdmin": "Admin", @@ -132,13 +132,13 @@ "userToken": "Token", "loginTitle": "Log på", "loginLanguage": "Sprog", - "loginReset": "Reset Password", + "loginReset": "Nulstille kodeord", "loginRegister": "Registrer", "loginLogin": "Log på", "loginFailed": "Fejl i email adresse eller kodeord", "loginCreated": "Ny bruger er registreret", - "loginResetSuccess": "Check your email", - "loginUpdateSuccess": "New password is set", + "loginResetSuccess": "Tjek din e-mail", + "loginUpdateSuccess": "Ny adgangskode er indstillet", "loginLogout": "Log af", "loginLogo": "Logo", "devicesAndState": "Enheder og status", @@ -244,8 +244,8 @@ "serverAnnouncement": "Meddelelse", "mapTitle": "Kort", "mapLayer": "Kort opsætning", - "mapCustom": "Custom (XYZ)", - "mapCustomArcgis": "Custom (ArcGIS)", + "mapCustom": "Brugerdefineret (XYZ)", + "mapCustomArcgis": "Brugerdefineret (ArcGIS)", "mapCustomLabel": "Brugerdefineret kort", "mapCarto": "Carto Basemaps", "mapOsm": "Open Street Map", @@ -258,21 +258,22 @@ "mapYandexMap": "Yandex Kort", "mapYandexSat": "Yandex Satellit", "mapWikimedia": "Wikimedia", - "mapMapboxStreets": "Mapbox Streets", - "mapMapboxOutdoors": "Mapbox Outdoors", - "mapMapboxSatellite": "Mapbox Satellite", + "mapMapboxStreets": "Mapbox gader", + "mapMapboxOutdoors": "Mapbox udendørs", + "mapMapboxSatellite": "Mapbox satellit", "mapShapePolygon": "Polygon", "mapShapeCircle": "Cirkel", "mapShapePolyline": "Polyline", "mapLiveRoutes": "Live ruter", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Lag", "stateTitle": "Status", "stateName": "Parameter", "stateValue": "Værdi", "commandTitle": "Kommando", "commandSend": "Send", - "commandSent": "Command sent", - "commandQueued": "Command queued", + "commandSent": "Kommando sendt", + "commandQueued": "Kommando i kø", "commandUnit": "Enhed", "commandCustom": "Skræddersyet kommando", "commandDeviceIdentification": "Enheds id", @@ -288,7 +289,7 @@ "commandRequestPhoto": "Tag billede", "commandPowerOff": "Sluk for enhed", "commandRebootDevice": "Genstart enhed", - "commandFactoryReset": "Factory Reset", + "commandFactoryReset": "Gendan fabriksindstillinger", "commandSendSms": "send SMS", "commandSendUssd": "Send USSD", "commandSosNumber": "Angiv SOS nummer", @@ -296,7 +297,7 @@ "commandSetPhonebook": "Angiv telefonbog", "commandVoiceMessage": "Tale meddelelse", "commandOutputControl": "Output kontrol", - "commandVoiceMonitoring": "Voice Monitoring", + "commandVoiceMonitoring": "Stemmeovervågning", "commandSetAgps": "Konfigurer AGPS", "commandSetIndicator": "Gem indikator", "commandConfiguration": "Konfiguration", @@ -306,7 +307,7 @@ "commandSetOdometer": "Konfigurer kilometertæller", "commandGetModemStatus": "Hent Modem status", "commandGetDeviceStatus": "Hent enheds status", - "commandSetSpeedLimit": "Set Speed Limit", + "commandSetSpeedLimit": "Indstil hastighedsgrænse", "commandModePowerSaving": "Rediger strømbesparelse", "commandModeDeepSleep": "Rediger Deep Sleep", "commandMovementAlarm": "Bevægelsesalarm", @@ -325,13 +326,13 @@ "eventDeviceUnknown": "Status ukendt", "eventDeviceOffline": "Status offline", "eventDeviceInactive": "Enhed inaktiv", - "eventDeviceMoving": "Device moving", - "eventDeviceStopped": "Device stopped", + "eventDeviceMoving": "Enheden bevæger sig", + "eventDeviceStopped": "Enheden stoppet", "eventDeviceOverspeed": "Hastighedsgrænsen overskredet", - "eventDeviceFuelDrop": "Fuel drop", + "eventDeviceFuelDrop": "Brændstoffald", "eventCommandResult": "Resultat af kommando", - "eventGeofenceEnter": "Geofence entered", - "eventGeofenceExit": "Geofence exited", + "eventGeofenceEnter": "Geofence indtastet", + "eventGeofenceExit": "Geofence forladt", "eventAlarm": "Alarm", "eventIgnitionOn": "Tænding tændt", "eventIgnitionOff": "Tænding slukket", @@ -346,7 +347,7 @@ "alarmLowspeed": "Lav hastighed", "alarmOverspeed": "Hastighedsoverskridelse", "alarmFallDown": "Fald", - "alarmLowPower": "Low Power", + "alarmLowPower": "Lav strøm", "alarmLowBattery": "Lavt batteri", "alarmFault": "Fejl", "alarmPowerOff": "Sluk", @@ -357,27 +358,27 @@ "alarmGeofence": "Geofence", "alarmGeofenceEnter": "Geofence Enter", "alarmGeofenceExit": "Geofence Exit", - "alarmGpsAntennaCut": "GPS Antenna Cut", + "alarmGpsAntennaCut": "GPS-antennesnit", "alarmAccident": "Ulykke", "alarmTow": "Bugseret", - "alarmIdle": "Idle", - "alarmHighRpm": "High RPM", - "alarmHardAcceleration": "Hard Acceleration", - "alarmHardBraking": "Hard Braking", - "alarmHardCornering": "Hard Cornering", + "alarmIdle": "Ledig", + "alarmHighRpm": "Høj RPM", + "alarmHardAcceleration": "Hård acceleration", + "alarmHardBraking": "Hård bremsning", + "alarmHardCornering": "Hård sving", "alarmLaneChange": "Vognbaneskift", - "alarmFatigueDriving": "Fatigue Driving", + "alarmFatigueDriving": "Træthedskørsel", "alarmPowerCut": "Strømafbrydelse", "alarmPowerRestored": "Strøm genoprettet", - "alarmJamming": "Jamming", + "alarmJamming": "Fastklemning", "alarmTemperature": "Temperatur", "alarmParking": "Parkering", - "alarmShock": "Shock", + "alarmShock": "Stød", "alarmBonnet": "Motorhjelm", "alarmFootBrake": "Fodbremse", "alarmFuelLeak": "Brændstoflækage", - "alarmTampering": "Tampering", - "alarmRemoving": "Removing", + "alarmTampering": "Manipulering", + "alarmRemoving": "Fjerner", "notificationType": "Type af notifikation", "notificationAlways": "Alle enheder", "notificationNotificators": "Kanaler", @@ -451,7 +452,7 @@ "categoryTrolleybus": "Bybus", "categoryTruck": "Lastbil", "categoryVan": "Van", - "categoryScooter": "Scooter", - "maintenanceStart": "Start", + "categoryScooter": "scooter", + "maintenanceStart": "start", "maintenancePeriod": "Periode" } \ No newline at end of file diff --git a/web/l10n/de.json b/web/l10n/de.json index fcd458da..e20d8378 100644 --- a/web/l10n/de.json +++ b/web/l10n/de.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Kreis", "mapShapePolyline": "Polylinie", "mapLiveRoutes": "Live Route", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Ebene", "stateTitle": "Status", "stateName": "Parameter", diff --git a/web/l10n/el.json b/web/l10n/el.json index f13aac7e..6d6be3e2 100644 --- a/web/l10n/el.json +++ b/web/l10n/el.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Κύκλος", "mapShapePolyline": "Polyline", "mapLiveRoutes": "Live Routes", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "Κατάσταση", "stateName": "Παράμετρος", diff --git a/web/l10n/en.json b/web/l10n/en.json index 617a7e95..97243a69 100644 --- a/web/l10n/en.json +++ b/web/l10n/en.json @@ -261,6 +261,8 @@ "mapMapboxStreets": "Mapbox Streets", "mapMapboxOutdoors": "Mapbox Outdoors", "mapMapboxSatellite": "Mapbox Satellite", + "mapMapTilerBasic": "MapTiler Basic", + "mapMapTilerHybrid": "MapTiler Hybrid", "mapShapePolygon": "Polygon", "mapShapeCircle": "Circle", "mapShapePolyline": "Polyline", diff --git a/web/l10n/es.json b/web/l10n/es.json index c9dfbc08..5cdf7838 100644 --- a/web/l10n/es.json +++ b/web/l10n/es.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Círculo", "mapShapePolyline": "Polilínea", "mapLiveRoutes": "Rutas en vivo", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "Capa POI", "stateTitle": "Estado", "stateName": "Parámetro", diff --git a/web/l10n/fa.json b/web/l10n/fa.json index 1e3b4e8b..1a77883f 100644 --- a/web/l10n/fa.json +++ b/web/l10n/fa.json @@ -265,6 +265,7 @@ "mapShapeCircle": "دایره ", "mapShapePolyline": "چند خطی", "mapLiveRoutes": "تعقیب مسیر", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "لایه POI", "stateTitle": "وضعیت", "stateName": "ویژگی", diff --git a/web/l10n/fi.json b/web/l10n/fi.json index b783d57d..2b37d75a 100644 --- a/web/l10n/fi.json +++ b/web/l10n/fi.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Ympyrä", "mapShapePolyline": "Murtoviiva", "mapLiveRoutes": "Live-reitit", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "Kohdepistetaso", "stateTitle": "Tila", "stateName": "Ominaisuus", diff --git a/web/l10n/fr.json b/web/l10n/fr.json index effe4d3d..076981ac 100644 --- a/web/l10n/fr.json +++ b/web/l10n/fr.json @@ -8,8 +8,8 @@ "sharedEdit": "Editer", "sharedRemove": "Effacer", "sharedRemoveConfirm": "Effacer objet?", - "sharedYes": "Yes", - "sharedNo": "No", + "sharedYes": "Oui", + "sharedNo": "Non", "sharedKm": "km", "sharedMi": "mi", "sharedNmi": "nmi", @@ -23,8 +23,8 @@ "sharedHours": "heures", "sharedMinutes": "minutes", "sharedDecimalDegrees": "Degrés Décimaux", - "sharedDegreesDecimalMinutes": "Dégrés Décimaux Minutes", - "sharedDegreesMinutesSeconds": "Dégrés Minutes Secondes", + "sharedDegreesDecimalMinutes": "Degrés Décimaux Minutes", + "sharedDegreesMinutesSeconds": "Degrés Minutes Secondes", "sharedName": "Nom", "sharedDescription": "Description", "sharedSearch": "Recherche", @@ -65,7 +65,7 @@ "sharedRequired": "Requis", "sharedPreferences": "Préférences", "sharedPermissions": "Permissions", - "sharedConnections": "Connections", + "sharedConnections": "Connexions", "sharedExtra": "Extra", "sharedTypeString": "Chaîne de caractères", "sharedTypeNumber": "Nombre", @@ -76,20 +76,20 @@ "sharedSavedCommands": "Commandes sauvegardées ", "sharedNew": "Nouveau", "sharedShowAddress": "Montrer adresse", - "sharedShowDetails": "More Details", + "sharedShowDetails": "Plus de détails", "sharedDisabled": "Désactivé", "sharedMaintenance": "Entretien", "sharedDeviceAccumulators": "Accumulateurs", "sharedAlarms": "Alarmes", - "sharedLocation": "Location", - "sharedImport": "Import", + "sharedLocation": "Localisation", + "sharedImport": "Importer", "attributeSpeedLimit": "Limite de vitesse", "attributePolylineDistance": "Distance polyligne", "attributeReportIgnoreOdometer": "Rapport: Ignorer l'odomètre", "attributeWebReportColor": "Web: couleur du rapport", "attributeDevicePassword": "Mot de passe de l'appareil", - "attributeDeviceInactivityStart": "Device Inactivity Start", - "attributeDeviceInactivityPeriod": "Device Inactivity Period", + "attributeDeviceInactivityStart": "Début d'inactivité de l'appareil", + "attributeDeviceInactivityPeriod": "Période d'inactivité de l'appareil", "attributeProcessingCopyAttributes": "En cours: Copie des attributs", "attributeColor": "Couleur", "attributeWebLiveRouteLength": "Web: Longueur de route en temps réel", @@ -112,9 +112,9 @@ "attributeUiDisableDrivers": "UI: Désactiver les conducteurs", "attributeUiDisableComputedAttributes": "UI: Désactiver les attributs calculés", "attributeUiDisableCalendars": "UI: Désactiver les calendiers", - "attributeUiDisableMaintenance": "UI/ Désactiver l'entretien", + "attributeUiDisableMaintenance": "UI: Désactiver l'entretien", "attributeUiHidePositionAttributes": "UI: Cacher Attributs de Position", - "attributeNotificationTokens": "Notification Tokens", + "attributeNotificationTokens": "Jeton de notification", "errorTitle": "Erreur", "errorGeneral": "Paramètres invalides ou violation de contrainte", "errorConnection": "Erreur de connexion", @@ -132,13 +132,13 @@ "userToken": "Jeton", "loginTitle": "Identification", "loginLanguage": "Langue", - "loginReset": "Reset Password", + "loginReset": "Réinitialiser le mot de passe", "loginRegister": "Inscription", "loginLogin": "Se connecter", "loginFailed": "Adresse email ou mot de passe incorrect", "loginCreated": "Nouvel utilisateur enregistré", - "loginResetSuccess": "Check your email", - "loginUpdateSuccess": "New password is set", + "loginResetSuccess": "Vérifiez vos emails", + "loginUpdateSuccess": "Le nouveau mot de passe est défini", "loginLogout": "Déconnexion", "loginLogo": "Logo", "devicesAndState": "Appareils et État", @@ -241,7 +241,7 @@ "serverRegistration": "Inscription", "serverReadonly": "Lecture seule", "serverForceSettings": "Forcer les paramètres", - "serverAnnouncement": "Announcement", + "serverAnnouncement": "Avis", "mapTitle": "Carte", "mapLayer": "Couche cartographique", "mapCustom": "Personnalisé (XYZ)", @@ -265,6 +265,7 @@ "mapShapeCircle": "Cercle", "mapShapePolyline": "Polyligne", "mapLiveRoutes": "Routes en direct", + "mapCurrentLocation": "Localisation actuelle", "mapPoiLayer": "Couche Point d'intérêt", "stateTitle": "État", "stateName": "Paramètre", @@ -283,12 +284,12 @@ "commandEngineResume": "Démarrage moteur", "commandAlarmArm": "Activer l'alarme", "commandAlarmDisarm": "Désactiver l'alarme", - "commandAlarmDismiss": "Dismiss Alarm", + "commandAlarmDismiss": "Ignorer l'alarme", "commandSetTimezone": "Régler le fuseau horaire", "commandRequestPhoto": "Demander une photo", "commandPowerOff": "Eteindre l'appareil", "commandRebootDevice": "Redémarrer l'appareil", - "commandFactoryReset": "Factory Reset", + "commandFactoryReset": "Réinitialisation d'usine", "commandSendSms": "Envoyer un SMS", "commandSendUssd": "Envoyer un USSD", "commandSosNumber": "Régler le n° SOS", @@ -306,14 +307,14 @@ "commandSetOdometer": "Fixer l'odomètre", "commandGetModemStatus": "Acquérir le statut du modem", "commandGetDeviceStatus": "Acquérir le statut du périphérique", - "commandSetSpeedLimit": "Set Speed Limit", + "commandSetSpeedLimit": "Définir la limite de vitesse", "commandModePowerSaving": "Modifier la sauvegarde de courant", "commandModeDeepSleep": "Modifier le sommeil profond", "commandMovementAlarm": "Alarme mouvement", "commandFrequency": "Fréquence", "commandTimezone": "Décalage horaire", "commandMessage": "Message", - "commandRadius": "rayon", + "commandRadius": "Rayon", "commandEnable": "Activer", "commandData": "Données", "commandIndex": "Index", @@ -324,7 +325,7 @@ "eventDeviceOnline": "Statut: en ligne", "eventDeviceUnknown": "Statut: inconnu", "eventDeviceOffline": "Statut: hors ligne", - "eventDeviceInactive": "Device inactive", + "eventDeviceInactive": "Appareil inactif", "eventDeviceMoving": "Appareil en mouvement", "eventDeviceStopped": "Appareil arrêté", "eventDeviceOverspeed": "Vitesse limite dépassée", @@ -392,7 +393,7 @@ "reportTrips": "Trajets", "reportStops": "Arrêts", "reportSummary": "Résumé", - "reportDaily": "Daily Summary", + "reportDaily": "Rapport journalier", "reportChart": "Graphique", "reportConfigure": "Configurer", "reportEventTypes": "Types d'évènements", @@ -404,8 +405,8 @@ "reportCustom": "Personnalisé", "reportToday": "Aujourd'hui", "reportYesterday": "Hier", - "reportThisWeek": "Cette Semaine", - "reportPreviousWeek": "La Semaine dernière", + "reportThisWeek": "Cette semaine", + "reportPreviousWeek": "La semaine dernière", "reportThisMonth": "Ce mois-ci", "reportPreviousMonth": "Le mois dernier", "reportDeviceName": "Nom de l'appareil", @@ -413,8 +414,8 @@ "reportMaximumSpeed": "Vitesse maximum", "reportEngineHours": "Heures du moteur", "reportDuration": "Durée", - "reportStartDate": "Start Date", - "reportStartTime": "Date de départ", + "reportStartDate": "Date de départ", + "reportStartTime": "Heure de départ", "reportStartAddress": "Adresse de départ", "reportEndTime": "Date de fin", "reportEndAddress": "Adresse de fin", @@ -430,7 +431,7 @@ "statisticsMessagesStored": "Messages stockés", "statisticsGeocoder": "Requêtes de géocodage", "statisticsGeolocation": "Requêtes de géolocalisation", - "categoryArrow": "Flêche", + "categoryArrow": "Flèche", "categoryDefault": "Par défaut", "categoryAnimal": "Animal", "categoryBicycle": "Vélo", @@ -440,7 +441,7 @@ "categoryCrane": "Grue", "categoryHelicopter": "Hélicoptère", "categoryMotorcycle": "Moto", - "categoryOffroad": "Véhicule tout terrains", + "categoryOffroad": "Véhicule tout-terrain", "categoryPerson": "Personne", "categoryPickup": "Pickup", "categoryPlane": "Avion", diff --git a/web/l10n/he.json b/web/l10n/he.json index 6a0b6ac8..53985e7e 100644 --- a/web/l10n/he.json +++ b/web/l10n/he.json @@ -265,6 +265,7 @@ "mapShapeCircle": "מעגל", "mapShapePolyline": "צלע", "mapLiveRoutes": "מסלול נסיעה", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "שכבת נק' עניין", "stateTitle": "מצב", "stateName": "תכונה", diff --git a/web/l10n/hi.json b/web/l10n/hi.json index a50cb8dc..6e18ec5d 100644 --- a/web/l10n/hi.json +++ b/web/l10n/hi.json @@ -265,6 +265,7 @@ "mapShapeCircle": "वृत्त", "mapShapePolyline": "पाली लाइन", "mapLiveRoutes": "लाइव मार्ग", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "पीओआई परत", "stateTitle": "स्थिति / अवस्ता", "stateName": "गुण", diff --git a/web/l10n/hr.json b/web/l10n/hr.json index 70ade902..7f0c44bf 100644 --- a/web/l10n/hr.json +++ b/web/l10n/hr.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Krug", "mapShapePolyline": "Razlomljena linija", "mapLiveRoutes": "Rute uživo", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "Točke interesa sloj", "stateTitle": "Stanje", "stateName": "Atribut", diff --git a/web/l10n/hu.json b/web/l10n/hu.json index e50caf6e..18b56b13 100644 --- a/web/l10n/hu.json +++ b/web/l10n/hu.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Kör", "mapShapePolyline": "Vonallánc", "mapLiveRoutes": "Élő útvonalak", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI réteg", "stateTitle": "Helyzet", "stateName": "Paraméter", diff --git a/web/l10n/id.json b/web/l10n/id.json index ec7c7b8a..657e23f6 100644 --- a/web/l10n/id.json +++ b/web/l10n/id.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Lingkaran", "mapShapePolyline": "Garis Poli", "mapLiveRoutes": "Rute Aktif", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "Status", "stateName": "Atribut", diff --git a/web/l10n/it.json b/web/l10n/it.json index a3b89427..d727a0fb 100644 --- a/web/l10n/it.json +++ b/web/l10n/it.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Cerchio", "mapShapePolyline": "Polylinea", "mapLiveRoutes": "Diretta Tragitti", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "Layer POI", "stateTitle": "Stato", "stateName": "Attributo", diff --git a/web/l10n/ja.json b/web/l10n/ja.json index 480db1a2..61df9977 100644 --- a/web/l10n/ja.json +++ b/web/l10n/ja.json @@ -265,6 +265,7 @@ "mapShapeCircle": "円形", "mapShapePolyline": "折れ線形", "mapLiveRoutes": "リアルタイム経路", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI レイヤー", "stateTitle": "詳細", "stateName": "属性", diff --git a/web/l10n/ka.json b/web/l10n/ka.json index 8c547fd7..0acc10a0 100644 --- a/web/l10n/ka.json +++ b/web/l10n/ka.json @@ -265,6 +265,7 @@ "mapShapeCircle": "წრე", "mapShapePolyline": "ტეხილი ხაზები", "mapLiveRoutes": "ცოცხალი მარშრუტები", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI ფენა", "stateTitle": "სტატუსი", "stateName": "ატრიბუტი", diff --git a/web/l10n/kk.json b/web/l10n/kk.json index 7bed9b4c..a6589312 100644 --- a/web/l10n/kk.json +++ b/web/l10n/kk.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Шеңбер", "mapShapePolyline": "Сызық", "mapLiveRoutes": "Нақты бағыттар", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "Жай күйі", "stateName": "Параметрі", diff --git a/web/l10n/km.json b/web/l10n/km.json index 3c6935bf..9b3e24fa 100644 --- a/web/l10n/km.json +++ b/web/l10n/km.json @@ -265,6 +265,7 @@ "mapShapeCircle": "រង្វង់", "mapShapePolyline": "ពហុបន្ទាត់", "mapLiveRoutes": "ផ្លូវបន្តផ្ទាល់", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "សភាព", "stateName": "គុណលក្ខណៈ", diff --git a/web/l10n/ko.json b/web/l10n/ko.json index 6e30b9ae..3a2ebe20 100644 --- a/web/l10n/ko.json +++ b/web/l10n/ko.json @@ -265,6 +265,7 @@ "mapShapeCircle": "원형", "mapShapePolyline": "폴리라인", "mapLiveRoutes": "실시간 경로", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "상태", "stateName": "속성", diff --git a/web/l10n/lo.json b/web/l10n/lo.json index d45e14e9..12c8ddf0 100644 --- a/web/l10n/lo.json +++ b/web/l10n/lo.json @@ -265,6 +265,7 @@ "mapShapeCircle": "ວົງກົມ", "mapShapePolyline": "Polyline", "mapLiveRoutes": "Live Routes", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "ສະຖານະ", "stateName": "ຄຸນລັກສະນະ", diff --git a/web/l10n/lt.json b/web/l10n/lt.json index 9eb577cf..228a26a5 100644 --- a/web/l10n/lt.json +++ b/web/l10n/lt.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Apskritimas", "mapShapePolyline": "Polilinija", "mapLiveRoutes": "Tiesioginiai maršrutai", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "Lankytinų vietų sluoksnis", "stateTitle": "Būklė", "stateName": "Parametras", diff --git a/web/l10n/lv.json b/web/l10n/lv.json index 920b6cdf..b387aa78 100644 --- a/web/l10n/lv.json +++ b/web/l10n/lv.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Aplis", "mapShapePolyline": "Lauzta līnija", "mapLiveRoutes": "Reāllaika Maršruti", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Slānis", "stateTitle": "Stāvoklis", "stateName": "Īpašības", diff --git a/web/l10n/ml.json b/web/l10n/ml.json index 0bb44495..9ce6d1a0 100644 --- a/web/l10n/ml.json +++ b/web/l10n/ml.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Circle", "mapShapePolyline": "Polyline", "mapLiveRoutes": "Live Routes", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "State", "stateName": "Attribute", diff --git a/web/l10n/mn.json b/web/l10n/mn.json index 8fe305c4..7675707e 100644 --- a/web/l10n/mn.json +++ b/web/l10n/mn.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Circle", "mapShapePolyline": "Polyline", "mapLiveRoutes": "Live Routes", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "State", "stateName": "Attribute", diff --git a/web/l10n/ms.json b/web/l10n/ms.json index 7b6ee99e..f94b432d 100644 --- a/web/l10n/ms.json +++ b/web/l10n/ms.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Circle", "mapShapePolyline": "Polyline", "mapLiveRoutes": "Live Routes", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "Negeri", "stateName": "Atribut", diff --git a/web/l10n/nb.json b/web/l10n/nb.json index eaaaa748..dbf5785f 100644 --- a/web/l10n/nb.json +++ b/web/l10n/nb.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Sirkel", "mapShapePolyline": "Polylinje", "mapLiveRoutes": "Live rute", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI-lag", "stateTitle": "Status", "stateName": "Egenskap", diff --git a/web/l10n/ne.json b/web/l10n/ne.json index ea610df1..c6b0db49 100644 --- a/web/l10n/ne.json +++ b/web/l10n/ne.json @@ -265,6 +265,7 @@ "mapShapeCircle": "वृत्त", "mapShapePolyline": "बहुरेखा", "mapLiveRoutes": "Live Routes", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "अवस्था ", "stateName": "बिषेशता", diff --git a/web/l10n/nl.json b/web/l10n/nl.json index d06f3dab..4447ed53 100644 --- a/web/l10n/nl.json +++ b/web/l10n/nl.json @@ -132,13 +132,13 @@ "userToken": "Token", "loginTitle": "Inloggen", "loginLanguage": "Taal", - "loginReset": "Reset Password", + "loginReset": "Wachtwoord herstellen", "loginRegister": "Registreren", "loginLogin": "Inloggen", "loginFailed": "Onjuist e-mailadres of wachtwoord", "loginCreated": "De nieuwe gebruiker is geregistreerd", - "loginResetSuccess": "Check your email", - "loginUpdateSuccess": "New password is set", + "loginResetSuccess": "Check je e-mail", + "loginUpdateSuccess": "Het wachtwoord is ingesteld", "loginLogout": "Afmelden", "loginLogo": "Logo", "devicesAndState": "Apparaten en status", @@ -265,6 +265,7 @@ "mapShapeCircle": "Cirkel", "mapShapePolyline": "Polylijn", "mapLiveRoutes": "Live routes", + "mapCurrentLocation": "Huidige locatie", "mapPoiLayer": "POI laag", "stateTitle": "Status", "stateName": "Parameter", diff --git a/web/l10n/nn.json b/web/l10n/nn.json index 1c2e106e..d275369b 100644 --- a/web/l10n/nn.json +++ b/web/l10n/nn.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Sirkel", "mapShapePolyline": "Polylinje", "mapLiveRoutes": "Live ruter", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI-lag", "stateTitle": "Status", "stateName": "Eigenskap", diff --git a/web/l10n/pl.json b/web/l10n/pl.json index f1011b7c..d67da1e8 100644 --- a/web/l10n/pl.json +++ b/web/l10n/pl.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Okrąg", "mapShapePolyline": "Krzywa", "mapLiveRoutes": "Ścieżki na żywo", + "mapCurrentLocation": "Aktualna lokalizacja", "mapPoiLayer": "Warstwa POI", "stateTitle": "Stan i lokalizacja", "stateName": "Właściwość", diff --git a/web/l10n/pt.json b/web/l10n/pt.json index 1051a3e1..1f76ad7d 100644 --- a/web/l10n/pt.json +++ b/web/l10n/pt.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Circulo", "mapShapePolyline": "Linha Polígono", "mapLiveRoutes": "Rotas ao Vivo", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "Camada POI", "stateTitle": "Estado", "stateName": "Parâmetro", diff --git a/web/l10n/pt_BR.json b/web/l10n/pt_BR.json index c36b00c9..8a22b3aa 100644 --- a/web/l10n/pt_BR.json +++ b/web/l10n/pt_BR.json @@ -132,13 +132,13 @@ "userToken": "Token", "loginTitle": "Login", "loginLanguage": "Idioma", - "loginReset": "Reset Password", + "loginReset": "Redefinir senha", "loginRegister": "Registrar", "loginLogin": "Entrar", "loginFailed": "Email ou senha incorretos", "loginCreated": "Novo usuário registrado", - "loginResetSuccess": "Check your email", - "loginUpdateSuccess": "New password is set", + "loginResetSuccess": "Verifique seu e-mail", + "loginUpdateSuccess": "Nova senha definida", "loginLogout": "Sair", "loginLogo": "Logotipo", "devicesAndState": "Dispositivo e Estado", @@ -265,6 +265,7 @@ "mapShapeCircle": "Círculo", "mapShapePolyline": "Polilinha", "mapLiveRoutes": "Rotas ao Vivo", + "mapCurrentLocation": "Localização atual", "mapPoiLayer": "Camada POI", "stateTitle": "Estado", "stateName": "Atributo", @@ -288,7 +289,7 @@ "commandRequestPhoto": "Pegar foto", "commandPowerOff": "Desligar o Dispositivo", "commandRebootDevice": "Reiniciar dispositivo", - "commandFactoryReset": "Factory Reset", + "commandFactoryReset": "Restauração de fábrica", "commandSendSms": "Enviar SMS", "commandSendUssd": "Enviar USSD", "commandSosNumber": "Definir numero SOS", @@ -306,7 +307,7 @@ "commandSetOdometer": "Definir Odômetro", "commandGetModemStatus": "Obter Status do Modem", "commandGetDeviceStatus": "Obter status do dispositivo", - "commandSetSpeedLimit": "Set Speed Limit", + "commandSetSpeedLimit": "Definir limite de velocidade", "commandModePowerSaving": "Modificar a Economia de Energia", "commandModeDeepSleep": "Modifique o Sono Profundo", "commandMovementAlarm": "Alarme de Movimento", diff --git a/web/l10n/ro.json b/web/l10n/ro.json index 96e710c4..8a36f2d3 100644 --- a/web/l10n/ro.json +++ b/web/l10n/ro.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Cerc", "mapShapePolyline": "Polilinie", "mapLiveRoutes": "Rute in timp real", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI ", "stateTitle": "Stare", "stateName": "Atribut", diff --git a/web/l10n/ru.json b/web/l10n/ru.json index 36b48f52..526d9cda 100644 --- a/web/l10n/ru.json +++ b/web/l10n/ru.json @@ -8,8 +8,8 @@ "sharedEdit": "Редактировать", "sharedRemove": "Удалить", "sharedRemoveConfirm": "Удалить элемент?", - "sharedYes": "Yes", - "sharedNo": "No", + "sharedYes": "Да", + "sharedNo": "Нет", "sharedKm": "км", "sharedMi": "мили", "sharedNmi": "м.мили", @@ -65,7 +65,7 @@ "sharedRequired": "Обязательные", "sharedPreferences": "Настройки", "sharedPermissions": "Разрешения", - "sharedConnections": "Connections", + "sharedConnections": "Соединения", "sharedExtra": "Экстра", "sharedTypeString": "Строка", "sharedTypeNumber": "Число", @@ -76,20 +76,20 @@ "sharedSavedCommands": "Сохраненные команды", "sharedNew": "Новый...", "sharedShowAddress": "Показать адрес", - "sharedShowDetails": "More Details", + "sharedShowDetails": "Подробнее", "sharedDisabled": "Отключен", "sharedMaintenance": "Обслуживание", "sharedDeviceAccumulators": "Аккумуляторы", "sharedAlarms": "Тревоги", - "sharedLocation": "Location", - "sharedImport": "Import", + "sharedLocation": "Расположение", + "sharedImport": "Импортировать", "attributeSpeedLimit": "Ограничение скорости", "attributePolylineDistance": "Расстояние от линии", "attributeReportIgnoreOdometer": "Отчет: Игнорировать одометер", "attributeWebReportColor": "Веб: Цвет отчета", "attributeDevicePassword": "Пароль устройтва", - "attributeDeviceInactivityStart": "Device Inactivity Start", - "attributeDeviceInactivityPeriod": "Device Inactivity Period", + "attributeDeviceInactivityStart": "Бездействие Устройства Начало", + "attributeDeviceInactivityPeriod": "Бездействие Устройства Период", "attributeProcessingCopyAttributes": "Обработка: Копирование атрибутов", "attributeColor": "Цвет", "attributeWebLiveRouteLength": "Веб: Длина онлайн маршрута", @@ -114,7 +114,7 @@ "attributeUiDisableCalendars": "UI: Отключить календари", "attributeUiDisableMaintenance": "UI: Отключить обслуживание", "attributeUiHidePositionAttributes": "UI: Скрывать атрибуты", - "attributeNotificationTokens": "Notification Tokens", + "attributeNotificationTokens": "Токены Уведомлений", "errorTitle": "Ошибка", "errorGeneral": "Неправильные параметры или нарушение ограничений", "errorConnection": "Ошибка соединения", @@ -132,13 +132,13 @@ "userToken": "Ключ", "loginTitle": "Вход", "loginLanguage": "Язык", - "loginReset": "Reset Password", + "loginReset": "Сброс Пароля", "loginRegister": "Регистрация", "loginLogin": "Вход", "loginFailed": "Неправильный email адрес или пароль", "loginCreated": "Новый пользователь зарегистрирован", - "loginResetSuccess": "Check your email", - "loginUpdateSuccess": "New password is set", + "loginResetSuccess": "Проверьте свою электронную почту", + "loginUpdateSuccess": "Новый пароль установлен", "loginLogout": "Выход", "loginLogo": "Логотип", "devicesAndState": "Устройства и состояния", @@ -241,7 +241,7 @@ "serverRegistration": "Регистрация", "serverReadonly": "Только просмотр", "serverForceSettings": "Форсировать настройки", - "serverAnnouncement": "Announcement", + "serverAnnouncement": "Объявление", "mapTitle": "Карта", "mapLayer": "Слой карты", "mapCustom": "Пользовательский (XYZ)", @@ -258,13 +258,14 @@ "mapYandexMap": "Яндекс Карты", "mapYandexSat": "Яндекс Спутник", "mapWikimedia": "Викимедиа", - "mapMapboxStreets": "Mapbox Streets", - "mapMapboxOutdoors": "Mapbox Outdoors", - "mapMapboxSatellite": "Mapbox Satellite", + "mapMapboxStreets": "Mapbox Улицы", + "mapMapboxOutdoors": "Mapbox Топография", + "mapMapboxSatellite": "Mapbox Спутник", "mapShapePolygon": "Многоугольник", "mapShapeCircle": "Круг", "mapShapePolyline": "Линия", "mapLiveRoutes": " Живые маршруты", + "mapCurrentLocation": "Текущее Местоположение", "mapPoiLayer": "Слой POI", "stateTitle": "Состояние", "stateName": "Параметр", @@ -283,12 +284,12 @@ "commandEngineResume": "Разблокировать двигатель", "commandAlarmArm": "Активировать сигнализацию", "commandAlarmDisarm": "Деактивировать сигнализацию", - "commandAlarmDismiss": "Dismiss Alarm", + "commandAlarmDismiss": "Отключить Сигнализацию", "commandSetTimezone": "Настроить часовой пояс", "commandRequestPhoto": "Запросить фото", "commandPowerOff": "Выключить устройство", "commandRebootDevice": "Перезагрузить устройство", - "commandFactoryReset": "Factory Reset", + "commandFactoryReset": "Сброс к Заводским Настройкам", "commandSendSms": "Отправить СМС", "commandSendUssd": "Отправить USSD", "commandSosNumber": "Настроить экстренный номер", @@ -306,7 +307,7 @@ "commandSetOdometer": "Настроить одометр", "commandGetModemStatus": "Запросить состояние модема", "commandGetDeviceStatus": "Запросить состояние устройства", - "commandSetSpeedLimit": "Set Speed Limit", + "commandSetSpeedLimit": "Установить Ограничение Скорости", "commandModePowerSaving": "Изменить режим энергосбережения", "commandModeDeepSleep": "Изменить режим глубокого сна", "commandMovementAlarm": "Тревога Движение", @@ -324,7 +325,7 @@ "eventDeviceOnline": "Статус онлайн", "eventDeviceUnknown": "Статус неизвестен", "eventDeviceOffline": "Статус оффлайн", - "eventDeviceInactive": "Device inactive", + "eventDeviceInactive": "Устройство неактивно", "eventDeviceMoving": "Устройство двигается", "eventDeviceStopped": "Устройство остановилось", "eventDeviceOverspeed": "Превышено ограничение скорости", @@ -386,13 +387,13 @@ "notificatorSms": "СМС", "notificatorFirebase": "Firebase", "notificatorTraccar": "Traccar", - "reportReplay": "Replay", + "reportReplay": "Воспроизвести", "reportRoute": "Маршрут", "reportEvents": "События", "reportTrips": "Поездки", "reportStops": "Остановки", "reportSummary": "Сводка", - "reportDaily": "Daily Summary", + "reportDaily": "Ежедневная Сводка", "reportChart": "Диаграмма", "reportConfigure": "Конфигурировать", "reportEventTypes": "Тип события", @@ -413,7 +414,7 @@ "reportMaximumSpeed": "Максимальная скорость", "reportEngineHours": "Моточасы", "reportDuration": "Длительность", - "reportStartDate": "Start Date", + "reportStartDate": "Дата Начала", "reportStartTime": "Начальное время", "reportStartAddress": "Начальный адрес", "reportEndTime": "Конечное время", diff --git a/web/l10n/si.json b/web/l10n/si.json index 57c59590..40fa1b2d 100644 --- a/web/l10n/si.json +++ b/web/l10n/si.json @@ -265,6 +265,7 @@ "mapShapeCircle": "වෘත්තය", "mapShapePolyline": "රේකාව ", "mapLiveRoutes": "සජීවී මාර්ග", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI ස්තරය", "stateTitle": "තත්වය", "stateName": "පරාමිතිය", diff --git a/web/l10n/sk.json b/web/l10n/sk.json index 2d8475fe..44c5978e 100644 --- a/web/l10n/sk.json +++ b/web/l10n/sk.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Kruh", "mapShapePolyline": "Lomená čiara", "mapLiveRoutes": "Live Routes", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "Parametre", "stateName": "Parameter", diff --git a/web/l10n/sl.json b/web/l10n/sl.json index e4433c01..d40081a0 100644 --- a/web/l10n/sl.json +++ b/web/l10n/sl.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Krog", "mapShapePolyline": "Polyline", "mapLiveRoutes": "Live Routes", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "Stanje", "stateName": "Parameter", diff --git a/web/l10n/sq.json b/web/l10n/sq.json index 0c25fae1..cd3ae2d5 100644 --- a/web/l10n/sq.json +++ b/web/l10n/sq.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Circle", "mapShapePolyline": "Polyline", "mapLiveRoutes": "Live Routes", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "Gjëndja", "stateName": "Atribut", diff --git a/web/l10n/sr.json b/web/l10n/sr.json index 7c2acc59..603f5198 100644 --- a/web/l10n/sr.json +++ b/web/l10n/sr.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Krug", "mapShapePolyline": "Višelinijski", "mapLiveRoutes": "Validne rute", + "mapCurrentLocation": "Trenutna lokacija", "mapPoiLayer": "POI sloj", "stateTitle": "Stanje", "stateName": "Parametar", diff --git a/web/l10n/sv.json b/web/l10n/sv.json index 6aba5164..7194040d 100644 --- a/web/l10n/sv.json +++ b/web/l10n/sv.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Cirkel", "mapShapePolyline": "Polyline", "mapLiveRoutes": "Liverutter", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "Status", "stateName": "Attribut", diff --git a/web/l10n/ta.json b/web/l10n/ta.json index 45f4d981..06a2f853 100644 --- a/web/l10n/ta.json +++ b/web/l10n/ta.json @@ -265,6 +265,7 @@ "mapShapeCircle": "வட்டம்", "mapShapePolyline": "பாலிலைன்", "mapLiveRoutes": "நேரடி வழிகள்", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI லேயர்", "stateTitle": "நிலை", "stateName": "சாட்டு", diff --git a/web/l10n/th.json b/web/l10n/th.json index 80382f5f..1b8c7e46 100644 --- a/web/l10n/th.json +++ b/web/l10n/th.json @@ -265,6 +265,7 @@ "mapShapeCircle": "วงกลม", "mapShapePolyline": "โพลีไลน์", "mapLiveRoutes": "เส้นทาง Live", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "สถานะ", "stateName": "พารามิเตอร์", diff --git a/web/l10n/tr.json b/web/l10n/tr.json index 33480cd7..b138eba8 100644 --- a/web/l10n/tr.json +++ b/web/l10n/tr.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Çember", "mapShapePolyline": "Çizim", "mapLiveRoutes": "Canlı Takip", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Katmanı", "stateTitle": "Bölge", "stateName": "Özellik", diff --git a/web/l10n/uk.json b/web/l10n/uk.json index 925c87fc..09e207a6 100644 --- a/web/l10n/uk.json +++ b/web/l10n/uk.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Коло", "mapShapePolyline": "Лінія", "mapLiveRoutes": "Поточні маршрути", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "Шар POI", "stateTitle": "Стан", "stateName": "Атрибут", diff --git a/web/l10n/uz.json b/web/l10n/uz.json index f16b6f1b..20d632dd 100644 --- a/web/l10n/uz.json +++ b/web/l10n/uz.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Айлана", "mapShapePolyline": "Чизиқ", "mapLiveRoutes": "Амалдаги маршрутлар", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "Ҳолат", "stateName": "Параметр", diff --git a/web/l10n/vi.json b/web/l10n/vi.json index 5f837217..24d2cfbb 100644 --- a/web/l10n/vi.json +++ b/web/l10n/vi.json @@ -265,6 +265,7 @@ "mapShapeCircle": "Vòng tròn", "mapShapePolyline": "Đường kẻ đa giác", "mapLiveRoutes": "Lộ trình trực tuyến", + "mapCurrentLocation": "Current Location", "mapPoiLayer": "POI Layer", "stateTitle": "Trạng thái", "stateName": "Thuộc tính", diff --git a/web/l10n/zh.json b/web/l10n/zh.json index 8dd8d27c..97765216 100644 --- a/web/l10n/zh.json +++ b/web/l10n/zh.json @@ -8,8 +8,8 @@ "sharedEdit": "编辑", "sharedRemove": "删除", "sharedRemoveConfirm": "要删除选中项吗?", - "sharedYes": "Yes", - "sharedNo": "No", + "sharedYes": "是", + "sharedNo": "否", "sharedKm": "千米", "sharedMi": "海里", "sharedNmi": "海里", @@ -65,7 +65,7 @@ "sharedRequired": "必填", "sharedPreferences": "个性化设置", "sharedPermissions": "权限", - "sharedConnections": "Connections", + "sharedConnections": "链接", "sharedExtra": "附加", "sharedTypeString": "字符串", "sharedTypeNumber": "数字", @@ -76,20 +76,20 @@ "sharedSavedCommands": "保存指令", "sharedNew": "新建", "sharedShowAddress": "显示地址", - "sharedShowDetails": "More Details", + "sharedShowDetails": "详情请见", "sharedDisabled": "关闭", "sharedMaintenance": "维护", "sharedDeviceAccumulators": "蓄电池", "sharedAlarms": "报警", - "sharedLocation": "Location", - "sharedImport": "Import", + "sharedLocation": "位置", + "sharedImport": "接入", "attributeSpeedLimit": "速度限制", "attributePolylineDistance": "折线距离", "attributeReportIgnoreOdometer": "报告:忽略里程表", "attributeWebReportColor": "页面:报告颜色", "attributeDevicePassword": "设备密码", - "attributeDeviceInactivityStart": "Device Inactivity Start", - "attributeDeviceInactivityPeriod": "Device Inactivity Period", + "attributeDeviceInactivityStart": "设备无响应起始", + "attributeDeviceInactivityPeriod": "设备无响应时期", "attributeProcessingCopyAttributes": "处理中:复制属性", "attributeColor": "颜色", "attributeWebLiveRouteLength": "页面:活动路径长度", @@ -114,7 +114,7 @@ "attributeUiDisableCalendars": "关闭日历", "attributeUiDisableMaintenance": "禁止维护", "attributeUiHidePositionAttributes": "隐藏位置属性", - "attributeNotificationTokens": "Notification Tokens", + "attributeNotificationTokens": "通知标识", "errorTitle": "错误", "errorGeneral": "无效参数", "errorConnection": "连接错误", @@ -132,13 +132,13 @@ "userToken": "令牌", "loginTitle": "登录", "loginLanguage": "语言", - "loginReset": "Reset Password", + "loginReset": "密码重设", "loginRegister": "注册", "loginLogin": "登录", "loginFailed": "邮箱或密码不对", "loginCreated": "该用户已经被注册了", - "loginResetSuccess": "Check your email", - "loginUpdateSuccess": "New password is set", + "loginResetSuccess": "邮件查询", + "loginUpdateSuccess": "新密码已重置", "loginLogout": "注销", "loginLogo": "图标", "devicesAndState": "设备和状态", @@ -241,12 +241,12 @@ "serverRegistration": "注册", "serverReadonly": "只读", "serverForceSettings": "强制设置", - "serverAnnouncement": "Announcement", + "serverAnnouncement": "通知", "mapTitle": "地图", "mapLayer": "地图图层", - "mapCustom": "Custom (XYZ)", - "mapCustomArcgis": "Custom (ArcGIS)", - "mapCustomLabel": "Custom map", + "mapCustom": "自定义(XYZ) ", + "mapCustomArcgis": "自定义(ArcGIS)", + "mapCustomLabel": "自定义地图", "mapCarto": "Carto Basemaps", "mapOsm": "OpenStreetMap 地图", "mapBingKey": "必应重点地图", @@ -254,17 +254,18 @@ "mapBingAerial": "必应航测地图", "mapBingHybrid": "必应混合地图", "mapBaidu": "百度地图", - "mapAutoNavi": "AutoNavi", + "mapAutoNavi": " 高德地图", "mapYandexMap": "Yandex地图", "mapYandexSat": "Yandex卫星地图", "mapWikimedia": "维基", - "mapMapboxStreets": "Mapbox Streets", - "mapMapboxOutdoors": "Mapbox Outdoors", - "mapMapboxSatellite": "Mapbox Satellite", + "mapMapboxStreets": "Mapbox街道", + "mapMapboxOutdoors": "Mapbox外景", + "mapMapboxSatellite": "Mapbox卫星", "mapShapePolygon": "多边形", "mapShapeCircle": "圆形", "mapShapePolyline": "折线", "mapLiveRoutes": "运动轨迹", + "mapCurrentLocation": "当前位置", "mapPoiLayer": "POI层", "stateTitle": "状态", "stateName": "参数", @@ -283,12 +284,12 @@ "commandEngineResume": "引擎启动", "commandAlarmArm": "部署报警", "commandAlarmDisarm": "解除报警", - "commandAlarmDismiss": "Dismiss Alarm", + "commandAlarmDismiss": "停止警报", "commandSetTimezone": "设置时区", "commandRequestPhoto": "请求图片", "commandPowerOff": "设备关机", "commandRebootDevice": "重启设备", - "commandFactoryReset": "Factory Reset", + "commandFactoryReset": "恢复出厂设置", "commandSendSms": "发送短信", "commandSendUssd": "发送USSD", "commandSosNumber": "设置SOS号码", @@ -306,7 +307,7 @@ "commandSetOdometer": "设置里程表", "commandGetModemStatus": "获取Modem状态", "commandGetDeviceStatus": "获取设备状态", - "commandSetSpeedLimit": "Set Speed Limit", + "commandSetSpeedLimit": "设置速度限制", "commandModePowerSaving": "修改电源节省", "commandModeDeepSleep": "修改深度睡眠", "commandMovementAlarm": "移动报警", @@ -324,7 +325,7 @@ "eventDeviceOnline": "在线状态", "eventDeviceUnknown": "未知状态", "eventDeviceOffline": "离线状态", - "eventDeviceInactive": "Device inactive", + "eventDeviceInactive": "设备无响应", "eventDeviceMoving": "设备移动中", "eventDeviceStopped": "设备已停止", "eventDeviceOverspeed": "超速限制", @@ -386,20 +387,20 @@ "notificatorSms": "短信", "notificatorFirebase": "Firebase", "notificatorTraccar": "Traccar", - "reportReplay": "Replay", + "reportReplay": "重播", "reportRoute": "轨迹", "reportEvents": "事件", "reportTrips": "行程", "reportStops": "停留点", "reportSummary": "概要", - "reportDaily": "Daily Summary", + "reportDaily": "每日汇报", "reportChart": "图表", "reportConfigure": "筛选条件", "reportEventTypes": "事件类型", "reportChartType": "图表类型", "reportShowMarkers": "显示图标", "reportExport": "导出", - "reportEmail": "邮件报告", + "reportEmail": "邮件发送", "reportPeriod": "时期", "reportCustom": "自定义", "reportToday": "今天", @@ -413,7 +414,7 @@ "reportMaximumSpeed": "最大速度", "reportEngineHours": "发动机时间", "reportDuration": "持续时间", - "reportStartDate": "Start Date", + "reportStartDate": "开始日", "reportStartTime": "开始时间", "reportStartAddress": "开始地址", "reportEndTime": "结束时间", @@ -451,7 +452,7 @@ "categoryTrolleybus": "无轨电车", "categoryTruck": "卡车", "categoryVan": "厢式货车", - "categoryScooter": "Scooter", + "categoryScooter": "小型摩托车", "maintenanceStart": "开始", "maintenancePeriod": "时期" } \ No newline at end of file diff --git a/web/l10n/zh_TW.json b/web/l10n/zh_TW.json index e153dac5..67012bec 100644 --- a/web/l10n/zh_TW.json +++ b/web/l10n/zh_TW.json @@ -8,8 +8,8 @@ "sharedEdit": "編輯", "sharedRemove": "移除", "sharedRemoveConfirm": "確認要移除嗎?", - "sharedYes": "Yes", - "sharedNo": "No", + "sharedYes": "是", + "sharedNo": "否", "sharedKm": "公里", "sharedMi": "英里", "sharedNmi": "海里", @@ -31,7 +31,7 @@ "sharedGeofence": "地圖圍籬", "sharedGeofences": "地圖圍籬", "sharedNotifications": "通知", - "sharedNotification": "Notification", + "sharedNotification": "通知", "sharedAttributes": "屬性", "sharedAttribute": "屬性", "sharedDrivers": "駕駛", @@ -42,11 +42,11 @@ "sharedDistance": "距離", "sharedHourAbbreviation": "時", "sharedMinuteAbbreviation": "分", - "sharedSecondAbbreviation": "s", + "sharedSecondAbbreviation": "秒", "sharedVoltAbbreviation": "伏特", "sharedLiterAbbreviation": "公升", - "sharedGallonAbbreviation": "gal", - "sharedLiter": "Liter", + "sharedGallonAbbreviation": "加侖", + "sharedLiter": "升", "sharedImpGallon": "Imp. Gallon", "sharedUsGallon": "U.S. Gallon", "sharedLiterPerHourAbbreviation": "公升/小時", @@ -65,7 +65,7 @@ "sharedRequired": "必需", "sharedPreferences": "偏好", "sharedPermissions": "權限", - "sharedConnections": "Connections", + "sharedConnections": "連線", "sharedExtra": "更多", "sharedTypeString": "字串", "sharedTypeNumber": "整數", @@ -74,15 +74,15 @@ "sharedInfoTitle": "資訊", "sharedSavedCommand": "Saved Command", "sharedSavedCommands": "Saved Commands", - "sharedNew": "New…", - "sharedShowAddress": "Show Address", - "sharedShowDetails": "More Details", - "sharedDisabled": "Disabled", - "sharedMaintenance": "Maintenance", + "sharedNew": "新建", + "sharedShowAddress": "顯示地址", + "sharedShowDetails": "詳情請見", + "sharedDisabled": "關閉", + "sharedMaintenance": "維護", "sharedDeviceAccumulators": "Accumulators", - "sharedAlarms": "Alarms", - "sharedLocation": "Location", - "sharedImport": "Import", + "sharedAlarms": "警告", + "sharedLocation": "位置", + "sharedImport": "接入", "attributeSpeedLimit": "速限", "attributePolylineDistance": "Polyline Distance", "attributeReportIgnoreOdometer": "報告:忽略里程表", @@ -132,13 +132,13 @@ "userToken": "簽證", "loginTitle": "登入", "loginLanguage": "語言", - "loginReset": "Reset Password", + "loginReset": "密碼重設", "loginRegister": "註冊", "loginLogin": "登入", "loginFailed": "錯誤的電子信箱地址或密碼", "loginCreated": "已成功註冊新用戶", - "loginResetSuccess": "Check your email", - "loginUpdateSuccess": "New password is set", + "loginResetSuccess": "郵件查詢", + "loginUpdateSuccess": "新密碼已重置", "loginLogout": "登出", "loginLogo": "標識", "devicesAndState": "設備與狀態", @@ -265,6 +265,7 @@ "mapShapeCircle": "圓形", "mapShapePolyline": "多邊形", "mapLiveRoutes": "即時路況", + "mapCurrentLocation": "當前位置", "mapPoiLayer": "POI Layer", "stateTitle": "狀態", "stateName": "名稱", @@ -318,7 +319,7 @@ "commandData": "資料", "commandIndex": "索引", "commandPhone": "電話號碼", - "commandServer": "Server", + "commandServer": "服務器", "commandPort": "Port", "eventAll": "所有事件", "eventDeviceOnline": "Status online", @@ -379,7 +380,7 @@ "alarmTampering": "Tampering", "alarmRemoving": "Removing", "notificationType": "通知類型", - "notificationAlways": "All Devices", + "notificationAlways": "所有設備", "notificationNotificators": "Channels", "notificatorWeb": "Web", "notificatorMail": "Mail", @@ -392,14 +393,14 @@ "reportTrips": "旅程", "reportStops": "站點", "reportSummary": "摘要", - "reportDaily": "Daily Summary", + "reportDaily": "每日匯報", "reportChart": "圖表", "reportConfigure": "設置", "reportEventTypes": "事件類型", "reportChartType": "圖表類型", "reportShowMarkers": "顯示地標", "reportExport": "匯出", - "reportEmail": "Email Report", + "reportEmail": "郵件發送", "reportPeriod": "Period", "reportCustom": "Custom", "reportToday": "Today", diff --git a/web/load.js b/web/load.js index 26a651c3..9e9cd8fc 100644 --- a/web/load.js +++ b/web/load.js @@ -156,36 +156,22 @@ navigator.__defineGetter__('userAgent', function () { return __originalUserAgent.replace(/\/OPR[^)]*/g, ''); }); } - extjsVersion = '6.2.0'; - olVersion = '6.5.0'; - olLayerSwitcherVersion = '3.8.3'; - proj4jsVersion = '2.6.0'; - - if (debugMode) { - addScriptFile('https://cdn.traccar.com/js/extjs/' + extjsVersion + '/ext-all-debug.js'); - addScriptFile('https://cdn.traccar.com/js/extjs/' + extjsVersion + '/packages/charts/classic/charts-debug.js'); - } else { - addScriptFile('https://cdn.traccar.com/js/extjs/' + extjsVersion + '/ext-all.js'); - addScriptFile('https://cdn.traccar.com/js/extjs/' + extjsVersion + '/packages/charts/classic/charts.js'); - } - addScriptFile('https://cdn.traccar.com/js/extjs/' + extjsVersion + '/classic/locale/locale-' + locale.languages[locale.language].code + '.js'); + addScriptFile('lib/extjs/ext-all.js'); + addScriptFile('lib/extjs/classic/locale/locale-' + locale.languages[locale.language].code + '.js'); - addStyleFile('https://cdn.traccar.com/js/extjs/' + extjsVersion + '/classic/theme-triton/resources/theme-triton-all.css'); - addScriptFile('https://cdn.traccar.com/js/extjs/' + extjsVersion + '/classic/theme-triton/theme-triton.js'); + addStyleFile('lib/extjs/classic/theme-triton/resources/theme-triton-all.css'); + addScriptFile('lib/extjs/classic/theme-triton/theme-triton.js'); - addStyleFile('https://cdn.traccar.com/js/extjs/' + extjsVersion + '/packages/charts/classic/triton/resources/charts-all.css'); + addScriptFile('lib/extjs/packages/charts/classic/charts.js'); + addStyleFile('lib/extjs/packages/charts/classic/triton/resources/charts-all.css'); - addStyleFile('https://cdn.traccar.com/js/ol/' + olVersion + '/ol.css'); - addScriptFile('https://cdn.traccar.com/js/ol/' + olVersion + '/ol.js'); + addStyleFile('lib/ol/ol.css'); + addScriptFile('lib/ol/ol.js'); - addStyleFile('https://cdn.traccar.com/js/ol-layerswitcher/' + olLayerSwitcherVersion + '/ol-layerswitcher.css'); - addScriptFile('https://cdn.traccar.com/js/ol-layerswitcher/' + olLayerSwitcherVersion + '/ol-layerswitcher.js'); + addStyleFile('lib/ol-layerswitcher/ol-layerswitcher.css'); + addScriptFile('lib/ol-layerswitcher/ol-layerswitcher.js'); - if (debugMode) { - addScriptFile('https://cdn.traccar.com/js/proj4js/' + proj4jsVersion + '/proj4-src.js'); - } else { - addScriptFile('https://cdn.traccar.com/js/proj4js/' + proj4jsVersion + '/proj4.js'); - } + addScriptFile('lib/proj4/proj4.js'); window.Images = ['arrow', 'default', 'animal', 'bicycle', 'boat', 'bus', 'car', 'crane', 'helicopter', 'motorcycle', 'offroad', 'person', 'pickup', 'plane', 'ship', 'tractor', 'train', 'tram', 'trolleybus', 'truck', 'van', 'scooter']; -- cgit v1.2.3 From 195ec38d4d2f2f37bdf64c73e902954801e9b18d Mon Sep 17 00:00:00 2001 From: rahighi Date: Thu, 26 Aug 2021 13:24:15 +0430 Subject: removed an error --- modern/src/map/Map.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modern') diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js index 4ba36554..64fc31a0 100644 --- a/modern/src/map/Map.js +++ b/modern/src/map/Map.js @@ -64,6 +64,10 @@ const initMap = async () => { map.on('load', initMap); +const navigationControl = new maplibregl.NavigationControl({ + showCompass: false, +}) + const switcher = new SwitcherControl( [ { title: t('mapOsm'), uri: styleOsm() }, -- cgit v1.2.3 From 332681f36dc9814e51c61d0e310f6c5d8a0f0c20 Mon Sep 17 00:00:00 2001 From: rahighi Date: Sat, 28 Aug 2021 08:21:50 +0430 Subject: resolving Anton's comments --- modern/.vscode/settings.json | 7 --- modern/public/index.html | 2 +- modern/src/common/localization.js | 108 +++++++++++++++++++------------------- 3 files changed, 55 insertions(+), 62 deletions(-) delete mode 100644 modern/.vscode/settings.json (limited to 'modern') diff --git a/modern/.vscode/settings.json b/modern/.vscode/settings.json deleted file mode 100644 index 5767cf1e..00000000 --- a/modern/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "workbench.colorCustomizations": { - "activityBar.background": "#183407", - "titleBar.activeBackground": "#224909", - "titleBar.activeForeground": "#F4FDEE" - } -} \ No newline at end of file diff --git a/modern/public/index.html b/modern/public/index.html index 6d2eb7a0..78138ed5 100644 --- a/modern/public/index.html +++ b/modern/public/index.html @@ -9,7 +9,7 @@ Traccar - + diff --git a/modern/src/common/localization.js b/modern/src/common/localization.js index 3b2f04b3..26b90e57 100644 --- a/modern/src/common/localization.js +++ b/modern/src/common/localization.js @@ -60,60 +60,60 @@ import zh_TW from '../../../web/l10n/zh_TW.json'; import theme from "../theme"; const supportedLanguages = { - 'af': { data: af, name: 'Afrikaans' }, - 'ar': { data: ar, name: 'العربية' }, - 'az': { data: az, name: 'Azərbaycanca' }, - 'bg': { data: bg, name: 'Български' }, - 'bn': { data: bn, name: 'বাংলা' }, - 'cs': { data: cs, name: 'Čeština' }, - 'de': { data: de, name: 'Deutsch' }, - 'da': { data: da, name: 'Dansk' }, - 'el': { data: el, name: 'Ελληνικά' }, - 'en': { data: en, name: 'English' }, - 'es': { data: es, name: 'Español' }, - 'fa': { data: fa, name: 'فارسی' }, - 'fi': { data: fi, name: 'Suomi' }, - 'fr': { data: fr, name: 'Français' }, - 'he': { data: he, name: 'עברית' }, - 'hi': { data: hi, name: 'हिन्दी' }, - 'hr': { data: hr, name: 'Hrvatski' }, - 'hu': { data: hu, name: 'Magyar' }, - 'id': { data: id, name: 'Bahasa Indonesia' }, - 'it': { data: it, name: 'Italiano' }, - 'ja': { data: ja, name: '日本語' }, - 'ka': { data: ka, name: 'ქართული' }, - 'kk': { data: kk, name: 'Қазақша' }, - 'ko': { data: ko, name: '한국어' }, - 'km': { data: km, name: 'ភាសាខ្មែរ' }, - 'lo': { data: lo, name: 'ລາວ' }, - 'lt': { data: lt, name: 'Lietuvių' }, - 'lv': { data: lv, name: 'Latviešu' }, - 'ml': { data: ml, name: 'മലയാളം' }, - 'mn': { data: mn, name: 'Монгол хэл' }, - 'ms': { data: ms, name: 'بهاس ملايو' }, - 'nb': { data: nb, name: 'Norsk bokmål' }, - 'ne': { data: ne, name: 'नेपाली' }, - 'nl': { data: nl, name: 'Nederlands' }, - 'nn': { data: nn, name: 'Norsk nynorsk' }, - 'pl': { data: pl, name: 'Polski' }, - 'pt': { data: pt, name: 'Português' }, - 'pt_BR': { data: pt_BR, name: 'Português (Brasil)' }, - 'ro': { data: ro, name: 'Română' }, - 'ru': { data: ru, name: 'Русский' }, - 'si': { data: si, name: 'සිංහල' }, - 'sk': { data: sk, name: 'Slovenčina' }, - 'sl': { data: sl, name: 'Slovenščina' }, - 'sq': { data: sq, name: 'Shqipëria' }, - 'sr': { data: sr, name: 'Srpski' }, - 'sv': { data: sv, name: 'Svenska' }, - 'ta': { data: ta, name: 'தமிழ்' }, - 'th': { data: th, name: 'ไทย' }, - 'tr': { data: tr, name: 'Türkçe' }, - 'uk': { data: uk, name: 'Українська' }, - 'uz': { data: uz, name: 'Oʻzbekcha' }, - 'vi': { data: vi, name: 'Tiếng Việt' }, - 'zh': { data: zh, name: '中文' }, - 'zh_TW': { data: zh_TW, name: '中文 (Taiwan)' } + af: { data: af, name: 'Afrikaans' }, + ar: { data: ar, name: 'العربية' }, + az: { data: az, name: 'Azərbaycanca' }, + bg: { data: bg, name: 'Български' }, + bn: { data: bn, name: 'বাংলা' }, + cs: { data: cs, name: 'Čeština' }, + de: { data: de, name: 'Deutsch' }, + da: { data: da, name: 'Dansk' }, + el: { data: el, name: 'Ελληνικά' }, + en: { data: en, name: 'English' }, + es: { data: es, name: 'Español' }, + fa: { data: fa, name: 'فارسی' }, + fi: { data: fi, name: 'Suomi' }, + fr: { data: fr, name: 'Français' }, + he: { data: he, name: 'עברית' }, + hi: { data: hi, name: 'हिन्दी' }, + hr: { data: hr, name: 'Hrvatski' }, + hu: { data: hu, name: 'Magyar' }, + id: { data: id, name: 'Bahasa Indonesia' }, + it: { data: it, name: 'Italiano' }, + ja: { data: ja, name: '日本語' }, + ka: { data: ka, name: 'ქართული' }, + kk: { data: kk, name: 'Қазақша' }, + ko: { data: ko, name: '한국어' }, + km: { data: km, name: 'ភាសាខ្មែរ' }, + lo: { data: lo, name: 'ລາວ' }, + lt: { data: lt, name: 'Lietuvių' }, + lv: { data: lv, name: 'Latviešu' }, + ml: { data: ml, name: 'മലയാളം' }, + mn: { data: mn, name: 'Монгол хэл' }, + ms: { data: ms, name: 'بهاس ملايو' }, + nb: { data: nb, name: 'Norsk bokmål' }, + ne: { data: ne, name: 'नेपाली' }, + nl: { data: nl, name: 'Nederlands' }, + nn: { data: nn, name: 'Norsk nynorsk' }, + pl: { data: pl, name: 'Polski' }, + pt: { data: pt, name: 'Português' }, + pt_BR: { data: pt_BR, name: 'Português (Brasil)' }, + ro: { data: ro, name: 'Română' }, + ru: { data: ru, name: 'Русский' }, + si: { data: si, name: 'සිංහල' }, + sk: { data: sk, name: 'Slovenčina' }, + sl: { data: sl, name: 'Slovenščina' }, + sq: { data: sq, name: 'Shqipëria' }, + sr: { data: sr, name: 'Srpski' }, + sv: { data: sv, name: 'Svenska' }, + ta: { data: ta, name: 'தமிழ்' }, + th: { data: th, name: 'ไทย' }, + tr: { data: tr, name: 'Türkçe' }, + uk: { data: uk, name: 'Українська' }, + uz: { data: uz, name: 'Oʻzbekcha' }, + vi: { data: vi, name: 'Tiếng Việt' }, + zh: { data: zh, name: '中文' }, + zh_TW: { data: zh_TW, name: '中文 (Taiwan)' }, }; export const languageList = Object.entries(supportedLanguages).map((values) => ({ code: values[0], name: values[1].name })); -- cgit v1.2.3 From 545f0d8223e88631f8d7c13077ffe5bae78716cb Mon Sep 17 00:00:00 2001 From: rahighi Date: Sat, 28 Aug 2021 09:41:25 +0430 Subject: Only multiple language support feature --- modern/src/App.js | 84 +++++++++++----------- modern/src/GeofencesPage.js | 3 +- modern/src/common/localization.js | 25 +------ modern/src/components/registration/LoginForm.js | 7 +- modern/src/components/registration/RegisterForm.js | 4 +- modern/src/map/CurrentLocationMap.js | 9 +-- modern/src/map/Map.js | 25 ++----- web/l10n/fa.json | 2 + 8 files changed, 59 insertions(+), 100 deletions(-) (limited to 'modern') diff --git a/modern/src/App.js b/modern/src/App.js index 228fe554..5197a074 100644 --- a/modern/src/App.js +++ b/modern/src/App.js @@ -35,56 +35,58 @@ import LoginForm from './components/registration/LoginForm'; import RegisterForm from './components/registration/RegisterForm'; import ResetPasswordForm from './components/registration/ResetPasswordForm'; -import theme from './theme'; import GeofencesPage from './GeofencesPage'; import GeofencePage from './GeofencePage'; import { LocalizationProvider } from './common/localization'; +import theme from './theme'; const App = () => { const initialized = useSelector((state) => !!state.session.server && !!state.session.user); return ( - - - - - - - - - {!initialized ? () : ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - )} - - + + + + + + + + + + {!initialized ? () : ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + )} + + + ); diff --git a/modern/src/GeofencesPage.js b/modern/src/GeofencesPage.js index 4d23d106..f16ea431 100644 --- a/modern/src/GeofencesPage.js +++ b/modern/src/GeofencesPage.js @@ -5,12 +5,11 @@ import { import Drawer from '@material-ui/core/Drawer'; import ContainerDimensions from 'react-container-dimensions'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; +import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import Map from './map/Map'; import CurrentLocationMap from './map/CurrentLocationMap'; import GeofenceEditMap from './map/GeofenceEditMap'; import GeofencesList from './GeofencesList'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; - import t from './common/localization'; diff --git a/modern/src/common/localization.js b/modern/src/common/localization.js index 26b90e57..6f3e5855 100644 --- a/modern/src/common/localization.js +++ b/modern/src/common/localization.js @@ -1,7 +1,5 @@ import React, { useState, createContext, useContext, useEffect } from "react"; import { create } from 'jss'; -import rtl from 'jss-rtl'; -import { StylesProvider, jssPreset, useTheme, ThemeProvider } from '@material-ui/core/styles'; import af from '../../../web/l10n/af.json'; import ar from '../../../web/l10n/ar.json'; @@ -149,47 +147,28 @@ export default key => { return selectedLanguage.data[key]; }; -const rtlLangueges = ['ar', 'he', 'fa']; -const isRtl = (language) => rtlLangueges.indexOf(language) > -1; - export const setSelectedLanguage = (language) => { selectedLanguage = supportedLanguages[language]; localStorage.setItem('language', language); - localStorage.setItem('direction', isRtl(language) ? 'rtl' : 'ltr'); } export const defaultLanguage = language; -const defaultDirection = localStorage.getItem('direction') || 'ltr'; export const LocalizationContext = createContext({ - direction: defaultDirection, language }); -const jss = create({ plugins: [...jssPreset().plugins, rtl()] }); export function LocalizationProvider(props) { const [language, setLanguage] = useState(defaultLanguage); - const [direction, setDirection] = useState(defaultDirection); - const handleLanguageChange = (nextLanguage) => { setSelectedLanguage(nextLanguage); setLanguage(nextLanguage); - setDirection(isRtl(nextLanguage) ? 'rtl' : 'ltr'); }; - useEffect(() => { - theme.direction = direction; - window.document.body.dir = direction - }, [direction]) - - return - - - {props.children} - - + return + {props.children} } diff --git a/modern/src/components/registration/LoginForm.js b/modern/src/components/registration/LoginForm.js index c5c1d6f2..461a1ab6 100644 --- a/modern/src/components/registration/LoginForm.js +++ b/modern/src/components/registration/LoginForm.js @@ -62,9 +62,9 @@ const LoginForm = () => { } }; - const handleLanguageChange = e => { + const handleLanguageChange = (e) => { setLanguage(e.target.value); - } + }; return ( @@ -130,7 +130,7 @@ const LoginForm = () => { {t('loginLanguage')} @@ -145,7 +145,6 @@ const LoginForm = () => { ); - }; export default LoginForm; diff --git a/modern/src/components/registration/RegisterForm.js b/modern/src/components/registration/RegisterForm.js index 3a249c60..6260a0c5 100644 --- a/modern/src/components/registration/RegisterForm.js +++ b/modern/src/components/registration/RegisterForm.js @@ -4,9 +4,9 @@ import { } from '@material-ui/core'; import { useHistory } from 'react-router-dom'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; +import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import StartPage from '../../StartPage'; import t from '../../common/localization'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; const useStyles = makeStyles((theme) => ({ register: { @@ -61,7 +61,7 @@ const RegisterForm = () => { history.push('/login')}> - {theme.direction === 'rtl' ? : } + {theme.direction === 'rtl' ? : } diff --git a/modern/src/map/CurrentLocationMap.js b/modern/src/map/CurrentLocationMap.js index c875662d..69724ce1 100644 --- a/modern/src/map/CurrentLocationMap.js +++ b/modern/src/map/CurrentLocationMap.js @@ -1,14 +1,9 @@ import maplibregl from 'maplibre-gl'; import { useEffect } from 'react'; -import { useLocalization } from '../common/localization'; import { map } from './Map'; const CurrentLocationMap = () => { - const {direction} = useLocalization(); - useEffect(() => { - const controlsPosition = direction ==='rtl' ? 'top-left' : 'top-right'; - const control = new maplibregl.GeolocateControl({ positionOptions: { enableHighAccuracy: true, @@ -16,9 +11,9 @@ const CurrentLocationMap = () => { }, trackUserLocation: true, }); - map.addControl(control,controlsPosition); + map.addControl(control); return () => map.removeControl(control); - }, [direction]); + }, []); return null; }; diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js index 64fc31a0..47ebb1f0 100644 --- a/modern/src/map/Map.js +++ b/modern/src/map/Map.js @@ -7,10 +7,10 @@ import React, { import { SwitcherControl } from './switcher/switcher'; import deviceCategories from '../common/deviceCategories'; import { prepareIcon, loadImage } from './mapUtil'; -import t, { useLocalization } from '../common/localization'; import { styleCarto, styleMapbox, styleMapTiler, styleOsm, } from './mapStyles'; +import t from '../common/localization'; import { useAttributePreference } from '../common/preferences'; import palette from '../theme/palette'; @@ -64,9 +64,9 @@ const initMap = async () => { map.on('load', initMap); -const navigationControl = new maplibregl.NavigationControl({ +map.addControl(new maplibregl.NavigationControl({ showCompass: false, -}) +})); const switcher = new SwitcherControl( [ @@ -92,32 +92,15 @@ const switcher = new SwitcherControl( }, ); -const addPrimaryControls = position => { - map.addControl(navigationControl, position); - map.addControl(switcher, position); -} - -const removePrimaryControls =()=> { - map.removeControl(navigationControl); - map.removeControl(switcher); -} - - map.addControl(switcher); const Map = ({ children }) => { const containerEl = useRef(null); - const {direction} = useLocalization(); + const [mapReady, setMapReady] = useState(false); const mapboxAccessToken = useAttributePreference('mapboxAccessToken'); - useEffect(()=>{ - const controlsPosition = direction ==='rtl' ? 'top-left' : 'top-right'; - addPrimaryControls(controlsPosition); - return removePrimaryControls; - },[direction]) - useEffect(() => { maplibregl.accessToken = mapboxAccessToken; }, [mapboxAccessToken]); diff --git a/web/l10n/fa.json b/web/l10n/fa.json index 1a77883f..100f19e5 100644 --- a/web/l10n/fa.json +++ b/web/l10n/fa.json @@ -267,6 +267,8 @@ "mapLiveRoutes": "تعقیب مسیر", "mapCurrentLocation": "Current Location", "mapPoiLayer": "لایه POI", + "mapMapTilerBasic" : "Map Tiler Basic", + "mapMapTilerHybrid" : "Map Tiler Hybrid", "stateTitle": "وضعیت", "stateName": "ویژگی", "stateValue": "مقدار", -- cgit v1.2.3 From 2f486cb70ec99098458da5912a48893175102001 Mon Sep 17 00:00:00 2001 From: rahighi Date: Sat, 28 Aug 2021 09:55:27 +0430 Subject: removed irrelevant dependancy --- modern/package.json | 1 - 1 file changed, 1 deletion(-) (limited to 'modern') diff --git a/modern/package.json b/modern/package.json index ad4a3d3d..66066499 100644 --- a/modern/package.json +++ b/modern/package.json @@ -13,7 +13,6 @@ "@turf/circle": "^6.5.0", "@turf/turf": "^6.4.0", "canvas-tint-image": "^2.0.1", - "jss-rtl": "^0.3.0", "mapbox-gl": "^1.13.1", "maplibre-gl": "^1.15.0", "moment": "^2.29.1", -- cgit v1.2.3 From 6587ea34698054175917aab54860bcac4bb38ff3 Mon Sep 17 00:00:00 2001 From: rahighi Date: Sat, 28 Aug 2021 11:33:19 +0430 Subject: Removed remaining RTL parts --- modern/src/GeofencesPage.js | 6 ++---- modern/src/MainPage.js | 13 ++++++------- modern/src/components/registration/RegisterForm.js | 6 ++---- modern/src/reports/ReportLayout.js | 6 ++---- modern/src/settings/OptionsLayout/index.js | 5 +---- 5 files changed, 13 insertions(+), 23 deletions(-) (limited to 'modern') diff --git a/modern/src/GeofencesPage.js b/modern/src/GeofencesPage.js index f16ea431..71219c16 100644 --- a/modern/src/GeofencesPage.js +++ b/modern/src/GeofencesPage.js @@ -1,11 +1,10 @@ import React from 'react'; import { - Divider, isWidthUp, makeStyles, withWidth, Typography, IconButton, useTheme, + Divider, isWidthUp, makeStyles, withWidth, Typography, IconButton, } from '@material-ui/core'; import Drawer from '@material-ui/core/Drawer'; import ContainerDimensions from 'react-container-dimensions'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import Map from './map/Map'; import CurrentLocationMap from './map/CurrentLocationMap'; import GeofenceEditMap from './map/GeofenceEditMap'; @@ -50,7 +49,6 @@ const useStyles = makeStyles((theme) => ({ const GeofencesPage = ({ width }) => { const classes = useStyles(); - const theme = useTheme(); return (
@@ -62,7 +60,7 @@ const GeofencesPage = ({ width }) => { >
- {theme.direction === 'rtl' ? : } + {t('sharedGeofences')} diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js index 97f42ea3..e0707404 100644 --- a/modern/src/MainPage.js +++ b/modern/src/MainPage.js @@ -9,7 +9,6 @@ import useMediaQuery from '@material-ui/core/useMediaQuery'; import AddIcon from '@material-ui/icons/Add'; import CloseIcon from '@material-ui/icons/Close'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import ListIcon from '@material-ui/icons/ViewList'; import DevicesList from './DevicesList'; @@ -132,9 +131,9 @@ const MainPage = () => { {isTablet && ( - - {theme.direction === 'rtl' ? : } - + + + )} { {!isTablet && ( - - - + + + )} diff --git a/modern/src/components/registration/RegisterForm.js b/modern/src/components/registration/RegisterForm.js index 6260a0c5..06f53551 100644 --- a/modern/src/components/registration/RegisterForm.js +++ b/modern/src/components/registration/RegisterForm.js @@ -1,10 +1,9 @@ import React, { useState } from 'react'; import { - Grid, Button, TextField, Typography, Link, makeStyles, Snackbar, useTheme, + Grid, Button, TextField, Typography, Link, makeStyles, Snackbar, } from '@material-ui/core'; import { useHistory } from 'react-router-dom'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import StartPage from '../../StartPage'; import t from '../../common/localization'; @@ -31,7 +30,6 @@ const RegisterForm = () => { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [snackbarOpen, setSnackbarOpen] = useState(false); - const theme = useTheme(); const submitDisabled = () => !name || !/(.+)@(.+)\.(.{2,})/.test(email) || !password; @@ -61,7 +59,7 @@ const RegisterForm = () => { history.push('/login')}> - {theme.direction === 'rtl' ? : } + diff --git a/modern/src/reports/ReportLayout.js b/modern/src/reports/ReportLayout.js index 48e77451..c231cd80 100644 --- a/modern/src/reports/ReportLayout.js +++ b/modern/src/reports/ReportLayout.js @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; import { - Grid, Typography, Divider, Drawer, makeStyles, IconButton, Hidden, useTheme, + Grid, Typography, Divider, Drawer, makeStyles, IconButton, Hidden, } from '@material-ui/core'; import TimelineIcon from '@material-ui/icons/Timeline'; import PauseCircleFilledIcon from '@material-ui/icons/PauseCircleFilled'; @@ -10,7 +10,6 @@ import NotificationsActiveIcon from '@material-ui/icons/NotificationsActive'; import FormatListBulletedIcon from '@material-ui/icons/FormatListBulleted'; import TrendingUpIcon from '@material-ui/icons/TrendingUp'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import SideNav from '../components/SideNav'; import NavBar from '../components/NavBar'; @@ -67,7 +66,6 @@ const ReportLayout = ({ children, filter }) => { const location = useLocation(); const [openDrawer, setOpenDrawer] = useState(false); const [reportTitle, setReportTitle] = useState(); - const theme = useTheme(); useEffect(() => { routes.forEach((route) => { @@ -105,7 +103,7 @@ const ReportLayout = ({ children, filter }) => { history.push('/')} > - {theme.direction === 'rtl' ? : } + {t('reportTitle')} diff --git a/modern/src/settings/OptionsLayout/index.js b/modern/src/settings/OptionsLayout/index.js index 34721680..4a42e583 100644 --- a/modern/src/settings/OptionsLayout/index.js +++ b/modern/src/settings/OptionsLayout/index.js @@ -7,11 +7,9 @@ import { makeStyles, IconButton, Hidden, - useTheme, } from '@material-ui/core'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import SideNav from '../../components/SideNav'; import NavBar from '../../components/NavBar'; @@ -58,7 +56,6 @@ const OptionsLayout = ({ children }) => { const [openDrawer, setOpenDrawer] = useState(false); const [optionTitle, setOptionTitle] = useState(); const routes = useRoutes(); - const theme = useTheme(); useEffect(() => { const activeRoute = routes.find( @@ -90,7 +87,7 @@ const OptionsLayout = ({ children }) => { >
- {theme.direction === 'rtl' ? : } + {t('settingsTitle')} -- cgit v1.2.3 From f4ec386afac1eeee9418cd773f6f6e2e211d9e76 Mon Sep 17 00:00:00 2001 From: rahighi Date: Sun, 29 Aug 2021 08:41:31 +0430 Subject: Reverting unneeded changes --- modern/public/fonts/IRANSansWeb(FaNum).ttf | Bin 59524 -> 0 bytes modern/src/App.js | 5 ++--- modern/src/common/localization.js | 7 ------- modern/src/components/registration/LoginForm.js | 8 ++++---- web/l10n/fa.json | 2 -- 5 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 modern/public/fonts/IRANSansWeb(FaNum).ttf (limited to 'modern') diff --git a/modern/public/fonts/IRANSansWeb(FaNum).ttf b/modern/public/fonts/IRANSansWeb(FaNum).ttf deleted file mode 100644 index 168a908e..00000000 Binary files a/modern/public/fonts/IRANSansWeb(FaNum).ttf and /dev/null differ diff --git a/modern/src/App.js b/modern/src/App.js index 5197a074..d3ba39ad 100644 --- a/modern/src/App.js +++ b/modern/src/App.js @@ -35,10 +35,10 @@ import LoginForm from './components/registration/LoginForm'; import RegisterForm from './components/registration/RegisterForm'; import ResetPasswordForm from './components/registration/ResetPasswordForm'; +import theme from './theme'; import GeofencesPage from './GeofencesPage'; import GeofencePage from './GeofencePage'; import { LocalizationProvider } from './common/localization'; -import theme from './theme'; const App = () => { const initialized = useSelector((state) => !!state.session.server && !!state.session.user); @@ -88,8 +88,7 @@ const App = () => { - ); }; -export default App; +export default App; \ No newline at end of file diff --git a/modern/src/common/localization.js b/modern/src/common/localization.js index 6f3e5855..5f1b8863 100644 --- a/modern/src/common/localization.js +++ b/modern/src/common/localization.js @@ -1,5 +1,4 @@ import React, { useState, createContext, useContext, useEffect } from "react"; -import { create } from 'jss'; import af from '../../../web/l10n/af.json'; import ar from '../../../web/l10n/ar.json'; @@ -55,7 +54,6 @@ import uz from '../../../web/l10n/uz.json'; import vi from '../../../web/l10n/vi.json'; import zh from '../../../web/l10n/zh.json'; import zh_TW from '../../../web/l10n/zh_TW.json'; -import theme from "../theme"; const supportedLanguages = { af: { data: af, name: 'Afrikaans' }, @@ -115,17 +113,13 @@ const supportedLanguages = { }; export const languageList = Object.entries(supportedLanguages).map((values) => ({ code: values[0], name: values[1].name })); - const languages = localStorage.getItem('language') ? [localStorage.getItem('language')] : (window.navigator.languages !== undefined ? window.navigator.languages.slice() : []); - let language = localStorage.getItem('language') || window.navigator.userLanguage || window.navigator.language; - languages.push(language); languages.push(language.substring(0, 2)); languages.push('en'); for (let i = 0; i < languages.length; i++) { language = languages[i].replace('-', '_'); - if (language in supportedLanguages) { break; } @@ -158,7 +152,6 @@ export const LocalizationContext = createContext({ language }); - export function LocalizationProvider(props) { const [language, setLanguage] = useState(defaultLanguage); diff --git a/modern/src/components/registration/LoginForm.js b/modern/src/components/registration/LoginForm.js index 461a1ab6..9b5ca3ed 100644 --- a/modern/src/components/registration/LoginForm.js +++ b/modern/src/components/registration/LoginForm.js @@ -136,11 +136,11 @@ const LoginForm = () => { {emailEnabled && ( - - - history.push('/reset-password')} className={classes.resetPassword} underline="none">{t('loginReset')} - + + + history.push('/reset-password')} className={classes.resetPassword} underline="none">{t('loginReset')} + )} diff --git a/web/l10n/fa.json b/web/l10n/fa.json index 100f19e5..1a77883f 100644 --- a/web/l10n/fa.json +++ b/web/l10n/fa.json @@ -267,8 +267,6 @@ "mapLiveRoutes": "تعقیب مسیر", "mapCurrentLocation": "Current Location", "mapPoiLayer": "لایه POI", - "mapMapTilerBasic" : "Map Tiler Basic", - "mapMapTilerHybrid" : "Map Tiler Hybrid", "stateTitle": "وضعیت", "stateName": "ویژگی", "stateValue": "مقدار", -- cgit v1.2.3 From 3676fb0033aaabe91a672d9661298559a22d02ca Mon Sep 17 00:00:00 2001 From: rahighi Date: Sun, 29 Aug 2021 08:47:15 +0430 Subject: some code refactoring and remove lint errors --- modern/src/App.js | 2 +- modern/src/common/localization.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'modern') diff --git a/modern/src/App.js b/modern/src/App.js index d3ba39ad..5143ad88 100644 --- a/modern/src/App.js +++ b/modern/src/App.js @@ -91,4 +91,4 @@ const App = () => { ); }; -export default App; \ No newline at end of file +export default App; diff --git a/modern/src/common/localization.js b/modern/src/common/localization.js index 5f1b8863..7383788d 100644 --- a/modern/src/common/localization.js +++ b/modern/src/common/localization.js @@ -1,4 +1,4 @@ -import React, { useState, createContext, useContext, useEffect } from "react"; +import React, { useState, createContext, useContext } from "react"; import af from '../../../web/l10n/af.json'; import ar from '../../../web/l10n/ar.json'; @@ -141,14 +141,14 @@ export default key => { return selectedLanguage.data[key]; }; -export const setSelectedLanguage = (language) => { +const setSelectedLanguage = (language) => { selectedLanguage = supportedLanguages[language]; localStorage.setItem('language', language); } -export const defaultLanguage = language; +const defaultLanguage = language; -export const LocalizationContext = createContext({ +const LocalizationContext = createContext({ language }); -- cgit v1.2.3 From 363198118bba28ad3a37e200a7db2ca02bf2eae7 Mon Sep 17 00:00:00 2001 From: rahighi Date: Sun, 29 Aug 2021 09:14:35 +0430 Subject: removed additional export --- modern/src/common/localization.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modern') diff --git a/modern/src/common/localization.js b/modern/src/common/localization.js index 7383788d..90a5739a 100644 --- a/modern/src/common/localization.js +++ b/modern/src/common/localization.js @@ -112,7 +112,7 @@ const supportedLanguages = { zh_TW: { data: zh_TW, name: '中文 (Taiwan)' }, }; -export const languageList = Object.entries(supportedLanguages).map((values) => ({ code: values[0], name: values[1].name })); +const languageList = Object.entries(supportedLanguages).map((values) => ({ code: values[0], name: values[1].name })); const languages = localStorage.getItem('language') ? [localStorage.getItem('language')] : (window.navigator.languages !== undefined ? window.navigator.languages.slice() : []); let language = localStorage.getItem('language') || window.navigator.userLanguage || window.navigator.language; languages.push(language); -- cgit v1.2.3