diff --git a/.prettierrc b/.prettierrc index 9eed9542..c5391127 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,5 +3,13 @@ "printWidth": 80, "singleQuote": true, "tabWidth": 2, - "trailingComma": "all" + "trailingComma": "all", + "overrides": [ + { + "files": "src/locales/**/*.js", + "options": { + "printWidth": 150 + } + } + ] } diff --git a/src/components/FeaturePanel/EditDialog/EditDialog.tsx b/src/components/FeaturePanel/EditDialog/EditDialog.tsx index 4152f5d5..a339b2f7 100644 --- a/src/components/FeaturePanel/EditDialog/EditDialog.tsx +++ b/src/components/FeaturePanel/EditDialog/EditDialog.tsx @@ -27,6 +27,7 @@ import { SuccessContent } from './SuccessContent'; import { icons } from '../../../assets/icons'; import { editOsmFeature } from '../../../services/osmApiAuth'; import { useOsmAuthContext } from '../../utils/OsmAuthContext'; +import { t, Translation } from '../../../services/intl'; const useIsFullScreen = () => { const theme = useTheme(); @@ -54,30 +55,27 @@ const OsmLogin = () => { {loggedIn ? ( <> - Jste přihlášeni jako {osmUser}, změny se ihned projeví v mapě. - ( + ( ) ) : ( <> - Vkládáte anonymní poznámku do mapy. -
- Pokud se{' '} + {' '} - , změny se ihned projeví v mapě. + )}
@@ -122,7 +120,7 @@ export const EditDialog = ({ feature, open, handleClose, focusTag }: Props) => { ); if (noteText == null) { // eslint-disable-next-line no-alert - alert('Proveďte, prosím, požadované změny.'); + alert(t('editdialog.changes_needed')); return; } @@ -153,7 +151,9 @@ export const EditDialog = ({ feature, open, handleClose, focusTag }: Props) => { width={16} height={16} />{' '} - {loggedIn ? 'Upravit: ' : 'Navrhnout úpravu: '} + {loggedIn + ? t('editdialog.edit_heading') + : t('editdialog.suggest_heading')}{' '} {feature.tags.name || feature.properties.subclass} {successInfo ? ( @@ -170,7 +170,9 @@ export const EditDialog = ({ feature, open, handleClose, focusTag }: Props) => { {!loggedIn && ( <> - Možnosti + + {t('editdialog.options_heading')} + { {loading && } diff --git a/src/components/FeaturePanel/EditDialog/MajorKeysEditor.tsx b/src/components/FeaturePanel/EditDialog/MajorKeysEditor.tsx index 45485fa0..8566b3ce 100644 --- a/src/components/FeaturePanel/EditDialog/MajorKeysEditor.tsx +++ b/src/components/FeaturePanel/EditDialog/MajorKeysEditor.tsx @@ -2,12 +2,13 @@ import React, { useEffect } from 'react'; import TextField from '@material-ui/core/TextField'; import Button from '@material-ui/core/Button'; import Typography from '@material-ui/core/Typography'; +import { t } from '../../../services/intl'; const majorKeysNames = { - name: 'Název', - website: 'Web', - phone: 'Telefon', - opening_hours: 'Otevírací doba', + name: t('tags.name'), + website: t('tags.website'), + phone: t('tags.phone'), + opening_hours: t('tags.opening_hours'), }; export const majorKeys = ['name', 'website', 'phone', 'opening_hours']; @@ -48,7 +49,7 @@ export const MajorKeysEditor = ({ tags, setTag, focusTag }) => { {!!inactiveMajorKeys.length && ( <> - Přidat: + {t('editdialog.add_major_tag')}: {inactiveMajorKeys.map((k) => ( diff --git a/src/components/FeaturePanel/EditDialog/OtherTagsEditor.tsx b/src/components/FeaturePanel/EditDialog/OtherTagsEditor.tsx index e3ef056e..20311333 100644 --- a/src/components/FeaturePanel/EditDialog/OtherTagsEditor.tsx +++ b/src/components/FeaturePanel/EditDialog/OtherTagsEditor.tsx @@ -6,6 +6,7 @@ import Typography from '@material-ui/core/Typography'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import { majorKeys } from './MajorKeysEditor'; import { isString } from '../../helpers'; +import { t } from '../../../services/intl'; const Table = styled.table` width: calc(100% - 20px); @@ -45,7 +46,7 @@ const NewTagRow = ({ setTag }) => { onChange={(e) => setNewKey(e.target.value)} variant="outlined" size="small" - placeholder="new key" + placeholder={t('editdialog.other_tags.new_key')} /> @@ -56,7 +57,7 @@ const NewTagRow = ({ setTag }) => { size="small" />{' '} @@ -75,7 +76,7 @@ const KeyValueRow = ({ k, v, setTag, focusTag }) => ( variant="outlined" size="small" autoFocus={focusTag === k} - placeholder="will be deleted" + placeholder={t('editdialog.other_tags.will_be_deleted')} /> @@ -107,7 +108,7 @@ export const OtherTagsEditor = ({ tags, setTag, focusTag }) => { disableElevation onClick={() => setShowTags(!showTags)} > - Další vlastnosti – tagy + {t('editdialog.other_tags')} )} @@ -120,7 +121,7 @@ export const OtherTagsEditor = ({ tags, setTag, focusTag }) => { color="textSecondary" style={{ position: 'relative' }} > - Další vlastnosti – tagy + {t('editdialog.other_tags')} diff --git a/src/components/FeaturePanel/EditDialog/SuccessContent.tsx b/src/components/FeaturePanel/EditDialog/SuccessContent.tsx index 45ff4851..9442a5f7 100644 --- a/src/components/FeaturePanel/EditDialog/SuccessContent.tsx +++ b/src/components/FeaturePanel/EditDialog/SuccessContent.tsx @@ -9,6 +9,7 @@ import Typography from '@material-ui/core/Typography'; import { Box, Tooltip } from '@material-ui/core'; import IconButton from '@material-ui/core/IconButton'; import { nl2br } from '../../utils/nl2br'; +import { t, Translation } from '../../../services/intl'; const StyledCheckCircleIcon = styled(CheckCircleIcon)` color: #4b912e; @@ -54,21 +55,18 @@ export const SuccessContent = ({ successInfo, handleClose }) => { const texts = successInfo.type === 'note' ? { - heading: 'Děkujeme za Váš návrh!', - subheading: - 'Dobrovolnící z komunity OpenStreetMap ho časem zpracují.', - body: `Celý proces obvykle trvá několik dní. Ovšem v místech, kde není aktivní komunita, to může trvat i velmi dlouho.`, - urlLabel: `Doplnit informace či sledovat vývoj můžete zde:`, - textLabel: 'Text poznámky', + heading: t('editsuccess.note.heading'), + subheading: t('editsuccess.note.subheading'), + body: , + urlLabel: t('editsuccess.note.urlLabel'), + textLabel: t('editsuccess.note.textLabel'), } : { - heading: 'Děkujeme za Vaši editaci!', - subheading: 'Již nyní se začíná objevovat v mapách po celém světě.', - body: `V databázi OSM již je uložena. V řádu několika minut ji uvidíte na mapě "OSM Mapnik". Zdejší mapa a různé jiné aplikace se obnovují cca 1x za měsíc. - - Pokud se jedná o omyl, můžete hodnoty ručně vrátit zpět a znovu je uložit.`, - urlLabel: `Vaše změny:`, - textLabel: 'Poznámka ke změně', + heading: t('editsuccess.edit.heading'), + subheading: t('editsuccess.edit.subheading'), + body: , + urlLabel: t('editsuccess.edit.urlLabel'), + textLabel: t('editsuccess.edit.textLabel'), }; return ( @@ -84,11 +82,11 @@ export const SuccessContent = ({ successInfo, handleClose }) => { - {nl2br(texts.body)} + {texts.body} - {nl2br(texts.urlLabel)} + {texts.urlLabel}
{successInfo.url} @@ -106,7 +104,7 @@ export const SuccessContent = ({ successInfo, handleClose }) => { diff --git a/src/components/FeaturePanel/EditDialog/components.tsx b/src/components/FeaturePanel/EditDialog/components.tsx index 5520cf51..2f16da37 100644 --- a/src/components/FeaturePanel/EditDialog/components.tsx +++ b/src/components/FeaturePanel/EditDialog/components.tsx @@ -5,6 +5,7 @@ import React from 'react'; import Typography from '@material-ui/core/Typography'; import { Box } from '@material-ui/core'; import { useToggleState } from '../../helpers'; +import { t, Translation } from '../../../services/intl'; export const DialogHeading = ({ children }) => ( @@ -21,14 +22,14 @@ export const ChangeLocationEditor = ({ location, setLocation }) => { control={ } - label="Zadat novou polohu" + label={t('editdialog.location_checkbox')} /> {showLocation && (
setLocation(e.target.value)} - placeholder="např. naproti přes ulici" + placeholder={t('editdialog.location_placeholder')} InputLabelProps={{ shrink: true, }} @@ -47,7 +48,7 @@ export const PlaceCancelledToggle = ({ cancelled, toggle }) => ( <> } - label="Místo zrušeno či trvale zavřeno" + label={t('editdialog.place_cancelled')} />
@@ -57,21 +58,13 @@ export const ContributionInfoBox = ({ loggedIn }) => loggedIn ? ( - Vaše úprava bude ihned uložena do databáze OpenStreetMap. Prosíme, - vkládejte pouze informace z vlastních nebo ověřených zdrojů. Je zakázano - kopírovat data krytá autorským zákonem (např. Google Maps).{' '} -
- Více informací - + ) : ( - Váš návrh budou zpracovávat dobrovolníci OpenStreetMap. Zde pro ně - můžete přidat doplňující poznámku, nebo popsat např. úpravu polohy. - Vhodné je též podložit váš příspěvek odkazem na zdroj informace (web, - foto atd.). + ); @@ -79,8 +72,8 @@ export const ContributionInfoBox = ({ loggedIn }) => export const NoteField = ({ note, setNote }) => ( <> ( - + ); diff --git a/src/components/FeaturePanel/FeatureImage.tsx b/src/components/FeaturePanel/FeatureImage.tsx index 8e38a191..5e335bb3 100644 --- a/src/components/FeaturePanel/FeatureImage.tsx +++ b/src/components/FeaturePanel/FeatureImage.tsx @@ -5,6 +5,7 @@ import Head from 'next/head'; import { getFeatureImage, LOADING } from '../../services/images'; import { Feature } from '../../services/types'; import { InlineSpinner } from './FeatureImage/InlineSpinner'; +import { t } from '../../services/intl'; const Wrapper = styled.div` position: relative; @@ -103,7 +104,7 @@ const FeatureImage = ({ feature, ico, children }: Props) => { const { source, link, thumb, username, portrait } = image ?? {}; const uncertainImage = source === 'Mapillary'; const uncertainTitle = uncertainImage - ? '\nThis is the closest street view image. It may show different object.' + ? `\n${ t('featurepanel.uncertain_image')}` : ''; return ( diff --git a/src/components/FeaturePanel/FeaturePanel.tsx b/src/components/FeaturePanel/FeaturePanel.tsx index 67764f5e..c8677e6d 100644 --- a/src/components/FeaturePanel/FeaturePanel.tsx +++ b/src/components/FeaturePanel/FeaturePanel.tsx @@ -27,6 +27,7 @@ import { PanelScrollbars, } from '../utils/PanelHelpers'; import { useFeatureContext } from '../utils/FeatureContext'; +import { t } from '../../services/intl'; const StyledEdit = styled.div` margin: 60px 0 20px 0; @@ -102,19 +103,32 @@ const FeaturePanel = () => { - {tags.name ? subclass.replace('_', ' ') : 'beze jména'} + + {tags.name + ? subclass.replace('_', ' ') + : t('featurepanel.no_name')} + {SHOW_PROTOTYPE_UI && ( <> - + - + - + )} @@ -127,11 +141,11 @@ const FeaturePanel = () => { {error === 'gone' && ( - Tento prvek byl v mezičase smazán z OpenStreetMap.{' '} + {t('featurepanel.error_gone')}{' '} - Historie » + {t('featurepanel.history_button')} )} @@ -148,7 +162,7 @@ const FeaturePanel = () => { display="block" color="textSecondary" > - Další informace + {t('featurepanel.other_info_heading')} )} @@ -163,13 +177,13 @@ const FeaturePanel = () => { )} @@ -184,8 +198,12 @@ const FeaturePanel = () => { {nonOsmObject - ? `Mapový prvek ${osmMeta.type}` - : `${capitalize(osmMeta.type)} v databázi OpenStreetMap`} + ? t('featurepanel.feature_description_nonosm', { + type: osmMeta.type, + }) + : t('featurepanel.feature_description_osm', { + type: capitalize(osmMeta.type), + })}

@@ -197,7 +215,7 @@ const FeaturePanel = () => { onChange={toggleAdvanced} checked={advanced} />{' '} - Zobrazit jen tagy + {t('featurepanel.show_tags_only_button')}
diff --git a/src/components/FeaturePanel/TagsTable.tsx b/src/components/FeaturePanel/TagsTable.tsx index 0324b0f5..6fab8a8d 100644 --- a/src/components/FeaturePanel/TagsTable.tsx +++ b/src/components/FeaturePanel/TagsTable.tsx @@ -53,6 +53,7 @@ const isNetwork = (k) => k.match(/network/); const isBrand = (k) => k.match(/^brand/); const isPayment = (k) => k.match(/^payment/); +// eslint-disable-next-line @typescript-eslint/no-unused-vars const TagsGroup = ({ tags, label, value, hideArrow = false, onEdit }) => { const [isShown, toggle] = useToggleState(false); @@ -66,7 +67,6 @@ const TagsGroup = ({ tags, label, value, hideArrow = false, onEdit }) => {
diff --git a/src/components/FeaturePanel/renderers/OpeningHoursRenderer.tsx b/src/components/FeaturePanel/renderers/OpeningHoursRenderer.tsx index c775c508..3c0a30b4 100644 --- a/src/components/FeaturePanel/renderers/OpeningHoursRenderer.tsx +++ b/src/components/FeaturePanel/renderers/OpeningHoursRenderer.tsx @@ -4,6 +4,7 @@ import styled from 'styled-components'; import AccessTime from '@material-ui/icons/AccessTime'; import { useToggleState } from '../../helpers'; import { ToggleButton } from '../helpers'; +import { t } from '../../../services/intl'; interface SimpleOpeningHoursTable { su: string[]; @@ -36,15 +37,7 @@ const Table = styled.table` `; // const weekDays = ['su', 'mo', 'tu', 'we', 'th', 'fr', 'sa']; -const weekDays = [ - 'neděle', - 'pondělí', - 'úterý', - 'středa', - 'čtvrtek', - 'pátek', - 'sobota', -]; +const weekDays = t('opening_hours.days_su_mo_tu_we_th_fr_sa').split('|'); const formatTimes = (times) => times.length ? times.map((x) => x.replace(/:00/g, '')).join(', ') : '-'; @@ -53,15 +46,16 @@ const formatDescription = (isOpen: boolean, days: SimpleOpeningHoursTable) => { const timesByDay = Object.values(days); const day = new Date().getDay(); const today = timesByDay[day]; + const todayTime = formatTimes(today); if (isOpen) { - return `Otevřeno: ${formatTimes(today)}`; + return t('opening_hours.open', { todayTime }); } const isOpenedToday = today.length; return isOpenedToday - ? `Nyní zavřeno, dnes: ${formatTimes(today)}` - : 'Dnes zavřeno'; + ? t('opening_hours.now_closed_but_today', { todayTime }) + : t('opening_hours.today_closed'); }; const OpeningHoursRenderer = ({ v }) => { diff --git a/src/components/Map/MapFooter.tsx b/src/components/Map/MapFooter.tsx index 8c84e056..164ad074 100644 --- a/src/components/Map/MapFooter.tsx +++ b/src/components/Map/MapFooter.tsx @@ -4,7 +4,7 @@ import getConfig from 'next/config'; import { Menu, MenuItem } from '@material-ui/core'; import { useMapStateContext } from '../utils/MapStateContext'; import { useFeatureContext } from '../utils/FeatureContext'; -import { changeLang, intl } from '../../services/intl'; +import { changeLang, intl, t } from '../../services/intl'; const { publicRuntimeConfig: { osmappVersion, commitHash, commitMessage }, @@ -102,11 +102,11 @@ const EditLink = () => { href={`https://www.openstreetmap.org/edit${featureQuery}#map=${ browser ? view.join('/') : '' }`} - title="v editoru iD" + title={t('map.edit_button_title')} target="_blank" rel="noopener" > - editovat + {t('map.edit_button')} ); }; @@ -118,9 +118,9 @@ const MapDataLink = () => ( type="button" className="linkLikeButton" // eslint-disable-next-line no-alert - onClick={() => alert('(c) OpenStreetMap.org contributors')} + onClick={() => alert(t('map.copyright'))} > - mapová data + {t('map.map_data_button')} ); diff --git a/src/components/SearchBox/SearchBoxInput.tsx b/src/components/SearchBox/SearchBoxInput.tsx index 537df640..9a590055 100644 --- a/src/components/SearchBox/SearchBoxInput.tsx +++ b/src/components/SearchBox/SearchBoxInput.tsx @@ -32,7 +32,7 @@ const ClosePanelButton = ({ setInputValue }) => { const { view } = useMapStateContext(); return ( { e.preventDefault(); setInputValue(''); diff --git a/src/components/utils/OsmAuthContext.tsx b/src/components/utils/OsmAuthContext.tsx index 8eea5ba1..2d6a8d64 100644 --- a/src/components/utils/OsmAuthContext.tsx +++ b/src/components/utils/OsmAuthContext.tsx @@ -7,7 +7,7 @@ import { interface OsmAuthType { loggedIn: boolean; - osmUser: false | string; + osmUser: string; handleLogin: () => void; handleLogout: () => void; } @@ -15,9 +15,9 @@ interface OsmAuthType { export const OsmAuthContext = createContext(undefined); export const OsmAuthProvider = ({ children }) => { - const [osmUser, setOsmUser] = useState(getOsmUsername()); + const [osmUser, setOsmUser] = useState(getOsmUsername() ?? ''); const handleLogin = () => fetchOsmUsername().then(setOsmUser); - const handleLogout = () => osmLogout().then(() => setOsmUser(false)); + const handleLogout = () => osmLogout().then(() => setOsmUser('')); const value = { loggedIn: !!osmUser, diff --git a/src/locales/cs.js b/src/locales/cs.js index 8a1a08be..4374f9db 100644 --- a/src/locales/cs.js +++ b/src/locales/cs.js @@ -1,7 +1,6 @@ export default { 'homepage.subtitle': 'Univerzální appka pro OpenStreetMap', - 'homepage.how_to_start': - 'Začněte ve vyhledávacím poli,\nnebo klikněte na libovolnou ikonku v mapě.', + 'homepage.how_to_start': 'Začněte ve vyhledávacím poli,\nnebo klikněte na libovolnou ikonku v mapě.', 'homepage.examples.eg': 'např.', 'homepage.examples.charles_bridge_statues': 'Sochy na Karlově mostě', 'homepage.osm_logo_alt': 'Logo OpenStreetMap', @@ -12,7 +11,7 @@ export default { 'homepage.about_osmapp': `Tato aplikace by měla nabídnout pohodlné rozhraní pro každodenní využití OpenStreetmap jako free alternativy bez jakéhokoliv sledování. Zatím je projekt v zárodku, ale už umí zobrazovat a editovat POI, a mapu základně prohledávat. V plánu jsou funkce jako přepínač vrstev, - outdoorový vektorový styl, navigace či oblíbená místa.`, + turistická vektorová mapa, navigace či oblíbená místa.`, 'homepage.github_link': `Další nápady můžete přidat na Github.`, 'homepage.special_thanks_heading': `Specialní díky`, 'homepage.special_thanks': `
    @@ -25,4 +24,79 @@ export default { `, 'searchbox.placeholder': 'Prohledat OpenStreetMap', + 'searchbox.close_panel': 'Zavřít panel', + + 'featurepanel.no_name': 'beze jména', + 'featurepanel.share_button': 'Sdílet', + 'featurepanel.save_button': 'Uložit', + 'featurepanel.directions_button': 'Trasa', + 'featurepanel.error_gone': 'Tento prvek byl v mezičase smazán z OpenStreetMap.', + 'featurepanel.history_button': 'Historie »', + 'featurepanel.other_info_heading': 'Další informace', + 'featurepanel.edit_button_title': 'Upravit v databázi OpenStreetMap', + 'featurepanel.edit_button': 'Upravit místo', + 'featurepanel.feature_description_nonosm': 'Mapový prvek __type__', + 'featurepanel.feature_description_osm': '__type__ v databázi OpenStreetMap', + 'featurepanel.show_tags_only_button': 'Zobrazit jen tagy', + 'featurepanel.uncertain_image': 'Je zobrazena nejbližší fotka uliční úrovně. Může ukazovat jiný objekt.', + 'featurepanel.inline_edit_title': 'Upravit', + + 'opening_hours.open': 'Otevřeno: __todayTime__', + 'opening_hours.now_closed_but_today': 'Nyní zavřeno, dnes: __todayTime__', + 'opening_hours.today_closed': 'Dnes zavřeno', + 'opening_hours.days_su_mo_tu_we_th_fr_sa': 'neděle|pondělí|úterý|středa|čtvrtek|pátek|sobota', + + 'map.edit_button': 'editovat', + 'map.edit_button_title': 'otevřít v editoru iD', + 'map.copyright': '(c) přispěvatelé OpenStreetMap.org', + 'map.map_data_button': 'mapová data', + + 'editdialog.edit_heading': 'Upravit:', + 'editdialog.suggest_heading': 'Navrhnout úpravu:', + 'editdialog.options_heading': 'Možnosti', + 'editdialog.cancel_button': 'Zrušit', + 'editdialog.save_button': 'Uložit', + 'editdialog.changes_needed': 'Proveďte, prosím, požadované změny.', + 'editdialog.loggedInMessage': 'Jste přihlášeni jako __osmUser__, změny se ihned projeví v mapě.', + 'editdialog.logout': 'odhlásit', + 'editdialog.anonymousMessage1': 'Vkládáte anonymní poznámku do mapy.
    Pokud se', + 'editdialog.anonymousMessage2_login': 'přihlásíte do OpenStreetMap', + 'editdialog.anonymousMessage3': ', změny se ihned projeví v mapě.', + 'editdialog.add_major_tag': 'Přidat', + 'editdialog.location_checkbox': 'Zadat novou polohu', + 'editdialog.location_placeholder': 'např. naproti přes ulici', + 'editdialog.place_cancelled': 'Místo zrušeno či trvale zavřeno', + 'editdialog.comment': 'Poznámka (nepovinné)', + 'editdialog.comment_placeholder': 'odkaz na zdroj informace apod.', + 'editdialog.info_edit': `Vaše úprava bude ihned uložena do databáze OpenStreetMap. Prosíme, + vkládejte pouze informace z vlastních nebo ověřených zdrojů. Je zakázano + kopírovat data krytá autorským zákonem (např. Google Maps).{' '} + + Více informací + `, + 'editdialog.info_note': `Váš návrh budou zpracovávat dobrovolníci OpenStreetMap. Zde pro ně + můžete přidat doplňující poznámku, nebo popsat např. úpravu polohy. + Vhodné je též podložit váš příspěvek odkazem na zdroj informace (web, + foto atd.).`, + 'editdialog.other_tags': 'Další vlastnosti – tagy', + 'editdialog.other_tags.new_key': 'nový klíč', + 'editdialog.other_tags.add': 'Přidat', + 'editdialog.other_tags.will_be_deleted': 'bude smazáno', + + 'editsuccess.close_button': 'Zavřít', + 'editsuccess.note.heading': 'Děkujeme za Váš návrh!', + 'editsuccess.note.subheading': 'Dobrovolnící z komunity OpenStreetMap ho časem zpracují.', + 'editsuccess.note.body': `Celý proces obvykle trvá několik dní. Ovšem v místech, kde není aktivní komunita, to může trvat i velmi dlouho.`, + 'editsuccess.note.urlLabel': `Doplnit informace či sledovat vývoj můžete zde:`, + 'editsuccess.note.textLabel': 'Text poznámky', + 'editsuccess.edit.heading': 'Děkujeme za Vaši editaci!', + 'editsuccess.edit.subheading': 'Již nyní se začíná objevovat v mapách po celém světě.', + 'editsuccess.edit.body': `V databázi OSM již je uložena. V řádu několika minut ji uvidíte na mapě "OSM Mapnik". Zdejší mapa a různé jiné aplikace se obnovují cca 1x za měsíc.\n\n Pokud se jedná o omyl, můžete hodnoty ručně vrátit zpět a znovu je uložit.`, + 'editsuccess.edit.urlLabel': `Vaše změny:`, + 'editsuccess.edit.textLabel': 'Poznámka ke změně', + + 'tags.name': 'Název', + 'tags.website': 'Web', + 'tags.phone': 'Telefon', + 'tags.opening_hours': 'Otevírací doba', }; diff --git a/src/locales/vocabulary.js b/src/locales/vocabulary.js index 0ec32377..e7d604ed 100644 --- a/src/locales/vocabulary.js +++ b/src/locales/vocabulary.js @@ -2,8 +2,7 @@ export default { 'homepage.subtitle': 'A universal OpenStreetMap app', - 'homepage.how_to_start': - 'Start by typing your query into the searchbox.\nOr click any item on the map.', + 'homepage.how_to_start': 'Start by typing your query into the searchbox.\nOr click any item on the map.', 'homepage.examples.eg': 'eg.', 'homepage.examples.charles_bridge_statues': 'Statues of Charles bridge', 'homepage.screenshot_alt': 'Screenshot of OsmAPP', @@ -30,4 +29,78 @@ export default { `, 'searchbox.placeholder': 'Search OpenStreetMap', + 'searchbox.close_panel': 'Close side-panel', + + 'featurepanel.no_name': 'No name', + 'featurepanel.share_button': 'Share', + 'featurepanel.save_button': 'Save to favorites', + 'featurepanel.directions_button': 'Directions', + 'featurepanel.error_gone': 'This feature was recently deleted from OpenStreetMap.', + 'featurepanel.history_button': 'History »', + 'featurepanel.other_info_heading': 'More information', + 'featurepanel.edit_button_title': 'Edit in OpenStreetMap database', + 'featurepanel.edit_button': 'Edit place', + 'featurepanel.feature_description_nonosm': 'Map feature __type__', + 'featurepanel.feature_description_osm': '__type__ in OpenStreetMap database', + 'featurepanel.show_tags_only_button': 'Show tags only', + 'featurepanel.uncertain_image': 'This is the closest street view image. It may show different object.', + 'featurepanel.inline_edit_title': 'Edit', + + 'opening_hours.open': 'Open: __todayTime__', + 'opening_hours.now_closed_but_today': 'Now closed, today: __todayTime__', + 'opening_hours.today_closed': 'Today closed', + 'opening_hours.days_su_mo_tu_we_th_fr_sa': 'sunday|monday|tuesday|wednesday|thursday|friday|saturday', + + 'map.edit_button': 'edit', + 'map.edit_button_title': 'open in iD editor', + 'map.copyright': '(c) OpenStreetMap.org contributors', + 'map.map_data_button': 'map data', + + 'editdialog.edit_heading': 'Edit:', + 'editdialog.suggest_heading': 'Suggest an edit:', + 'editdialog.options_heading': 'Options', + 'editdialog.cancel_button': 'Cancel', + 'editdialog.save_button': 'Save', + 'editdialog.changes_needed': 'Please, make some changes.', + 'editdialog.loggedInMessage': 'You are logged in as __osmUser__, changes will be saved immediately.', + 'editdialog.logout': 'logout', + 'editdialog.anonymousMessage1': 'An anonymous note will be added to the map.
    If you', + 'editdialog.anonymousMessage2_login': 'log in to OpenStreetMap', + 'editdialog.anonymousMessage3': ', your changes will be immediate.', + 'editdialog.add_major_tag': 'Add', + 'editdialog.location_checkbox': 'Change location', + 'editdialog.location_placeholder': 'eg. across the street', + 'editdialog.place_cancelled': 'Place cancelled or permanently closed', + 'editdialog.comment': 'Comment (optional)', + 'editdialog.comment_placeholder': 'link to the source of information etc.', + 'editdialog.info_edit': `Your edit will be immediately saved to the OpenStreetMap. Please, + enter only information from your own or verified sources. It is prohibited + to copy copyrighted data (e.g. Google Maps). More info`, + 'editdialog.info_note': `Your suggestion will be processed by OpenStreetMap volunteers. Here + you can add an additional note or describe position adjustment etc. + It is also appropriate to support your contribution with a link to a source of information (web, + photo, etc.).`, + 'editdialog.other_tags': 'Other properties – tags', + 'editdialog.other_tags.new_key': 'new key', + 'editdialog.other_tags.add': 'Add', + 'editdialog.other_tags.will_be_deleted': 'will be deleted', + + 'editsuccess.close_button': 'Close', + 'editsuccess.note.heading': 'Thank you for your suggestion!', + 'editsuccess.note.subheading': 'OpenStreetMap volunteers will process it over time.', + 'editsuccess.note.body': 'It usually takes few days. However, in places with no active community, it can take a very long time.', + 'editsuccess.note.urlLabel': 'You can add information or follow updates here:', + 'editsuccess.note.textLabel': 'Note text', + 'editsuccess.edit.heading': 'Thank you for your edit!', + 'editsuccess.edit.subheading': 'Your change is starting to appear on maps around the world.', + 'editsuccess.edit.body': `It is already stored in the OSM database. You will see it on the "OSM Mapnik" map in a few minutes. + The local map and various other applications are refreshed about once a month. +

    If this is a mistake, you can manually revert the values and save it again.`, + 'editsuccess.edit.urlLabel': `Your changes:`, + 'editsuccess.edit.textLabel': 'Comment', + + 'tags.name': 'Name', + 'tags.website': 'Web', + 'tags.phone': 'Phone', + 'tags.opening_hours': 'Opening hours', };
{label} onEdit(tags[0][0])} /> - {value || tags[0]?.join(' = ')} {!hideArrow && }