diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..daab3a54 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' (VERY IMPORTANT, we need to know which instance of uMap is concerned!) +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..11fc491e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 00000000..8d2f2cbf --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,6 @@ +trailingComma: "es5" +tabWidth: 2 +semi: false +singleQuote: true +printWidth: 88 +quoteProps: "consistent" diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..e2645f94 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,20 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +mkdocs: + configuration: mkdocs.yml + +# Optionally declare the Python requirements required to build your docs +python: + install: + - requirements: docs/requirements.txt diff --git a/.tx/config b/.tx/config index 45e25e76..c2412607 100644 --- a/.tx/config +++ b/.tx/config @@ -1,13 +1,13 @@ [main] host = https://www.transifex.com -[umap.backend] +[o:openstreetmap:p:umap:r:backend] file_filter = umap/locale//LC_MESSAGES/django.po source_file = umap/locale/en/LC_MESSAGES/django.po source_lang = en type = PO -[umap.frontend] +[o:openstreetmap:p:umap:r:frontend] file_filter = umap/static/umap/locale/.json source_file = umap/static/umap/locale/en.json source_lang = en diff --git a/Makefile b/Makefile index e6182deb..cadc786f 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ compilemessages: umap compilemessages umap generate_js_locale messages: - umap makemessages -l en --ignore node_modules --ignore umap_project.egg-info --ignore __pycache__ --ignore umap/tests + cd umap && umap makemessages -l en node node_modules/leaflet-i18n/bin/i18n.js --dir_path=umap/static/umap/js/ --dir_path=umap/static/umap/vendors/measurable/ --locale_dir_path=umap/static/umap/locale/ --locale_codes=en --mode=json --clean --default_values vendors: mkdir -p umap/static/umap/vendors/leaflet/ && cp -r node_modules/leaflet/dist/** umap/static/umap/vendors/leaflet/ @@ -24,7 +24,7 @@ vendors: mkdir -p umap/static/umap/vendors/editable/ && cp -r node_modules/leaflet.path.drag/src/*.js umap/static/umap/vendors/editable/ mkdir -p umap/static/umap/vendors/hash/ && cp -r node_modules/leaflet-hash/*.js umap/static/umap/vendors/hash/ mkdir -p umap/static/umap/vendors/i18n/ && cp -r node_modules/leaflet-i18n/*.js umap/static/umap/vendors/i18n/ - mkdir -p umap/static/umap/vendors/editinosm/ && cp -r node_modules/leaflet-editinosm/Leaflet.EditInOSM.* umap/static/umap/vendors/editinosm/ + mkdir -p umap/static/umap/vendors/editinosm/ && cp -r node_modules/leaflet-editinosm/{Leaflet.EditInOSM.*,edit-in-osm.png} umap/static/umap/vendors/editinosm/ mkdir -p umap/static/umap/vendors/minimap/ && cp -r node_modules/leaflet-minimap/src/** umap/static/umap/vendors/minimap/ mkdir -p umap/static/umap/vendors/loading/ && cp -r node_modules/leaflet-loading/src/** umap/static/umap/vendors/loading/ mkdir -p umap/static/umap/vendors/markercluster/ && cp -r node_modules/leaflet.markercluster/dist/** umap/static/umap/vendors/markercluster/ @@ -43,6 +43,7 @@ vendors: mkdir -p umap/static/umap/vendors/tokml && cp -r node_modules/tokml/tokml.js umap/static/umap/vendors/tokml mkdir -p umap/static/umap/vendors/locatecontrol/ && cp -r node_modules/leaflet.locatecontrol/dist/L.Control.Locate.css umap/static/umap/vendors/locatecontrol/ mkdir -p umap/static/umap/vendors/locatecontrol/ && cp -r node_modules/leaflet.locatecontrol/src/L.Control.Locate.js umap/static/umap/vendors/locatecontrol/ + mkdir -p umap/static/umap/vendors/dompurify/ && cp -r node_modules/dompurify/dist/purify.js umap/static/umap/vendors/dompurify/ installjs: npm install testjsfx: @@ -53,3 +54,17 @@ tx_push: tx push -s tx_pull: tx pull + +jsdir = umap/static/umap/js/ +filepath = "${jsdir}*.js" +pretty: ## Apply PrettierJS to all JS files (or specified `filepath`) + ./node_modules/prettier/bin-prettier.js --write ${filepath} + +lebab: ## Convert JS `filepath` to modern syntax with Lebab, then prettify + ./node_modules/lebab/bin/index.js --replace ${filepath} --transform arrow,arrow-return + ./node_modules/lebab/bin/index.js --replace ${filepath} --transform let + ./node_modules/lebab/bin/index.js --replace ${filepath} --transform template + $(MAKE) pretty filepath=${filepath} + +lebab-all: $(jsdir)* ## Convert all JS files to modern syntax with Lebab + prettify + for file in $^ ; do $(MAKE) lebab filepath=$${file}; done diff --git a/README.md b/README.md index a7f637a9..e90a2f3b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site. *Because we think that the more OSM will be used, the more OSM will be improved.* -It uses [django-leaflet-storage](https://github.com/umap-project/django-leaflet-storage) and [Leaflet.Storage](https://github.com/umap-project/Leaflet.Storage), built on top of Django and Leaflet. +Built on top of Django and Leaflet. ## Installation and configuration diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..04dc5936 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,5 @@ +# Security Policy + +## Reporting a Vulnerability + +You spoted a security issue? Please contact directly @yohanboniface or @davidbgk about it. diff --git a/docs/changelog.md b/docs/changelog.md index 59144afe..c09371a2 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,45 @@ # Changelog +## 1.3.0 + +- added a filter by category panel (cf #1041, thanks @k-3st3ban) +- added a permanent credit (cf #1041, thanks @k-3st3ban) +- allow to add an overlay tilelayer +- replaced custom locate control with Leaflet.Locate (cf #1031, thanks @aleksejspopovs) +- fixed bug where we coud not edit permissions of a new saved map unless reloading the page +- CSS: Fix cut of text in iframes of popup content (cf #971, thanks @tordans) +- enhanced property fallback in string formatting (cf #862, thanks @mstock) +- lines and polygons measure is now displayed while drawing (cf #1068, thanks @knowname) +- refactored zoomTo while making easing transition non default (cf #679 #179) +- fixed old `_storage_options` not being cleaned when saving map (cf #1076) +- added star maps feature (cf #683) +- added a banner + removed create buttons when in read only mode (cf #1095) +- added DOMPurify to escape malicious input from user (cf #1094) +- expose direct map URL in the export panel (cf #699) +- added a very basic `/stats/` JSON view (cf #1100) +- added max width for the help box (on small screens, cf #887) +- display the steps for inputs of type range (cf #877) +- lazy load tile layers thumbnails (cf #1089) +- allow geolocation from iframe embeds (cf #898) +- remove the limit of visible maps in user’s view (cf #1025) +- switch to Django full text search instead of home made (cf #519) + +## 1.2.7 +- redirect to `user_maps` at auth end when `window.opener` is unavailable (Twitter auth flow) + +## 1.2.6 +- marked User.id as protected, to fix Twitter auth + +## 1.2.5 +- Allow to create search index without changing unaccent mutability (cf #519) +- switched from `If-None-Match` to `If-Unmodified-Since` for concurrency control +- prevent caching datalayers geojson when in edit mode +- refactored gzip management + +## 1.2.4 +- upgrade to Django 4.x, and upgrade of other deps +- switched from custom DictField to propert JsonField + ## 1.2.3 - improved panel layout and image sizing (by @Binnette, cf #824) diff --git a/docs/contributing.md b/docs/contributing.md index 81d5cb25..524c4411 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -54,22 +54,22 @@ See [Installation](install.md) ### Hacking on the code -Create a workspace folder ~/wk and go into it. +Create a workspace folder `~/wk` and go into it. -"git clone" the main repository and go in the umap folder +"git clone" the main repository and go in the `umap/` folder. -Several commands you need to issue to be in a virtualenv: +Once you are in the `umap/` folder, create a Python virtual environment: - virtualenv ~/wk/umap/venv --python=/usr/bin/python3.6 - source ~/wk/umap/venv/bin/activate + python3 -m venv venv + source venv/bin/activate -Now, command "umap" will be available +Now, the `umap` command will be available. -*Note: if you close your terminal, you will need to re-run command:* +*Note: if you close your terminal, you will need to re-run that command from `~/wk/umap`:* - source /srv/umap/venv/bin/activate + source venv/bin/activate -To test your code, you will add to install umap from your git folder. Go to ~/wk/umap and run: +To test your code, you will add to install umap from your git folder. Go to `~/wk/umap` and run: pip install -e . # or pip install -e ~/wk/umap @@ -78,7 +78,12 @@ This command will check dependencies and install uMap from sources inside folder When installing from the git repository, do not forget to run `make installjs` and `make vendors`, before running `umap collectstatic` (as mentioned in [Ubuntu from scratch](ubuntu.md)). -To start your local uMap: +Create a PostgreSQL database and apply migrations to setup your database: + + createdb umap + umap migrate + +You should now be able to start your local uMap instance: umap runserver 0.0.0.0:8000 diff --git a/docs/install.md b/docs/install.md index 45c62c2a..1aa9c8e3 100644 --- a/docs/install.md +++ b/docs/install.md @@ -82,15 +82,15 @@ Start the server UMap uses PostgreSQL tsvector for searching. In case your database is big, you may want to add an index. For that, you should do so: + # Create a basic search configuration + CREATE TEXT SEARCH CONFIGURATION umapdict (COPY=simple); + + # If you also want to deal with accents and case, add this before creating the index CREATE EXTENSION unaccent; CREATE EXTENSION btree_gin; - ALTER FUNCTION unaccent(text) IMMUTABLE; - ALTER FUNCTION to_tsvector(text) IMMUTABLE; - CREATE INDEX search_idx ON umap_map USING gin(to_tsvector(unaccent(name)), share_status); + ALTER TEXT SEARCH CONFIGURATION umapdict ALTER MAPPING FOR hword, hword_part, word WITH unaccent, simple; + # Now create the index + CREATE INDEX IF NOT EXISTS search_idx ON umap_map USING GIN(to_tsvector('umapdict', name), share_status); -## Optimisations - -To speed up uMap homepage rendering on a large instance, the following index can be added as well (make sure you set the center to your default instance map center): - - CREATE INDEX umap_map_optim ON umap_map (modified_at) WHERE ("umap_map"."share_status" = 1 AND ST_Distance("umap_map"."center", ST_GeomFromEWKT('SRID=4326;POINT(2 51)')) > 1000.0); +And change `UMAP_SEARCH_CONFIGURATION = "umapdict"` in your settings. diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..c8c0c847 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +# Force rtfd to use a recent version of mkdocs +mkdocs==1.4.2 diff --git a/docs/ubuntu.md b/docs/ubuntu.md index 6f8ac33f..bd478b45 100644 --- a/docs/ubuntu.md +++ b/docs/ubuntu.md @@ -6,13 +6,10 @@ You need sudo grants on this server, and it must be connected to Internet. ## Install system dependencies - sudo apt install build-essential autoconf python3.6 python3.6-dev python-virtualenv wget nginx uwsgi uwsgi-plugin-python3 postgresql-9.5 postgresql-server-dev-9.5 postgresql-9.5-postgis-2.2 git libxml2-dev libxslt1-dev zlib1g-dev + sudo apt install python3 python3-dev python3-venv wget nginx uwsgi uwsgi-plugin-python3 postgresql gcc postgis libpq-dev *Note: nginx and uwsgi are not required for local development environment* -*Note: uMap also works with python 2.7 and 3.4, so adapt the package names if you work with another version.* - - ## Create deployment directories: sudo mkdir -p /srv/umap @@ -262,17 +259,30 @@ In your local.py: UMAP_DEMO_SITE = False DEBUG = False - + +### Configure Nginx to serve statics and uploaded files: + In your nginx config: location /static { autoindex off; + access_log off; + log_not_found off; + sendfile on; + gzip on; + gzip_vary on; alias /path/to/umap/var/static/; } location /uploads { autoindex off; - alias /path/to/umap/var/data/; + sendfile on; + gzip on; + gzip_vary on; + alias /path/to/umap/var/data/; + # Exclude direct acces to geojson, as permissions must be + # checked py django. + location /uploads/datalayer/ { return 404; } } ### Configure social auth @@ -294,6 +304,9 @@ In your local.py, set `COMPRESS_ENABLED = True`, and then run the following comm umap compress +Optionally add `COMPRESS_STORAGE = "compressor.storage.GzipCompressorFileStorage"` +and add `gzip_static on` directive to Nginx `/static` location, so Nginx will +serve pregenerated files instead of compressing them on the fly. ### Configure the site URL and short URL @@ -304,6 +317,55 @@ In your local.py: Also adapt `ALLOWED_HOSTS` accordingly. +### Configure X-Accel-Redirect + +In order to let Nginx serve the layer geojsons but uMap still check the permissions, +you can add this settings: + + UMAP_XSENDFILE_HEADER = 'X-Accel-Redirect' + +And then add this new location in your nginx config (before the `/` location): + + location /internal/ { + internal; + gzip_vary on; + gzip_static on; + alias /path/to/umap/var/data/; + } + +### Configure ajax proxy cache + +In Nginx: + +- add the proxy cache + + proxy_cache_path /tmp/nginx_ajax_proxy_cache levels=1:2 keys_zone=ajax_proxy:10m inactive=60m; + proxy_cache_key "$args"; + +- add this location (before the `/` location): + + location /ajax-proxy/ { + valid_referers server_names; + if ($invalid_referer) { + return 400; + } + add_header X-Proxy-Cache $upstream_cache_status always; + proxy_cache ajax_proxy; + proxy_cache_valid 1m; # Default. Umap will override using X-Accel-Expires + gzip on; + gzip_proxied any; + gzip_types + application/vnd.google-earth.kml+xml + application/geo+json + application/json + application/javascript + text/xml + application/xml; + uwsgi_pass umap; + include /srv/umap/uwsgi_params; + } + + ## Add more tilelayers, pictograms… diff --git a/package-lock.json b/package-lock.json index b49bdf13..aca700db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,17 +10,18 @@ "license": "WTFPL", "dependencies": { "csv2geojson": "5.1.1", + "dompurify": "^3.0.3", "georsstogeojson": "^0.1.0", "leaflet": "1.3.4", "leaflet-contextmenu": "^1.4.0", "leaflet-editable": "^1.2.0", "leaflet-editinosm": "0.2.3", - "leaflet-formbuilder": "0.2.3", + "leaflet-formbuilder": "0.2.4", "leaflet-fullscreen": "1.0.2", "leaflet-hash": "0.2.1", "leaflet-i18n": "0.3.1", "leaflet-loading": "0.1.24", - "leaflet-measurable": "0.0.5", + "leaflet-measurable": "0.1.0", "leaflet-minimap": "^3.6.1", "leaflet-toolbar": "umap-project/Leaflet.toolbar", "leaflet.heat": "0.2.0", @@ -36,12 +37,14 @@ "devDependencies": { "chai": "^3.3.0", "happen": "~0.1.3", + "lebab": "^3.2.1", "mocha": "^2.3.3", "mocha-phantomjs": "^4.0.1", "optimist": "~0.4.0", "phantomjs": "^1.9.18", - "sinon": "^1.10.3", - "uglify-js": "~2.2.3" + "prettier": "^2.8.8", + "sinon": "^15.1.0", + "uglify-js": "~3.17.4" } }, "node_modules/@mapbox/sexagesimal": { @@ -55,6 +58,68 @@ "node": ">=4.0.0" } }, + "node_modules/@sinonjs/commons": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/commons/node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.2.0.tgz", + "integrity": "sha512-OPwQlEdg40HAj5KNF8WW6q2KG4Z+cBCZb3m4ninfTZKaBmbIJodviQsDBoYMPHkOyJJMHnOJo5j2+LKDOhOACg==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@sinonjs/samsam": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", + "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^2.0.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/samsam/node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@sinonjs/text-encoding": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", + "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", + "dev": true + }, "node_modules/@types/geojson": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.6.tgz", @@ -66,6 +131,27 @@ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, + "node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/adm-zip": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.2.1.tgz", @@ -75,15 +161,6 @@ "node": ">=0.3.0" } }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true, - "engines": { - "node": ">=0.4.2" - } - }, "node_modules/ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -111,6 +188,18 @@ "safer-buffer": "~2.1.0" } }, + "node_modules/assert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", + "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "dev": true, + "dependencies": { + "es6-object-assign": "^1.1.0", + "is-nan": "^1.2.1", + "object-is": "^1.0.1", + "util": "^0.12.0" + } + }, "node_modules/assert-plus": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", @@ -129,6 +218,18 @@ "node": "*" } }, + "node_modules/ast-types": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.15.2.tgz", + "integrity": "sha512-c27loCv9QkZinsa5ProX751khO9DJl/AcB5c2KNtA6NRvHKS0PgLfcftz72KVq504vB0Gku5s2kUZzDBvQWvHg==", + "dev": true, + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/async": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", @@ -138,6 +239,18 @@ "lodash": "^4.17.14" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/aws-sign2": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", @@ -261,6 +374,19 @@ "node": "*" } }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/caseless": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", @@ -490,6 +616,22 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, + "node_modules/define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -535,6 +677,11 @@ "domelementtype": "1" } }, + "node_modules/dompurify": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.3.tgz", + "integrity": "sha512-axQ9zieHLnAnHh0sfAamKYiqXMJAVwu+LM/alQ7WDagoWessyWvMSFyW65CqF3owufNu8HBcE4cM2Vflu7YWcQ==" + }, "node_modules/domutils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.3.0.tgz", @@ -553,6 +700,12 @@ "safer-buffer": "^2.1.0" } }, + "node_modules/es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==", + "dev": true + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -562,6 +715,91 @@ "node": ">=0.8.0" } }, + "node_modules/escope": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-4.0.0.tgz", + "integrity": "sha512-E36qlD/r6RJHVpPKArgMoMlNJzoRJFH8z/cAZlI9lbc45zB3+S7i9k6e/MNb+7bZQzNEa6r8WKN3BovpeIBwgA==", + "dev": true, + "dependencies": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/escope/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", + "dev": true, + "dependencies": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -634,6 +872,18 @@ "node >=0.6.0" ] }, + "node_modules/f-matches": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/f-matches/-/f-matches-1.1.0.tgz", + "integrity": "sha512-8NALQS5oB1+9hkEwiRjsRroTAQ7zKmXjxe0ZcMHDRrFIR54PhSJp7Rm+Q5+tgJ7eO5ejCgbUPNXeiflX18Rt0Q==", + "dev": true, + "dependencies": { + "lodash": "^4.17.5" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/fd-slicer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", @@ -643,6 +893,15 @@ "pend": "~1.2.0" } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -666,16 +925,6 @@ "node": ">= 0.10" } }, - "node_modules/formatio": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", - "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", - "deprecated": "This package is unmaintained. Use @sinonjs/formatio instead", - "dev": true, - "dependencies": { - "samsam": "~1.1" - } - }, "node_modules/fs-extra": { "version": "0.26.7", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", @@ -695,6 +944,12 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "node_modules/generate-function": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", @@ -793,6 +1048,20 @@ "georsstogeojson": "georsstogeojson" } }, + "node_modules/get-intrinsic": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -823,6 +1092,18 @@ "node": "*" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -866,6 +1147,18 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -878,6 +1171,54 @@ "node": ">=0.10.0" } }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasha": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz", @@ -998,6 +1339,49 @@ "node": "*" } }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-my-ip-valid": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.1.tgz", @@ -1017,6 +1401,22 @@ "xtend": "^4.0.0" } }, + "node_modules/is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -1032,6 +1432,25 @@ "node": ">=0.10.0" } }, + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -1168,6 +1587,12 @@ "node": ">=0.8" } }, + "node_modules/just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, "node_modules/jxon": { "version": "2.0.0-beta.5", "resolved": "https://registry.npmjs.org/jxon/-/jxon-2.0.0-beta.5.tgz", @@ -1212,9 +1637,9 @@ "integrity": "sha1-8HFmTEpSe3b3uPm87HRLJIiVwHE=" }, "node_modules/leaflet-formbuilder": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/leaflet-formbuilder/-/leaflet-formbuilder-0.2.3.tgz", - "integrity": "sha1-7ucYzcyMOzABk+U7qASFLAv0l9k=" + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/leaflet-formbuilder/-/leaflet-formbuilder-0.2.4.tgz", + "integrity": "sha512-09y6hZXOwT1F3jt0u57ejfAt6GhSJJVYkjhDGg9+axr+IniBizZ0N4svdwyhzMBxXy9bJ1Gew516e6Aaul+P4w==" }, "node_modules/leaflet-fullscreen": { "version": "1.0.2", @@ -1240,9 +1665,9 @@ "integrity": "sha1-6v38GIcY6xPTz3uSJsTAaxbpKRk=" }, "node_modules/leaflet-measurable": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/leaflet-measurable/-/leaflet-measurable-0.0.5.tgz", - "integrity": "sha1-A6dXfcxqVYWEo1lldjX47WnnJX8=" + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/leaflet-measurable/-/leaflet-measurable-0.1.0.tgz", + "integrity": "sha512-XvErReRoJZUQppCrXXY+8OP523+rrG8Zs7AJGGXDrRM+1Zo7XlN0RRokpRbqhsD4ZBnt1A5x3LsNsKh+/jndXQ==" }, "node_modules/leaflet-minimap": { "version": "3.6.1", @@ -1283,16 +1708,89 @@ "resolved": "https://registry.npmjs.org/leaflet.photon/-/leaflet.photon-0.8.0.tgz", "integrity": "sha512-uvCPocNvRJaArW8yPm6K4bkgvoMCbCOA9tgFlQfOVw+mRmN4jbkuEFoSP0nJhj8UKIOWsRtGfOjxtzaJyZuciw==" }, + "node_modules/lebab": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/lebab/-/lebab-3.2.1.tgz", + "integrity": "sha512-DO7Z3pmWAT1OyY49X+I5Nhku40VL5rBMhldbRlWBrqHOruWb6siahltwzLjVn4kstfP06qLTxoy+byf9uaHrEA==", + "dev": true, + "dependencies": { + "commander": "^10.0.0", + "escope": "^4.0.0", + "espree": "^9.5.0", + "estraverse": "^5.3.0", + "f-matches": "^1.1.0", + "glob": "^9.2.1", + "lodash": "^4.17.11", + "recast": "^0.22.0" + }, + "bin": { + "lebab": "bin/index.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lebab/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/lebab/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/lebab/node_modules/glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/lebab/node_modules/minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/lolex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", - "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=", + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", "dev": true }, "node_modules/lru-cache": { @@ -1345,6 +1843,15 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" }, + "node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -1731,6 +2238,37 @@ "ncp": "bin/ncp" } }, + "node_modules/nise": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.4.tgz", + "integrity": "sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^2.0.0", + "@sinonjs/fake-timers": "^10.0.2", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "node_modules/nise/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/nise/node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/node-uuid": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", @@ -1791,6 +2329,31 @@ "node": "*" } }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/once": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/once/-/once-1.1.1.tgz", @@ -1870,6 +2433,55 @@ "node": ">=0.10.0" } }, + "node_modules/path-scurry": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.8.0.tgz", + "integrity": "sha512-IjTrKseM404/UAWA8bBbL3Qp6O2wXkanuIE3seCxBH7ctRuvH1QRawy1N3nVDHGkdeZsjOsSe/8AQBL/VQCy2g==", + "dev": true, + "dependencies": { + "lru-cache": "^9.1.1", + "minipass": "^5.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.1.tgz", + "integrity": "sha512-65/Jky17UwSb0BuB9V+MyDpsOtXKmYwzhyl+cOa9XUiI4uV2Ouy/2voFP3+al0BjZbJgMBD8FojMpAf+Z+qn4A==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/path-to-regexp/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, "node_modules/pbf": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.1.0.tgz", @@ -1929,6 +2541,21 @@ "node": ">=0.10.0" } }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/process-nextick-args": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", @@ -1974,6 +2601,22 @@ "util-deprecate": "~1.0.1" } }, + "node_modules/recast": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.22.0.tgz", + "integrity": "sha512-5AAx+mujtXijsEavc5lWXBPQqrM4+Dl5qNH96N2aNeuJFUzpiiToKPsxQD/zAIJHspz7zz0maX0PCtCTFVlixQ==", + "dev": true, + "dependencies": { + "assert": "^2.0.0", + "ast-types": "0.15.2", + "esprima": "~4.0.0", + "source-map": "~0.6.1", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">= 4" + } + }, "node_modules/request": { "version": "2.67.0", "resolved": "https://registry.npmjs.org/request/-/request-2.67.0.tgz", @@ -2098,13 +2741,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "node_modules/samsam": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", - "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=", - "deprecated": "This package has been deprecated in favour of @sinonjs/samsam", - "dev": true - }, "node_modules/semver": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/semver/-/semver-1.1.4.tgz", @@ -2120,18 +2756,42 @@ "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" }, "node_modules/sinon": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.7.tgz", - "integrity": "sha1-RUKk9JugxFwF6y6d2dID4rjv4L8=", + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.1.0.tgz", + "integrity": "sha512-cS5FgpDdE9/zx7no8bxROHymSlPLZzq0ChbbLk1DrxBfc+eTeBK3y8nIL+nu/0QeYydhhbLIr7ecHJpywjQaoQ==", "dev": true, "dependencies": { - "formatio": "1.1.1", - "lolex": "1.3.2", - "samsam": "1.1.2", - "util": ">=0.10.3 <1" + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^10.2.0", + "@sinonjs/samsam": "^8.0.0", + "diff": "^5.1.0", + "nise": "^5.1.4", + "supports-color": "^7.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/sinon" + } + }, + "node_modules/sinon/node_modules/diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/sinon/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" }, "engines": { - "node": ">=0.1.103" + "node": ">=8" } }, "node_modules/slide": { @@ -2155,6 +2815,15 @@ "node": ">=0.8.0" } }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -2379,6 +3048,12 @@ "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" }, + "node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true + }, "node_modules/tunnel-agent": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", @@ -2409,49 +3084,28 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "node_modules/uglify-js": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.2.5.tgz", - "integrity": "sha1-puAqcNg5eSuXgEiLe4sYTAlcmcc=", + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", "dev": true, - "dependencies": { - "optimist": "~0.3.5", - "source-map": "~0.1.7" - }, "bin": { "uglifyjs": "bin/uglifyjs" }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/uglify-js/node_modules/optimist": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", - "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", - "dev": true, - "dependencies": { - "wordwrap": "~0.0.2" - } - }, - "node_modules/uglify-js/node_modules/source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "dependencies": { - "amdefine": ">=0.0.4" - }, "engines": { "node": ">=0.8.0" } }, "node_modules/util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", "dev": true, "dependencies": { - "inherits": "2.0.1" + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" } }, "node_modules/util-deprecate": { @@ -2459,12 +3113,6 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, - "node_modules/util/node_modules/inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -2505,6 +3153,26 @@ "which": "bin/which" } }, + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -2558,6 +3226,66 @@ "resolved": "https://registry.npmjs.org/@mapbox/sexagesimal/-/sexagesimal-1.1.0.tgz", "integrity": "sha1-Y877k6RUlI0xpV6vRAx6rbOeM5o=" }, + "@sinonjs/commons": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + }, + "dependencies": { + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + } + } + }, + "@sinonjs/fake-timers": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.2.0.tgz", + "integrity": "sha512-OPwQlEdg40HAj5KNF8WW6q2KG4Z+cBCZb3m4ninfTZKaBmbIJodviQsDBoYMPHkOyJJMHnOJo5j2+LKDOhOACg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^3.0.0" + } + }, + "@sinonjs/samsam": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", + "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", + "dev": true, + "requires": { + "@sinonjs/commons": "^2.0.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + }, + "dependencies": { + "@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + } + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", + "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", + "dev": true + }, "@types/geojson": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.6.tgz", @@ -2569,18 +3297,25 @@ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, + "acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, "adm-zip": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.2.1.tgz", "integrity": "sha512-J2LiZpRxcLsJm2IwoekNa6COwzEZnMwCJ3vxz0UCw2NYUH2WFi7svuDrVccq5KpBGmzGUgFa0L0FwEmKmu/rzQ==", "dev": true }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -2602,6 +3337,18 @@ "safer-buffer": "~2.1.0" } }, + "assert": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", + "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", + "dev": true, + "requires": { + "es6-object-assign": "^1.1.0", + "is-nan": "^1.2.1", + "object-is": "^1.0.1", + "util": "^0.12.0" + } + }, "assert-plus": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", @@ -2614,6 +3361,15 @@ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, + "ast-types": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.15.2.tgz", + "integrity": "sha512-c27loCv9QkZinsa5ProX751khO9DJl/AcB5c2KNtA6NRvHKS0PgLfcftz72KVq504vB0Gku5s2kUZzDBvQWvHg==", + "dev": true, + "requires": { + "tslib": "^2.0.1" + } + }, "async": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", @@ -2623,6 +3379,12 @@ "lodash": "^4.17.14" } }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true + }, "aws-sign2": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", @@ -2720,6 +3482,16 @@ } } }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "caseless": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", @@ -2908,6 +3680,16 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -2943,6 +3725,11 @@ "domelementtype": "1" } }, + "dompurify": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.3.tgz", + "integrity": "sha512-axQ9zieHLnAnHh0sfAamKYiqXMJAVwu+LM/alQ7WDagoWessyWvMSFyW65CqF3owufNu8HBcE4cM2Vflu7YWcQ==" + }, "domutils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.3.0.tgz", @@ -2961,12 +3748,74 @@ "safer-buffer": "^2.1.0" } }, + "es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true }, + "escope": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-4.0.0.tgz", + "integrity": "sha512-E36qlD/r6RJHVpPKArgMoMlNJzoRJFH8z/cAZlI9lbc45zB3+S7i9k6e/MNb+7bZQzNEa6r8WKN3BovpeIBwgA==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + }, + "dependencies": { + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "dev": true + }, + "espree": { + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", + "dev": true, + "requires": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -3025,6 +3874,15 @@ "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true }, + "f-matches": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/f-matches/-/f-matches-1.1.0.tgz", + "integrity": "sha512-8NALQS5oB1+9hkEwiRjsRroTAQ7zKmXjxe0ZcMHDRrFIR54PhSJp7Rm+Q5+tgJ7eO5ejCgbUPNXeiflX18Rt0Q==", + "dev": true, + "requires": { + "lodash": "^4.17.5" + } + }, "fd-slicer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", @@ -3034,6 +3892,15 @@ "pend": "~1.2.0" } }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -3051,15 +3918,6 @@ "mime-types": "^2.1.11" } }, - "formatio": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", - "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", - "dev": true, - "requires": { - "samsam": "~1.1" - } - }, "fs-extra": { "version": "0.26.7", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", @@ -3079,6 +3937,12 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "generate-function": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", @@ -3165,6 +4029,17 @@ "xmldom": "~0.1.19" } }, + "get-intrinsic": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -3191,6 +4066,15 @@ "minimatch": "0.3" } }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -3229,6 +4113,15 @@ } } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -3238,6 +4131,36 @@ "ansi-regex": "^2.0.0" } }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, "hasha": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz", @@ -3343,6 +4266,31 @@ "integrity": "sha512-B6L/jfyFRcG2dqKiHggWnfby52Iy07iabE4F6srQAr/OmVKBRE5uU+B5MQ+nQ7NiYnjz93gENh1GhqHzpDgHgA==", "dev": true }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true + }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-my-ip-valid": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.1.tgz", @@ -3362,6 +4310,16 @@ "xtend": "^4.0.0" } }, + "is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, "is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -3374,6 +4332,19 @@ "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", "dev": true }, + "is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -3488,6 +4459,12 @@ } } }, + "just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, "jxon": { "version": "2.0.0-beta.5", "resolved": "https://registry.npmjs.org/jxon/-/jxon-2.0.0-beta.5.tgz", @@ -3532,9 +4509,9 @@ "integrity": "sha1-8HFmTEpSe3b3uPm87HRLJIiVwHE=" }, "leaflet-formbuilder": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/leaflet-formbuilder/-/leaflet-formbuilder-0.2.3.tgz", - "integrity": "sha1-7ucYzcyMOzABk+U7qASFLAv0l9k=" + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/leaflet-formbuilder/-/leaflet-formbuilder-0.2.4.tgz", + "integrity": "sha512-09y6hZXOwT1F3jt0u57ejfAt6GhSJJVYkjhDGg9+axr+IniBizZ0N4svdwyhzMBxXy9bJ1Gew516e6Aaul+P4w==" }, "leaflet-fullscreen": { "version": "1.0.2", @@ -3557,9 +4534,9 @@ "integrity": "sha1-6v38GIcY6xPTz3uSJsTAaxbpKRk=" }, "leaflet-measurable": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/leaflet-measurable/-/leaflet-measurable-0.0.5.tgz", - "integrity": "sha1-A6dXfcxqVYWEo1lldjX47WnnJX8=" + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/leaflet-measurable/-/leaflet-measurable-0.1.0.tgz", + "integrity": "sha512-XvErReRoJZUQppCrXXY+8OP523+rrG8Zs7AJGGXDrRM+1Zo7XlN0RRokpRbqhsD4ZBnt1A5x3LsNsKh+/jndXQ==" }, "leaflet-minimap": { "version": "3.6.1", @@ -3597,16 +4574,70 @@ "resolved": "https://registry.npmjs.org/leaflet.photon/-/leaflet.photon-0.8.0.tgz", "integrity": "sha512-uvCPocNvRJaArW8yPm6K4bkgvoMCbCOA9tgFlQfOVw+mRmN4jbkuEFoSP0nJhj8UKIOWsRtGfOjxtzaJyZuciw==" }, + "lebab": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/lebab/-/lebab-3.2.1.tgz", + "integrity": "sha512-DO7Z3pmWAT1OyY49X+I5Nhku40VL5rBMhldbRlWBrqHOruWb6siahltwzLjVn4kstfP06qLTxoy+byf9uaHrEA==", + "dev": true, + "requires": { + "commander": "^10.0.0", + "escope": "^4.0.0", + "espree": "^9.5.0", + "estraverse": "^5.3.0", + "f-matches": "^1.1.0", + "glob": "^9.2.1", + "lodash": "^4.17.11", + "recast": "^0.22.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true + }, + "glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + } + }, + "minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "lolex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", - "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=", + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", "dev": true }, "lru-cache": { @@ -3649,6 +4680,12 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" }, + "minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "dev": true + }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -3948,6 +4985,36 @@ "integrity": "sha512-PfGU8jYWdRl4FqJfCy0IzbkGyFHntfWygZg46nFk/dJD/XRrk2cj0SsKSX9n5u5gE0E0YfEpKWrEkfjnlZSTXA==", "dev": true }, + "nise": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.4.tgz", + "integrity": "sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^2.0.0", + "@sinonjs/fake-timers": "^10.0.2", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + }, + "dependencies": { + "@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + } + } + }, "node-uuid": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", @@ -3998,6 +5065,22 @@ "integrity": "sha512-VlF07iu3VV3+BTXj43Nmp6Irt/G7j/NgEctUS6IweH1RGhURjjCc2NWtzXFPXXWWfc7hgbXQdtiQu2LGp6MxUg==", "dev": true }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, "once": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/once/-/once-1.1.1.tgz", @@ -4065,6 +5148,47 @@ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, + "path-scurry": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.8.0.tgz", + "integrity": "sha512-IjTrKseM404/UAWA8bBbL3Qp6O2wXkanuIE3seCxBH7ctRuvH1QRawy1N3nVDHGkdeZsjOsSe/8AQBL/VQCy2g==", + "dev": true, + "requires": { + "lru-cache": "^9.1.1", + "minipass": "^5.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.1.tgz", + "integrity": "sha512-65/Jky17UwSb0BuB9V+MyDpsOtXKmYwzhyl+cOa9XUiI4uV2Ouy/2voFP3+al0BjZbJgMBD8FojMpAf+Z+qn4A==", + "dev": true + }, + "minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true + } + } + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + } + } + }, "pbf": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.1.0.tgz", @@ -4111,6 +5235,12 @@ "pinkie": "^2.0.0" } }, + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true + }, "process-nextick-args": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", @@ -4152,6 +5282,19 @@ "util-deprecate": "~1.0.1" } }, + "recast": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.22.0.tgz", + "integrity": "sha512-5AAx+mujtXijsEavc5lWXBPQqrM4+Dl5qNH96N2aNeuJFUzpiiToKPsxQD/zAIJHspz7zz0maX0PCtCTFVlixQ==", + "dev": true, + "requires": { + "assert": "^2.0.0", + "ast-types": "0.15.2", + "esprima": "~4.0.0", + "source-map": "~0.6.1", + "tslib": "^2.0.1" + } + }, "request": { "version": "2.67.0", "resolved": "https://registry.npmjs.org/request/-/request-2.67.0.tgz", @@ -4259,12 +5402,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "samsam": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", - "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=", - "dev": true - }, "semver": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/semver/-/semver-1.1.4.tgz", @@ -4277,15 +5414,34 @@ "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" }, "sinon": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.7.tgz", - "integrity": "sha1-RUKk9JugxFwF6y6d2dID4rjv4L8=", + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.1.0.tgz", + "integrity": "sha512-cS5FgpDdE9/zx7no8bxROHymSlPLZzq0ChbbLk1DrxBfc+eTeBK3y8nIL+nu/0QeYydhhbLIr7ecHJpywjQaoQ==", "dev": true, "requires": { - "formatio": "1.1.1", - "lolex": "1.3.2", - "samsam": "1.1.2", - "util": ">=0.10.3 <1" + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^10.2.0", + "@sinonjs/samsam": "^8.0.0", + "diff": "^5.1.0", + "nise": "^5.1.4", + "supports-color": "^7.2.0" + }, + "dependencies": { + "diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "slide": { @@ -4302,6 +5458,12 @@ "hoek": "2.x.x" } }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, "sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -4493,6 +5655,12 @@ "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" }, + "tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true + }, "tunnel-agent": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", @@ -4517,50 +5685,22 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "uglify-js": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.2.5.tgz", - "integrity": "sha1-puAqcNg5eSuXgEiLe4sYTAlcmcc=", - "dev": true, - "requires": { - "optimist": "~0.3.5", - "source-map": "~0.1.7" - }, - "dependencies": { - "optimist": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", - "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", - "dev": true, - "requires": { - "wordwrap": "~0.0.2" - } - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "dev": true }, "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", "dev": true, "requires": { - "inherits": "2.0.1" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - } + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" } }, "util-deprecate": { @@ -4601,6 +5741,20 @@ "isexe": "^2.0.0" } }, + "which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + } + }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", diff --git a/package.json b/package.json index 19b1fc45..97480e95 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,13 @@ "devDependencies": { "chai": "^3.3.0", "happen": "~0.1.3", + "lebab": "^3.2.1", "mocha": "^2.3.3", "mocha-phantomjs": "^4.0.1", "optimist": "~0.4.0", - "sinon": "^1.10.3", - "uglify-js": "~2.2.3" + "prettier": "^2.8.8", + "sinon": "^15.1.0", + "uglify-js": "~3.17.4" }, "scripts": { "test": "firefox test/index.html", @@ -33,17 +35,18 @@ "homepage": "http://wiki.openstreetmap.org/wiki/UMap", "dependencies": { "csv2geojson": "5.1.1", + "dompurify": "^3.0.3", "georsstogeojson": "^0.1.0", "leaflet": "1.3.4", "leaflet-contextmenu": "^1.4.0", "leaflet-editable": "^1.2.0", "leaflet-editinosm": "0.2.3", - "leaflet-formbuilder": "0.2.3", + "leaflet-formbuilder": "0.2.4", "leaflet-fullscreen": "1.0.2", "leaflet-hash": "0.2.1", "leaflet-i18n": "0.3.1", "leaflet-loading": "0.1.24", - "leaflet-measurable": "0.0.5", + "leaflet-measurable": "0.1.0", "leaflet-minimap": "^3.6.1", "leaflet-toolbar": "umap-project/Leaflet.toolbar", "leaflet.heat": "0.2.0", diff --git a/pytest.ini b/pytest.ini index 733af6f1..b4c5f0e5 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,2 +1,3 @@ [pytest] DJANGO_SETTINGS_MODULE=umap.tests.settings +addopts = "--pdbcls=IPython.terminal.debugger:Pdb" diff --git a/setup.cfg b/setup.cfg index 2bd4a8ae..caa1e364 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = umap-project -version = 1.3.0.alpha +version = 1.3.0 description = Create maps with OpenStreetMap layers in a minute and embed them in your site. long_description = file: README.md long_description_content_type = text/markdown @@ -26,14 +26,14 @@ classifiers = packages = find: include_package_data = True install_requires = - Django>=3.2.5,<4 - django-agnocomplete==1.0.0 - django-compressor==2.4.1 - Pillow==8.4.0 - psycopg2==2.9.3 - requests==2.26.0 - social-auth-core==4.1.0 - social-auth-app-django==5.0.0 + Django>=4.1 + django-agnocomplete==2.2.0 + django-compressor==4.3.1 + Pillow==9.5.0 + psycopg2==2.9.6 + requests==2.30.0 + social-auth-core==4.4.2 + social-auth-app-django==5.2.0 [options.extras_require] dev = diff --git a/umap/admin.py b/umap/admin.py index b583dc2c..f686786d 100644 --- a/umap/admin.py +++ b/umap/admin.py @@ -7,7 +7,7 @@ class TileLayerAdmin(admin.ModelAdmin): list_editable = ('rank', ) -class MapAdmin(admin.OSMGeoAdmin): +class MapAdmin(admin.GISModelAdmin): search_fields = ("name",) autocomplete_fields = ("owner", "editors") list_filter = ("share_status",) diff --git a/umap/apps.py b/umap/apps.py new file mode 100644 index 00000000..d7047f93 --- /dev/null +++ b/umap/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class UmapConfig(AppConfig): + name = "umap" + verbose_name = "uMap" diff --git a/umap/context_processors.py b/umap/context_processors.py index 499a82a8..cd377af4 100644 --- a/umap/context_processors.py +++ b/umap/context_processors.py @@ -5,13 +5,13 @@ from . import VERSION def settings(request): return { - 'UMAP_FEEDBACK_LINK': djsettings.UMAP_FEEDBACK_LINK, - 'SITE_NAME': djsettings.SITE_NAME, - 'ENABLE_ACCOUNT_LOGIN': djsettings.ENABLE_ACCOUNT_LOGIN, + "UMAP_FEEDBACK_LINK": djsettings.UMAP_FEEDBACK_LINK, + "SITE_NAME": djsettings.SITE_NAME, + "ENABLE_ACCOUNT_LOGIN": djsettings.ENABLE_ACCOUNT_LOGIN, + "UMAP_READONLY": djsettings.UMAP_READONLY, + "UMAP_DEMO_SITE": djsettings.UMAP_DEMO_SITE, } def version(request): - return { - 'UMAP_VERSION': VERSION - } + return {"UMAP_VERSION": VERSION} diff --git a/umap/decorators.py b/umap/decorators.py index 8fb7bc95..a0e13171 100644 --- a/umap/decorators.py +++ b/umap/decorators.py @@ -10,17 +10,19 @@ from .models import Map LOGIN_URL = getattr(settings, "LOGIN_URL", "login") -LOGIN_URL = (reverse_lazy(LOGIN_URL) if not LOGIN_URL.startswith("/") - else LOGIN_URL) +LOGIN_URL = reverse_lazy(LOGIN_URL) if not LOGIN_URL.startswith("/") else LOGIN_URL def login_required_if_not_anonymous_allowed(view_func): @wraps(view_func) def wrapper(request, *args, **kwargs): - if (not getattr(settings, "UMAP_ALLOW_ANONYMOUS", False) - and not request.user.is_authenticated): + if ( + not getattr(settings, "UMAP_ALLOW_ANONYMOUS", False) + and not request.user.is_authenticated + ): return simple_json_response(login_required=str(LOGIN_URL)) return view_func(request, *args, **kwargs) + return wrapper @@ -28,11 +30,12 @@ def map_permissions_check(view_func): """ Used for URLs dealing with the map. """ + @wraps(view_func) def wrapper(request, *args, **kwargs): - map_inst = get_object_or_404(Map, pk=kwargs['map_id']) + map_inst = get_object_or_404(Map, pk=kwargs["map_id"]) user = request.user - kwargs['map_inst'] = map_inst # Avoid rerequesting the map in the view + kwargs["map_inst"] = map_inst # Avoid rerequesting the map in the view if map_inst.edit_status >= map_inst.EDITORS: can_edit = map_inst.can_edit(user=user, request=request) if not can_edit: @@ -40,6 +43,7 @@ def map_permissions_check(view_func): return simple_json_response(login_required=str(LOGIN_URL)) return HttpResponseForbidden() return view_func(request, *args, **kwargs) + return wrapper @@ -48,9 +52,10 @@ def jsonize_view(view_func): def wrapper(request, *args, **kwargs): response = view_func(request, *args, **kwargs) response_kwargs = {} - if hasattr(response, 'rendered_content'): - response_kwargs['html'] = response.rendered_content - if response.has_header('location'): - response_kwargs['redirect'] = response['location'] + if hasattr(response, "rendered_content"): + response_kwargs["html"] = response.rendered_content + if response.has_header("location"): + response_kwargs["redirect"] = response["location"] return simple_json_response(**response_kwargs) + return wrapper diff --git a/umap/fields.py b/umap/fields.py index 00dbf1e5..4798b0b4 100644 --- a/umap/fields.py +++ b/umap/fields.py @@ -2,7 +2,7 @@ import json import six from django.db import models -from django.utils.encoding import smart_text +from django.utils.encoding import smart_str class DictField(models.TextField): @@ -30,4 +30,4 @@ class DictField(models.TextField): def value_to_string(self, obj): """Return value from object converted to string properly""" - return smart_text(self.get_prep_value(self.value_from_object(obj))) + return smart_str(self.get_prep_value(self.value_from_object(obj))) diff --git a/umap/locale/am_ET/LC_MESSAGES/django.mo b/umap/locale/am_ET/LC_MESSAGES/django.mo index 0fcf6174..aa3847b4 100644 Binary files a/umap/locale/am_ET/LC_MESSAGES/django.mo and b/umap/locale/am_ET/LC_MESSAGES/django.mo differ diff --git a/umap/locale/am_ET/LC_MESSAGES/django.po b/umap/locale/am_ET/LC_MESSAGES/django.po index 54279c3a..99645061 100644 --- a/umap/locale/am_ET/LC_MESSAGES/django.po +++ b/umap/locale/am_ET/LC_MESSAGES/django.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-07 14:28+0000\n" -"Last-Translator: yohanboniface \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Alazar Tekle , 2015\n" "Language-Team: Amharic (Ethiopia) (http://www.transifex.com/openstreetmap/umap/language/am_ET/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -70,7 +70,7 @@ msgstr "ፈልግ" msgid "Secret edit link is %s" msgstr "የሚስጥር የማረሚያ መስመሩ %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "ሁሉም ማረም ይችላል" @@ -82,107 +82,107 @@ msgstr "በሚስጥር የመረሚያ መስመሩ ብቻ የሚታረም" msgid "Site is readonly for maintenance" msgstr "" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "ስም" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "ዝርዝሮች" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "ፈቃዱ በዝርዝር ከተቀመጠ ገፅ ጛር አገናኝ" -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "የድረ-ገፅ አድራሻ ተምሳሌ በኦ.ኤስ.ኤም. የታይል ፎርማት" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "በማረሚያ ሳጥኑ ውስጥ የታይል ሌየሮቹ ቅደም ተከተል" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "አራሚዎች ብቻ ማረም ይችላሉ" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "ባለቤት ብቻ ማረም ይችላል" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "ሁሉም (የህዝብ)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "አድራሻው ያለው ሁሉ" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "አራሚዎች ብቻ" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "መገለጫ" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "መሀከል" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "ዙም" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "ጠቁም" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "በመጫን ላይ ያለውን ተጠቃሚ ጠቁም?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "የካርታውን ፈቃድ ከልስ" -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "ፈቃድ" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "ባለቤት" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "አራሚዎች" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "ያለበትን ሁኔታ አርም" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "ያለበትን ሁኔታ አጋራ" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "ሁኔታዎች" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "ድቃይ" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "በመጫን ላይ አሳይ" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "ሌየሩ በመጫን ላይ አሳይ" @@ -276,7 +276,7 @@ msgstr "ካርታዎችን ተመልከት፣ ስሜትህን አነቃቃ!" msgid "You are logged in. Continuing..." msgstr "ገብተዋል። በመቀጠል ላይ ..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "በ" @@ -289,8 +289,8 @@ msgid "About" msgstr "ስለ" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "አስተያየት" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -334,30 +334,30 @@ msgstr "" msgid "Not map found." msgstr "ካርታው አልተገኘም" -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "ካርታውን አሳይ" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "ካርታዎ ተፈጥሯል! ይህንን ካርታ ከሌላ ኮምፒውተር ላይ ሆነው ለማረም ከፈለጉ የሚከተለውን አድራሻ ይጠቀሙ %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "እንኳን ደስ አለዎ ካርታዎ ተፈጥሯል!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "ካርታው ታድሷል!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "የካርታ አራሚዎች በትክክል ታድሰዋል!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "ካርታውን የሚሰርዘው ባለቤቱ ብቻ ነው።" @@ -372,6 +372,6 @@ msgstr "ካርታዎ ተዳቅሏል! ይህንን ካርታ ከሌላ ኮምፒ msgid "Congratulations, your map has been cloned!" msgstr "እንኳን ደስ አለዎ ካርታዎ ተዳቅሏል!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "ሌየሩ በትክክል ተሰርዟ" diff --git a/umap/locale/ar/LC_MESSAGES/django.mo b/umap/locale/ar/LC_MESSAGES/django.mo index bd7f04c0..d42f0a2f 100644 Binary files a/umap/locale/ar/LC_MESSAGES/django.mo and b/umap/locale/ar/LC_MESSAGES/django.mo differ diff --git a/umap/locale/ar/LC_MESSAGES/django.po b/umap/locale/ar/LC_MESSAGES/django.po index ccba0d4d..5fd29cd0 100644 --- a/umap/locale/ar/LC_MESSAGES/django.po +++ b/umap/locale/ar/LC_MESSAGES/django.po @@ -3,14 +3,15 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Eyad Alomar, 2023 # Med Limem Smida , 2018 msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-07 14:28+0000\n" -"Last-Translator: yohanboniface \n" +"POT-Creation-Date: 2020-03-22 14:24+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Eyad Alomar, 2023\n" "Language-Team: Arabic (http://www.transifex.com/openstreetmap/umap/language/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -32,7 +33,7 @@ msgstr "" #: umap/templates/umap/about_summary.html:33 #: umap/templates/umap/navigation.html:26 msgid "Create a map" -msgstr "أعد خريطة" +msgstr "أنشئ خريطةً" #: tmp/framacarte/templates/umap/navigation.html:7 #: umap/templates/umap/navigation.html:10 @@ -52,7 +53,7 @@ msgstr "تسجيل" #: tmp/framacarte/templates/umap/navigation.html:12 #: umap/templates/umap/navigation.html:20 msgid "Log out" -msgstr "خروج" +msgstr "تسجيل خروج" #: tmp/framacarte/templates/umap/search_bar.html:6 #: umap/templates/umap/search_bar.html:6 @@ -72,15 +73,15 @@ msgstr "" #: umap/forms.py:44 umap/models.py:115 msgid "Everyone can edit" -msgstr "يمكن للجميع التغيير" +msgstr "يمكن للجميع التعدبل" #: umap/forms.py:45 msgid "Only editable with secret edit link" -msgstr "قابل للتغيير من خلال رابط خفي فقط" +msgstr "قابل للتعديل فقط مع رابط تعديلٍ سري" #: umap/middleware.py:14 msgid "Site is readonly for maintenance" -msgstr "لغاية الصيانة، الموقع مفتوح للقراءة فقط" +msgstr "الموقع مفتوح للقراءة فقط لغاية الصيانة" #: umap/models.py:17 msgid "name" diff --git a/umap/locale/bg/LC_MESSAGES/django.mo b/umap/locale/bg/LC_MESSAGES/django.mo index af77158c..f6596594 100644 Binary files a/umap/locale/bg/LC_MESSAGES/django.mo and b/umap/locale/bg/LC_MESSAGES/django.mo differ diff --git a/umap/locale/bg/LC_MESSAGES/django.po b/umap/locale/bg/LC_MESSAGES/django.po index c74657ff..caee1dc7 100644 --- a/umap/locale/bg/LC_MESSAGES/django.po +++ b/umap/locale/bg/LC_MESSAGES/django.po @@ -10,9 +10,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-22 14:24+0000\n" -"PO-Revision-Date: 2021-05-20 21:06+0000\n" -"Last-Translator: Пламен\n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Пламен, 2021\n" "Language-Team: Bulgarian (http://www.transifex.com/openstreetmap/umap/language/bg/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -72,7 +72,7 @@ msgstr "Търсене" msgid "Secret edit link is %s" msgstr "Тайно редактиране на линк е %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Всеки може да редактира" @@ -84,107 +84,107 @@ msgstr "Само може да се редактира с тайно редак msgid "Site is readonly for maintenance" msgstr "" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "име" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "детайли" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Линк към страницата с подробно описание за лиценза." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "URL шаблон, използван формат OSM плочи" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Поръчка на tilelayers в полето за редактиране" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Само редактори могат да редактират" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Само притежателят може да редактира" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "всеки (публично)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "всеки които има линк" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "само редакторите" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "описание" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "център" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "мащаб" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "локализирай" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Локализирай потребител при зареждане?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Избери лиценз за картата." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "лиценз" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "притежател" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "редактори" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "статус на редактиране" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "сподели статус" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "настройки" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Клониране на" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "покажи при зареждане" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Покажи този слой при зареждане" @@ -278,7 +278,7 @@ msgstr "Вдъхнови се, разгледай други карти " msgid "You are logged in. Continuing..." msgstr "В процес на включване. Продължение..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "от" @@ -291,8 +291,8 @@ msgid "About" msgstr "Относно" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Мнения" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -336,30 +336,30 @@ msgstr "" msgid "Not map found." msgstr "Няма такава карта." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Виж картата" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Вашата карта е създадена! Ако искате да редактирате тази карта от друг компютър, моля използвайте този линк : %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Поздравления, вашата карта е създадена!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Карта е актуализирана!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Редакторите на картата актуализират с успех!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Само собственикът може да изтрие картата." @@ -374,6 +374,6 @@ msgstr "Вашата карта е клонирана! Ако искате да msgid "Congratulations, your map has been cloned!" msgstr "Поздравления, вашата карта е клонирана!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Слоят е изтрит успешно." diff --git a/umap/locale/ca/LC_MESSAGES/django.mo b/umap/locale/ca/LC_MESSAGES/django.mo index bea61bed..d85e505a 100644 Binary files a/umap/locale/ca/LC_MESSAGES/django.mo and b/umap/locale/ca/LC_MESSAGES/django.mo differ diff --git a/umap/locale/ca/LC_MESSAGES/django.po b/umap/locale/ca/LC_MESSAGES/django.po index 0423eab0..c5f3cc2f 100644 --- a/umap/locale/ca/LC_MESSAGES/django.po +++ b/umap/locale/ca/LC_MESSAGES/django.po @@ -4,14 +4,14 @@ # # Translators: # jmontane, 2014 -# jmontane, 2014,2019 +# Joan Montané, 2014,2019 msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-09-13 09:58+0000\n" -"Last-Translator: jmontane\n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Joan Montané, 2014,2019\n" "Language-Team: Catalan (http://www.transifex.com/openstreetmap/umap/language/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -71,7 +71,7 @@ msgstr "Cerca" msgid "Secret edit link is %s" msgstr "L'enllaç d'edició secret és %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Tothom pot editar" @@ -83,107 +83,107 @@ msgstr "Només es pot editar amb l'enllaç d'edició secret" msgid "Site is readonly for maintenance" msgstr "El lloc és en mode lectura per manteniment" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "nom" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "detalls" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Enllaç a una pàgina on es detalla la llicència." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "La plantilla de l'URL usa el format de tesel·les de l'OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Ordre de les capes de tessel·les al quadre d'edició" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Només els editors poden editar" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Només el propietari pot editar" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "tothom (públic)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "qualsevol amb l'enllaç" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "només els editors" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "blocat" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "descripció" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "centre" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "escala" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "ubica" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Voleu ubicar l'usuari en carregar?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Trieu la llicència del mapa." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "llicència" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "propietari" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "editors" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "edita l'estat" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "comparteix l'estat" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "paràmetres" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Clon de" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "mostra en carregar" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Mostra aquesta capa en carregar." @@ -277,7 +277,7 @@ msgstr "Inspireu-vos, exploreu mapes" msgid "You are logged in. Continuing..." msgstr "Heu iniciat sessió. S'està continuant..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "per" @@ -290,8 +290,8 @@ msgid "About" msgstr "Quant a" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Comentaris" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -335,30 +335,30 @@ msgstr "S'ha canviat la contrasenya." msgid "Not map found." msgstr "No s'ha trobat el mapa" -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Mostra el mapa" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "S'ha creat el vostre mapa! Si voleu editar aquest mapa en un altre ordinador, useu aquest enllaç: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Enhorabona, s'ha creat el vostre mapa!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "S'ha actualitzat el mapa!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "S'han actualitzat els editors del mapa correctament!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Només el propietari pot suprimir el mapa." @@ -373,6 +373,6 @@ msgstr "S'ha clonat el vostre mapa! Si voleu editar aquest mapa en un altre ordi msgid "Congratulations, your map has been cloned!" msgstr "Enhorabona, s'ha clonat el vostre mapa!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "S'ha suprimit la capa correctament." diff --git a/umap/locale/cs_CZ/LC_MESSAGES/django.mo b/umap/locale/cs_CZ/LC_MESSAGES/django.mo index b36ef254..a41ed23d 100644 Binary files a/umap/locale/cs_CZ/LC_MESSAGES/django.mo and b/umap/locale/cs_CZ/LC_MESSAGES/django.mo differ diff --git a/umap/locale/cs_CZ/LC_MESSAGES/django.po b/umap/locale/cs_CZ/LC_MESSAGES/django.po index 948e0ece..db82000d 100644 --- a/umap/locale/cs_CZ/LC_MESSAGES/django.po +++ b/umap/locale/cs_CZ/LC_MESSAGES/django.po @@ -3,19 +3,20 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Aleš Fiala , 2023 # Jakub A. Tesinsky, 2014 # Jakub A. Tesinsky, 2014 -# trendspotter , 2019 -# trendspotter , 2018 -# trendspotter , 2018 -# trendspotter , 2018-2019 +# Jiří Podhorecký, 2019 +# Jiří Podhorecký, 2018 +# Jiří Podhorecký, 2018 +# Jiří Podhorecký, 2018-2019 msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-07-10 10:59+0000\n" -"Last-Translator: trendspotter \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Aleš Fiala , 2023\n" "Language-Team: Czech (Czech Republic) (http://www.transifex.com/openstreetmap/umap/language/cs_CZ/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -75,7 +76,7 @@ msgstr "Hledej" msgid "Secret edit link is %s" msgstr "Tajný odkaz umožňující úpravu mapy je %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Kdokoli může editovat" @@ -87,107 +88,107 @@ msgstr "Lze upravovat jen pomocí tajného odkazu" msgid "Site is readonly for maintenance" msgstr "Stránka je jen ke čtení kvůli údržbě" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "název" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "podrobnosti" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Odkaz na stránku s podrobnějším popisem licence." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "Vzor URL ve formátu pro dlaždice OSM " -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Pořadí vrstev při editaci" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Jen přispěvovatelé mohou editovat" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Jen vlastník může editovat" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "kdokoli (veřejná)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "kdokoli kdo má odkaz" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "jen připěvovatelé" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "blokováno" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "popis" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "střed" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "přiblížení" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "lokalizuj" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Najdi poluhu uživatele na startu?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Vyberte si licenci mapy." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licence" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "vlastník" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "přispěvovatelé" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "kdo může provádět úpravy" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "nastavení sdílení" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "nastavení" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Kopie" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" -msgstr "zbraz na startu" +msgstr "zobrazit při startu" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Zobrazit tuto vrstvu na startu." @@ -281,7 +282,7 @@ msgstr "Inspirujte se, koukněte na mapy jiných" msgid "You are logged in. Continuing..." msgstr "Jste přihlášeni. Jedeme dál ..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr ", autor:" @@ -294,8 +295,8 @@ msgid "About" msgstr "O uMap" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Napište nám" +msgid "Help" +msgstr "Nápověda" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -339,30 +340,30 @@ msgstr "Vaše heslo bylo změněno." msgid "Not map found." msgstr "Mapa nenalezena" -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Prohlídnout si tuto mapu" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Vaše mapa byla vytvořena! Pokud chcete upravovat tuto mapu z jiného počítače, použijte tento odkaz: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Gratulujeme, vaše mapa byla vytvořena!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Mapa byla aktualizována!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Seznam přispěvovatelů byl úspěšně upraven!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Jen vlastník může vymzat tuto mapu." @@ -377,6 +378,6 @@ msgstr "Byla vytvořena kopie mapy! Pokud chcete upravovat tuto mapu z jiného p msgid "Congratulations, your map has been cloned!" msgstr "Gratulujeme, byla vytvořena kopie mapy!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Vrstva úspěšně vymazána." diff --git a/umap/locale/da/LC_MESSAGES/django.mo b/umap/locale/da/LC_MESSAGES/django.mo index d338c5c9..af28c911 100644 Binary files a/umap/locale/da/LC_MESSAGES/django.mo and b/umap/locale/da/LC_MESSAGES/django.mo differ diff --git a/umap/locale/da/LC_MESSAGES/django.po b/umap/locale/da/LC_MESSAGES/django.po index a0e2b75e..06b28bab 100644 --- a/umap/locale/da/LC_MESSAGES/django.po +++ b/umap/locale/da/LC_MESSAGES/django.po @@ -10,9 +10,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2020-02-26 16:16+0000\n" -"Last-Translator: Neogeografen \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Neogeografen , 2013-2014,2020\n" "Language-Team: Danish (http://www.transifex.com/openstreetmap/umap/language/da/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -72,7 +72,7 @@ msgstr "Søg" msgid "Secret edit link is %s" msgstr "Hemmeligt redigeringslink er %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Alle kan redigere" @@ -84,107 +84,107 @@ msgstr "Er kun redigerbart med et hemmeligt link" msgid "Site is readonly for maintenance" msgstr "Webstedet er skrivebeskyttet pga. vedligeholdelse" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "navn" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "detaljer" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Link til en side hvor der er flere oplysninger om licensen." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "URL-skabelon i OSM flise-format" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Rækkefølge af flise-lag i redigeringsboksen" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Kun redaktører kan redigere" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Kun ejeren kan redigere" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "alle (offentlig)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "alle med et link" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "kun redaktører " -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "blokeret" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "beskrivelse" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "center" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "zoom" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "lokaliser" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Lokaliser brugeren ved indlæsning?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Vælg kortlicensen." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licens" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "ejer" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "redaktører" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "redigeringsstatus" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "delingsstatus" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "indstillinger" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Kloning af" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "vis ved indlæsning" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Vis dette lag ved indlæsning." @@ -278,7 +278,7 @@ msgstr "Bliv inspireret, gennemse kort" msgid "You are logged in. Continuing..." msgstr "Du er logget ind. Fortsætter..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "af" @@ -291,8 +291,8 @@ msgid "About" msgstr "Om" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Feedback" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -336,30 +336,30 @@ msgstr "Din adgangskode blev ændret." msgid "Not map found." msgstr "Ingen kort fundet." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Vis kortet" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Dit kort er oprettet! Hvis du ønsker at redigere kortet fra en anden computer, så brug følgende link: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Tillykke, dit kort er oprettet!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Kortet blev opdateret!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Kortredaktører blev opdateret!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Kun ejeren kan slette kortet." @@ -374,6 +374,6 @@ msgstr "Dit kort er klonet! Hvis du ønsker at redigere kortet fra en anden comp msgid "Congratulations, your map has been cloned!" msgstr "Tillykke, dit kort er klonet!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Lag blev slettet." diff --git a/umap/locale/de/LC_MESSAGES/django.mo b/umap/locale/de/LC_MESSAGES/django.mo index b5836209..fd978ff1 100644 Binary files a/umap/locale/de/LC_MESSAGES/django.mo and b/umap/locale/de/LC_MESSAGES/django.mo differ diff --git a/umap/locale/de/LC_MESSAGES/django.po b/umap/locale/de/LC_MESSAGES/django.po index 59eb3d62..90421dff 100644 --- a/umap/locale/de/LC_MESSAGES/django.po +++ b/umap/locale/de/LC_MESSAGES/django.po @@ -3,6 +3,7 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# pgeo, 2023 # Christopher , 2020 # Claus Ruedinger , 2020 # Ettore Atalan , 2016 @@ -14,10 +15,10 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-22 14:24+0000\n" -"PO-Revision-Date: 2020-11-24 20:26+0000\n" -"Last-Translator: Christopher \n" -"Language-Team: German (http://www.transifex.com/openstreetmap/umap/language/de/)\n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: pgeo, 2023\n" +"Language-Team: German (http://app.transifex.com/openstreetmap/umap/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -76,7 +77,7 @@ msgstr "Suchen" msgid "Secret edit link is %s" msgstr "Geheimer Bearbeitungslink ist %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Jeder kann bearbeiten" @@ -88,107 +89,107 @@ msgstr "Nur mit geheimem Bearbeitungslink zu bearbeiten" msgid "Site is readonly for maintenance" msgstr "Die Seite ist wegen Wartungsarbeiten im Nur-Lesen-Modus." -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "Name" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "Details" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Verlinke auf eine Seite mit der Lizenz." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "Das URL-Template nutzt das OSM Tile Format" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Reihenfolge der Karten-Ebenen in der Bearbeiten-Box" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Nur Bearbeiter können bearbeiten" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Nur der Ersteller kann bearbeiten" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "Jeder (Öffentlich)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "Jeder mit Link" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "Nur Bearbeiter " -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "blockiert" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "Beschreibung" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "Mittelpunkt" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "Zoom" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "lokalisiere" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Standort des Benutzers beim Seitenaufruf bestimmen?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Kartenlizenz auswählen" -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "Lizenz" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "Ersteller" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "Bearbeiter" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "Bearbeitungsstatus" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "Teilen-Status" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "Einstellungen" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Duplikat von" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "Beim Seitenaufruf einblenden" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Diese Ebene beim Seitenaufruf einblenden." @@ -282,7 +283,7 @@ msgstr "Lass dich inspirieren, schau dir diese Karten an." msgid "You are logged in. Continuing..." msgstr "Du bist eingeloggt. Weiterleitung..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "von" @@ -295,8 +296,8 @@ msgid "About" msgstr "Über" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Feedback" +msgid "Help" +msgstr "Hilfe" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -340,30 +341,30 @@ msgstr "Ihr Passwort wurde geändert." msgid "Not map found." msgstr "Keine Karte gefunden." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Diese Karte anzeigen" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Deine Karte wurde erstellt! Wenn du diese Karte von einem anderen Computer aus bearbeiten möchtest, benutze bitte diesen Link: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Glückwunsch, deine Karte wurde erstellt!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Karte wurde aktualisiert!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Bearbeiter erfolgreich geändert" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Nur der Ersteller kann die Karte löschen." @@ -378,6 +379,6 @@ msgstr "Deine Karte wurde kopiert! Wenn du diese Karte von einem anderen Compute msgid "Congratulations, your map has been cloned!" msgstr "Glückwunsch, deine Karte wurde kopiert!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Ebene erfolgreich gelöscht." diff --git a/umap/locale/el/LC_MESSAGES/django.mo b/umap/locale/el/LC_MESSAGES/django.mo index ad856ba4..e6c4c985 100644 Binary files a/umap/locale/el/LC_MESSAGES/django.mo and b/umap/locale/el/LC_MESSAGES/django.mo differ diff --git a/umap/locale/el/LC_MESSAGES/django.po b/umap/locale/el/LC_MESSAGES/django.po index 1d063d94..6e3bf250 100644 --- a/umap/locale/el/LC_MESSAGES/django.po +++ b/umap/locale/el/LC_MESSAGES/django.po @@ -6,16 +6,17 @@ # Emmanuel Verigos , 2017-2018,2021 # Emmanuel Verigos , 2018 # Emmanuel Verigos , 2017 +# Jim Kats , 2022 # prendi , 2017 -# Yannis Kaskamanidis , 2021 +# Yannis Kaskamanidis , 2021,2023 msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-22 14:24+0000\n" -"PO-Revision-Date: 2021-07-11 08:06+0000\n" -"Last-Translator: Yannis Kaskamanidis \n" -"Language-Team: Greek (http://www.transifex.com/openstreetmap/umap/language/el/)\n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Yannis Kaskamanidis , 2021,2023\n" +"Language-Team: Greek (http://app.transifex.com/openstreetmap/umap/language/el/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -74,7 +75,7 @@ msgstr "Αναζήτηση" msgid "Secret edit link is %s" msgstr "Ο μυστικός σύνδεσμος επεξεργασίας είναι %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Επεξεργασία από όλους" @@ -86,107 +87,107 @@ msgstr "Επεξεργάσιμο μόνο με μυστικό σύνδεσμο" msgid "Site is readonly for maintenance" msgstr "Λόγω συντήρησης, ο ιστότοπος είναι μόνο για ανάγνωση" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "Όνομα" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "Λεπτομέρειες" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Σύνδεσμος σελίδας Αναλυτικής Άδειας Χρήσης." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" -msgstr "URL προτύπου που χρησιμοποιεί μορφοποίηση πλακιδίων OSM" +msgstr "Πρότυπο URL που χρησιμοποιεί μορφοποίηση πλακιδίων OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Σειρά των υπόβαθρων στο πλαίσιο επεξεργασίας" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Μόνο οι συντάκτες μπορούν να κάνουν επεξεργασία" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Μόνο ο ιδιοκτήτης μπορεί να κάνει επεξεργασία" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "Όλοι (κοινό)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "Οποιοσδήποτε έχει τον σύνδεσμο" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "Μόνο συντάκτες" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "Αποκλεισμένο" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "Περιγραφή" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "Κέντρο" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "Εστίαση" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "Εντοπισμός θέσης" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Εντοπισμός θέσης χρήστη κατά την φόρτωση;" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Επιλογή άδειας χρήσης του χάρτη." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "Άδεια" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "Ιδιοκτήτης" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "Συντάκτες" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "Κατάσταση επεξεργασίας" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "Κατάσταση διαμοιρασμού" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "Ρυθμίσεις" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Κλώνος του" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "Εμφάνιση κατά την φόρτωση" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Εμφάνιση αυτού του επιπέδου κατά την φόρτωση." @@ -229,7 +230,7 @@ msgstr "Παρακαλώ επιλέξτε έναν πάροχο" msgid "" "uMap lets you create maps with OpenStreetMap " "layers in a minute and embed them in your site." -msgstr "Το uMap σου επιτρέπει να δημιουργήσεις χάρτες μεOpenStreetMap επίπεδα πολύ γρήγορα και να τα ενσωματώσεις στον ιστότοπο σου." +msgstr "Το uMap σου επιτρέπει να δημιουργήσεις πολύ γρήγορα χάρτες μεOpenStreetMap και να τους ενσωματώσεις στον ιστότοπο σου." #: umap/templates/umap/about_summary.html:11 msgid "Choose the layers of your map" @@ -274,13 +275,13 @@ msgstr "Χάρτης των uMaps" #: umap/templates/umap/home.html:24 msgid "Get inspired, browse maps" -msgstr "Έμπνευση και περιήγηση στους χάρτες" +msgstr "Περιηγήσου και αναζήτησε την έμπνευση στους παρακάτω χάρτες!" #: umap/templates/umap/login_popup_end.html:2 msgid "You are logged in. Continuing..." msgstr "Είστε συνδεδεμένοι. Συνέχεια..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "Από" @@ -293,8 +294,8 @@ msgid "About" msgstr "Σχετικά" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Ανατροφοδότηση" +msgid "Help" +msgstr "Βοήθεια" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -338,30 +339,30 @@ msgstr "Ο κωδικός πρόσβασης άλλαξε" msgid "Not map found." msgstr "Δεν βρέθηκε χάρτης." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Προβολή του χάρτη" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Ο χάρτης σας δημιουργήθηκε! Αν επιθυμείτε να τον επεξεργαστείτε από κάποιον άλλο υπολογιστή, παρακαλώ χρησιμοποιήστε αυτόν τον σύνδεσμο: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Συγχαρητήρια, ο χάρτης σας δημιουργήθηκε!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Ο χάρτης ενημερώθηκε!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Η ενημέρωση των συντακτών χάρτη ήταν επιτυχής!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Μονό ο ιδιοκτήτης μπορεί να διαγράψει αυτό τον χάρτη." @@ -376,6 +377,6 @@ msgstr "Ο χάρτης κλωνοποιήθηκε! Αν θέλετε να το msgid "Congratulations, your map has been cloned!" msgstr "Συγχαρητήρια ο χάρτης σας κλωνοποιήθηκε!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Το επίπεδο διαγράφηκε με επιτυχία." diff --git a/umap/locale/en/LC_MESSAGES/django.po b/umap/locale/en/LC_MESSAGES/django.po index 53a40edc..47d22b2c 100644 --- a/umap/locale/en/LC_MESSAGES/django.po +++ b/umap/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-22 14:24+0000\n" +"POT-Creation-Date: 2023-05-31 07:12+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,360 +17,370 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: tmp/framacarte/templates/umap/home.html:8 umap/templates/umap/home.html:9 -#, python-format -msgid "" -"This is a demo instance, used for tests and pre-rolling releases. If you " -"need a stable instance, please use " -"%(stable_url)s. You can also host your own instance, it's open source!" -msgstr "" - -#: tmp/framacarte/templates/umap/home.html:83 -#: tmp/framacarte/templates/umap/navigation.html:14 -#: umap/templates/umap/about_summary.html:33 -#: umap/templates/umap/navigation.html:26 -msgid "Create a map" -msgstr "" - -#: tmp/framacarte/templates/umap/navigation.html:7 -#: umap/templates/umap/navigation.html:10 -msgid "My maps" -msgstr "" - -#: tmp/framacarte/templates/umap/navigation.html:9 -#: umap/templates/umap/navigation.html:12 -msgid "Log in" -msgstr "" - -#: tmp/framacarte/templates/umap/navigation.html:9 -#: umap/templates/umap/navigation.html:12 -msgid "Sign in" -msgstr "" - -#: tmp/framacarte/templates/umap/navigation.html:12 -#: umap/templates/umap/navigation.html:20 -msgid "Log out" -msgstr "" - -#: tmp/framacarte/templates/umap/search_bar.html:6 -#: umap/templates/umap/search_bar.html:6 -msgid "Search maps" -msgstr "" - -#: tmp/framacarte/templates/umap/search_bar.html:10 -#: tmp/framacarte/templates/umap/search_bar.html:13 -#: umap/templates/umap/search_bar.html:9 -msgid "Search" -msgstr "" - -#: umap/forms.py:40 +#: forms.py:40 #, python-format msgid "Secret edit link is %s" msgstr "" -#: umap/forms.py:44 umap/models.py:115 +#: forms.py:44 models.py:110 msgid "Everyone can edit" msgstr "" -#: umap/forms.py:45 +#: forms.py:45 msgid "Only editable with secret edit link" msgstr "" -#: umap/middleware.py:14 +#: middleware.py:14 msgid "Site is readonly for maintenance" msgstr "" -#: umap/models.py:17 +#: models.py:16 msgid "name" msgstr "" -#: umap/models.py:48 +#: models.py:47 msgid "details" msgstr "" -#: umap/models.py:49 +#: models.py:48 msgid "Link to a page where the licence is detailed." msgstr "" -#: umap/models.py:63 +#: models.py:58 msgid "URL template using OSM tile format" msgstr "" -#: umap/models.py:71 +#: models.py:64 msgid "Order of the tilelayers in the edit box" msgstr "" -#: umap/models.py:116 +#: models.py:111 msgid "Only editors can edit" msgstr "" -#: umap/models.py:117 +#: models.py:112 msgid "Only owner can edit" msgstr "" -#: umap/models.py:120 +#: models.py:115 msgid "everyone (public)" msgstr "" -#: umap/models.py:121 +#: models.py:116 msgid "anyone with link" msgstr "" -#: umap/models.py:122 +#: models.py:117 msgid "editors only" msgstr "" -#: umap/models.py:123 +#: models.py:118 msgid "blocked" msgstr "" -#: umap/models.py:126 umap/models.py:256 +#: models.py:121 models.py:270 msgid "description" msgstr "" -#: umap/models.py:127 +#: models.py:122 msgid "center" msgstr "" -#: umap/models.py:128 +#: models.py:123 msgid "zoom" msgstr "" -#: umap/models.py:129 +#: models.py:125 msgid "locate" msgstr "" -#: umap/models.py:129 +#: models.py:125 msgid "Locate user on load?" msgstr "" -#: umap/models.py:132 +#: models.py:129 msgid "Choose the map licence." msgstr "" -#: umap/models.py:133 +#: models.py:130 msgid "licence" msgstr "" -#: umap/models.py:138 +#: models.py:140 msgid "owner" msgstr "" -#: umap/models.py:139 +#: models.py:144 msgid "editors" msgstr "" -#: umap/models.py:140 +#: models.py:147 msgid "edit status" msgstr "" -#: umap/models.py:141 +#: models.py:150 msgid "share status" msgstr "" -#: umap/models.py:142 +#: models.py:153 msgid "settings" msgstr "" -#: umap/models.py:210 +#: models.py:225 msgid "Clone of" msgstr "" -#: umap/models.py:261 +#: models.py:274 msgid "display on load" msgstr "" -#: umap/models.py:262 +#: models.py:275 msgid "Display this layer on load." msgstr "" -#: umap/templates/404.html:7 +#: templates/404.html:7 msgid "Take me to the home page" msgstr "" -#: umap/templates/auth/user_detail.html:7 +#: templates/auth/user_detail.html:7 #, python-format msgid "Browse %(current_user)s's maps" msgstr "" -#: umap/templates/auth/user_detail.html:15 +#: templates/auth/user_detail.html:15 #, python-format msgid "%(current_user)s has no maps." msgstr "" -#: umap/templates/registration/login.html:4 +#: templates/auth/user_stars.html:7 +#, python-format +msgid "Browse %(current_user)s's starred maps" +msgstr "" + +#: templates/auth/user_stars.html:15 +#, python-format +msgid "%(current_user)s has no starred maps yet." +msgstr "" + +#: templates/registration/login.html:4 msgid "Please log in with your account" msgstr "" -#: umap/templates/registration/login.html:18 +#: templates/registration/login.html:18 msgid "Username" msgstr "" -#: umap/templates/registration/login.html:20 +#: templates/registration/login.html:20 msgid "Password" msgstr "" -#: umap/templates/registration/login.html:21 +#: templates/registration/login.html:21 msgid "Login" msgstr "" -#: umap/templates/registration/login.html:27 +#: templates/registration/login.html:27 msgid "Please choose a provider" msgstr "" -#: umap/templates/umap/about_summary.html:6 +#: templates/umap/about_summary.html:6 #, python-format msgid "" "uMap lets you create maps with OpenStreetMap " "layers in a minute and embed them in your site." msgstr "" -#: umap/templates/umap/about_summary.html:11 +#: templates/umap/about_summary.html:11 msgid "Choose the layers of your map" msgstr "" -#: umap/templates/umap/about_summary.html:12 +#: templates/umap/about_summary.html:12 msgid "Add POIs: markers, lines, polygons..." msgstr "" -#: umap/templates/umap/about_summary.html:13 +#: templates/umap/about_summary.html:13 msgid "Manage POIs colours and icons" msgstr "" -#: umap/templates/umap/about_summary.html:14 +#: templates/umap/about_summary.html:14 msgid "Manage map options: display a minimap, locate user on load…" msgstr "" -#: umap/templates/umap/about_summary.html:15 +#: templates/umap/about_summary.html:15 msgid "Batch import geostructured data (geojson, gpx, kml, osm...)" msgstr "" -#: umap/templates/umap/about_summary.html:16 +#: templates/umap/about_summary.html:16 msgid "Choose the license for your data" msgstr "" -#: umap/templates/umap/about_summary.html:17 +#: templates/umap/about_summary.html:17 msgid "Embed and share your map" msgstr "" -#: umap/templates/umap/about_summary.html:23 +#: templates/umap/about_summary.html:23 #, python-format msgid "And it's open source!" msgstr "" -#: umap/templates/umap/about_summary.html:35 +#: templates/umap/about_summary.html:34 templates/umap/navigation.html:28 +msgid "Create a map" +msgstr "" + +#: templates/umap/about_summary.html:37 msgid "Play with the demo" msgstr "" -#: umap/templates/umap/home.html:17 +#: templates/umap/content.html:25 +msgid "" +"This instance of uMap is currently in read only mode, no creation/edit is " +"allowed." +msgstr "" + +#: templates/umap/content.html:33 +#, python-format +msgid "" +"This is a demo instance, used for tests and pre-rolling releases. If you " +"need a stable instance, please use %(stable_url)s. You can also host your own " +"instance, it's open source!" +msgstr "" + +#: templates/umap/home.html:10 msgid "Map of the uMaps" msgstr "" -#: umap/templates/umap/home.html:24 +#: templates/umap/home.html:17 msgid "Get inspired, browse maps" msgstr "" -#: umap/templates/umap/login_popup_end.html:2 +#: templates/umap/login_popup_end.html:2 msgid "You are logged in. Continuing..." msgstr "" -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: templates/umap/map_list.html:7 views.py:245 msgid "by" msgstr "" -#: umap/templates/umap/map_list.html:11 +#: templates/umap/map_list.html:11 msgid "More" msgstr "" -#: umap/templates/umap/navigation.html:14 +#: templates/umap/navigation.html:10 +msgid "My maps" +msgstr "" + +#: templates/umap/navigation.html:11 +msgid "Starred maps" +msgstr "" + +#: templates/umap/navigation.html:13 +msgid "Log in" +msgstr "" + +#: templates/umap/navigation.html:13 +msgid "Sign in" +msgstr "" + +#: templates/umap/navigation.html:15 msgid "About" msgstr "" -#: umap/templates/umap/navigation.html:15 -msgid "Feedback" +#: templates/umap/navigation.html:16 +msgid "Help" msgstr "" -#: umap/templates/umap/navigation.html:18 +#: templates/umap/navigation.html:19 msgid "Change password" msgstr "" -#: umap/templates/umap/password_change.html:6 +#: templates/umap/navigation.html:21 +msgid "Log out" +msgstr "" + +#: templates/umap/password_change.html:6 msgid "Password change" msgstr "" -#: umap/templates/umap/password_change.html:7 +#: templates/umap/password_change.html:7 msgid "" "Please enter your old password, for security's sake, and then enter your new " "password twice so we can verify you typed it in correctly." msgstr "" -#: umap/templates/umap/password_change.html:12 +#: templates/umap/password_change.html:12 msgid "Old password" msgstr "" -#: umap/templates/umap/password_change.html:14 +#: templates/umap/password_change.html:14 msgid "New password" msgstr "" -#: umap/templates/umap/password_change.html:16 +#: templates/umap/password_change.html:16 msgid "New password confirmation" msgstr "" -#: umap/templates/umap/password_change.html:18 +#: templates/umap/password_change.html:18 msgid "Change my password" msgstr "" -#: umap/templates/umap/password_change_done.html:6 +#: templates/umap/password_change_done.html:6 msgid "Password change successful" msgstr "" -#: umap/templates/umap/password_change_done.html:7 +#: templates/umap/password_change_done.html:7 msgid "Your password was changed." msgstr "" -#: umap/templates/umap/search.html:13 +#: templates/umap/search.html:13 msgid "Not map found." msgstr "" -#: umap/views.py:220 +#: templates/umap/search_bar.html:6 +msgid "Search maps" +msgstr "" + +#: templates/umap/search_bar.html:9 +msgid "Search" +msgstr "" + +#: views.py:250 msgid "View the map" msgstr "" -#: umap/views.py:524 +#: views.py:547 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "" -#: umap/views.py:529 +#: views.py:552 msgid "Congratulations, your map has been created!" msgstr "" -#: umap/views.py:561 +#: views.py:582 msgid "Map has been updated!" msgstr "" -#: umap/views.py:587 +#: views.py:607 msgid "Map editors updated with success!" msgstr "" -#: umap/views.py:612 +#: views.py:632 msgid "Only its owner can delete the map." msgstr "" -#: umap/views.py:637 +#: views.py:655 #, python-format msgid "" "Your map has been cloned! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "" -#: umap/views.py:642 +#: views.py:660 msgid "Congratulations, your map has been cloned!" msgstr "" -#: umap/views.py:809 +#: views.py:826 msgid "Layer successfully deleted." msgstr "" diff --git a/umap/locale/es/LC_MESSAGES/django.mo b/umap/locale/es/LC_MESSAGES/django.mo index d4d94fea..29add12b 100644 Binary files a/umap/locale/es/LC_MESSAGES/django.mo and b/umap/locale/es/LC_MESSAGES/django.mo differ diff --git a/umap/locale/es/LC_MESSAGES/django.po b/umap/locale/es/LC_MESSAGES/django.po index df933983..7c919fce 100644 --- a/umap/locale/es/LC_MESSAGES/django.po +++ b/umap/locale/es/LC_MESSAGES/django.po @@ -12,15 +12,15 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-22 14:24+0000\n" -"PO-Revision-Date: 2020-04-27 21:31+0000\n" -"Last-Translator: 3c4f354c26c2c190ba28f9c2666d7fdb_003e9d1 \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: 3c4f354c26c2c190ba28f9c2666d7fdb_003e9d1 , 2014,2016-2017,2020\n" "Language-Team: Spanish (http://www.transifex.com/openstreetmap/umap/language/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" #: tmp/framacarte/templates/umap/home.html:8 umap/templates/umap/home.html:9 #, python-format @@ -74,7 +74,7 @@ msgstr "Buscar" msgid "Secret edit link is %s" msgstr "El enlace secreto de edición es %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Todos pueden editar" @@ -86,107 +86,107 @@ msgstr "Sólo puede editarse con el enlace secreto de edición" msgid "Site is readonly for maintenance" msgstr "El sitio está en sólo lectura por mantenimiento" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "nombre" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "detalles" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Enlace a una página donde se detalla la licencia." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "Plantilla URL usando el formato de teselas OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Orden de las capas de teselas en la caja de edición" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Solo los editores pueden editar" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Solo el propietario puede editar" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "todo el mundo (público)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "cualquiera que tenga el enlace" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "sólo editores" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "bloqueado" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "descripción" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "centrar" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "acercar/alejar" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "ubicar" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "¿Al cargar ubicar al usuario?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Elija la licencia del mapa." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licencia" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "propietario" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "editores" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "estado de la edición" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "compartir estado" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "ajustes" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Clon de" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "mostrar al cargar" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Mostrar esta capa al cargar." @@ -280,7 +280,7 @@ msgstr "Inspírate, navega por los mapas" msgid "You are logged in. Continuing..." msgstr "Has iniciado sesión. Continuando..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "por" @@ -293,8 +293,8 @@ msgid "About" msgstr "Acerca de" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Contacto" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -338,30 +338,30 @@ msgstr "Su contraseña fue guardada." msgid "Not map found." msgstr "No se encontraron mapas." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Ver el mapa" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "¡Tu mapa ha sido creado! Si deseas editarlo desde otro ordenador, por favor usa este enlace: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "¡Enhorabuena! ¡Tu mapa ha sido creado!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "¡El mapa ha sido actualizado!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "¡Los editores del mapas han sido actualizados con éxito!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Sólo el propietario puede borrar el mapa." @@ -376,6 +376,6 @@ msgstr "¡Tu mapa ha sido clonado! Si quieres editar este mapa desde otro ordena msgid "Congratulations, your map has been cloned!" msgstr "¡Enhorabuena! ¡Tu mapa ha sido clonado!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Se eliminó la capa con éxito." diff --git a/umap/locale/et/LC_MESSAGES/django.mo b/umap/locale/et/LC_MESSAGES/django.mo index 1d989383..b22d9f9b 100644 Binary files a/umap/locale/et/LC_MESSAGES/django.mo and b/umap/locale/et/LC_MESSAGES/django.mo differ diff --git a/umap/locale/et/LC_MESSAGES/django.po b/umap/locale/et/LC_MESSAGES/django.po index ba979773..818c5473 100644 --- a/umap/locale/et/LC_MESSAGES/django.po +++ b/umap/locale/et/LC_MESSAGES/django.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-22 14:24+0000\n" -"PO-Revision-Date: 2020-09-29 10:12+0000\n" -"Last-Translator: Moon Ika\n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Moon Ika, 2020\n" "Language-Team: Estonian (http://www.transifex.com/openstreetmap/umap/language/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -70,7 +70,7 @@ msgstr "Otsi" msgid "Secret edit link is %s" msgstr "Salajane muutmislink on %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Igaüks saab muuta" @@ -82,107 +82,107 @@ msgstr "Muudetav ainult salajase muutmislingiga" msgid "Site is readonly for maintenance" msgstr "Sait on hoolduseks kirjutuskaitstud" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "nimi" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "detailid" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Link litsentsi selgitavale lehele." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Ainult toimetajad saavad muuta" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Ainult omanik saab muuta" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "igaüks (avalik)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "kõik, kellel on link" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "ainult toimetajad" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "blokeeritud" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "kirjeldus" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "tsentreeri" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "suurenda" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "määra asukoht" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Määra kasutaja asukoht laadimisel?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Vali kaardi litsents." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "litsents" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "omanik" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "toimetajad" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "muutmise staatus" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "jagamise staatus" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "seaded" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Koopia" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "kuva laadimisel" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Kuva seda kihti laadimisel" @@ -276,7 +276,7 @@ msgstr "Sirvi kaarte ja ammuta inspiratsiooni" msgid "You are logged in. Continuing..." msgstr "Oled sisse logitud. Jätkamine..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "kasutajalt" @@ -289,8 +289,8 @@ msgid "About" msgstr "Teave" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Tagasiside" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -334,30 +334,30 @@ msgstr "Sinu salasõna on muudetud." msgid "Not map found." msgstr "Kaarti ei leitud." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Vaata kaarti" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Sinu kaart on loodud! Kui soovid oma kaarti muuta teisest arvutist, kasuta palun seda linki: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Õnnitleme, sinu kaart on loodud!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Kaart on uuendatud!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Kaardi toimetajaid uuendati edukalt!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Kaarti saab kustutada vaid selle omanik." @@ -372,6 +372,6 @@ msgstr "Sinu kaart on kopeeritud! Kui sa soovid oma kaarti muuta teisest arvutis msgid "Congratulations, your map has been cloned!" msgstr "Sinu kaart on kopeeritud!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Kiht on kustutatud." diff --git a/umap/locale/fa_IR/LC_MESSAGES/django.mo b/umap/locale/fa_IR/LC_MESSAGES/django.mo new file mode 100644 index 00000000..6a6d3c00 Binary files /dev/null and b/umap/locale/fa_IR/LC_MESSAGES/django.mo differ diff --git a/umap/locale/fa_IR/LC_MESSAGES/django.po b/umap/locale/fa_IR/LC_MESSAGES/django.po new file mode 100644 index 00000000..07caaec6 --- /dev/null +++ b/umap/locale/fa_IR/LC_MESSAGES/django.po @@ -0,0 +1,379 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Goudarz Jafari , 2020 +# *Sociologist Abedi*, 2023 +# *Sociologist Abedi*, 2021 +msgid "" +msgstr "" +"Project-Id-Version: uMap\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: *Sociologist Abedi*, 2023\n" +"Language-Team: Persian (Iran) (http://app.transifex.com/openstreetmap/umap/language/fa_IR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fa_IR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: tmp/framacarte/templates/umap/home.html:8 umap/templates/umap/home.html:9 +#, python-format +msgid "" +"This is a demo instance, used for tests and pre-rolling releases. If you " +"need a stable instance, please use %(stable_url)s. You can also host your own " +"instance, it's open source!" +msgstr "این یک نمونه آزمایشی است که برای آزمایشات و نسخه های پیش از انتشار استفاده می شود. اگر به نمونه پایدار نیاز دارید، لطفاً %(stable_url)s استفاده کنید. همچنین می توانید نمونه شخصی خود را میزبانی کنید، منبع باز است!" + +#: tmp/framacarte/templates/umap/home.html:83 +#: tmp/framacarte/templates/umap/navigation.html:14 +#: umap/templates/umap/about_summary.html:33 +#: umap/templates/umap/navigation.html:26 +msgid "Create a map" +msgstr "ایجاد نقشه" + +#: tmp/framacarte/templates/umap/navigation.html:7 +#: umap/templates/umap/navigation.html:10 +msgid "My maps" +msgstr "نقشه‌های من" + +#: tmp/framacarte/templates/umap/navigation.html:9 +#: umap/templates/umap/navigation.html:12 +msgid "Log in" +msgstr "ورود" + +#: tmp/framacarte/templates/umap/navigation.html:9 +#: umap/templates/umap/navigation.html:12 +msgid "Sign in" +msgstr "ثبت نام" + +#: tmp/framacarte/templates/umap/navigation.html:12 +#: umap/templates/umap/navigation.html:20 +msgid "Log out" +msgstr "خروج" + +#: tmp/framacarte/templates/umap/search_bar.html:6 +#: umap/templates/umap/search_bar.html:6 +msgid "Search maps" +msgstr "جستجوی نقشه‌ها" + +#: tmp/framacarte/templates/umap/search_bar.html:10 +#: tmp/framacarte/templates/umap/search_bar.html:13 +#: umap/templates/umap/search_bar.html:9 +msgid "Search" +msgstr "جستجو" + +#: umap/forms.py:40 +#, python-format +msgid "Secret edit link is %s" +msgstr "لینک ویرایش مخفی %s است" + +#: umap/forms.py:44 umap/models.py:114 +msgid "Everyone can edit" +msgstr "همه می‌توانند ویرایش کنند" + +#: umap/forms.py:45 +msgid "Only editable with secret edit link" +msgstr "فقط با لینک ویرایش مخفی قابل ویرایش است" + +#: umap/middleware.py:14 +msgid "Site is readonly for maintenance" +msgstr "سایت در حال حاضر برای نگهداری فقط خواندنی است" + +#: umap/models.py:16 +msgid "name" +msgstr "نام" + +#: umap/models.py:47 +msgid "details" +msgstr "جزئیات" + +#: umap/models.py:48 +msgid "Link to a page where the licence is detailed." +msgstr "پیوندی به صفحه ای که مجوز در آن دقیق است." + +#: umap/models.py:62 +msgid "URL template using OSM tile format" +msgstr "قالب آدرس اینترنتی با استفاده از قالب کاشی OSM" + +#: umap/models.py:70 +msgid "Order of the tilelayers in the edit box" +msgstr "ترتیب لایه های کاشی در جعبه ویرایش" + +#: umap/models.py:115 +msgid "Only editors can edit" +msgstr "فقط ویراستاران می‌توانند ویرایش کنند" + +#: umap/models.py:116 +msgid "Only owner can edit" +msgstr "فقط مالک می‌تواند ویرایش کند" + +#: umap/models.py:119 +msgid "everyone (public)" +msgstr "همه (عمومی)" + +#: umap/models.py:120 +msgid "anyone with link" +msgstr "هر کسی با لینک" + +#: umap/models.py:121 +msgid "editors only" +msgstr "فقط ویراستاران" + +#: umap/models.py:122 +msgid "blocked" +msgstr "مسدود شد" + +#: umap/models.py:125 umap/models.py:255 +msgid "description" +msgstr "توضیحات" + +#: umap/models.py:126 +msgid "center" +msgstr "مرکز" + +#: umap/models.py:127 +msgid "zoom" +msgstr "بزرگ‌نمایی" + +#: umap/models.py:128 +msgid "locate" +msgstr "مکان یابی" + +#: umap/models.py:128 +msgid "Locate user on load?" +msgstr "کاربر را در حال بارگیری مکان یابی کنید؟" + +#: umap/models.py:131 +msgid "Choose the map licence." +msgstr "مجوز نقشه را انتخاب کنید." + +#: umap/models.py:132 +msgid "licence" +msgstr "مجوز" + +#: umap/models.py:137 +msgid "owner" +msgstr "مالک" + +#: umap/models.py:138 +msgid "editors" +msgstr "ویراستاران" + +#: umap/models.py:139 +msgid "edit status" +msgstr "ویرایش وضعیت" + +#: umap/models.py:140 +msgid "share status" +msgstr "وضعیت اشتراک گذاری" + +#: umap/models.py:141 +msgid "settings" +msgstr "تنظیمات" + +#: umap/models.py:209 +msgid "Clone of" +msgstr "کلون از" + +#: umap/models.py:260 +msgid "display on load" +msgstr "نمایش روی بارگذاری" + +#: umap/models.py:261 +msgid "Display this layer on load." +msgstr "این لایه را روی بارگذاری نمایش دهید." + +#: umap/templates/404.html:7 +msgid "Take me to the home page" +msgstr "مرا به صفحه اصلی ببرید" + +#: umap/templates/auth/user_detail.html:7 +#, python-format +msgid "Browse %(current_user)s's maps" +msgstr "نقشه‌های %(current_user)s را مرور کنید" + +#: umap/templates/auth/user_detail.html:15 +#, python-format +msgid "%(current_user)s has no maps." +msgstr "%(current_user)s هیچ نقشه‌ای ندارد" + +#: umap/templates/registration/login.html:4 +msgid "Please log in with your account" +msgstr "لطفا با حساب کاربری خود وارد شوید" + +#: umap/templates/registration/login.html:18 +msgid "Username" +msgstr "نام کاربری" + +#: umap/templates/registration/login.html:20 +msgid "Password" +msgstr "رمز عبور" + +#: umap/templates/registration/login.html:21 +msgid "Login" +msgstr "ورود" + +#: umap/templates/registration/login.html:27 +msgid "Please choose a provider" +msgstr "لطفا ارائه دهنده را انتخاب کنید" + +#: umap/templates/umap/about_summary.html:6 +#, python-format +msgid "" +"uMap lets you create maps with OpenStreetMap " +"layers in a minute and embed them in your site." +msgstr "uMap به شما این امکان را می‌دهد تا در یک دقیقه با لایه‌های اوپن‌استریت‌مپ نقشه ایجاد کنید و آن‌ها را در سایت خود قرار دهید." + +#: umap/templates/umap/about_summary.html:11 +msgid "Choose the layers of your map" +msgstr "لایه‌های نقشه خود را انتخاب کنید" + +#: umap/templates/umap/about_summary.html:12 +msgid "Add POIs: markers, lines, polygons..." +msgstr "POI را اضافه کنید: نشانگرها، خطوط، چند ضلعی‌ها..." + +#: umap/templates/umap/about_summary.html:13 +msgid "Manage POIs colours and icons" +msgstr "رنگ‌ها و آیکون‌های POI را مدیریت کنید" + +#: umap/templates/umap/about_summary.html:14 +msgid "Manage map options: display a minimap, locate user on load…" +msgstr "مدیریت گزینه های نقشه: نمایش حداقل نقشه، مکان یابی کاربر در حال بارگذاری…" + +#: umap/templates/umap/about_summary.html:15 +msgid "Batch import geostructured data (geojson, gpx, kml, osm...)" +msgstr "واردات داده های زمین ساختار (geojson ، gpx ، kml ، osm ...)" + +#: umap/templates/umap/about_summary.html:16 +msgid "Choose the license for your data" +msgstr "مجوز داده های خود را انتخاب کنید" + +#: umap/templates/umap/about_summary.html:17 +msgid "Embed and share your map" +msgstr "نقشه خود را جاسازی کرده و به اشتراک بگذارید" + +#: umap/templates/umap/about_summary.html:23 +#, python-format +msgid "And it's open source!" +msgstr "و متن باز است!" + +#: umap/templates/umap/about_summary.html:35 +msgid "Play with the demo" +msgstr "با نسخه ی نمایشی کار کنید" + +#: umap/templates/umap/home.html:17 +msgid "Map of the uMaps" +msgstr "نقشه uMaps" + +#: umap/templates/umap/home.html:24 +msgid "Get inspired, browse maps" +msgstr "الهام بگیرید، نقشه‌ها را مرور کنید" + +#: umap/templates/umap/login_popup_end.html:2 +msgid "You are logged in. Continuing..." +msgstr "شما وارد سیستم شده اید. ادامه..." + +#: umap/templates/umap/map_list.html:7 umap/views.py:227 +msgid "by" +msgstr "توسط" + +#: umap/templates/umap/map_list.html:11 +msgid "More" +msgstr "بیشتر" + +#: umap/templates/umap/navigation.html:14 +msgid "About" +msgstr "درباره" + +#: umap/templates/umap/navigation.html:15 +msgid "Help" +msgstr "راهنما" + +#: umap/templates/umap/navigation.html:18 +msgid "Change password" +msgstr "رمز عبور را تغییر دهید" + +#: umap/templates/umap/password_change.html:6 +msgid "Password change" +msgstr "تغییر رمز عبور" + +#: umap/templates/umap/password_change.html:7 +msgid "" +"Please enter your old password, for security's sake, and then enter your new" +" password twice so we can verify you typed it in correctly." +msgstr "لطفاً برای حفظ امنیت گذرواژه قدیمی خود را وارد کنید و سپس رمز جدید خود را دوبار وارد کنید تا بتوانیم تأیید کنیم که شما آن را به درستی وارد کرده اید." + +#: umap/templates/umap/password_change.html:12 +msgid "Old password" +msgstr "رمز عبور قدیمی" + +#: umap/templates/umap/password_change.html:14 +msgid "New password" +msgstr "رمز عبور جدید" + +#: umap/templates/umap/password_change.html:16 +msgid "New password confirmation" +msgstr "تایید رمز عبور جدید" + +#: umap/templates/umap/password_change.html:18 +msgid "Change my password" +msgstr "تغییر رمز عبور خود" + +#: umap/templates/umap/password_change_done.html:6 +msgid "Password change successful" +msgstr "تغییر رمز عبور موفقیت آمیز بود" + +#: umap/templates/umap/password_change_done.html:7 +msgid "Your password was changed." +msgstr "رمز عبور شما تغییر کرد" + +#: umap/templates/umap/search.html:13 +msgid "Not map found." +msgstr "نقشه یافت نشد." + +#: umap/views.py:232 +msgid "View the map" +msgstr "مشاهده نقشه" + +#: umap/views.py:529 +#, python-format +msgid "" +"Your map has been created! If you want to edit this map from another " +"computer, please use this link: %(anonymous_url)s" +msgstr "نقشه شما ایجاد شده است! اگر می‌خواهید این نقشه را از یک رایانه دیگر ویرایش کنید، از این لینک استفاده کنید: %(anonymous_url)s" + +#: umap/views.py:534 +msgid "Congratulations, your map has been created!" +msgstr "تبریک می‌گویم، نقشه شما ایجاد شده است!" + +#: umap/views.py:564 +msgid "Map has been updated!" +msgstr "نقشه به روز شده است!" + +#: umap/views.py:589 +msgid "Map editors updated with success!" +msgstr "ویراستاران نقشه با موفقیت به روز شد!" + +#: umap/views.py:614 +msgid "Only its owner can delete the map." +msgstr "فقط مالک آن می‌تواند نقشه را حذف کند." + +#: umap/views.py:637 +#, python-format +msgid "" +"Your map has been cloned! If you want to edit this map from another " +"computer, please use this link: %(anonymous_url)s" +msgstr "نقشه شما شبیه سازی شده است! اگر می خواهید این نقشه را از رایانه دیگری ویرایش کنید، لطفاً از این پیوند استفاده کنید: %(anonymous_url)s" + +#: umap/views.py:642 +msgid "Congratulations, your map has been cloned!" +msgstr "تبریک می گویم، نقشه شما شبیه سازی شده است!" + +#: umap/views.py:793 +msgid "Layer successfully deleted." +msgstr "لایه با موفقیت حذف شد." diff --git a/umap/locale/fi/LC_MESSAGES/django.mo b/umap/locale/fi/LC_MESSAGES/django.mo index b571e27d..1949f1e0 100644 Binary files a/umap/locale/fi/LC_MESSAGES/django.mo and b/umap/locale/fi/LC_MESSAGES/django.mo differ diff --git a/umap/locale/fi/LC_MESSAGES/django.po b/umap/locale/fi/LC_MESSAGES/django.po index 4dd2ae5f..537f2aba 100644 --- a/umap/locale/fi/LC_MESSAGES/django.po +++ b/umap/locale/fi/LC_MESSAGES/django.po @@ -12,9 +12,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-07 14:28+0000\n" -"Last-Translator: yohanboniface \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Jaakko Helleranta , 2013\n" "Language-Team: Finnish (http://www.transifex.com/openstreetmap/umap/language/fi/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -74,7 +74,7 @@ msgstr "Etsi" msgid "Secret edit link is %s" msgstr "Salainen muokkauslinkki on %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Kuka tahansa saa muokata" @@ -86,107 +86,107 @@ msgstr "Muokattavissa vain salaisella muokkauslinkillä" msgid "Site is readonly for maintenance" msgstr "" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "nimi" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "tarkemmat tiedot" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Linkki sivulle, jossa lisenssi on määritetty yksityiskohtaisesti." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "OSM-karttatiiliformaattia mukaileva URL-sapluuna" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Taustakarttojen järjestys muokkauslaatikossa" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Vain julkaisijat saavat muokata" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Vain omistaja saa muokata" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "kaikille (julkinen)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "linkinhaltijoille" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "vain muokkaajille" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "kuvaus" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "keskitä" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "zoomaa" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "paikanna" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Paikanna käyttäjä sivua ladattaessa?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Valitse kartan lisenssi" -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "lisenssi" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "omistaja" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "julkaisija" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "muokkaa tilaa" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "jaa status" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "asetukset" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Kloonattu kartasta" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "näytä ladattaessa" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Näytä tämä kerros ladattaessa." @@ -280,7 +280,7 @@ msgstr "Inspiroidu selaamalla karttoja" msgid "You are logged in. Continuing..." msgstr "Sisäänkirjautumisesi onnistui. Jatketahan..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "taholta" @@ -293,8 +293,8 @@ msgid "About" msgstr "Tietoja" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Palaute" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -338,30 +338,30 @@ msgstr "" msgid "Not map found." msgstr "Karttaa ei löytynyt." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Katso karttaa" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Karttasi on luotu! Jos haluat muokata tätä karttaa joltain muulta tietokoneelta, käytä tätä linkkiä: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Onneksi olkoon! Uusi karttasi on luotu!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Kartta on päivitetty!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Kartan toimittajat päivitetty onnistuneesti!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Vain kartan omistaja voi poistaa kartan." @@ -376,6 +376,6 @@ msgstr "Karttasi on kloonattu! Jos haluat muokata tätä karttaa joltain muulta msgid "Congratulations, your map has been cloned!" msgstr "Onneksi olkoon! Karttasi on kloonattu!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Kerros onnistuneesti poistettu. Pysyvästi." diff --git a/umap/locale/fr/LC_MESSAGES/django.mo b/umap/locale/fr/LC_MESSAGES/django.mo index 5e459fa2..daf6cbda 100644 Binary files a/umap/locale/fr/LC_MESSAGES/django.mo and b/umap/locale/fr/LC_MESSAGES/django.mo differ diff --git a/umap/locale/fr/LC_MESSAGES/django.po b/umap/locale/fr/LC_MESSAGES/django.po index e87cae02..45915266 100644 --- a/umap/locale/fr/LC_MESSAGES/django.po +++ b/umap/locale/fr/LC_MESSAGES/django.po @@ -3,32 +3,255 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Antonin Del Fabbro, 2023 +# bagage , 2021 # Buggi, 2013 # Buggi, 2013 # Buggi, 2013 # Philippe Verdy, 2017 # severin.menard , 2014 # severin.menard , 2014 +# severin.menard , 2014 +# spf, 2019 # spf, 2019 # Philippe Verdy, 2017 -# yohanboniface , 2013-2014,2018-2019 +# yohanboniface , 2013-2014,2018-2019,2023 # YOHAN BONIFACE , 2012 # yohanboniface , 2014,2016 msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-07-17 18:43+0000\n" -"Last-Translator: spf\n" -"Language-Team: French (http://www.transifex.com/openstreetmap/umap/language/fr/)\n" +"POT-Creation-Date: 2023-05-31 07:12+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: yohanboniface , 2013-2014,2018-2019,2023\n" +"Language-Team: French (http://app.transifex.com/openstreetmap/umap/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: fr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" -#: tmp/framacarte/templates/umap/home.html:8 umap/templates/umap/home.html:9 +#: forms.py:40 +#, python-format +msgid "Secret edit link is %s" +msgstr "Lien de modification secret : %s" + +#: forms.py:44 models.py:110 +msgid "Everyone can edit" +msgstr "Tout le monde peut modifier" + +#: forms.py:45 +msgid "Only editable with secret edit link" +msgstr "Modifiable seulement avec le lien de modification secret" + +#: middleware.py:14 +msgid "Site is readonly for maintenance" +msgstr "Le site est en lecture seule pour maintenance." + +#: models.py:16 +msgid "name" +msgstr "nom" + +#: models.py:47 +msgid "details" +msgstr "détails" + +#: models.py:48 +msgid "Link to a page where the licence is detailed." +msgstr "Lien vers une page détaillant la licence." + +#: models.py:58 +msgid "URL template using OSM tile format" +msgstr "Modèle d'URL au format des tuiles OSM" + +#: models.py:64 +msgid "Order of the tilelayers in the edit box" +msgstr "Ordre des calques de tuiles dans le panneau de modification" + +#: models.py:111 +msgid "Only editors can edit" +msgstr "Seuls les éditeurs peuvent modifier" + +#: models.py:112 +msgid "Only owner can edit" +msgstr "Seul le créateur peut modifier" + +#: models.py:115 +msgid "everyone (public)" +msgstr "tout le monde (public)" + +#: models.py:116 +msgid "anyone with link" +msgstr "quiconque a le lien" + +#: models.py:117 +msgid "editors only" +msgstr "seulement les modificateurs" + +#: models.py:118 +msgid "blocked" +msgstr "Bloquée" + +#: models.py:121 models.py:270 +msgid "description" +msgstr "description" + +#: models.py:122 +msgid "center" +msgstr "centre" + +#: models.py:123 +msgid "zoom" +msgstr "zoom" + +#: models.py:125 +msgid "locate" +msgstr "géolocaliser" + +#: models.py:125 +msgid "Locate user on load?" +msgstr "Géolocaliser l'utilisateur au chargement ?" + +#: models.py:129 +msgid "Choose the map licence." +msgstr "Choisir une licence pour la carte" + +#: models.py:130 +msgid "licence" +msgstr "licence" + +#: models.py:140 +msgid "owner" +msgstr "créateur" + +#: models.py:144 +msgid "editors" +msgstr "éditeurs" + +#: models.py:147 +msgid "edit status" +msgstr "statut de modification" + +#: models.py:150 +msgid "share status" +msgstr "qui a accès" + +#: models.py:153 +msgid "settings" +msgstr "réglages" + +#: models.py:225 +msgid "Clone of" +msgstr "Clone de" + +#: models.py:274 +msgid "display on load" +msgstr "afficher au chargement." + +#: models.py:275 +msgid "Display this layer on load." +msgstr "Afficher ce calque au chargement." + +#: templates/404.html:7 +msgid "Take me to the home page" +msgstr "Retour à la page d'accueil" + +#: templates/auth/user_detail.html:7 +#, python-format +msgid "Browse %(current_user)s's maps" +msgstr "Consulter les cartes de %(current_user)s" + +#: templates/auth/user_detail.html:15 +#, python-format +msgid "%(current_user)s has no maps." +msgstr "%(current_user)s n'a aucune carte." + +#: templates/auth/user_stars.html:7 +#, python-format +msgid "Browse %(current_user)s's starred maps" +msgstr "Consulter les cartes favorites de %(current_user)s" + +#: templates/auth/user_stars.html:15 +#, python-format +msgid "%(current_user)s has no starred maps yet." +msgstr "%(current_user)s n'a aucune carte favorite." + +#: templates/registration/login.html:4 +msgid "Please log in with your account" +msgstr "Identifiez-vous" + +#: templates/registration/login.html:18 +msgid "Username" +msgstr "Nom d'utilisateur" + +#: templates/registration/login.html:20 +msgid "Password" +msgstr "Mot de passe" + +#: templates/registration/login.html:21 +msgid "Login" +msgstr "Connexion" + +#: templates/registration/login.html:27 +msgid "Please choose a provider" +msgstr "Merci de choisir un fournisseur" + +#: templates/umap/about_summary.html:6 +#, python-format +msgid "" +"uMap lets you create maps with OpenStreetMap " +"layers in a minute and embed them in your site." +msgstr "uMap permet de créer des cartes personnalisées sur des fonds OpenStreetMap en un instant et les afficher dans votre site." + +#: templates/umap/about_summary.html:11 +msgid "Choose the layers of your map" +msgstr "Choisir les fonds pour votre carte" + +#: templates/umap/about_summary.html:12 +msgid "Add POIs: markers, lines, polygons..." +msgstr "Ajouter des points d'intérêt : marqueurs, lignes, polygones..." + +#: templates/umap/about_summary.html:13 +msgid "Manage POIs colours and icons" +msgstr "Choisir la couleur et les icônes" + +#: templates/umap/about_summary.html:14 +msgid "Manage map options: display a minimap, locate user on load…" +msgstr "Gérer les options de la carte : afficher une minicarte, géolocaliser l'utilisateur..." + +#: templates/umap/about_summary.html:15 +msgid "Batch import geostructured data (geojson, gpx, kml, osm...)" +msgstr "Import des données géographiques en masse (geojson, gpx, kml, osm...)" + +#: templates/umap/about_summary.html:16 +msgid "Choose the license for your data" +msgstr "Choisir la licence de vos données" + +#: templates/umap/about_summary.html:17 +msgid "Embed and share your map" +msgstr "Exporter et partager votre carte" + +#: templates/umap/about_summary.html:23 +#, python-format +msgid "And it's open source!" +msgstr "Et c'est open source!" + +#: templates/umap/about_summary.html:34 templates/umap/navigation.html:28 +msgid "Create a map" +msgstr "Créer une carte" + +#: templates/umap/about_summary.html:37 +msgid "Play with the demo" +msgstr "Tester la démo" + +#: templates/umap/content.html:25 +msgid "" +"This instance of uMap is currently in read only mode, no creation/edit is " +"allowed." +msgstr "uMap est actuelle en mode lecture seule, aucune création ou modification n'est possible." + +#: templates/umap/content.html:33 #, python-format msgid "" "This is a demo instance, used for tests and pre-rolling releases. If you " @@ -37,351 +260,142 @@ msgid "" "instance, it's open source!" msgstr "Il s'agit d'un site de démonstration, utilisé pour les tests et validation avant diffusion. Si vous avez besoin d'une version stable, utilisez plutôt %(stable_url)s. Vous pouvez aussi mettre en place votre propre version, c'est open source!" -#: tmp/framacarte/templates/umap/home.html:83 -#: tmp/framacarte/templates/umap/navigation.html:14 -#: umap/templates/umap/about_summary.html:33 -#: umap/templates/umap/navigation.html:26 -msgid "Create a map" -msgstr "Créer une carte" - -#: tmp/framacarte/templates/umap/navigation.html:7 -#: umap/templates/umap/navigation.html:10 -msgid "My maps" -msgstr "Mes cartes" - -#: tmp/framacarte/templates/umap/navigation.html:9 -#: umap/templates/umap/navigation.html:12 -msgid "Log in" -msgstr "Connexion" - -#: tmp/framacarte/templates/umap/navigation.html:9 -#: umap/templates/umap/navigation.html:12 -msgid "Sign in" -msgstr "Créer un compte" - -#: tmp/framacarte/templates/umap/navigation.html:12 -#: umap/templates/umap/navigation.html:20 -msgid "Log out" -msgstr "Déconnexion" - -#: tmp/framacarte/templates/umap/search_bar.html:6 -#: umap/templates/umap/search_bar.html:6 -msgid "Search maps" -msgstr "Chercher des cartes" - -#: tmp/framacarte/templates/umap/search_bar.html:10 -#: tmp/framacarte/templates/umap/search_bar.html:13 -#: umap/templates/umap/search_bar.html:9 -msgid "Search" -msgstr "Chercher" - -#: umap/forms.py:40 -#, python-format -msgid "Secret edit link is %s" -msgstr "Lien de modification secret : %s" - -#: umap/forms.py:44 umap/models.py:115 -msgid "Everyone can edit" -msgstr "Tout le monde peut modifier" - -#: umap/forms.py:45 -msgid "Only editable with secret edit link" -msgstr "Modifiable seulement avec le lien de modification secret" - -#: umap/middleware.py:14 -msgid "Site is readonly for maintenance" -msgstr "Le site est en lecture seule pour maintenance." - -#: umap/models.py:17 -msgid "name" -msgstr "nom" - -#: umap/models.py:48 -msgid "details" -msgstr "détails" - -#: umap/models.py:49 -msgid "Link to a page where the licence is detailed." -msgstr "Lien vers une page détaillant la licence." - -#: umap/models.py:63 -msgid "URL template using OSM tile format" -msgstr "Modèle d'URL au format des tuiles OSM" - -#: umap/models.py:71 -msgid "Order of the tilelayers in the edit box" -msgstr "Ordre des calques de tuiles dans le panneau de modification" - -#: umap/models.py:116 -msgid "Only editors can edit" -msgstr "Seuls les modificateurs peuvent modifier" - -#: umap/models.py:117 -msgid "Only owner can edit" -msgstr "Seul le créateur peut modifier" - -#: umap/models.py:120 -msgid "everyone (public)" -msgstr "tout le monde (public)" - -#: umap/models.py:121 -msgid "anyone with link" -msgstr "quiconque a le lien" - -#: umap/models.py:122 -msgid "editors only" -msgstr "seulement les modificateurs" - -#: umap/models.py:123 -msgid "blocked" -msgstr "Bloquée" - -#: umap/models.py:126 umap/models.py:256 -msgid "description" -msgstr "description" - -#: umap/models.py:127 -msgid "center" -msgstr "centre" - -#: umap/models.py:128 -msgid "zoom" -msgstr "zoom" - -#: umap/models.py:129 -msgid "locate" -msgstr "géolocaliser" - -#: umap/models.py:129 -msgid "Locate user on load?" -msgstr "Géolocaliser l'utilisateur au chargement ?" - -#: umap/models.py:132 -msgid "Choose the map licence." -msgstr "Choisir une licence pour la carte" - -#: umap/models.py:133 -msgid "licence" -msgstr "licence" - -#: umap/models.py:138 -msgid "owner" -msgstr "créateur" - -#: umap/models.py:139 -msgid "editors" -msgstr "modificateurs" - -#: umap/models.py:140 -msgid "edit status" -msgstr "statut de modification" - -#: umap/models.py:141 -msgid "share status" -msgstr "qui a accès" - -#: umap/models.py:142 -msgid "settings" -msgstr "réglages" - -#: umap/models.py:210 -msgid "Clone of" -msgstr "Clone de" - -#: umap/models.py:261 -msgid "display on load" -msgstr "afficher au chargement." - -#: umap/models.py:262 -msgid "Display this layer on load." -msgstr "Afficher ce calque au chargement." - -#: umap/templates/404.html:7 -msgid "Take me to the home page" -msgstr "Retour à la page d'accueil" - -#: umap/templates/auth/user_detail.html:7 -#, python-format -msgid "Browse %(current_user)s's maps" -msgstr "Consulter les cartes de %(current_user)s" - -#: umap/templates/auth/user_detail.html:15 -#, python-format -msgid "%(current_user)s has no maps." -msgstr "%(current_user)s n'a aucune carte." - -#: umap/templates/registration/login.html:4 -msgid "Please log in with your account" -msgstr "Identifiez-vous" - -#: umap/templates/registration/login.html:18 -msgid "Username" -msgstr "Nom d'utilisateur" - -#: umap/templates/registration/login.html:20 -msgid "Password" -msgstr "Mot de passe" - -#: umap/templates/registration/login.html:21 -msgid "Login" -msgstr "Connexion" - -#: umap/templates/registration/login.html:27 -msgid "Please choose a provider" -msgstr "Merci de choisir un fournisseur" - -#: umap/templates/umap/about_summary.html:6 -#, python-format -msgid "" -"uMap lets you create maps with OpenStreetMap " -"layers in a minute and embed them in your site." -msgstr "uMap permet de créer des cartes personnalisées sur des fonds OpenStreetMap en un instant et les afficher dans votre site." - -#: umap/templates/umap/about_summary.html:11 -msgid "Choose the layers of your map" -msgstr "Choisir les fonds pour votre carte" - -#: umap/templates/umap/about_summary.html:12 -msgid "Add POIs: markers, lines, polygons..." -msgstr "Ajouter des points d'intérêt : marqueurs, lignes, polygones..." - -#: umap/templates/umap/about_summary.html:13 -msgid "Manage POIs colours and icons" -msgstr "Choisir la couleur et les icônes" - -#: umap/templates/umap/about_summary.html:14 -msgid "Manage map options: display a minimap, locate user on load…" -msgstr "Gérer les options de la carte : afficher une minicarte, géolocaliser l'utilisateur..." - -#: umap/templates/umap/about_summary.html:15 -msgid "Batch import geostructured data (geojson, gpx, kml, osm...)" -msgstr "Import des données géographiques en masse (geojson, gpx, kml, osm...)" - -#: umap/templates/umap/about_summary.html:16 -msgid "Choose the license for your data" -msgstr "Choisir la licence de vos données" - -#: umap/templates/umap/about_summary.html:17 -msgid "Embed and share your map" -msgstr "Exporter et partager votre carte" - -#: umap/templates/umap/about_summary.html:23 -#, python-format -msgid "And it's open source!" -msgstr "Et c'est open source!" - -#: umap/templates/umap/about_summary.html:35 -msgid "Play with the demo" -msgstr "Tester la démo" - -#: umap/templates/umap/home.html:17 +#: templates/umap/home.html:10 msgid "Map of the uMaps" msgstr "La carte des uMaps" -#: umap/templates/umap/home.html:24 +#: templates/umap/home.html:17 msgid "Get inspired, browse maps" msgstr "Naviguer dans les cartes" -#: umap/templates/umap/login_popup_end.html:2 +#: templates/umap/login_popup_end.html:2 msgid "You are logged in. Continuing..." msgstr "Vous êtes maintenant identifié. Merci de patienter..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: templates/umap/map_list.html:7 views.py:245 msgid "by" msgstr "par" -#: umap/templates/umap/map_list.html:11 +#: templates/umap/map_list.html:11 msgid "More" msgstr "Plus" -#: umap/templates/umap/navigation.html:14 +#: templates/umap/navigation.html:10 +msgid "My maps" +msgstr "Mes cartes" + +#: templates/umap/navigation.html:11 +msgid "Starred maps" +msgstr "Favoris" + +#: templates/umap/navigation.html:13 +msgid "Log in" +msgstr "Connexion" + +#: templates/umap/navigation.html:13 +msgid "Sign in" +msgstr "Créer un compte" + +#: templates/umap/navigation.html:15 msgid "About" msgstr "À propos" -#: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Donner votre avis" +#: templates/umap/navigation.html:16 +msgid "Help" +msgstr "Aide" -#: umap/templates/umap/navigation.html:18 +#: templates/umap/navigation.html:19 msgid "Change password" msgstr "Changer le mot de passe" -#: umap/templates/umap/password_change.html:6 +#: templates/umap/navigation.html:21 +msgid "Log out" +msgstr "Déconnexion" + +#: templates/umap/password_change.html:6 msgid "Password change" msgstr "Changer le mot de passe" -#: umap/templates/umap/password_change.html:7 +#: templates/umap/password_change.html:7 msgid "" "Please enter your old password, for security's sake, and then enter your new" " password twice so we can verify you typed it in correctly." msgstr "Merci de renseigner votre mot de passe actuel, puis deux fois le nouveau." -#: umap/templates/umap/password_change.html:12 +#: templates/umap/password_change.html:12 msgid "Old password" msgstr "Ancien mot de passe" -#: umap/templates/umap/password_change.html:14 +#: templates/umap/password_change.html:14 msgid "New password" msgstr "Nouveau mot de passe" -#: umap/templates/umap/password_change.html:16 +#: templates/umap/password_change.html:16 msgid "New password confirmation" msgstr "Confirmation du nouveau mot de passe" -#: umap/templates/umap/password_change.html:18 +#: templates/umap/password_change.html:18 msgid "Change my password" msgstr "Changer de mot de passe" -#: umap/templates/umap/password_change_done.html:6 +#: templates/umap/password_change_done.html:6 msgid "Password change successful" msgstr "Le mot de passe a été modifié" -#: umap/templates/umap/password_change_done.html:7 +#: templates/umap/password_change_done.html:7 msgid "Your password was changed." msgstr "Votre mot de passe a été modifié" -#: umap/templates/umap/search.html:13 +#: templates/umap/search.html:13 msgid "Not map found." msgstr "Aucune carte trouvée." -#: umap/views.py:220 +#: templates/umap/search_bar.html:6 +msgid "Search maps" +msgstr "Chercher des cartes" + +#: templates/umap/search_bar.html:9 +msgid "Search" +msgstr "Chercher" + +#: views.py:250 msgid "View the map" msgstr "Voir la carte" -#: umap/views.py:524 +#: views.py:547 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Votre carte a été créée ! Si vous souhaitez la modifier depuis un autre ordinateur, veuillez utiliser ce lien : %(anonymous_url)s" -#: umap/views.py:529 +#: views.py:552 msgid "Congratulations, your map has been created!" msgstr "Félicitations, votre carte a bien été créée !" -#: umap/views.py:561 +#: views.py:582 msgid "Map has been updated!" msgstr "La carte a été mise à jour !" -#: umap/views.py:587 +#: views.py:607 msgid "Map editors updated with success!" -msgstr "Modificateurs de la carte mis à jour !" +msgstr "Éditeurs de la carte mis à jour !" -#: umap/views.py:612 +#: views.py:632 msgid "Only its owner can delete the map." msgstr "Seul le créateur de la carte peut la supprimer." -#: umap/views.py:637 +#: views.py:655 #, python-format msgid "" "Your map has been cloned! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Votre carte a été dupliquée ! Si vous souhaitez la modifier depuis un autre ordinateur, veuillez utiliser ce lien : %(anonymous_url)s" -#: umap/views.py:642 +#: views.py:660 msgid "Congratulations, your map has been cloned!" msgstr "Votre carte a été dupliquée !" -#: umap/views.py:809 +#: views.py:826 msgid "Layer successfully deleted." msgstr "Calque supprimé." diff --git a/umap/locale/gl/LC_MESSAGES/django.mo b/umap/locale/gl/LC_MESSAGES/django.mo index 19a76bd4..db4d1d21 100644 Binary files a/umap/locale/gl/LC_MESSAGES/django.mo and b/umap/locale/gl/LC_MESSAGES/django.mo differ diff --git a/umap/locale/gl/LC_MESSAGES/django.po b/umap/locale/gl/LC_MESSAGES/django.po index dc776be8..14b2a1a4 100644 --- a/umap/locale/gl/LC_MESSAGES/django.po +++ b/umap/locale/gl/LC_MESSAGES/django.po @@ -11,9 +11,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-06-05 16:37+0000\n" -"Last-Translator: Navhy\n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Navhy, 2019\n" "Language-Team: Galician (http://www.transifex.com/openstreetmap/umap/language/gl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -73,7 +73,7 @@ msgstr "Procurar" msgid "Secret edit link is %s" msgstr "A ligazón de edición secreta é %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Calquera pode editar" @@ -85,107 +85,107 @@ msgstr "Só pode editarse ca ligazón secreta de edición" msgid "Site is readonly for maintenance" msgstr "O sitio está só para o mantemento" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "nome" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "detalles" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Ligazón a unha páxina web onde se detalla a licenza." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "Modelo de URL que usa o formato de teselas de OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Orde das capas base na caixa de edición" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Só os editores poden editar" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Só o dono pode editar" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "calquera (público)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "calquera que teña a ligazón" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "só editores" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "bloqueado" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "descrición" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "centrar" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "achegar/afastar" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "localizar" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Localizar o usuario na carga?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Escolle a licenza do mapa." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licenza" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "dono" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "editores" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "estado da edición" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "compartir o estado" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "axustes" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Clon de" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "amosar na carga" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Amosar esta capa na carga." @@ -279,7 +279,7 @@ msgstr "Inspírate e procura mapas" msgid "You are logged in. Continuing..." msgstr "Iniciaches a sesión. Estase a continuar..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "por" @@ -292,8 +292,8 @@ msgid "About" msgstr "Acerca de" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Opinións" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -337,30 +337,30 @@ msgstr "O seu contrasinal foi mudado." msgid "Not map found." msgstr "Non se atoparon mapas." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Ollar o mapa" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "O teu mapa foi creado! Se desexas editar este mapa dende outra computadora, emprega esta ligazón: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Parabéns! O teu mapa foi creado!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "O mapa foi actualizado!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "O editores do mapa foron actualizados de xeito exitoso!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Só o seu dono pode eliminar o mapa." @@ -375,6 +375,6 @@ msgstr "O teu mapa foi clonado! Se desexas editar este mapa dende outra computad msgid "Congratulations, your map has been cloned!" msgstr "Parabéns! O teu mapa foi clonado!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "A capa foi eliminada de xeito exitoso." diff --git a/umap/locale/he/LC_MESSAGES/django.mo b/umap/locale/he/LC_MESSAGES/django.mo index 2883573b..521bf72f 100644 Binary files a/umap/locale/he/LC_MESSAGES/django.mo and b/umap/locale/he/LC_MESSAGES/django.mo differ diff --git a/umap/locale/he/LC_MESSAGES/django.po b/umap/locale/he/LC_MESSAGES/django.po index 8e8a9c7d..90632730 100644 --- a/umap/locale/he/LC_MESSAGES/django.po +++ b/umap/locale/he/LC_MESSAGES/django.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2020-02-26 06:19+0000\n" -"Last-Translator: Yaron Shahrabani \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Yaron Shahrabani , 2020\n" "Language-Team: Hebrew (http://www.transifex.com/openstreetmap/umap/language/he/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -70,7 +70,7 @@ msgstr "חיפוש" msgid "Secret edit link is %s" msgstr "קישור העריכה הסודי הוא %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "לכולם יש הרשאות לערוך" @@ -82,107 +82,107 @@ msgstr "רק למי שיש את קישור העריכה הסודי יכול לע msgid "Site is readonly for maintenance" msgstr "האתר הוא לקריאה בלבד לצורך תחזוקה" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "שם" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "פרטים" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "קישור לעמוד בו הרישיון מפורט." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "תבנית כתובת עם תבנית האריחים של OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "סדר שכבת האריחים בתיבת העריכה" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "רק עורכים יכולים לערוך" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "רק בעלים יכולים לערוך" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "כולם (ציבורי)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "לכל מי שיש את הקישור" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "עורכים בלבד" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "חסום" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "תיאור" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "מרכז" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "תקריב" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "איתור" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "לאתר משתמש עם הטעינה?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "נא לבחור את רישיון המפה." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "רישיון" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "בעלות" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "עורכים" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "מצב עריכה" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "מצב שיתוף" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "הגדרות" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "עותק של" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "הצגה עם הטעינה" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "הצגת השכבה הזאת עם הטעינה." @@ -276,7 +276,7 @@ msgstr "מפות שתענקנה לך השראה" msgid "You are logged in. Continuing..." msgstr "נכנסת למערכת. ממשיכים הלאה…" -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "מאת" @@ -289,8 +289,8 @@ msgid "About" msgstr "על אודות" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "משוב" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -334,30 +334,30 @@ msgstr "הססמה שלך הוחלפה." msgid "Not map found." msgstr "לא נמצאה מפה." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "הצגת המפה" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "המפה שלך נוצרה! אם מעניין אותן לערוך את המפה הזאת ממחשב אחר נא להשתמש בקישור הבא: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "ברכותינו, המפה שלך נוצרה!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "המפה עודכנה!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "עורכי המפה עודכנו בהצלחה!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "רק לבעלים יש אפשרות למחוק את המפה." @@ -372,6 +372,6 @@ msgstr "המפה שלך שוכפלה! אם מעניין אותך לערוך את msgid "Congratulations, your map has been cloned!" msgstr "ברכותינו, המפה שלך שוכפלה!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "השכבה נמחקה בהצלחה." diff --git a/umap/locale/hr/LC_MESSAGES/django.mo b/umap/locale/hr/LC_MESSAGES/django.mo index 886733fd..90464cc5 100644 Binary files a/umap/locale/hr/LC_MESSAGES/django.mo and b/umap/locale/hr/LC_MESSAGES/django.mo differ diff --git a/umap/locale/hr/LC_MESSAGES/django.po b/umap/locale/hr/LC_MESSAGES/django.po index fdcce38a..7eb163c6 100644 --- a/umap/locale/hr/LC_MESSAGES/django.po +++ b/umap/locale/hr/LC_MESSAGES/django.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-07 14:28+0000\n" -"Last-Translator: yohanboniface \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Janjko , 2013\n" "Language-Team: Croatian (http://www.transifex.com/openstreetmap/umap/language/hr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -71,7 +71,7 @@ msgstr "Pretraživanje" msgid "Secret edit link is %s" msgstr "" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Svi mogu uređivati" @@ -83,107 +83,107 @@ msgstr "" msgid "Site is readonly for maintenance" msgstr "" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "ime" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "detalji" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "" -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Samo urednici mogu uređivati" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Samo vlasnik može uređivati" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "opis" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "centar" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "uvećanje" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "" -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licenca" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "vlasnik" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "urednici" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "status uređivanja" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "postavke" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Duplikat od" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "" @@ -277,7 +277,7 @@ msgstr "" msgid "You are logged in. Continuing..." msgstr "" -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "" @@ -290,8 +290,8 @@ msgid "About" msgstr "Više o" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Povratna informacija" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -335,30 +335,30 @@ msgstr "" msgid "Not map found." msgstr "Karta nije nađena" -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Samo vlasnik karte ju može obrisati." @@ -373,6 +373,6 @@ msgstr "" msgid "Congratulations, your map has been cloned!" msgstr "Karta je duplicirana." -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Sloj obrisan." diff --git a/umap/locale/hu/LC_MESSAGES/django.mo b/umap/locale/hu/LC_MESSAGES/django.mo index fc3ac0a2..d1fee8cf 100644 Binary files a/umap/locale/hu/LC_MESSAGES/django.mo and b/umap/locale/hu/LC_MESSAGES/django.mo differ diff --git a/umap/locale/hu/LC_MESSAGES/django.po b/umap/locale/hu/LC_MESSAGES/django.po index f1d826e4..0b869a9a 100644 --- a/umap/locale/hu/LC_MESSAGES/django.po +++ b/umap/locale/hu/LC_MESSAGES/django.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-09-10 09:55+0000\n" -"Last-Translator: Gábor Babos \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Gábor Babos , 2017-2019\n" "Language-Team: Hungarian (http://www.transifex.com/openstreetmap/umap/language/hu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -71,7 +71,7 @@ msgstr "Keresés" msgid "Secret edit link is %s" msgstr "Titkos szerkesztési link: %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Bárki szerkesztheti" @@ -83,107 +83,107 @@ msgstr "Kizárólag titkos szerkesztési linken szerkeszthető" msgid "Site is readonly for maintenance" msgstr "Karbantartás miatt a webhely csak olvasható" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "név" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "részletek" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Link egy részletes licencinformációkat tartalmazó lapra." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "OSM-csempeformátumot használó URL-sablon" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Csemperétegek sorrendje a szerkesztődobozban" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Csak szerkesztők szerkeszthetik" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Csak a tulajdonos szerkesztheti" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "mindenki (nyilvános)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "a link birtokában bárki" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "csak szerkesztők" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "blokkolva" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "leírás" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "középpont" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "nagyítás" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "helymeghatározás" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Bekérje a felhasználó pozícióját betöltéskor?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Térképlicenc kiválasztása" -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licenc" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "tulajdonos" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "szerkesztők" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "szerkeszthetőség" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "megoszthatóság" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "beállítások" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Másolat erről: " -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "megjelenítés betöltéskor" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Réteg megjelenítése betöltéskor" @@ -277,7 +277,7 @@ msgstr "Szerezzen ihletet, böngésszen a térképek között!" msgid "You are logged in. Continuing..." msgstr "Be van jelentkezve. Továbblépés…" -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "– készítette:" @@ -290,8 +290,8 @@ msgid "About" msgstr "Névjegy" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Visszajelzés" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -335,30 +335,30 @@ msgstr "A jelszava megváltozott." msgid "Not map found." msgstr "Ilyen térkép nem található." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Térkép megtekintése" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "A térképe elkészült! Ha egy másik számítógépről szeretné szerkeszteni, ezt a linket használja: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Gratulálunk, a térképe elkészült!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "A térkép frissült." -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "A térképszerkesztők sikeresen frissültek." -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "A térképet csak a tulajdonosa törölheti." @@ -373,6 +373,6 @@ msgstr "Elkészült a térképe másolata. Ha egy másik számítógépről szer msgid "Congratulations, your map has been cloned!" msgstr "Gratulálunk, elkészült a térképe másolata!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "A réteg sikeresen törlődött." diff --git a/umap/locale/is/LC_MESSAGES/django.mo b/umap/locale/is/LC_MESSAGES/django.mo index 4aeb9cf1..6c262428 100644 Binary files a/umap/locale/is/LC_MESSAGES/django.mo and b/umap/locale/is/LC_MESSAGES/django.mo differ diff --git a/umap/locale/is/LC_MESSAGES/django.po b/umap/locale/is/LC_MESSAGES/django.po index 29e6c3fa..005e1222 100644 --- a/umap/locale/is/LC_MESSAGES/django.po +++ b/umap/locale/is/LC_MESSAGES/django.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2020-02-27 06:51+0000\n" -"Last-Translator: Sveinn í Felli \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Sveinn í Felli , 2020\n" "Language-Team: Icelandic (http://www.transifex.com/openstreetmap/umap/language/is/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -70,7 +70,7 @@ msgstr "Leita" msgid "Secret edit link is %s" msgstr "Leynilegur breytingatengill er %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Allir geta breytt" @@ -82,107 +82,107 @@ msgstr "Aðeins breytanlegt með leynilegum breytingatengli" msgid "Site is readonly for maintenance" msgstr "Vefsvæðið er núna skrifvarið vegna viðhaldsvinnu" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "nafn" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "nánar" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Tengill á síðu þar sem notkunarleyfi er útskýrt." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "URL-sniðmát sem notar OSM-kortatíglasnið" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Röð kortatíglalaga í breytingareitnum" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Aðeins ritstjórar geta breytt" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Aðeins eigandi getur breytt" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "allir (opinbert)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "allir með tengil" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "aðeins ritstjórar" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "útilokað" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "lýsing" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "miðja" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "aðdráttur" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "staðsetja" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Staðsetja notanda við innhleðslu?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Veldu notkunarleyfi fyrir kortið." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "notkunarleyfi" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "eigandi" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "ritstjórar" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "staða vinnslu" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "staða deilingar" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "stillingar" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Klón af" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "birta við innhleðslu" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Birta þetta lag við innhleðslu." @@ -276,7 +276,7 @@ msgstr "Fáðu hugmyndir, skoðaðu önnur landakort" msgid "You are logged in. Continuing..." msgstr "Þú ert skráð/ur inn. Held áfram..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "eftir" @@ -289,8 +289,8 @@ msgid "About" msgstr "Um hugbúnaðinn" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Umsagnir" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -334,30 +334,30 @@ msgstr "Lykilorðinu þínu hefur verið breytt" msgid "Not map found." msgstr "Ekkert landakort fannst." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Skoða kortið" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Það tókst að útbúa landakortið þitt! Ef þú ætlar að breyta þessu landakorti úr annarri tölvu, ættirðu að nota þennan tengil: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Til hamingju, það tókst að útbúa landakortið þitt!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Kortið hefur verið uppfært!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Tókst að uppfæra vinnslu korta!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Aðeins eigandinn getur eytt landakortinu." @@ -372,6 +372,6 @@ msgstr "Það tókst að klóna landakortið þitt! Ef þú ætlar að breyta þ msgid "Congratulations, your map has been cloned!" msgstr "Til hamingju, það tókst að klóna landakortið þitt!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Tókst að eyða lagi." diff --git a/umap/locale/it/LC_MESSAGES/django.mo b/umap/locale/it/LC_MESSAGES/django.mo index ca7ec2e6..6a009aa1 100644 Binary files a/umap/locale/it/LC_MESSAGES/django.mo and b/umap/locale/it/LC_MESSAGES/django.mo differ diff --git a/umap/locale/it/LC_MESSAGES/django.po b/umap/locale/it/LC_MESSAGES/django.po index 0f624108..238a0728 100644 --- a/umap/locale/it/LC_MESSAGES/django.po +++ b/umap/locale/it/LC_MESSAGES/django.po @@ -9,7 +9,7 @@ # Marco , 2019 # Marco , 2018 # Maurizio Napolitano , 2013,2017 -# MIrco Zorzo , 2020 +# Mirco Zorzo , 2020 # claudiamocci , 2013 # Simone Cortesi , 2014 # YOHAN BONIFACE , 2012 @@ -17,15 +17,15 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2020-02-19 08:35+0000\n" -"Last-Translator: MIrco Zorzo \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Mirco Zorzo , 2020\n" "Language-Team: Italian (http://www.transifex.com/openstreetmap/umap/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" #: tmp/framacarte/templates/umap/home.html:8 umap/templates/umap/home.html:9 #, python-format @@ -79,7 +79,7 @@ msgstr "Cerca" msgid "Secret edit link is %s" msgstr "Il link segreto per la modifica %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Chiunque può modificare" @@ -91,107 +91,107 @@ msgstr "Modificabile solo con il link segreto" msgid "Site is readonly for maintenance" msgstr "Il sito in sola lettura per la manutenzione" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "nome" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "dettagli" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Link alla pagina con i dettagli della licenza" -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "Modello dell'URL usando il formato delle tile OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Ordine degli sfondi (tilelayers) nel box di modifica" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Solo gli editor possono fare modifiche" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Solo il proprietario può effettuare modifiche" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "chiunque (pubblico)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "chiunque abbia il ilnk" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "solo autori" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "bloccato" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "descrizione" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "centra" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "zoom" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "localizza" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Geolocalizzare l'utente al caricamento?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Scegliere una licenza per la mappa." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licenza" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "proprietario" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "editor" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "stato della modifica" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "stato condivisione" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "impostazioni" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Duplicata da " -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "mostra al caricamento" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Visualizza questo layer al caricamento." @@ -285,7 +285,7 @@ msgstr "Prendi ispirazione, visualizza mappe" msgid "You are logged in. Continuing..." msgstr "Utente loggato. Continuare..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "di" @@ -298,8 +298,8 @@ msgid "About" msgstr "Informazioni" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Feedback" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -343,30 +343,30 @@ msgstr "La tua password è stata cambiata." msgid "Not map found." msgstr "Nessuna mappa trovata." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Visualizza la mappa" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "La mappa è stata creata! Per modificarla da un altro computer, si deve utilizzare questo link: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Congratulazioni, la mappa è stata creata!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "La mappa è stata aggiornata!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Aggiornato l'elenco degli editor abilitati alla modifica della mappa!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Solo il proprietario può eliminare la mappa." @@ -381,6 +381,6 @@ msgstr "La mappa è stata clonata! Per modificarla usando un altro computer, si msgid "Congratulations, your map has been cloned!" msgstr "Perfetto, la tua mappa è stata clonata!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Layer eliminato correttamente" diff --git a/umap/locale/ja/LC_MESSAGES/django.mo b/umap/locale/ja/LC_MESSAGES/django.mo index 2db91742..df2ec31d 100644 Binary files a/umap/locale/ja/LC_MESSAGES/django.mo and b/umap/locale/ja/LC_MESSAGES/django.mo differ diff --git a/umap/locale/ja/LC_MESSAGES/django.po b/umap/locale/ja/LC_MESSAGES/django.po index 5f5f9d75..34793714 100644 --- a/umap/locale/ja/LC_MESSAGES/django.po +++ b/umap/locale/ja/LC_MESSAGES/django.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-22 14:24+0000\n" -"PO-Revision-Date: 2021-08-01 09:46+0000\n" -"Last-Translator: tomoya muramoto \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: tomoya muramoto , 2016,2021\n" "Language-Team: Japanese (http://www.transifex.com/openstreetmap/umap/language/ja/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -71,7 +71,7 @@ msgstr "検索" msgid "Secret edit link is %s" msgstr "非公開の編集用リンク %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "だれでも編集可能" @@ -83,107 +83,107 @@ msgstr "非公開の編集リンクからのみ編集可能" msgid "Site is readonly for maintenance" msgstr "メンテナンス中のため現在読み込み専用です。" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "名称" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "詳細" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "ライセンス詳細ページへのリンク" -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "OSMタイルフォーマットを利用したURLテンプレート" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "編集ボックス内のタイルレイヤ並び順" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "指定ユーザのみ編集可能" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "所有者のみ編集可能" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "制限なし (公開)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "リンクを知っている人全員" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "編集者のみ" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "ブロック" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "概要" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "中心点" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "ズーム" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "現在地" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "読み込み時に現在地を表示?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "マップのライセンスを選択" -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "ライセンス" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "所有者" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "編集者" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "編集ステータス" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "共有状況" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "設定" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "複製元" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "読み込み時に表示" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "読み込み時にこのレイヤを表示" @@ -277,7 +277,7 @@ msgstr "Get inspired, browse maps" msgid "You are logged in. Continuing..." msgstr "ログインしました" -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "by" @@ -290,8 +290,8 @@ msgid "About" msgstr "uMapについて" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "フィードバック" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -335,30 +335,30 @@ msgstr "パスワードは変更されました" msgid "Not map found." msgstr "検索結果がありません" -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "マップ表示" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "マップの作成が完了しました! このマップを他の端末から編集する場合、いかのリンクを使用してください: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "マップ作成完了です!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "マップが更新されました!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "マップ編集者の更新が完了しました!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "マップを削除できるのは所有者だけです" @@ -373,6 +373,6 @@ msgstr "マップの複製が完了しました! このマップを他の端 msgid "Congratulations, your map has been cloned!" msgstr "マップの複製が完了しました!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "レイヤ削除完了" diff --git a/umap/locale/ko/LC_MESSAGES/django.mo b/umap/locale/ko/LC_MESSAGES/django.mo index cebf74f3..268560d4 100644 Binary files a/umap/locale/ko/LC_MESSAGES/django.mo and b/umap/locale/ko/LC_MESSAGES/django.mo differ diff --git a/umap/locale/ko/LC_MESSAGES/django.po b/umap/locale/ko/LC_MESSAGES/django.po index 8eaf3cc3..66fd6839 100644 --- a/umap/locale/ko/LC_MESSAGES/django.po +++ b/umap/locale/ko/LC_MESSAGES/django.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-30 12:39+0000\n" -"Last-Translator: Dongha Hwang \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Dongha Hwang , 2019\n" "Language-Team: Korean (http://www.transifex.com/openstreetmap/umap/language/ko/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -70,7 +70,7 @@ msgstr "검색" msgid "Secret edit link is %s" msgstr "비공개 편집 링크 %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "누구나 편집할 수 있음" @@ -82,107 +82,107 @@ msgstr "비공개 편집 링크를 가진 사람만 편집할 수 있음" msgid "Site is readonly for maintenance" msgstr "유지보수 중입니다. 읽기 전용으로 구동 중입니다." -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "이름" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "세부 정보" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "라이선스가 명시된 페이지로 이동하는 링크입니다." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "오픈스트리트맵 타일 포맷을 이용한 URL 템플릿" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "편집 창에서 타일 레이어의 순서" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "편집자만 편집할 수 있음" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "소유주만 편집할 수 있음" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "누구나(공개)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "링크를 가지고 있는 사람" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "편집자만" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "차단됨" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "설명" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "중앙" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "줌" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "위치" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "불러오면서 위치를 잡으시겠습니까?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "지도의 라이선스를 선택해 주세요." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "라이선스" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "소유주" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "편집자" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "편집 상태" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "공유 상태" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "설정" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "원본:" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "불러오면서 표시" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "불러오면서 동시에 이 레이어를 띄웁니다." @@ -276,7 +276,7 @@ msgstr "푹 빠져 보세요, 지도를 검색해 보세요" msgid "You are logged in. Continuing..." msgstr "로그인되었습니다. 잠시만 기다려 주세요..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "제작:" @@ -289,8 +289,8 @@ msgid "About" msgstr "정보" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "피드백" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -334,30 +334,30 @@ msgstr "비밀번호가 변경되었습니다." msgid "Not map found." msgstr "지도를 찾을 수 없습니다." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "지도 보기" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "지도가 생성되었습니다! 다른 컴퓨터에서 지도를 편집하고 싶다면 다음 링크를 사용하세요: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "축하드립니다, 지도가 생성되었습니다!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "지도가 업데이트되었습니다!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "지도 편집자가 성공적으로 업데이트되었습니다!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "소유주만 지도를 삭제할 수 있습니다." @@ -372,6 +372,6 @@ msgstr "지도가 복제되었습니다! 다른 컴퓨터에서 지도를 편집 msgid "Congratulations, your map has been cloned!" msgstr "축하드립니다, 지도가 복제되었습니다!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "레이어가 성공적으로 삭제되었습니다." diff --git a/umap/locale/lt/LC_MESSAGES/django.mo b/umap/locale/lt/LC_MESSAGES/django.mo index f12e46a4..622bf0b8 100644 Binary files a/umap/locale/lt/LC_MESSAGES/django.mo and b/umap/locale/lt/LC_MESSAGES/django.mo differ diff --git a/umap/locale/lt/LC_MESSAGES/django.po b/umap/locale/lt/LC_MESSAGES/django.po index 207c5f25..7778f943 100644 --- a/umap/locale/lt/LC_MESSAGES/django.po +++ b/umap/locale/lt/LC_MESSAGES/django.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-07 14:28+0000\n" -"Last-Translator: yohanboniface \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Ugne Urbelyte , 2017\n" "Language-Team: Lithuanian (http://www.transifex.com/openstreetmap/umap/language/lt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -71,7 +71,7 @@ msgstr "Ieškoti" msgid "Secret edit link is %s" msgstr "Slapta redagavimo nuoroda %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Visi gali redaguoti" @@ -83,107 +83,107 @@ msgstr "Redaguojamas tik su slapta nuoroda" msgid "Site is readonly for maintenance" msgstr "" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "vardas" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "išsamiau" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Licenzijos aprašymo nuoroda." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "URL šablonas OSM kaladėlių formatui" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Žemėlapio sluoksnių tvarka redagavimo lange" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Tik redaktoriai gali keisti" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Tik savininkas gali keisti" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "visi (viešai)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "visi su nuoroda" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "tik keitėjai" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "aprašymas" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "centras" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "mastelis" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "nustatyti padėtį" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Nustatyti padėti užsikrovus?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Pasirinkite žemėlapio licenziją." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licenzija" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "savininkas" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "redaktoriai" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "keisti būseną" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "pasidalinti būsena" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "nustatymai" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Kopija" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "rodyti pasikrovus" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Rodyti šį sluoksnį pasrikrovus." @@ -277,7 +277,7 @@ msgstr "Peržiūrėkite žemėlapius, raskite įkvėpimą" msgid "You are logged in. Continuing..." msgstr "Sėkmingai prisijungėte. Kraunasi..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "pagal" @@ -290,8 +290,8 @@ msgid "About" msgstr "Apie" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Atsiliepimai" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -335,30 +335,30 @@ msgstr "Jūsų slaptažodis buvo pakeistas." msgid "Not map found." msgstr "Nerasta." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Peržiūrėti žemėlapį" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Jūsų žemėlapis sėkmingai sukurtas! Jei norite redaguoti jį iš kito kompiuterio, pasinaudokite šia nuoroda: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Sveikinam, Jūsų žemėlapis sukurtas!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Žemėlapis atnaujintas!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Žemėlapio keitėjai atnaujinti!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Tik savininkas gali ištrinti žemėlapį." @@ -373,6 +373,6 @@ msgstr "Jūsų žemėlapis nukopijuotas! Jei norite redaguoti jį iš kito kompi msgid "Congratulations, your map has been cloned!" msgstr "Sveikinam, Jūsų žemėlapis buvo nukopijuotas!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Sluoksnis sėkmingai ištrintas." diff --git a/umap/locale/ms/LC_MESSAGES/django.mo b/umap/locale/ms/LC_MESSAGES/django.mo new file mode 100644 index 00000000..88c67b3b Binary files /dev/null and b/umap/locale/ms/LC_MESSAGES/django.mo differ diff --git a/umap/locale/ms/LC_MESSAGES/django.po b/umap/locale/ms/LC_MESSAGES/django.po new file mode 100644 index 00000000..9f49d159 --- /dev/null +++ b/umap/locale/ms/LC_MESSAGES/django.po @@ -0,0 +1,388 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# Yaya - Nurul Azeera Hidayah @ Muhammad Nur Hidayat Yasuyoshi (MNH48) , 2021,2023 +# Yaya - Nurul Azeera Hidayah @ Muhammad Nur Hidayat Yasuyoshi (MNH48) , 2021 +msgid "" +msgstr "" +"Project-Id-Version: uMap\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-05-31 07:12+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Yaya - Nurul Azeera Hidayah @ Muhammad Nur Hidayat Yasuyoshi (MNH48) , 2021,2023\n" +"Language-Team: Malay (http://app.transifex.com/openstreetmap/umap/language/ms/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ms\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: forms.py:40 +#, python-format +msgid "Secret edit link is %s" +msgstr "Pautan suntingan rahsia ialah %s" + +#: forms.py:44 models.py:110 +msgid "Everyone can edit" +msgstr "Sesiapa pun boleh sunting" + +#: forms.py:45 +msgid "Only editable with secret edit link" +msgstr "Hanya boleh disunting dengan pautan rahsia" + +#: middleware.py:14 +msgid "Site is readonly for maintenance" +msgstr "Laman dalam mod baca sahaja untuk penyenggaraan" + +#: models.py:16 +msgid "name" +msgstr "nama" + +#: models.py:47 +msgid "details" +msgstr "perincian" + +#: models.py:48 +msgid "Link to a page where the licence is detailed." +msgstr "Pautan ke halaman yang menyatakan lesennya." + +#: models.py:58 +msgid "URL template using OSM tile format" +msgstr "Templat URL menggunakan format fail OSM" + +#: models.py:64 +msgid "Order of the tilelayers in the edit box" +msgstr "Kedudukan lapisan jubin dalam kotak suntingan" + +#: models.py:111 +msgid "Only editors can edit" +msgstr "Hanya penyunting boleh sunting" + +#: models.py:112 +msgid "Only owner can edit" +msgstr "Hanya pemilik boleh sunting" + +#: models.py:115 +msgid "everyone (public)" +msgstr "semua orang (umum)" + +#: models.py:116 +msgid "anyone with link" +msgstr "sesiapa yang ada pautan" + +#: models.py:117 +msgid "editors only" +msgstr "penyunting sahaja" + +#: models.py:118 +msgid "blocked" +msgstr "disekat" + +#: models.py:121 models.py:270 +msgid "description" +msgstr "keterangan" + +#: models.py:122 +msgid "center" +msgstr "pertengahkan" + +#: models.py:123 +msgid "zoom" +msgstr "zum" + +#: models.py:125 +msgid "locate" +msgstr "mengesan" + +#: models.py:125 +msgid "Locate user on load?" +msgstr "Kesan kedudukan pengguna semasa dimuatkan?" + +#: models.py:129 +msgid "Choose the map licence." +msgstr "Pilih lesen peta." + +#: models.py:130 +msgid "licence" +msgstr "lesen" + +#: models.py:140 +msgid "owner" +msgstr "pemilik" + +#: models.py:144 +msgid "editors" +msgstr "penyunting" + +#: models.py:147 +msgid "edit status" +msgstr "status suntingan" + +#: models.py:150 +msgid "share status" +msgstr "status perkongsian" + +#: models.py:153 +msgid "settings" +msgstr "tetapan" + +#: models.py:225 +msgid "Clone of" +msgstr "Klon bagi" + +#: models.py:274 +msgid "display on load" +msgstr "paparkan semasa dimuatkan" + +#: models.py:275 +msgid "Display this layer on load." +msgstr "Paparkan lapisan ini ketika dimuatkan." + +#: templates/404.html:7 +msgid "Take me to the home page" +msgstr "Bawa saya ke halaman utama" + +#: templates/auth/user_detail.html:7 +#, python-format +msgid "Browse %(current_user)s's maps" +msgstr "Layari peta %(current_user)s" + +#: templates/auth/user_detail.html:15 +#, python-format +msgid "%(current_user)s has no maps." +msgstr "%(current_user)s tidak mempunyai peta." + +#: templates/auth/user_stars.html:7 +#, python-format +msgid "Browse %(current_user)s's starred maps" +msgstr "Layari peta yang ditandai bintang oleh %(current_user)s" + +#: templates/auth/user_stars.html:15 +#, python-format +msgid "%(current_user)s has no starred maps yet." +msgstr "%(current_user)s masih belum ada peta yang ditandai bintang." + +#: templates/registration/login.html:4 +msgid "Please log in with your account" +msgstr "Sila log masuk dengan akaun anda" + +#: templates/registration/login.html:18 +msgid "Username" +msgstr "Nama pengguna" + +#: templates/registration/login.html:20 +msgid "Password" +msgstr "Kata laluan" + +#: templates/registration/login.html:21 +msgid "Login" +msgstr "Log masuk" + +#: templates/registration/login.html:27 +msgid "Please choose a provider" +msgstr "Sila pilih penyedia" + +#: templates/umap/about_summary.html:6 +#, python-format +msgid "" +"uMap lets you create maps with OpenStreetMap " +"layers in a minute and embed them in your site." +msgstr "uMap membolehkan anda mencipta peta dengan lapisan OpenStreetMap dalam masa singkat dan benamkan di laman anda." + +#: templates/umap/about_summary.html:11 +msgid "Choose the layers of your map" +msgstr "Pilih lapisan untuk peta anda" + +#: templates/umap/about_summary.html:12 +msgid "Add POIs: markers, lines, polygons..." +msgstr "Tambah POI: penanda, garisan, poligon..." + +#: templates/umap/about_summary.html:13 +msgid "Manage POIs colours and icons" +msgstr "Urus warna dan ikon POI" + +#: templates/umap/about_summary.html:14 +msgid "Manage map options: display a minimap, locate user on load…" +msgstr "Urus pilihan peta: paparkan minipeta, kesan kedudukan pengguna ketika dimuatkan..." + +#: templates/umap/about_summary.html:15 +msgid "Batch import geostructured data (geojson, gpx, kml, osm...)" +msgstr "Import kelompok data berstruktur geografi (geojson, gpx, kml, osm...)" + +#: templates/umap/about_summary.html:16 +msgid "Choose the license for your data" +msgstr "Pilih lesen untuk data anda" + +#: templates/umap/about_summary.html:17 +msgid "Embed and share your map" +msgstr "Benam dan kongsi peta anda" + +#: templates/umap/about_summary.html:23 +#, python-format +msgid "And it's open source!" +msgstr "Dan ia bersumber terbuka!" + +#: templates/umap/about_summary.html:34 templates/umap/navigation.html:28 +msgid "Create a map" +msgstr "Cipta peta" + +#: templates/umap/about_summary.html:37 +msgid "Play with the demo" +msgstr "Main dengan demo" + +#: templates/umap/content.html:25 +msgid "" +"This instance of uMap is currently in read only mode, no creation/edit is " +"allowed." +msgstr "" + +#: templates/umap/content.html:33 +#, python-format +msgid "" +"This is a demo instance, used for tests and pre-rolling releases. If you " +"need a stable instance, please use %(stable_url)s. You can also host your own " +"instance, it's open source!" +msgstr "Ini tika demo, digunakan untuk ujian dan pra-terbitan berterusan. Jika anda perlukan tika yang stabil, sila gunakan %(stable_url)s. Anda juga boleh hos tika anda sendiri, ia bersumber terbuka!" + +#: templates/umap/home.html:10 +msgid "Map of the uMaps" +msgstr "Peta bagi uMaps" + +#: templates/umap/home.html:17 +msgid "Get inspired, browse maps" +msgstr "Dapatkan inspirasi, layari peta-peta" + +#: templates/umap/login_popup_end.html:2 +msgid "You are logged in. Continuing..." +msgstr "Anda telah log masuk. Menyambung..." + +#: templates/umap/map_list.html:7 views.py:245 +msgid "by" +msgstr "oleh" + +#: templates/umap/map_list.html:11 +msgid "More" +msgstr "Lebih lagi" + +#: templates/umap/navigation.html:10 +msgid "My maps" +msgstr "Peta saya" + +#: templates/umap/navigation.html:11 +msgid "Starred maps" +msgstr "Peta ditandai bintang" + +#: templates/umap/navigation.html:13 +msgid "Log in" +msgstr "Log masuk" + +#: templates/umap/navigation.html:13 +msgid "Sign in" +msgstr "Daftar masuk" + +#: templates/umap/navigation.html:15 +msgid "About" +msgstr "Perihalan" + +#: templates/umap/navigation.html:16 +msgid "Help" +msgstr "Bantuan" + +#: templates/umap/navigation.html:19 +msgid "Change password" +msgstr "Tukar kata laluan" + +#: templates/umap/navigation.html:21 +msgid "Log out" +msgstr "Log keluar" + +#: templates/umap/password_change.html:6 +msgid "Password change" +msgstr "Penukaran kata laluan" + +#: templates/umap/password_change.html:7 +msgid "" +"Please enter your old password, for security's sake, and then enter your new" +" password twice so we can verify you typed it in correctly." +msgstr "Sila masukkan kata laluan anda yang lama, untuk tujuan keselamatan, kemudian masukkan kata laluan anda yang baharu dua kali supaya kami sahkan anda menaipnya dengan betul." + +#: templates/umap/password_change.html:12 +msgid "Old password" +msgstr "Kata laluan lama" + +#: templates/umap/password_change.html:14 +msgid "New password" +msgstr "Kata laluan baharu" + +#: templates/umap/password_change.html:16 +msgid "New password confirmation" +msgstr "Pengesahan kata laluan baharu" + +#: templates/umap/password_change.html:18 +msgid "Change my password" +msgstr "Tukar kata laluan saya" + +#: templates/umap/password_change_done.html:6 +msgid "Password change successful" +msgstr "Penukaran kata laluan berjaya" + +#: templates/umap/password_change_done.html:7 +msgid "Your password was changed." +msgstr "Kata laluan anda telah ditukar." + +#: templates/umap/search.html:13 +msgid "Not map found." +msgstr "Tiada peta dijumpai." + +#: templates/umap/search_bar.html:6 +msgid "Search maps" +msgstr "Cari peta" + +#: templates/umap/search_bar.html:9 +msgid "Search" +msgstr "Gelintar" + +#: views.py:250 +msgid "View the map" +msgstr "Lihat peta" + +#: views.py:547 +#, python-format +msgid "" +"Your map has been created! If you want to edit this map from another " +"computer, please use this link: %(anonymous_url)s" +msgstr "Peta anda telah dicipta! Jika anda ingin menyunting peta ini dari komputer lain, sila gunakan pautan ini: %(anonymous_url)s" + +#: views.py:552 +msgid "Congratulations, your map has been created!" +msgstr "Tahniah, peta anda telah berjaya dicipta!" + +#: views.py:582 +msgid "Map has been updated!" +msgstr "Peta telah dikemas kini!" + +#: views.py:607 +msgid "Map editors updated with success!" +msgstr "Penyunting peta telah dikemas kini dengan jayanya!" + +#: views.py:632 +msgid "Only its owner can delete the map." +msgstr "Hanya pemiliknya sahaja mampu memadamkan peta." + +#: views.py:655 +#, python-format +msgid "" +"Your map has been cloned! If you want to edit this map from another " +"computer, please use this link: %(anonymous_url)s" +msgstr "Peta anda telah diklon! Jika anda ingin menyunting peta ini dari komputer lain, sila gunakan pautan ini: %(anonymous_url)s" + +#: views.py:660 +msgid "Congratulations, your map has been cloned!" +msgstr "Tahniah, peta anda telah berjaya diklon!" + +#: views.py:826 +msgid "Layer successfully deleted." +msgstr "Lapisan telah berjaya dipadamkan." diff --git a/umap/locale/nl/LC_MESSAGES/django.mo b/umap/locale/nl/LC_MESSAGES/django.mo index 2e9bac2a..4668fff9 100644 Binary files a/umap/locale/nl/LC_MESSAGES/django.mo and b/umap/locale/nl/LC_MESSAGES/django.mo differ diff --git a/umap/locale/nl/LC_MESSAGES/django.po b/umap/locale/nl/LC_MESSAGES/django.po index e8a02262..1d0e9444 100644 --- a/umap/locale/nl/LC_MESSAGES/django.po +++ b/umap/locale/nl/LC_MESSAGES/django.po @@ -4,13 +4,14 @@ # # Translators: # Cees Geuze , 2020 +# danieldegroot2 , 2022 msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-22 14:24+0000\n" -"PO-Revision-Date: 2020-07-19 19:55+0000\n" -"Last-Translator: Cees Geuze \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: danieldegroot2 , 2022\n" "Language-Team: Dutch (http://www.transifex.com/openstreetmap/umap/language/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,7 +26,7 @@ msgid "" "need a stable instance, please use %(stable_url)s. You can also host your own " "instance, it's open source!" -msgstr "" +msgstr "Dit is een demo-versie, gebruikt voor tests en pre-rolling releases. Als u een stabiele versie nodig hebt, gebruik %(stable_url)s. U kan ook uw eigen versie hosten, het is namelijk open source!" #: tmp/framacarte/templates/umap/home.html:83 #: tmp/framacarte/templates/umap/navigation.html:14 @@ -42,7 +43,7 @@ msgstr "Mijn kaarten" #: tmp/framacarte/templates/umap/navigation.html:9 #: umap/templates/umap/navigation.html:12 msgid "Log in" -msgstr "" +msgstr "Inloggen" #: tmp/framacarte/templates/umap/navigation.html:9 #: umap/templates/umap/navigation.html:12 @@ -68,127 +69,127 @@ msgstr "Zoeken" #: umap/forms.py:40 #, python-format msgid "Secret edit link is %s" -msgstr "" +msgstr "Geheime link om te bewerken is %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" -msgstr "Iedereen kan wijzigen" +msgstr "Iedereen kan wijzigingen maken" #: umap/forms.py:45 msgid "Only editable with secret edit link" -msgstr "" +msgstr "Alleen te bewerken met een geheime link" #: umap/middleware.py:14 msgid "Site is readonly for maintenance" -msgstr "Kaart is 'alleen lezen' wegens onderhoud" +msgstr "Site is 'alleen lezen' wegens onderhoud" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "naam" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "details" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Link naar pagina waar de licentie details staan" -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" -msgstr "" +msgstr "URL-sjabloon met OSM tegel-formaat" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" -msgstr "" +msgstr "Volgorde van de tegel-lagen in het bewerkingsvak." -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Alleen editors kunnen wijzigen" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Alleen eigenaar kan wijzigen" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "iedereen (openbaar)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "Iedereen met een link" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "alleen editors" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "geblokkeerd" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "omschrijving" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "centreer" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "zoom" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "zoek" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Gebruiker zoeken tijdens laden?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Kies de kaartlicentie" -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "Licentie" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "eigenaar" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "editors" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "wijzig status" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "deel status" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "instellingen" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Kopie van" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "toon tijdens laden" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Toon deze laag tijdens laden." #: umap/templates/404.html:7 msgid "Take me to the home page" -msgstr "Ga naar de home page" +msgstr "Ga naar de home-pagina" #: umap/templates/auth/user_detail.html:7 #, python-format @@ -225,11 +226,11 @@ msgstr "Kies een provider" msgid "" "uMap lets you create maps with OpenStreetMap " "layers in a minute and embed them in your site." -msgstr "Maak in enkele ogenblikken kaarten met uMaps OpenStreetMap kaartlagen en toon ze op uw site." +msgstr "Maak in enkele ogenblikken kaarten met OpenStreetMap-kaartlagen en toon ze op uw site." #: umap/templates/umap/about_summary.html:11 msgid "Choose the layers of your map" -msgstr "Kies de lagen van je kaart" +msgstr "Kies de lagen van uw kaart" #: umap/templates/umap/about_summary.html:12 msgid "Add POIs: markers, lines, polygons..." @@ -245,11 +246,11 @@ msgstr "Stel kaartopties in: toon minikaart, zoek gebruiker tijdens laden..." #: umap/templates/umap/about_summary.html:15 msgid "Batch import geostructured data (geojson, gpx, kml, osm...)" -msgstr "" +msgstr "Batchimporteer geo-gestructureerde gegevens (geojson, gpx, kml, osm...)" #: umap/templates/umap/about_summary.html:16 msgid "Choose the license for your data" -msgstr "Kies de licentie voor je data" +msgstr "Kies de licentie voor uw data" #: umap/templates/umap/about_summary.html:17 msgid "Embed and share your map" @@ -276,7 +277,7 @@ msgstr "Laat u inspireren, blader door kaarten" msgid "You are logged in. Continuing..." msgstr "U bent ingelogd. Ga verder..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "door" @@ -289,8 +290,8 @@ msgid "About" msgstr "Over" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Terugkoppeling" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -304,7 +305,7 @@ msgstr "Wachtwoord wijziging" msgid "" "Please enter your old password, for security's sake, and then enter your new" " password twice so we can verify you typed it in correctly." -msgstr "Vul uw oude wachtwoord in ,om veiligheidsredenen, en vul daarna tweemaal uw nieuwe wachtwoord in, zodat we zeker weten dat u het correct hebt ingevoerd." +msgstr "Vul uw oude wachtwoord in -om veiligheidsredenen- en vul daarna tweemaal uw nieuwe wachtwoord in, zodat we zeker weten dat u het correct hebt ingevoerd." #: umap/templates/umap/password_change.html:12 msgid "Old password" @@ -334,30 +335,30 @@ msgstr "Uw wachtwoord is gewijzigd." msgid "Not map found." msgstr "Geen kaart gevonden." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Bekijk de kaart" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Uw kaart is gemaakt! Als u deze kaart wilt wijzigen vanaf een andere computer, gebruik dan deze link: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Gefeliciteerd, uw kaart is gemaakt!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Kaart is bijgewerkt!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Kaarteditors met succes bijgewerkt!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Kaart kan alleen door eigenaar worden verwijderd." @@ -372,6 +373,6 @@ msgstr "Uw kaart is gekopieerd! Als u deze kaart wilt wijzigen vanaf een andere msgid "Congratulations, your map has been cloned!" msgstr "Gefeliciteerd, uw kaart is gekopieerd!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Laag is verwijderd." diff --git a/umap/locale/pl/LC_MESSAGES/django.mo b/umap/locale/pl/LC_MESSAGES/django.mo index 6d7f12c1..0a86a104 100644 Binary files a/umap/locale/pl/LC_MESSAGES/django.mo and b/umap/locale/pl/LC_MESSAGES/django.mo differ diff --git a/umap/locale/pl/LC_MESSAGES/django.po b/umap/locale/pl/LC_MESSAGES/django.po index edf30191..fc029f3f 100644 --- a/umap/locale/pl/LC_MESSAGES/django.po +++ b/umap/locale/pl/LC_MESSAGES/django.po @@ -15,9 +15,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-22 14:24+0000\n" -"PO-Revision-Date: 2021-02-08 15:11+0000\n" -"Last-Translator: maro21 OSM\n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: maro21 OSM, 2020-2021\n" "Language-Team: Polish (http://www.transifex.com/openstreetmap/umap/language/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -77,7 +77,7 @@ msgstr "Szukaj" msgid "Secret edit link is %s" msgstr "Sekretnym odnośnikiem do edycji jest %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Wszyscy mogą edytować" @@ -89,107 +89,107 @@ msgstr "Edycja możliwa tylko z sekretnym odnośnikiem" msgid "Site is readonly for maintenance" msgstr "Strona jest w trybie tylko do odczytu z powodu prac konserwacyjnych" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "nazwa" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "szczegóły" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Odnośnik do strony ze szczegółowym opisem licencji." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "Szablon URL używający formatu kafelków OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Kolejność podkładów w oknie edycji" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Tylko edytorzy mogą edytować" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Tylko właściciel może edytować" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "wszyscy (publiczne)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "każdy z linkiem" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "tylko edytorzy" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "zablokowane" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "opis" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "środek" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "przybliżenie" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "lokalizuj" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Lokalizować użytkownika po załadowaniu?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Wybierz licencję mapy." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licencja" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "właściciel" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "edytorzy" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "status edycji" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "udostępnij status" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "ustawienia" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Kopia" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "wyświetl po załadowaniu" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Wyświetl tę warstwę po załadowaniu." @@ -283,7 +283,7 @@ msgstr "Zainspiruj się, przejrzyj mapy" msgid "You are logged in. Continuing..." msgstr "Jesteś zalogowany. Kontynuowanie..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "przez" @@ -296,8 +296,8 @@ msgid "About" msgstr "Informacje" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Kontakt" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -341,30 +341,30 @@ msgstr "Twoje hasło zostało zmienione." msgid "Not map found." msgstr "Nie znaleziono mapy." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Zobacz mapę" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Twoja mapa została utworzona! Jeśli chcesz edytować ją z innego komputera, użyj odnośnika: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Gratulacje, twoja mapa została utworzona!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Mapa została zaktualizowana!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Edytorzy mapy zaktualizowani pomyślnie!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Tylko właściciel może usunąć mapę." @@ -379,6 +379,6 @@ msgstr "Twoja mapa została skopiowana! Jeśli chcesz edytować ją z innego kom msgid "Congratulations, your map has been cloned!" msgstr "Gratulacje, twoja mapa została skopiowana!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Warstwa usunięta pomyślnie." diff --git a/umap/locale/pt/LC_MESSAGES/django.mo b/umap/locale/pt/LC_MESSAGES/django.mo index 04ca6de1..064d21f7 100644 Binary files a/umap/locale/pt/LC_MESSAGES/django.mo and b/umap/locale/pt/LC_MESSAGES/django.mo differ diff --git a/umap/locale/pt/LC_MESSAGES/django.po b/umap/locale/pt/LC_MESSAGES/django.po index 9b5924e0..fb78c91e 100644 --- a/umap/locale/pt/LC_MESSAGES/django.po +++ b/umap/locale/pt/LC_MESSAGES/django.po @@ -9,15 +9,15 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-14 17:11+0000\n" -"Last-Translator: Rui \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Rui , 2016,2018-2019\n" "Language-Team: Portuguese (http://www.transifex.com/openstreetmap/umap/language/pt/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pt\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" #: tmp/framacarte/templates/umap/home.html:8 umap/templates/umap/home.html:9 #, python-format @@ -71,7 +71,7 @@ msgstr "Procurar" msgid "Secret edit link is %s" msgstr "Link secreto para edição é %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Todos podem editar" @@ -83,107 +83,107 @@ msgstr "Unicamente editável através de link secreto" msgid "Site is readonly for maintenance" msgstr "O site está em modo de leitura para manutenção" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "nome" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "detalhes" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Link para uma página detalhando a licença." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "Modelo de URL no formato de telas OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Ordem das camadas na caixa de edição" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Só editores podem editar" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Só o proprietário pode editar" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "todos (público)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "qualquer um com o link" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "só editores" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "bloqueado" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "descrição" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "centro" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "zoom" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "localizar" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Localizar utilizador no início?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Escolha uma licença para o mapa." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licença" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "proprietário" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "editores" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "editar estado" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "partilhar estado" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "parâmetros" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Clone de" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "mostrar no início" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Apresentar esta camada ao carregar." @@ -277,7 +277,7 @@ msgstr "Inspire-se, explore os mapas" msgid "You are logged in. Continuing..." msgstr "Sucesso na identificação. Continuando..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "por" @@ -290,8 +290,8 @@ msgid "About" msgstr "Sobre" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Contactar" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -335,30 +335,30 @@ msgstr "A sua palavra-passe foi alterada" msgid "Not map found." msgstr "Nenhum mapa encontrado." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Ver o mapa" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "O seu mapa foi criado! Se quiser editar este mapa noutro computador, por favor utilize este link: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Parabéns, o seu mapa foi criado!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "O mapa foi atualizado!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Os editores do mapa foram atualizados com sucesso!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Só o proprietário pode eliminar o mapa." @@ -373,6 +373,6 @@ msgstr "O seu mapa foi clonado! Se quiser editar este mapa noutro computador, po msgid "Congratulations, your map has been cloned!" msgstr "Parabéns, o seu mapa foi clonado!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Camada eliminada com sucesso." diff --git a/umap/locale/pt_BR/LC_MESSAGES/django.mo b/umap/locale/pt_BR/LC_MESSAGES/django.mo index 8a844c98..5a16451a 100644 Binary files a/umap/locale/pt_BR/LC_MESSAGES/django.mo and b/umap/locale/pt_BR/LC_MESSAGES/django.mo differ diff --git a/umap/locale/pt_BR/LC_MESSAGES/django.po b/umap/locale/pt_BR/LC_MESSAGES/django.po index d1eb64bc..5fc14839 100644 --- a/umap/locale/pt_BR/LC_MESSAGES/django.po +++ b/umap/locale/pt_BR/LC_MESSAGES/django.po @@ -3,21 +3,22 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Alexandre de Menezes , 2020 # Joao Ponce de Leao Paulouro , 2014 # Rui , 2016,2018 msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-07 14:28+0000\n" -"Last-Translator: yohanboniface \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Alexandre de Menezes , 2020\n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/openstreetmap/umap/language/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pt_BR\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" #: tmp/framacarte/templates/umap/home.html:8 umap/templates/umap/home.html:9 #, python-format @@ -71,7 +72,7 @@ msgstr "Procurar" msgid "Secret edit link is %s" msgstr "Link secreto para edição é %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Todos podem editar" @@ -83,107 +84,107 @@ msgstr "Unicamente editável através de link secreto" msgid "Site is readonly for maintenance" msgstr "O site está em modo de leitura para manutenção" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "nome" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "detalhes" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Link para uma página detalhando a licença." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "Modelo de URL no formato de telas OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Ordem das camadas na caixa de edição" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Só editores podem editar" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Só o proprietário pode editar" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "todos (público)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "qualquer um com o link" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "só editores" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" -msgstr "" +msgstr "bloqueado" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "descrição" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "centro" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "zoom" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "localizar" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Localizar usuário no início?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Escolha uma licença para o mapa." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licença" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "proprietário" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "editores" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "editar estado" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "partilhar estado" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "parâmetros" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Clone de" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "mostrar no início" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Apresentar esta camada ao carregar." @@ -226,7 +227,7 @@ msgstr "Por favor escolha um fornecedor" msgid "" "uMap lets you create maps with OpenStreetMap " "layers in a minute and embed them in your site." -msgstr "" +msgstr "O uMap permite criar mapas com as camadas do OpenStreetMap em um minuto e incorporá-los ao seu site." #: umap/templates/umap/about_summary.html:11 msgid "Choose the layers of your map" @@ -277,7 +278,7 @@ msgstr "Inspire-se, explore os mapas" msgid "You are logged in. Continuing..." msgstr "Sucesso na identificação. Continuando..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "por" @@ -290,8 +291,8 @@ msgid "About" msgstr "Sobre" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Contactar" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -335,30 +336,30 @@ msgstr "A sua palavra-passe foi alterada" msgid "Not map found." msgstr "Nenhum mapa encontrado." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Ver o mapa" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "O seu mapa foi criado! Se quiser editar este mapa noutro computador, por favor utilize este link: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Parabéns, o seu mapa foi criado!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "O mapa foi atualizado!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Os editores do mapa foram atualizados com sucesso!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Só o proprietário pode eliminar o mapa." @@ -373,6 +374,6 @@ msgstr "O seu mapa foi clonado! Se quiser editar este mapa noutro computador, po msgid "Congratulations, your map has been cloned!" msgstr "Parabéns, o seu mapa foi clonado!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Camada eliminada com sucesso." diff --git a/umap/locale/pt_PT/LC_MESSAGES/django.mo b/umap/locale/pt_PT/LC_MESSAGES/django.mo index 445cbe7c..7eb6db39 100644 Binary files a/umap/locale/pt_PT/LC_MESSAGES/django.mo and b/umap/locale/pt_PT/LC_MESSAGES/django.mo differ diff --git a/umap/locale/pt_PT/LC_MESSAGES/django.po b/umap/locale/pt_PT/LC_MESSAGES/django.po index b4d0f3ff..7ba926c3 100644 --- a/umap/locale/pt_PT/LC_MESSAGES/django.po +++ b/umap/locale/pt_PT/LC_MESSAGES/django.po @@ -9,15 +9,15 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-14 17:09+0000\n" -"Last-Translator: Rui \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Rui , 2016,2018-2019\n" "Language-Team: Portuguese (Portugal) (http://www.transifex.com/openstreetmap/umap/language/pt_PT/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: pt_PT\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" #: tmp/framacarte/templates/umap/home.html:8 umap/templates/umap/home.html:9 #, python-format @@ -71,7 +71,7 @@ msgstr "Procurar" msgid "Secret edit link is %s" msgstr "Link secreto para edição é %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Todos podem editar" @@ -83,107 +83,107 @@ msgstr "Unicamente editável através de link secreto" msgid "Site is readonly for maintenance" msgstr "O site está em modo de leitura para manutenção" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "nome" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "detalhes" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Link para uma página detalhando a licença." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "Modelo de URL no formato de telas OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Ordem das camadas na caixa de edição" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Só editores podem editar" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Só o proprietário pode editar" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "todos (público)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "qualquer um com o link" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "só editores" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "bloqueado" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "descrição" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "centro" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "zoom" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "localizar" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Localizar usuário no início?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Escolha uma licença para o mapa." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licença" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "proprietário" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "editores" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "editar estado" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "partilhar estado" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "parâmetros" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Clone de" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "mostrar no início" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Apresentar esta camada ao carregar." @@ -277,7 +277,7 @@ msgstr "Inspire-se, explore os mapas" msgid "You are logged in. Continuing..." msgstr "Sucesso na identificação. Continuando..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "por" @@ -290,8 +290,8 @@ msgid "About" msgstr "Sobre" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Contactar" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -335,30 +335,30 @@ msgstr "A sua palavra-passe foi alterada" msgid "Not map found." msgstr "Nenhum mapa encontrado." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Ver o mapa" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "O seu mapa foi criado! Se quiser editar este mapa noutro computador, por favor utilize este link: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Parabéns, o seu mapa foi criado!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "O mapa foi atualizado!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Os editores do mapa foram atualizados com sucesso!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Só o proprietário pode eliminar o mapa." @@ -373,6 +373,6 @@ msgstr "O seu mapa foi clonado! Se quiser editar este mapa noutro computador, po msgid "Congratulations, your map has been cloned!" msgstr "Parabéns, o seu mapa foi clonado!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Camada eliminada com sucesso." diff --git a/umap/locale/ru/LC_MESSAGES/django.mo b/umap/locale/ru/LC_MESSAGES/django.mo index a15647ac..57e914b8 100644 Binary files a/umap/locale/ru/LC_MESSAGES/django.mo and b/umap/locale/ru/LC_MESSAGES/django.mo differ diff --git a/umap/locale/ru/LC_MESSAGES/django.po b/umap/locale/ru/LC_MESSAGES/django.po index b7cb3c77..ceb7c92c 100644 --- a/umap/locale/ru/LC_MESSAGES/django.po +++ b/umap/locale/ru/LC_MESSAGES/django.po @@ -12,9 +12,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-08-27 14:21+0000\n" -"Last-Translator: Nikolay Parukhin \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Nikolay Parukhin , 2019\n" "Language-Team: Russian (http://www.transifex.com/openstreetmap/umap/language/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -74,7 +74,7 @@ msgstr "Найти" msgid "Secret edit link is %s" msgstr "Секретная ссылка для редактирования: %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Все могут редактировать" @@ -86,107 +86,107 @@ msgstr "Редактирование возможно только при нал msgid "Site is readonly for maintenance" msgstr "Сайт доступен только для обслуживания" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "название" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "подробности" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Ссылка на страницу с описанием лицензии" -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "шаблон ссылки использует формат слоя OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Расположите слои карт в окне редактирования" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Только редакторы могут редактировать" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Только владелец может редактировать" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "все (без ограничений)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "все, у кого есть ссылка" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "только редакторы" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "блокировано" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "описание" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "центр" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "масштаб" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "геолокация" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Использовать геолокацию при загрузке?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Выберите лицензию для карты." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "лицензия" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "владелец" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "редакторы" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "статус редактирования" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "статус совместного использования" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "настройки" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Копия" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "показывать при загрузке" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Показать этот слой при загрузке." @@ -280,7 +280,7 @@ msgstr "Смотрите чужие карты и вдохновляйтесь" msgid "You are logged in. Continuing..." msgstr "Вы вошли. Продолжим..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "от" @@ -293,8 +293,8 @@ msgid "About" msgstr "О проекте" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Обратная связь" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -338,30 +338,30 @@ msgstr "Ваш пароль был изменён." msgid "Not map found." msgstr "Карта не найдена." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Посмотреть карту" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Ваша карта готова! Если вы хотите редактировать её на другом компьютере, используйте эту ссылку:: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Поздравляем, ваша карта готова!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Карта обновлена!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Редакторы карты успешно обновлены!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Только владелец карты может удалить её." @@ -376,6 +376,6 @@ msgstr "Карта была скопирована. Если вы хотите msgid "Congratulations, your map has been cloned!" msgstr "Поздравляем, ваша карта скопирована!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Слой удалён." diff --git a/umap/locale/sk_SK/LC_MESSAGES/django.mo b/umap/locale/sk_SK/LC_MESSAGES/django.mo index 00edf927..bb46b5a7 100644 Binary files a/umap/locale/sk_SK/LC_MESSAGES/django.mo and b/umap/locale/sk_SK/LC_MESSAGES/django.mo differ diff --git a/umap/locale/sk_SK/LC_MESSAGES/django.po b/umap/locale/sk_SK/LC_MESSAGES/django.po index 64c20baf..09ad8266 100644 --- a/umap/locale/sk_SK/LC_MESSAGES/django.po +++ b/umap/locale/sk_SK/LC_MESSAGES/django.po @@ -10,9 +10,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-07 14:28+0000\n" -"Last-Translator: yohanboniface \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Martin Ždila , 2014\n" "Language-Team: Slovak (Slovakia) (http://www.transifex.com/openstreetmap/umap/language/sk_SK/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -72,7 +72,7 @@ msgstr "Hľadať" msgid "Secret edit link is %s" msgstr "Tajný odkaz umožňujúci úpravu mapy je %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Hocikto môže upravovať" @@ -84,107 +84,107 @@ msgstr "Možné upravovať iba pomocou tajného odkazu" msgid "Site is readonly for maintenance" msgstr "" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "názov" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "podrobnosti" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Odkaz na stránku s podrobnejším popisom licencie." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "Vzor URL vo formáte pre dlaždice OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Poradie vrstiev pri úprave" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Upravovať môžu iba prispievatelia" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Upravovať môže iba vlastník" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "hocikto (verejná)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "hocikto pomocou odkazu" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "iba prispievatelia" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "popis" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "stred" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "priblíženie" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "lokalizovať" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Nájsť polohu používateľa pri štarte?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Vyberte si licenciu mapy." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licencia" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "vlastník" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "prispievatelia" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "kto môže vykonávať úpravy" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "nastavenie zdieľania" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "nastavenia" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Kópia" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "zobraziť pri štarte" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Zobraziť túto vrstvu pri štarte." @@ -278,7 +278,7 @@ msgstr "Inšpirujte sa prezeraním iných máp" msgid "You are logged in. Continuing..." msgstr "Ste prihláseni. Pokračujeme ďalej…" -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr ", autor:" @@ -291,8 +291,8 @@ msgid "About" msgstr "O uMap" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Napíšte nám" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -336,30 +336,30 @@ msgstr "Vaše heslo sa zmenilo." msgid "Not map found." msgstr "Žiadna mapa sa nenašla." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Prezrieť si túto mapu" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Vaša mapa bola vytvorená! Ak chcete upravovať túto mapu z iného počítača, použite tento odkaz: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Gratulujeme, vaša mapa bola vytvorená!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Mapa bola aktualizována!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Zoznam prispievovateľov bol úspešne upravený!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Iba vlastník môže vymazať túto mapu." @@ -374,6 +374,6 @@ msgstr "Bola vytvorená kópia mapy! Ak chcete upravovať túto mapu z iného po msgid "Congratulations, your map has been cloned!" msgstr "Gratulujeme, bola vytvorená kópia mapy!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Vrstva bola úspešne vymazaná." diff --git a/umap/locale/sl/LC_MESSAGES/django.mo b/umap/locale/sl/LC_MESSAGES/django.mo index 8329c51c..c7d050a0 100644 Binary files a/umap/locale/sl/LC_MESSAGES/django.mo and b/umap/locale/sl/LC_MESSAGES/django.mo differ diff --git a/umap/locale/sl/LC_MESSAGES/django.po b/umap/locale/sl/LC_MESSAGES/django.po index 4b265f9f..09165e1a 100644 --- a/umap/locale/sl/LC_MESSAGES/django.po +++ b/umap/locale/sl/LC_MESSAGES/django.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-07 14:28+0000\n" -"Last-Translator: yohanboniface \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Štefan Baebler , 2019\n" "Language-Team: Slovenian (http://www.transifex.com/openstreetmap/umap/language/sl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -71,7 +71,7 @@ msgstr "Poišči" msgid "Secret edit link is %s" msgstr "Skrivna povezava za urejanje je %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Vsakdo lahko ureja" @@ -83,107 +83,107 @@ msgstr "Urejanje je mogoče le prek posebne skrivne povezave" msgid "Site is readonly for maintenance" msgstr "Zaradi vzdrževanja je strežnik na voljo samo za ogled." -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "ime" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "podrobnosti" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Povezava do strani, kjer je objavljeno dovoljenje." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "Predloga naslova URL z uporabo zapisa OSM." -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Vrstni red plasti v urejevalniku" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Urejajo lahko le uredniki" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Ureja lahko le lastnik" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "kdorkoli (javno)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "kdorkoli s povezavo" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "le uredniki" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "opis" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "središče" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "približaj" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "določi mesto" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Al naj se ob zagonu določi trenutno mesto uporabnika?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Izbor dovoljenja za zemljevid." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "dovoljenje" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "lastnik" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "uredniki" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "stanje urejanja" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "stanje souporabe" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "nastavitve" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Klon zemljevida" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "pokaži ob zagonu" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Pokaži to plast med nalaganjem." @@ -277,7 +277,7 @@ msgstr "Poiščite zamisli, prebrskajte zemljevide" msgid "You are logged in. Continuing..." msgstr "Prijava je uspešno končana. Poteka nalaganje vsebine ..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "–" @@ -290,8 +290,8 @@ msgid "About" msgstr "O projektu" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Odziv" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -335,30 +335,30 @@ msgstr "Geslo je spremenjeno." msgid "Not map found." msgstr "Zemljevida ni mogoče najti." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Pogled zemljevida" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Zemljevid je ustvarjen! Za urejanje z drugega računalnika uporabite povezavo: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Zemljevid je uspešno ustvarjen!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Zemljevid je posodobljen!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "seznam urednikov je posodobljen!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Zemljevid lahko izbriše le lastnik." @@ -373,6 +373,6 @@ msgstr "Zemljevid je kloniran! Za urejanje z drugega računalnika uporabite pove msgid "Congratulations, your map has been cloned!" msgstr "Zemljevid je uspešno kloniran!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Plast je uspešno izbrisana." diff --git a/umap/locale/sr/LC_MESSAGES/django.mo b/umap/locale/sr/LC_MESSAGES/django.mo index 54b6c595..66d52d81 100644 Binary files a/umap/locale/sr/LC_MESSAGES/django.mo and b/umap/locale/sr/LC_MESSAGES/django.mo differ diff --git a/umap/locale/sr/LC_MESSAGES/django.po b/umap/locale/sr/LC_MESSAGES/django.po index 05bbbb4a..5a0c9011 100644 --- a/umap/locale/sr/LC_MESSAGES/django.po +++ b/umap/locale/sr/LC_MESSAGES/django.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-22 14:24+0000\n" -"PO-Revision-Date: 2020-04-08 15:29+0000\n" -"Last-Translator: kingserbi \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: kingserbi , 2019-2020\n" "Language-Team: Serbian (http://www.transifex.com/openstreetmap/umap/language/sr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -70,7 +70,7 @@ msgstr "Претрага" msgid "Secret edit link is %s" msgstr "Тајни лик за уређивање је %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Свако може да уређује" @@ -82,107 +82,107 @@ msgstr "Могуће је уређивати само са тајним линк msgid "Site is readonly for maintenance" msgstr "Доступно само ради одржавања сајта" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "Име" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "Детаљи" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Линк до странице на којој је лиценца детаљно описана" -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "URL шаблон користећи OSM формат" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Редослед слојева у пољу за уређивање" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Само уређивачи могу да уређују" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Само власник може да уређује" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "свако (јавно)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "свако са линком" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "само уређивачи" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "блокирано" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "опис" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "центар" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "увећање" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "пронаћи" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Пронаћи корисника при уређивању" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Изаберите лиценцу мапе" -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "лиценца" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "власник" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "уређивачи" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "статус уређивања" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "подели статус" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "подешавања" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "клон од" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "приказ при учитавању" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Прикажи овај лејер при учитавању" @@ -276,7 +276,7 @@ msgstr "Инспиришите се, претражите мапе" msgid "You are logged in. Continuing..." msgstr "Улоговани сте. Учитава се..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "од стране" @@ -289,8 +289,8 @@ msgid "About" msgstr "О апликацији" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Повратна информација" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -334,30 +334,30 @@ msgstr "Ваша лозинка је промењена." msgid "Not map found." msgstr "Мапа није пронађена." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Преглед мапе" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Мапа успешно креирана! Ако желите да уређује мапу са другог рачунара, користите овај линк:%(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Чесистамо, ваша мапа је креирана!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Мапа је ажурирана!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Успешно су ажурирани уредници мапа!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Власник мапе једино може да обрише мапу." @@ -372,6 +372,6 @@ msgstr "Мапа успешно дуплирана! Ако желите да у msgid "Congratulations, your map has been cloned!" msgstr "Честитамо, ваша мапа је дуплирана!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Лејер успешно избрисан." diff --git a/umap/locale/sv/LC_MESSAGES/django.mo b/umap/locale/sv/LC_MESSAGES/django.mo index 6d515c1f..d03a97a0 100644 Binary files a/umap/locale/sv/LC_MESSAGES/django.mo and b/umap/locale/sv/LC_MESSAGES/django.mo differ diff --git a/umap/locale/sv/LC_MESSAGES/django.po b/umap/locale/sv/LC_MESSAGES/django.po index 6446a4f2..ad2fb114 100644 --- a/umap/locale/sv/LC_MESSAGES/django.po +++ b/umap/locale/sv/LC_MESSAGES/django.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-22 14:24+0000\n" -"PO-Revision-Date: 2020-12-04 00:01+0000\n" -"Last-Translator: carlbacker\n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: carlbacker, 2020\n" "Language-Team: Swedish (http://www.transifex.com/openstreetmap/umap/language/sv/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -71,7 +71,7 @@ msgstr "Sök" msgid "Secret edit link is %s" msgstr "Privat redigeringslänk är %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Alla kan redigera" @@ -83,107 +83,107 @@ msgstr "Redigering är bara tillåten med privat redigeringslänk" msgid "Site is readonly for maintenance" msgstr "Webbplatsen är skrivskyddad för underhållsarbete." -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "namn" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "detaljer" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Länk till sida med detaljerad licens information." -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "URL-mall med OSM:s tile-format" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Ordningen för tile-lager i redigeringsrutan" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Bara redaktörer kan redigera" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Bara ägaren kan redigera" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "alla (publik)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "alla med en länk" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "enbart redaktörer" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "låst" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "beskrivning" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "centrera" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "zooma" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "lokalisera" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Lokalisera användaren vid uppstart?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Välj licens för kartan." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "licens" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "ägare" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "redaktörer" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "redigeringsstatus" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "delningsstatus" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "inställningar" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Kopia av" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "visa vid uppstart" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Visa detta lager från start." @@ -277,7 +277,7 @@ msgstr "Inspireras av andra kartor" msgid "You are logged in. Continuing..." msgstr "Du är nu inloggad. Fortsätter..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "av" @@ -290,8 +290,8 @@ msgid "About" msgstr "Om" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Återkoppling" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -335,30 +335,30 @@ msgstr "Ditt lösenord har ändrats." msgid "Not map found." msgstr "Ingen karta hittades." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Se kartan" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Din karta har skapats! Om du vill redigera den här kartan från en annan dator, använd denna länk: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Grattis, din karta har skapats!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Kartan har uppdaterats!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Kartans redaktörer har uppdaterats!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Bara ägaren kan radera kartan." @@ -373,6 +373,6 @@ msgstr "Din karta har kopierats! Om du vill redigera den här kartan från en an msgid "Congratulations, your map has been cloned!" msgstr "Grattis, din karta har kopierats!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Lagret har raderats." diff --git a/umap/locale/th_TH/LC_MESSAGES/django.mo b/umap/locale/th_TH/LC_MESSAGES/django.mo index 01cd4296..01bd3543 100644 Binary files a/umap/locale/th_TH/LC_MESSAGES/django.mo and b/umap/locale/th_TH/LC_MESSAGES/django.mo differ diff --git a/umap/locale/th_TH/LC_MESSAGES/django.po b/umap/locale/th_TH/LC_MESSAGES/django.po index b1199c71..727b1559 100644 --- a/umap/locale/th_TH/LC_MESSAGES/django.po +++ b/umap/locale/th_TH/LC_MESSAGES/django.po @@ -3,14 +3,15 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: +# Krittin Leewanich, 2023 msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-07 14:28+0000\n" -"Last-Translator: yohanboniface \n" -"Language-Team: Thai (Thailand) (http://www.transifex.com/openstreetmap/umap/language/th_TH/)\n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Krittin Leewanich, 2023\n" +"Language-Team: Thai (Thailand) (http://app.transifex.com/openstreetmap/umap/language/th_TH/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -24,353 +25,353 @@ msgid "" "need a stable instance, please use %(stable_url)s. You can also host your own " "instance, it's open source!" -msgstr "" +msgstr "นี่เป็นเพียงตัวอย่างสาธิต ใช้สำหรับการทดสอบและการเผยแพร่ล่วงหน้า ถ้าต้องการตัวอย่าง\nเสถียร โปรดใช้ %(stable_url)s คุณยังสามารถโฮสต์ตัวอย่างของคุณได้ เนื่องจากเป็นโอเพนซอร์ส!" #: tmp/framacarte/templates/umap/home.html:83 #: tmp/framacarte/templates/umap/navigation.html:14 #: umap/templates/umap/about_summary.html:33 #: umap/templates/umap/navigation.html:26 msgid "Create a map" -msgstr "" +msgstr "สร้างแผนที่" #: tmp/framacarte/templates/umap/navigation.html:7 #: umap/templates/umap/navigation.html:10 msgid "My maps" -msgstr "" +msgstr "แผนที่ของฉัน" #: tmp/framacarte/templates/umap/navigation.html:9 #: umap/templates/umap/navigation.html:12 msgid "Log in" -msgstr "" +msgstr "เข้าสู่ระบบ" #: tmp/framacarte/templates/umap/navigation.html:9 #: umap/templates/umap/navigation.html:12 msgid "Sign in" -msgstr "" +msgstr "ลงชื่อเข้าใช้" #: tmp/framacarte/templates/umap/navigation.html:12 #: umap/templates/umap/navigation.html:20 msgid "Log out" -msgstr "" +msgstr "ออกจากระบบ" #: tmp/framacarte/templates/umap/search_bar.html:6 #: umap/templates/umap/search_bar.html:6 msgid "Search maps" -msgstr "" +msgstr "ค้นหาแผนที่" #: tmp/framacarte/templates/umap/search_bar.html:10 #: tmp/framacarte/templates/umap/search_bar.html:13 #: umap/templates/umap/search_bar.html:9 msgid "Search" -msgstr "" +msgstr "ค้นหา" #: umap/forms.py:40 #, python-format msgid "Secret edit link is %s" -msgstr "" +msgstr "ลิงก์แก้ไขลับคือ %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" -msgstr "" +msgstr "ทุนคนแก้ไขได้" #: umap/forms.py:45 msgid "Only editable with secret edit link" -msgstr "" +msgstr "แก้ไขได้ ด้วยลิงก์ลับ" #: umap/middleware.py:14 msgid "Site is readonly for maintenance" -msgstr "" +msgstr "สามารถอ่านไซต์เท่านั้น เนื่องจากมีการซ่อมบำรุง" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" -msgstr "" +msgstr "ชื่อ" + +#: umap/models.py:47 +msgid "details" +msgstr "รายละเอียด" #: umap/models.py:48 -msgid "details" -msgstr "" - -#: umap/models.py:49 msgid "Link to a page where the licence is detailed." -msgstr "" +msgstr "ลิงก์ไปยังหน้ารายละเอียดใบอนุญาต" -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" -msgstr "" +msgstr "แม่แบบ URL ที่ใช้ฟอร์แมตไทล์ OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" -msgstr "" +msgstr "ลำดับของเลเยอร์ไทล์ในกล่องแก้ไข" + +#: umap/models.py:115 +msgid "Only editors can edit" +msgstr "แก้ไขเฉพาะผู้แก้ไข" #: umap/models.py:116 -msgid "Only editors can edit" -msgstr "" - -#: umap/models.py:117 msgid "Only owner can edit" -msgstr "" +msgstr "แก้ไขเฉพาะเจ้าของ" + +#: umap/models.py:119 +msgid "everyone (public)" +msgstr "ทุกคน (สาธารณะ)" #: umap/models.py:120 -msgid "everyone (public)" -msgstr "" +msgid "anyone with link" +msgstr "ทุกคนที่มีลิงก์" #: umap/models.py:121 -msgid "anyone with link" -msgstr "" +msgid "editors only" +msgstr "เฉพาะผู้แก้ไข" #: umap/models.py:122 -msgid "editors only" -msgstr "" - -#: umap/models.py:123 msgid "blocked" -msgstr "" +msgstr "บล็อก" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" -msgstr "" +msgstr "คำอธิบาย" + +#: umap/models.py:126 +msgid "center" +msgstr "ทำให้อยู่ตรงกลาง" #: umap/models.py:127 -msgid "center" -msgstr "" +msgid "zoom" +msgstr "ซูม" #: umap/models.py:128 -msgid "zoom" -msgstr "" - -#: umap/models.py:129 msgid "locate" -msgstr "" +msgstr "ระบุตำแหน่ง" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" -msgstr "" +msgstr "ระบุตำแหน่งผู้ใช้ที่กำลังโหลด?" + +#: umap/models.py:131 +msgid "Choose the map licence." +msgstr "เลือกใบอนุญาติแผนที่" #: umap/models.py:132 -msgid "Choose the map licence." -msgstr "" - -#: umap/models.py:133 msgid "licence" -msgstr "" +msgstr "ใบอนุญาติ" + +#: umap/models.py:137 +msgid "owner" +msgstr "เจ้าของ" #: umap/models.py:138 -msgid "owner" -msgstr "" +msgid "editors" +msgstr "ผู้แก้ไข" #: umap/models.py:139 -msgid "editors" -msgstr "" +msgid "edit status" +msgstr "สถานะการแก้ไข" #: umap/models.py:140 -msgid "edit status" -msgstr "" +msgid "share status" +msgstr "สถานะการแชร์" #: umap/models.py:141 -msgid "share status" -msgstr "" - -#: umap/models.py:142 msgid "settings" -msgstr "" +msgstr "การตั้งค่า" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" -msgstr "" +msgstr "โคลนของ" + +#: umap/models.py:260 +msgid "display on load" +msgstr "แสดงตอนโหลด" #: umap/models.py:261 -msgid "display on load" -msgstr "" - -#: umap/models.py:262 msgid "Display this layer on load." -msgstr "" +msgstr "แสดงเลเยอร์ตอนโหลด" #: umap/templates/404.html:7 msgid "Take me to the home page" -msgstr "" +msgstr "ไปหน้าหลัก" #: umap/templates/auth/user_detail.html:7 #, python-format msgid "Browse %(current_user)s's maps" -msgstr "" +msgstr "เรียกดูแผนที่ของ %(current_user)s" #: umap/templates/auth/user_detail.html:15 #, python-format msgid "%(current_user)s has no maps." -msgstr "" +msgstr "ไม่มีแผนที่ของ %(current_user)s" #: umap/templates/registration/login.html:4 msgid "Please log in with your account" -msgstr "" +msgstr "โปรดเข้าสู่ระบบ" #: umap/templates/registration/login.html:18 msgid "Username" -msgstr "" +msgstr "ชื่อผู้ใช้" #: umap/templates/registration/login.html:20 msgid "Password" -msgstr "" +msgstr "รหัสผ่าน" #: umap/templates/registration/login.html:21 msgid "Login" -msgstr "" +msgstr "ลงชื่อเข้าใช้" #: umap/templates/registration/login.html:27 msgid "Please choose a provider" -msgstr "" +msgstr "โปรดเลือกผู้ให้บริการ" #: umap/templates/umap/about_summary.html:6 #, python-format msgid "" "uMap lets you create maps with OpenStreetMap " "layers in a minute and embed them in your site." -msgstr "" +msgstr "uMap ช่วยให้คุณสร้างแผนที่ด้วยเลเยอร์จาก OpenStreetMap ในระยะเวลาไม่กี่นาที และฝังไว้ในเว็บไซต์ของคุณ" #: umap/templates/umap/about_summary.html:11 msgid "Choose the layers of your map" -msgstr "" +msgstr "เลือกเลเยอร์ของแผนที่" #: umap/templates/umap/about_summary.html:12 msgid "Add POIs: markers, lines, polygons..." -msgstr "" +msgstr "เพิ่ม POI: เครื่องหมาย, เส้น, รูปร่าง..." #: umap/templates/umap/about_summary.html:13 msgid "Manage POIs colours and icons" -msgstr "" +msgstr "จัดการสีและสัญลักษณ์ POI" #: umap/templates/umap/about_summary.html:14 msgid "Manage map options: display a minimap, locate user on load…" -msgstr "" +msgstr "จัดการตัวเลือกแผนที่: แสดงแผนที่เล็ก, ระบุตำแหน่งผู้ใช้ตอนโหลด..." #: umap/templates/umap/about_summary.html:15 msgid "Batch import geostructured data (geojson, gpx, kml, osm...)" -msgstr "" +msgstr "แบทช์นำเข้าข้อมูลโครงสร้างทางภูมิศาสตร์ (geojson, gpx, kml, osm...)" #: umap/templates/umap/about_summary.html:16 msgid "Choose the license for your data" -msgstr "" +msgstr "เลือกใบอนุญาติสำหรับข้อมูล" #: umap/templates/umap/about_summary.html:17 msgid "Embed and share your map" -msgstr "" +msgstr "ฝังและแชร์แผนที่" #: umap/templates/umap/about_summary.html:23 #, python-format msgid "And it's open source!" -msgstr "" +msgstr "และเป็นโอเพ่นซอร์ส!" #: umap/templates/umap/about_summary.html:35 msgid "Play with the demo" -msgstr "" +msgstr "เล่นกับตัวอย่างเดโม่" #: umap/templates/umap/home.html:17 msgid "Map of the uMaps" -msgstr "" +msgstr "แผนที่จาก uMaps" #: umap/templates/umap/home.html:24 msgid "Get inspired, browse maps" -msgstr "" +msgstr "รับแรงบันดาลใจ เรียกดูแผนที่" #: umap/templates/umap/login_popup_end.html:2 msgid "You are logged in. Continuing..." -msgstr "" +msgstr "คุณเข้าสู่ระบบแล้ว กำลังดำเนินการต่อ..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" -msgstr "" +msgstr "โดย" #: umap/templates/umap/map_list.html:11 msgid "More" -msgstr "" +msgstr "เพิ่มเติม" #: umap/templates/umap/navigation.html:14 msgid "About" -msgstr "" +msgstr "เกี่ยวกับ" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "" +msgid "Help" +msgstr "ช่วยเหลือ" #: umap/templates/umap/navigation.html:18 msgid "Change password" -msgstr "" +msgstr "เปลี่ยนรหัสผ่าน" #: umap/templates/umap/password_change.html:6 msgid "Password change" -msgstr "" +msgstr "การเปลี่ยนแปลงรหัสผ่าน" #: umap/templates/umap/password_change.html:7 msgid "" "Please enter your old password, for security's sake, and then enter your new" " password twice so we can verify you typed it in correctly." -msgstr "" +msgstr "โปรดใส่รหัสผ่านเก่าของคุณ และเพื่อความปลอดภัย ป้อนรหัสผ่ายใหม่สองครั้งเพื่อตรวจสอบว่าคุณนั้นพิมพ์ถูกต้องแล้ว" #: umap/templates/umap/password_change.html:12 msgid "Old password" -msgstr "" +msgstr "รหัสผ่านเก่า" #: umap/templates/umap/password_change.html:14 msgid "New password" -msgstr "" +msgstr "รหัสผ่านใหม่" #: umap/templates/umap/password_change.html:16 msgid "New password confirmation" -msgstr "" +msgstr "ยืนยันรหัสผ่านใหม่" #: umap/templates/umap/password_change.html:18 msgid "Change my password" -msgstr "" +msgstr "เปลี่ยนรหัสผ่าน" #: umap/templates/umap/password_change_done.html:6 msgid "Password change successful" -msgstr "" +msgstr "เปลี่ยนรหัสผ่านแล้ว" #: umap/templates/umap/password_change_done.html:7 msgid "Your password was changed." -msgstr "" +msgstr "รหัสผ่านของคุณนั้นถูกเปลี่ยนแล้ว" #: umap/templates/umap/search.html:13 msgid "Not map found." -msgstr "" +msgstr "ไม่พบแผนที่" -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" -msgstr "" +msgstr "ดูแผนที่" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" -msgstr "" +msgstr "แผนที่ของคุณถูกสร้างแล้ว! ถ้าคุณต้องการแก้ไขแผนที่นี้จากอุปกรณ์อื่น โปรดใช้ลิงค์: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" -msgstr "" +msgstr "ยินดีด้วย แผนที่ของคุณถูกสร้างขึ้นแล้ว!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" -msgstr "" +msgstr "อัพเดทแผนที่แล้ว!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" -msgstr "" +msgstr "ผู้แก้ไขแผนที่อัปเดตสำเร็จแล้ว!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." -msgstr "" +msgstr "เฉพาะเจ้าของสามารถลบแผนที่ได้เท่านั้น" #: umap/views.py:637 #, python-format msgid "" "Your map has been cloned! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" -msgstr "" +msgstr "แผนที่ของคุณถูกโคลนแล้ว! ถ้าคุณต้องการแก้ไขแผนที่นี้จากอุปกรณ์อื่น โปรดใช้ลิงค์: %(anonymous_url)s" #: umap/views.py:642 msgid "Congratulations, your map has been cloned!" -msgstr "" +msgstr "ยินดีด้วย แผนที่ของคุณถูกโคลนแล้ว!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." -msgstr "" +msgstr "ลบเลเยอร์สำเร็จแล้ว" diff --git a/umap/locale/tr/LC_MESSAGES/django.mo b/umap/locale/tr/LC_MESSAGES/django.mo index 67d250bc..45727ca4 100644 Binary files a/umap/locale/tr/LC_MESSAGES/django.mo and b/umap/locale/tr/LC_MESSAGES/django.mo differ diff --git a/umap/locale/tr/LC_MESSAGES/django.po b/umap/locale/tr/LC_MESSAGES/django.po index 235ecdca..150c8275 100644 --- a/umap/locale/tr/LC_MESSAGES/django.po +++ b/umap/locale/tr/LC_MESSAGES/django.po @@ -10,9 +10,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-03-22 14:24+0000\n" -"PO-Revision-Date: 2021-01-05 16:24+0000\n" -"Last-Translator: irem TACYILDIZ \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: irem TACYILDIZ , 2021\n" "Language-Team: Turkish (http://www.transifex.com/openstreetmap/umap/language/tr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -72,7 +72,7 @@ msgstr "Ara" msgid "Secret edit link is %s" msgstr "Saklı düzenleme bağlantısı şu: %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Herkes düzeltebilir" @@ -84,107 +84,107 @@ msgstr "Yalnızca gizli düzenleme bağlantısı ile düzenlenebilir" msgid "Site is readonly for maintenance" msgstr "Sitenin bakım modu olduğu için salt okunur" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "adı" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "ayrıntılar" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Lisansın detaylandırıldığı bir sayfaya bağlantı" -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "URL şablonu OSM döşeme biçimini kullanıyor" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Harita katmanları sırası düzenleme kutusunda" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Sadece editörlerin düzelteme hakkı var" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Sadece sahibin düzelteme hakkı var" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "herkes (kamu)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "bağlantısı olan herkes" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "sadece editörler" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "engellenmiş" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "açıklama" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "ortalaştır" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "yakınlaştır" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "yerini belirt" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Yüklenen kullanıcılar bulunsun mu?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Harita lisansi seç" -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "lisans" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "sahibi" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "editörler" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "düzeltme durumu" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "durum paylaş" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "ayarlar" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Kopya" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "yüklerken görüntüle" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Yüklerken bu katman görüntüle" @@ -278,7 +278,7 @@ msgstr "İlham alın, haritalara göz atın" msgid "You are logged in. Continuing..." msgstr "Giriş tamamlandı. Devam..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "tarafından" @@ -291,8 +291,8 @@ msgid "About" msgstr "Hakkında" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Geri bildirim" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -336,30 +336,30 @@ msgstr "Şifren değiştirildi." msgid "Not map found." msgstr "Harita bulunmadı" -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Haritayı görüntüle" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Haritanız oluşturuldu! Eğer bu haritayı başka bir bilgisayardan düzenlemek isterseniz, lütfen bu bağlantıyı kullanın: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Tebrikler, haritan oluşturuldu!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Harita güncellendi!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Haritanın editörleri başarıyla güncellendi!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Salt haritanın sahibi haritayı silebilir." @@ -374,6 +374,6 @@ msgstr "Haritanız çoğaltıldı! Eğer bu haritayı başka bir bilgisayardan d msgid "Congratulations, your map has been cloned!" msgstr "Tebrikler, haritanız çoğaltıldı!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Katman başarıyla silindi" diff --git a/umap/locale/uk_UA/LC_MESSAGES/django.mo b/umap/locale/uk_UA/LC_MESSAGES/django.mo index 18bc0d8d..7f0392b9 100644 Binary files a/umap/locale/uk_UA/LC_MESSAGES/django.mo and b/umap/locale/uk_UA/LC_MESSAGES/django.mo differ diff --git a/umap/locale/uk_UA/LC_MESSAGES/django.po b/umap/locale/uk_UA/LC_MESSAGES/django.po index 84868083..12e8be1f 100644 --- a/umap/locale/uk_UA/LC_MESSAGES/django.po +++ b/umap/locale/uk_UA/LC_MESSAGES/django.po @@ -9,9 +9,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2020-02-27 13:06+0000\n" -"Last-Translator: Andrey Golovin\n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Andrey Golovin, 2020\n" "Language-Team: Ukrainian (Ukraine) (http://www.transifex.com/openstreetmap/umap/language/uk_UA/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -71,7 +71,7 @@ msgstr "Шукати" msgid "Secret edit link is %s" msgstr "Секретне посилання для редагування: %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Кожен може редагувати" @@ -83,107 +83,107 @@ msgstr "Редагування можливе лише за наявності msgid "Site is readonly for maintenance" msgstr "Сайт доступний лише для перегляду на час робіт з його обслуговування." -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "назва" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "подробиці" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Посилання на сторінку з описом ліцензії" -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "шаблон посилання використовує формат шару OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Розташуйте шари мап у вікні редагування" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Лише редактори можуть редагувати" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Лише власник може редагувати" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "усі (відкритий доступ)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "усі, у кого є посилання" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "лише редактори" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "заблоковано" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "опис" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "центр" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "масштаб" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "геолокація" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Використовувати геолокацію при завантаженні?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Виберіть ліцензію для мапи." -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "ліцензія" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "власник" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "редактори" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "статус редагування" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "статус спільного використання" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "налаштування" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Копія " -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "показувати при завантаженні" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Показати цей шар при завантаженні." @@ -277,7 +277,7 @@ msgstr "Дивіться чужі мапи та надихайтеся" msgid "You are logged in. Continuing..." msgstr "Ви увійшли. Продовжимо …" -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr " від " @@ -290,8 +290,8 @@ msgid "About" msgstr "Про проект" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Зворотній зв’язок" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -335,30 +335,30 @@ msgstr "Ваш пароль змінено." msgid "Not map found." msgstr "Не знайдено жодної мапи." -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Переглянути мапу" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Ваша мапа готова! Якщо Ви хочете редагувати її на іншому комп’ютері, використовуйте це посилання: %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Вітаємо, Ваша мапа готова!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Мапа оновлена!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Редактори мапи успішно оновлені!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Лише власник мапи може вилучити її." @@ -373,6 +373,6 @@ msgstr "Карта була скопійована. Якщо Ви хочете msgid "Congratulations, your map has been cloned!" msgstr "Вітаємо, Ваша мапа скопійована!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Шар вилучено." diff --git a/umap/locale/vi/LC_MESSAGES/django.mo b/umap/locale/vi/LC_MESSAGES/django.mo index 9af2191c..b82a0510 100644 Binary files a/umap/locale/vi/LC_MESSAGES/django.mo and b/umap/locale/vi/LC_MESSAGES/django.mo differ diff --git a/umap/locale/vi/LC_MESSAGES/django.po b/umap/locale/vi/LC_MESSAGES/django.po index 47de018b..fec4457f 100644 --- a/umap/locale/vi/LC_MESSAGES/django.po +++ b/umap/locale/vi/LC_MESSAGES/django.po @@ -8,9 +8,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-04-07 14:28+0000\n" -"Last-Translator: yohanboniface \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Thanh Le Viet , 2014\n" "Language-Team: Vietnamese (http://www.transifex.com/openstreetmap/umap/language/vi/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -70,7 +70,7 @@ msgstr "Tìm" msgid "Secret edit link is %s" msgstr "Link chỉnh sửa bí mật là %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "Ai cũng có thể chỉnh sửa" @@ -82,107 +82,107 @@ msgstr "Chỉ có thể sửa với liên kết chỉnh sửa bí mật" msgid "Site is readonly for maintenance" msgstr "" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "tên" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "chi tiết" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "Liên kết đến trang có chi tiết về bản quyền" -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "Mẫu URL sử dụng định dạng tile của OSM" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "Thứ tự các titlelayer trong hộp chỉnh sửa" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "Chỉ chỉnh sửa bởi người có quyền" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "Chỉ người sở hữu có thể chỉnh sửa" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "mọi người" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "bất kì ai với liên kết" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "chỉ người có quyền" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "mô tả" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "trung tâm" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "thu phóng" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "xác định" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "Xác định người dùng khi tải trang?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "Chọn bản quyền cho bản đồ" -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "bản quyền" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "chủ nhân" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "người chỉnh sửa" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "trạng thái chỉnh sửa" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "chia sẻ trạng thái" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "thiết lập" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "Sao chép của" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "hiển thị khi tải trang" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "Hiển thị layer này khi tải trang" @@ -276,7 +276,7 @@ msgstr "Tham khảo các bản đồ" msgid "You are logged in. Continuing..." msgstr "Bạn đã đăng nhập, Đang tiếp tục..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "" @@ -289,8 +289,8 @@ msgid "About" msgstr "Về" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "Đóng góp" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -334,30 +334,30 @@ msgstr "" msgid "Not map found." msgstr "Không tìm thấy bản đồ" -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "Xem bản đồ" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "Bản đồ của bạn đã được tạo! Nếu bạn muốn chỉnh sửa bản đồ từ máy tính khác, vui lòng sử dụng liên kết này %(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "Chúc mừng, bản đồ của bạn đã được tạo!" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "Bản đồ đã được cập nhật!" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "Bản đồ được cập nhật thành công!" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "Chỉ chủ nhân của bản đồ mới có quyền xóa." @@ -372,6 +372,6 @@ msgstr "Bản đồ của bạn đã được sao chép. Nếu bạn muốn ch msgid "Congratulations, your map has been cloned!" msgstr "Chúc mừng, bản đồ của bạn đã được sao chép!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "Đã xóa layer" diff --git a/umap/locale/zh_TW/LC_MESSAGES/django.mo b/umap/locale/zh_TW/LC_MESSAGES/django.mo index c59439ce..2e248ff0 100644 Binary files a/umap/locale/zh_TW/LC_MESSAGES/django.mo and b/umap/locale/zh_TW/LC_MESSAGES/django.mo differ diff --git a/umap/locale/zh_TW/LC_MESSAGES/django.po b/umap/locale/zh_TW/LC_MESSAGES/django.po index 9df19b42..f6588a1b 100644 --- a/umap/locale/zh_TW/LC_MESSAGES/django.po +++ b/umap/locale/zh_TW/LC_MESSAGES/django.po @@ -14,9 +14,9 @@ msgid "" msgstr "" "Project-Id-Version: uMap\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-04-07 14:28+0000\n" -"PO-Revision-Date: 2019-08-11 12:37+0000\n" -"Last-Translator: Supaplex \n" +"POT-Creation-Date: 2023-02-27 12:54+0000\n" +"PO-Revision-Date: 2013-11-22 14:00+0000\n" +"Last-Translator: Supaplex , 2019\n" "Language-Team: Chinese (Taiwan) (http://www.transifex.com/openstreetmap/umap/language/zh_TW/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -76,7 +76,7 @@ msgstr "搜尋" msgid "Secret edit link is %s" msgstr "不公開的私密編輯連結 %s" -#: umap/forms.py:44 umap/models.py:115 +#: umap/forms.py:44 umap/models.py:114 msgid "Everyone can edit" msgstr "所有人皆可編輯" @@ -88,107 +88,107 @@ msgstr "僅能由私密連結編輯" msgid "Site is readonly for maintenance" msgstr "網站目前因維護中設定為唯讀狀態" -#: umap/models.py:17 +#: umap/models.py:16 msgid "name" msgstr "名稱" -#: umap/models.py:48 +#: umap/models.py:47 msgid "details" msgstr "詳情" -#: umap/models.py:49 +#: umap/models.py:48 msgid "Link to a page where the licence is detailed." msgstr "連結至授權條款說明網址" -#: umap/models.py:63 +#: umap/models.py:62 msgid "URL template using OSM tile format" msgstr "URL 樣板,使用 OSM 地圖磚格式" -#: umap/models.py:71 +#: umap/models.py:70 msgid "Order of the tilelayers in the edit box" msgstr "編輯方塊中地圖磚的圖層順序" -#: umap/models.py:116 +#: umap/models.py:115 msgid "Only editors can edit" msgstr "僅編輯群可編輯" -#: umap/models.py:117 +#: umap/models.py:116 msgid "Only owner can edit" msgstr "僅擁有者可編輯" -#: umap/models.py:120 +#: umap/models.py:119 msgid "everyone (public)" msgstr "所有人(公開)" -#: umap/models.py:121 +#: umap/models.py:120 msgid "anyone with link" msgstr "任何有連結的人" -#: umap/models.py:122 +#: umap/models.py:121 msgid "editors only" msgstr "只有編輯者允許" -#: umap/models.py:123 +#: umap/models.py:122 msgid "blocked" msgstr "已經封鎖了" -#: umap/models.py:126 umap/models.py:256 +#: umap/models.py:125 umap/models.py:255 msgid "description" msgstr "描述" -#: umap/models.py:127 +#: umap/models.py:126 msgid "center" msgstr "中心" -#: umap/models.py:128 +#: umap/models.py:127 msgid "zoom" msgstr "縮放" -#: umap/models.py:129 +#: umap/models.py:128 msgid "locate" msgstr "定位" -#: umap/models.py:129 +#: umap/models.py:128 msgid "Locate user on load?" msgstr "載入時使用定位功能?" -#: umap/models.py:132 +#: umap/models.py:131 msgid "Choose the map licence." msgstr "選擇地圖授權" -#: umap/models.py:133 +#: umap/models.py:132 msgid "licence" msgstr "授權" -#: umap/models.py:138 +#: umap/models.py:137 msgid "owner" msgstr "擁有者" -#: umap/models.py:139 +#: umap/models.py:138 msgid "editors" msgstr "編輯者" -#: umap/models.py:140 +#: umap/models.py:139 msgid "edit status" msgstr "編輯狀態" -#: umap/models.py:141 +#: umap/models.py:140 msgid "share status" msgstr "分享狀態" -#: umap/models.py:142 +#: umap/models.py:141 msgid "settings" msgstr "設定" -#: umap/models.py:210 +#: umap/models.py:209 msgid "Clone of" msgstr "複製" -#: umap/models.py:261 +#: umap/models.py:260 msgid "display on load" msgstr "載入時顯示" -#: umap/models.py:262 +#: umap/models.py:261 msgid "Display this layer on load." msgstr "載入此圖層時顯示" @@ -282,7 +282,7 @@ msgstr "找點子,瀏覽其他地圖" msgid "You are logged in. Continuing..." msgstr "您已登入,繼續中..." -#: umap/templates/umap/map_list.html:7 umap/views.py:214 +#: umap/templates/umap/map_list.html:7 umap/views.py:227 msgid "by" msgstr "由" @@ -295,8 +295,8 @@ msgid "About" msgstr "關於" #: umap/templates/umap/navigation.html:15 -msgid "Feedback" -msgstr "回報問題" +msgid "Help" +msgstr "" #: umap/templates/umap/navigation.html:18 msgid "Change password" @@ -340,30 +340,30 @@ msgstr "你的密碼已更改。" msgid "Not map found." msgstr "找不到地圖。" -#: umap/views.py:220 +#: umap/views.py:232 msgid "View the map" msgstr "檢視地圖" -#: umap/views.py:524 +#: umap/views.py:529 #, python-format msgid "" "Your map has been created! If you want to edit this map from another " "computer, please use this link: %(anonymous_url)s" msgstr "您的地圖已建立完成!如果您想在不同的機器編輯這個地圖,請使用這個連結:%(anonymous_url)s" -#: umap/views.py:529 +#: umap/views.py:534 msgid "Congratulations, your map has been created!" msgstr "恭喜您的地圖已經新增完成" -#: umap/views.py:561 +#: umap/views.py:564 msgid "Map has been updated!" msgstr "地圖已經更新" -#: umap/views.py:587 +#: umap/views.py:589 msgid "Map editors updated with success!" msgstr "地圖編輯者更新完成" -#: umap/views.py:612 +#: umap/views.py:614 msgid "Only its owner can delete the map." msgstr "只有擁有者可以刪除此地圖" @@ -378,6 +378,6 @@ msgstr "您的地圖已複製完成!如果您想在不同的機器編輯這個 msgid "Congratulations, your map has been cloned!" msgstr "恭喜,您的地圖已被複製!" -#: umap/views.py:809 +#: umap/views.py:793 msgid "Layer successfully deleted." msgstr "圖層已刪除" diff --git a/umap/migrations/0008_alter_map_settings.py b/umap/migrations/0008_alter_map_settings.py new file mode 100644 index 00000000..a9e0648a --- /dev/null +++ b/umap/migrations/0008_alter_map_settings.py @@ -0,0 +1,20 @@ +# Generated by Django 4.1.7 on 2023-02-27 12:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("umap", "0007_auto_20190416_1757"), + ] + + operations = [ + migrations.AlterField( + model_name="map", + name="settings", + field=models.JSONField( + blank=True, default=dict, null=True, verbose_name="settings" + ), + ), + ] diff --git a/umap/migrations/0009_star.py b/umap/migrations/0009_star.py new file mode 100644 index 00000000..7f2fec0e --- /dev/null +++ b/umap/migrations/0009_star.py @@ -0,0 +1,25 @@ +# Generated by Django 4.1.7 on 2023-05-05 18:02 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('umap', '0008_alter_map_settings'), + ] + + operations = [ + migrations.CreateModel( + name='Star', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('at', models.DateTimeField(auto_now=True)), + ('by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stars', to=settings.AUTH_USER_MODEL)), + ('map', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='umap.map')), + ], + ), + ] diff --git a/umap/models.py b/umap/models.py index 2e317abc..6613a25c 100644 --- a/umap/models.py +++ b/umap/models.py @@ -17,7 +17,7 @@ class NamedModel(models.Model): class Meta: abstract = True - ordering = ('name', ) + ordering = ("name",) def __unicode__(self): return self.name @@ -34,8 +34,7 @@ def get_default_licence(): """ return Licence.objects.get_or_create( # can't use ugettext_lazy for database storage, see #13965 - name=getattr(settings, "UMAP_DEFAULT_LICENCE_NAME", - 'No licence set') + name=getattr(settings, "UMAP_DEFAULT_LICENCE_NAME", "No licence set") )[0] @@ -43,46 +42,42 @@ class Licence(NamedModel): """ The licence one map is published on. """ + details = models.URLField( - verbose_name=_('details'), - help_text=_('Link to a page where the licence is detailed.') + verbose_name=_("details"), + help_text=_("Link to a page where the licence is detailed."), ) @property def json(self): - return { - 'name': self.name, - 'url': self.details - } + return {"name": self.name, "url": self.details} class TileLayer(NamedModel): url_template = models.CharField( - max_length=200, - help_text=_("URL template using OSM tile format") + max_length=200, help_text=_("URL template using OSM tile format") ) minZoom = models.IntegerField(default=0) maxZoom = models.IntegerField(default=18) attribution = models.CharField(max_length=300) rank = models.SmallIntegerField( - blank=True, - null=True, - help_text=_('Order of the tilelayers in the edit box') + blank=True, null=True, help_text=_("Order of the tilelayers in the edit box") ) # See https://wiki.openstreetmap.org/wiki/TMS#The_Y_coordinate tms = models.BooleanField(default=False) @property def json(self): - return dict((field.name, getattr(self, field.name)) - for field in self._meta.fields) + return dict( + (field.name, getattr(self, field.name)) for field in self._meta.fields + ) @classmethod def get_default(cls): """ Returns the default tile layer (used for a map when no layer is set). """ - return cls.objects.order_by('rank')[0] # FIXME, make it administrable + return cls.objects.order_by("rank")[0] # FIXME, make it administrable @classmethod def get_list(cls): @@ -91,18 +86,19 @@ class TileLayer(NamedModel): for t in cls.objects.all(): fields = t.json if default and default.pk == t.pk: - fields['selected'] = True + fields["selected"] = True l.append(fields) return l class Meta: - ordering = ('rank', 'name', ) + ordering = ("rank", "name") class Map(NamedModel): """ A single thematical map. """ + ANONYMOUS = 1 EDITORS = 2 OWNER = 3 @@ -111,45 +107,62 @@ class Map(NamedModel): PRIVATE = 3 BLOCKED = 9 EDIT_STATUS = ( - (ANONYMOUS, _('Everyone can edit')), - (EDITORS, _('Only editors can edit')), - (OWNER, _('Only owner can edit')), + (ANONYMOUS, _("Everyone can edit")), + (EDITORS, _("Only editors can edit")), + (OWNER, _("Only owner can edit")), ) SHARE_STATUS = ( - (PUBLIC, _('everyone (public)')), - (OPEN, _('anyone with link')), - (PRIVATE, _('editors only')), - (BLOCKED, _('blocked')), + (PUBLIC, _("everyone (public)")), + (OPEN, _("anyone with link")), + (PRIVATE, _("editors only")), + (BLOCKED, _("blocked")), ) slug = models.SlugField(db_index=True) description = models.TextField(blank=True, null=True, verbose_name=_("description")) center = models.PointField(geography=True, verbose_name=_("center")) zoom = models.IntegerField(default=7, verbose_name=_("zoom")) - locate = models.BooleanField(default=False, verbose_name=_("locate"), help_text=_("Locate user on load?")) + locate = models.BooleanField( + default=False, verbose_name=_("locate"), help_text=_("Locate user on load?") + ) licence = models.ForeignKey( Licence, help_text=_("Choose the map licence."), - verbose_name=_('licence'), + verbose_name=_("licence"), on_delete=models.SET_DEFAULT, - default=get_default_licence + default=get_default_licence, ) modified_at = models.DateTimeField(auto_now=True) - owner = models.ForeignKey(settings.AUTH_USER_MODEL, blank=True, null=True, related_name="owned_maps", verbose_name=_("owner"), on_delete=models.PROTECT) - editors = models.ManyToManyField(settings.AUTH_USER_MODEL, blank=True, verbose_name=_("editors")) - edit_status = models.SmallIntegerField(choices=EDIT_STATUS, default=OWNER, verbose_name=_("edit status")) - share_status = models.SmallIntegerField(choices=SHARE_STATUS, default=PUBLIC, verbose_name=_("share status")) - settings = models.JSONField(blank=True, null=True, verbose_name=_("settings"), default=dict) + owner = models.ForeignKey( + settings.AUTH_USER_MODEL, + blank=True, + null=True, + related_name="owned_maps", + verbose_name=_("owner"), + on_delete=models.PROTECT, + ) + editors = models.ManyToManyField( + settings.AUTH_USER_MODEL, blank=True, verbose_name=_("editors") + ) + edit_status = models.SmallIntegerField( + choices=EDIT_STATUS, default=OWNER, verbose_name=_("edit status") + ) + share_status = models.SmallIntegerField( + choices=SHARE_STATUS, default=PUBLIC, verbose_name=_("share status") + ) + settings = models.JSONField( + blank=True, null=True, verbose_name=_("settings"), default=dict + ) objects = models.Manager() public = PublicManager() def get_absolute_url(self): - return reverse("map", kwargs={'slug': self.slug or "map", 'pk': self.pk}) + return reverse("map", kwargs={"slug": self.slug or "map", "pk": self.pk}) def get_anonymous_edit_url(self): signer = Signer() signature = signer.sign(self.pk) - return reverse('map_anonymous_edit_url', kwargs={'signature': signature}) + return reverse("map_anonymous_edit_url", kwargs={"signature": signature}) def is_anonymous_owner(self, request): if self.owner: @@ -169,8 +182,9 @@ class Map(NamedModel): """ can = False if request and not self.owner: - if (getattr(settings, "UMAP_ALLOW_ANONYMOUS", False) - and self.is_anonymous_owner(request)): + if getattr( + settings, "UMAP_ALLOW_ANONYMOUS", False + ) and self.is_anonymous_owner(request): can = True if self.edit_status == self.ANONYMOUS: can = True @@ -192,13 +206,15 @@ class Map(NamedModel): elif request.user == self.owner: can = True else: - can = not (self.share_status == self.PRIVATE - and request.user not in self.editors.all()) + can = not ( + self.share_status == self.PRIVATE + and request.user not in self.editors.all() + ) return can @property def signed_cookie_elements(self): - return ('anonymous_owner|%s' % self.pk, self.pk) + return ("anonymous_owner|%s" % self.pk, self.pk) def get_tilelayer(self): return self.tilelayer or TileLayer.get_default() @@ -206,7 +222,7 @@ class Map(NamedModel): def clone(self, **kwargs): new = self.__class__.objects.get(pk=self.pk) new.pk = None - new.name = u"%s %s" % (_("Clone of"), self.name) + new.name = "%s %s" % (_("Clone of"), self.name) if "owner" in kwargs: # can be None in case of anonymous cloning new.owner = kwargs["owner"] @@ -222,6 +238,7 @@ class Pictogram(NamedModel): """ An image added to an icon of the map. """ + attribution = models.CharField(max_length=300) pictogram = models.ImageField(upload_to="pictogram") @@ -231,7 +248,7 @@ class Pictogram(NamedModel): "id": self.pk, "attribution": self.attribution, "name": self.name, - "src": self.pictogram.url + "src": self.pictogram.url, } @@ -248,22 +265,19 @@ class DataLayer(NamedModel): """ Layer to store Features in. """ + map = models.ForeignKey(Map, on_delete=models.CASCADE) - description = models.TextField( - blank=True, - null=True, - verbose_name=_("description") - ) + description = models.TextField(blank=True, null=True, verbose_name=_("description")) geojson = models.FileField(upload_to=upload_to, blank=True, null=True) display_on_load = models.BooleanField( default=False, verbose_name=_("display on load"), - help_text=_("Display this layer on load.") + help_text=_("Display this layer on load."), ) rank = models.SmallIntegerField(default=0) class Meta: - ordering = ('rank',) + ordering = ("rank",) def save(self, force_insert=False, force_update=False, **kwargs): is_new = not bool(self.pk) @@ -281,7 +295,7 @@ class DataLayer(NamedModel): def upload_to(self): root = self.storage_root() - name = '%s_%s.geojson' % (self.pk, int(time.time() * 1000)) + name = "%s_%s.geojson" % (self.pk, int(time.time() * 1000)) return os.path.join(root, name) def storage_root(self): @@ -293,11 +307,7 @@ class DataLayer(NamedModel): @property def metadata(self): - return { - "name": self.name, - "id": self.pk, - "displayOnLoad": self.display_on_load - } + return {"name": self.name, "id": self.pk, "displayOnLoad": self.display_on_load} def clone(self, map_inst=None): new = self.__class__.objects.get(pk=self.pk) @@ -309,14 +319,14 @@ class DataLayer(NamedModel): return new def is_valid_version(self, name): - return name.startswith('%s_' % self.pk) and name.endswith('.geojson') + return name.startswith("%s_" % self.pk) and name.endswith(".geojson") def version_metadata(self, name): - els = name.split('.')[0].split('_') + els = name.split(".")[0].split("_") return { "name": name, "at": els[1], - "size": self.geojson.storage.size(self.get_version_path(name)) + "size": self.geojson.storage.size(self.get_version_path(name)), } def get_versions(self): @@ -333,19 +343,27 @@ class DataLayer(NamedModel): def get_version(self, name): path = self.get_version_path(name) - with self.geojson.storage.open(path, 'r') as f: + with self.geojson.storage.open(path, "r") as f: return f.read() def get_version_path(self, name): - return '{root}/{name}'.format(root=self.storage_root(), name=name) + return "{root}/{name}".format(root=self.storage_root(), name=name) def purge_old_versions(self): root = self.storage_root() - names = self.get_versions()[settings.UMAP_KEEP_VERSIONS:] + names = self.get_versions()[settings.UMAP_KEEP_VERSIONS :] for name in names: - for ext in ['', '.gz']: + for ext in ["", ".gz"]: path = os.path.join(root, name + ext) try: self.geojson.storage.delete(path) except FileNotFoundError: pass + + +class Star(models.Model): + at = models.DateTimeField(auto_now=True) + map = models.ForeignKey(Map, on_delete=models.CASCADE) + by = models.ForeignKey( + settings.AUTH_USER_MODEL, related_name="stars", on_delete=models.CASCADE + ) diff --git a/umap/settings/base.py b/umap/settings/base.py index 741da560..10b91139 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -30,13 +30,18 @@ LANG_INFO.update({ 'name': 'Sinhala', 'name_local': 'සිංහල', }, + "ms": { + "bidi": False, + "code": "ms", + "name": "Malay", + "name_local": "Bahasa Melayu", + }, }) # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name TIME_ZONE = 'UTC' USE_TZ = True USE_I18N = True -USE_L10N = True LANGUAGE_CODE = 'en' LANGUAGES = ( ('am-et', 'Amharic'), @@ -51,6 +56,7 @@ LANGUAGES = ( ('en', 'English'), ('es', 'Spanish'), ('et', 'Estonian'), + ('fa-ir', 'Persian (Iran)'), ('fi', 'Finnish'), ('fr', 'French'), ('gl', 'Galician'), @@ -63,9 +69,11 @@ LANGUAGES = ( ('ja', 'Japanese'), ('ko', 'Korean'), ('lt', 'Lithuanian'), + ('ms', 'Malay'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('pl', 'Polish'), + ('pt', 'Portuguese'), ('pt-br', 'Portuguese (Brazil)'), ('pt-pt', 'Portuguese (Portugal)'), ('ro', 'Romanian'), @@ -99,7 +107,10 @@ INSTALLED_APPS = ( 'umap', 'compressor', 'social_django', - 'agnocomplete', + # See https://github.com/peopledoc/django-agnocomplete/commit/26eda2dfa4a2f8a805ca2ea19a0c504b9d773a1c + # Django does not find the app config in the default place, so the app is not loaded + # so the "autodiscover" is not run. + 'agnocomplete.app.AgnocompleteConfig', ) DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' @@ -134,6 +145,7 @@ STATICFILES_FINDERS = [ 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'compressor.finders.CompressorFinder', ] +STATICFILES_DIRS = [] # May be extended when using UMAP_CUSTOM_STATICS # ============================================================================= # Templates @@ -203,7 +215,7 @@ UMAP_DEMO_SITE = False UMAP_EXCLUDE_DEFAULT_MAPS = False UMAP_MAPS_PER_PAGE = 5 UMAP_MAPS_PER_PAGE_OWNER = 10 -UMAP_USE_UNACCENT = False +UMAP_SEARCH_CONFIGURATION = "simple" UMAP_FEEDBACK_LINK = "https://wiki.openstreetmap.org/wiki/UMap#Feedback_and_help" # noqa USER_MAPS_URL = 'user_maps' DATABASES = { @@ -213,6 +225,7 @@ DATABASES = { } } UMAP_READONLY = False +UMAP_GZIP = True LOCALE_PATHS = [os.path.join(PROJECT_DIR, 'locale')] # ============================================================================= @@ -224,17 +237,6 @@ COMPRESS_OFFLINE = True SOCIAL_AUTH_DEFAULT_USERNAME = lambda u: slugify(u) SOCIAL_AUTH_ASSOCIATE_BY_EMAIL = True SOCIAL_AUTH_NO_DEFAULT_PROTECTED_USER_FIELDS = True +SOCIAL_AUTH_PROTECTED_USER_FIELDS = ("id", ) LOGIN_URL = "login" SOCIAL_AUTH_LOGIN_REDIRECT_URL = "/login/popup/end/" -SOCIAL_AUTH_PIPELINE = ( - 'social_core.pipeline.social_auth.social_details', - 'social_core.pipeline.social_auth.social_uid', - 'social_core.pipeline.social_auth.auth_allowed', - 'social_core.pipeline.social_auth.social_user', - 'social_core.pipeline.social_auth.associate_by_email', - 'social_core.pipeline.user.get_username', - 'social_core.pipeline.user.create_user', - 'social_core.pipeline.social_auth.associate_user', - 'social_core.pipeline.social_auth.load_extra_data', - 'social_core.pipeline.user.user_details' -) diff --git a/umap/settings/local.py.sample b/umap/settings/local.py.sample index f50c3d1a..a22a7dff 100644 --- a/umap/settings/local.py.sample +++ b/umap/settings/local.py.sample @@ -94,11 +94,6 @@ SHORT_SITE_URL = "http://s.hort" # POSTGIS_VERSION = (2, 1, 0) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' -# You need to unable accent extension before using UMAP_USE_UNACCENT -# python manage.py dbshell -# CREATE EXTENSION unaccent; -UMAP_USE_UNACCENT = False - # Put the site in readonly mode (useful for migration or any maintenance) UMAP_READONLY = False diff --git a/umap/static/umap/base.css b/umap/static/umap/base.css index e4d9eed4..af18a94a 100644 --- a/umap/static/umap/base.css +++ b/umap/static/umap/base.css @@ -508,9 +508,17 @@ i.info { .umap-layer-properties-container, .umap-footer-container, .umap-browse-data, +.umap-filter-data, .umap-browse-datalayers { padding: 0 10px; } +.umap-field-datalist { + display: flex; + justify-content: space-between; + font-size: 9px; + margin-top: -8px; + padding: 0 5px; +} .umap-form-iconfield { position: relative; overflow: hidden; @@ -713,7 +721,7 @@ input[type=hidden].blur + .button { font-weight: bold; color: #fff; font-size: 0.8em; - z-index: 1002; + z-index: 1012; border-radius: 2px; } #umap-alert-container.error { diff --git a/umap/static/umap/content.css b/umap/static/umap/content.css index 41734935..931321b4 100644 --- a/umap/static/umap/content.css +++ b/umap/static/umap/content.css @@ -59,7 +59,7 @@ input:-moz-placeholder, :-moz-placeholder { .login-grid .login-bitbucket { background-image: url("./bitbucket.png"); } -.login-grid .login-twitter { +.login-grid .login-twitter-oauth2 { background-image: url("./twitter.png"); } .login-grid .login-openstreetmap { diff --git a/umap/static/umap/img/24-white.png b/umap/static/umap/img/24-white.png index 95edf1d6..e3a43024 100644 Binary files a/umap/static/umap/img/24-white.png and b/umap/static/umap/img/24-white.png differ diff --git a/umap/static/umap/img/24-white.svg b/umap/static/umap/img/24-white.svg index 28c7fc4d..861e45f5 100644 --- a/umap/static/umap/img/24-white.svg +++ b/umap/static/umap/img/24-white.svg @@ -13,7 +13,7 @@ height="200" id="svg2" version="1.1" - inkscape:version="0.92.2 2405546, 2018-03-11" + inkscape:version="0.92.4 5da689c313, 2019-01-14" sodipodi:docname="24-white.svg" inkscape:export-filename="/home/ybon/Code/py/umap/umap/static/umap/img/24-white.png" inkscape:export-xdpi="96" @@ -27,9 +27,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="22.4" - inkscape:cx="124.98783" - inkscape:cy="45.00337" + inkscape:zoom="16" + inkscape:cx="119.65216" + inkscape:cy="34.240239" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" diff --git a/umap/static/umap/img/24.png b/umap/static/umap/img/24.png index c4a9bddf..d6c038fb 100644 Binary files a/umap/static/umap/img/24.png and b/umap/static/umap/img/24.png differ diff --git a/umap/static/umap/img/24.svg b/umap/static/umap/img/24.svg index 5835faf0..4cf1ac8d 100644 --- a/umap/static/umap/img/24.svg +++ b/umap/static/umap/img/24.svg @@ -2,22 +2,22 @@ + inkscape:export-ydpi="89.996864" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> + inkscape:guide-bbox="true" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1"> + + diff --git a/umap/static/umap/img/edit.svg b/umap/static/umap/img/edit.svg index 93a110bb..def3be37 100644 --- a/umap/static/umap/img/edit.svg +++ b/umap/static/umap/img/edit.svg @@ -1,105 +1,7 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - + + + + + + diff --git a/umap/static/umap/img/logo.svg b/umap/static/umap/img/logo.svg index 478f053e..1a8c2b75 100644 --- a/umap/static/umap/img/logo.svg +++ b/umap/static/umap/img/logo.svg @@ -1,96 +1,4 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - + + + diff --git a/umap/static/umap/img/opensource.svg b/umap/static/umap/img/opensource.svg index 33387232..1bfd9fa1 100644 --- a/umap/static/umap/img/opensource.svg +++ b/umap/static/umap/img/opensource.svg @@ -1,103 +1,7 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - + + + + + diff --git a/umap/static/umap/img/osm.svg b/umap/static/umap/img/osm.svg index 5694b0a8..38eb3948 100644 --- a/umap/static/umap/img/osm.svg +++ b/umap/static/umap/img/osm.svg @@ -1,107 +1,7 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - + + + + + diff --git a/umap/static/umap/js/umap.autocomplete.js b/umap/static/umap/js/umap.autocomplete.js index efd9bf03..1f9b65cb 100644 --- a/umap/static/umap/js/umap.autocomplete.js +++ b/umap/static/umap/js/umap.autocomplete.js @@ -1,314 +1,336 @@ L.U.AutoComplete = L.Class.extend({ + options: { + placeholder: 'Start typing...', + emptyMessage: 'No result', + allowFree: true, + minChar: 2, + maxResults: 5, + }, - options: { - placeholder: 'Start typing...', - emptyMessage: 'No result', - allowFree: true, - minChar: 2, - maxResults: 5 - }, + CACHE: '', + RESULTS: [], - CACHE: '', - RESULTS: [], - - initialize: function (el, options) { - this.el = el; - var ui = new L.U.UI(document.querySelector('header')); - this.xhr = new L.U.Xhr(ui); - L.setOptions(this, options); - var CURRENT = null; - try { - Object.defineProperty(this, 'CURRENT', { - get: function () { - return CURRENT; - }, - set: function (index) { - if (typeof index === 'object') { - index = this.resultToIndex(index); - } - CURRENT = index; - } - }); - } catch (e) { - // Hello IE8 - } - return this; - }, - - createInput: function () { - this.input = L.DomUtil.element('input', { - type: 'text', - placeholder: this.options.placeholder, - autocomplete: 'off', - className: this.options.className - }, this.el); - L.DomEvent.on(this.input, 'keydown', this.onKeyDown, this); - L.DomEvent.on(this.input, 'keyup', this.onKeyUp, this); - L.DomEvent.on(this.input, 'blur', this.onBlur, this); - }, - - createContainer: function () { - this.container = L.DomUtil.element('ul', {className: 'umap-autocomplete'}, document.body); - }, - - resizeContainer: function() - { - var l = this.getLeft(this.input); - var t = this.getTop(this.input) + this.input.offsetHeight; - this.container.style.left = l + 'px'; - this.container.style.top = t + 'px'; - var width = this.options.width ? this.options.width : this.input.offsetWidth - 2; - this.container.style.width = width + 'px'; - }, - - - onKeyDown: function (e) { - switch (e.keyCode) { - case L.U.Keys.TAB: - if(this.CURRENT !== null) this.setChoice(); - L.DomEvent.stop(e); - break; - case L.U.Keys.ENTER: - L.DomEvent.stop(e); - this.setChoice(); - break; - case L.U.Keys.ESC: - L.DomEvent.stop(e); - this.hide(); - break; - case L.U.Keys.DOWN: - if(this.RESULTS.length > 0) { - if(this.CURRENT !== null && this.CURRENT < this.RESULTS.length - 1) { // what if one result? - this.CURRENT++; - this.highlight(); - } - else if(this.CURRENT === null) { - this.CURRENT = 0; - this.highlight(); - } - } - break; - case L.U.Keys.UP: - if(this.CURRENT !== null) { - L.DomEvent.stop(e); - } - if(this.RESULTS.length > 0) { - if(this.CURRENT > 0) { - this.CURRENT--; - this.highlight(); - } - else if(this.CURRENT === 0) { - this.CURRENT = null; - this.highlight(); - } - } - break; - } - }, - - onKeyUp: function (e) { - var special = [ - L.U.Keys.TAB, - L.U.Keys.ENTER, - L.U.Keys.LEFT, - L.U.Keys.RIGHT, - L.U.Keys.DOWN, - L.U.Keys.UP, - L.U.Keys.APPLE, - L.U.Keys.SHIFT, - L.U.Keys.ALT, - L.U.Keys.CTRL - ]; - if (special.indexOf(e.keyCode) === -1) - { - this.search(); - } - }, - - onBlur: function () { - var self = this; - setTimeout(function () { - self.hide(); - }, 100); - }, - - clear: function () { - this.RESULTS = []; - this.CURRENT = null; - this.CACHE = ''; - this.container.innerHTML = ''; - }, - - hide: function() { - this.clear(); - this.container.style.display = 'none'; - this.input.value = ''; - }, - - setChoice: function (choice) { - choice = choice || this.RESULTS[this.CURRENT]; - if (choice) { - this.input.value = choice.item.label; - this.options.on_select(choice); - this.displaySelected(choice); - this.hide(); - if (this.options.callback) { - L.Util.bind(this.options.callback, this)(choice); - } - } - }, - - search: function() { - var val = this.input.value; - if (val.length < this.options.minChar) { - this.clear(); - return; - } - if( val + '' === this.CACHE + '') return; - else this.CACHE = val; - this._do_search(val, function (data) { - this.handleResults(data.data); - }, this); - }, - - createResult: function (item) { - var el = L.DomUtil.element('li', {}, this.container); - el.textContent = item.label; - var result = { - item: item, - el: el - }; - L.DomEvent.on(el, 'mouseover', function () { - this.CURRENT = result; - this.highlight(); - }, this); - L.DomEvent.on(el, 'mousedown', function () { - this.setChoice(); - }, this); - return result; - }, - - resultToIndex: function (result) { - var out = null; - this.forEach(this.RESULTS, function (item, index) { - if (item.item.value == result.item.value) { - out = index; - return; - } - }); - return out; - }, - - handleResults: function(data) { - var self = this; - this.clear(); - this.container.style.display = 'block'; - this.resizeContainer(); - this.forEach(data, function (item) { - self.RESULTS.push(self.createResult(item)); - }); - this.CURRENT = 0; - this.highlight(); - //TODO manage no results - }, - - highlight: function () { - var self = this; - this.forEach(this.RESULTS, function (result, index) { - if (index === self.CURRENT) L.DomUtil.addClass(result.el, 'on'); - else L.DomUtil.removeClass(result.el, 'on'); - }); - }, - - getLeft: function (el) { - var tmp = el.offsetLeft; - el = el.offsetParent; - while(el) { - tmp += el.offsetLeft; - el = el.offsetParent; - } - return tmp; - }, - - getTop: function (el) { - var tmp = el.offsetTop; - el = el.offsetParent; - while(el) { - tmp += el.offsetTop; - el = el.offsetParent; - } - return tmp; - }, - - forEach: function (els, callback) { - Array.prototype.forEach.call(els, callback); + initialize: function (el, options) { + this.el = el + const ui = new L.U.UI(document.querySelector('header')) + this.xhr = new L.U.Xhr(ui) + L.setOptions(this, options) + let CURRENT = null + try { + Object.defineProperty(this, 'CURRENT', { + get: function () { + return CURRENT + }, + set: function (index) { + if (typeof index === 'object') { + index = this.resultToIndex(index) + } + CURRENT = index + }, + }) + } catch (e) { + // Hello IE8 } + return this + }, -}); + createInput: function () { + this.input = L.DomUtil.element( + 'input', + { + type: 'text', + placeholder: this.options.placeholder, + autocomplete: 'off', + className: this.options.className, + }, + this.el + ) + L.DomEvent.on(this.input, 'keydown', this.onKeyDown, this) + L.DomEvent.on(this.input, 'keyup', this.onKeyUp, this) + L.DomEvent.on(this.input, 'blur', this.onBlur, this) + }, + createContainer: function () { + this.container = L.DomUtil.element( + 'ul', + { className: 'umap-autocomplete' }, + document.body + ) + }, + + resizeContainer: function () { + const l = this.getLeft(this.input) + const t = this.getTop(this.input) + this.input.offsetHeight + this.container.style.left = `${l}px` + this.container.style.top = `${t}px` + const width = this.options.width ? this.options.width : this.input.offsetWidth - 2 + this.container.style.width = `${width}px` + }, + + onKeyDown: function (e) { + switch (e.keyCode) { + case L.U.Keys.TAB: + if (this.CURRENT !== null) this.setChoice() + L.DomEvent.stop(e) + break + case L.U.Keys.ENTER: + L.DomEvent.stop(e) + this.setChoice() + break + case L.U.Keys.ESC: + L.DomEvent.stop(e) + this.hide() + break + case L.U.Keys.DOWN: + if (this.RESULTS.length > 0) { + if (this.CURRENT !== null && this.CURRENT < this.RESULTS.length - 1) { + // what if one result? + this.CURRENT++ + this.highlight() + } else if (this.CURRENT === null) { + this.CURRENT = 0 + this.highlight() + } + } + break + case L.U.Keys.UP: + if (this.CURRENT !== null) { + L.DomEvent.stop(e) + } + if (this.RESULTS.length > 0) { + if (this.CURRENT > 0) { + this.CURRENT-- + this.highlight() + } else if (this.CURRENT === 0) { + this.CURRENT = null + this.highlight() + } + } + break + } + }, + + onKeyUp: function (e) { + const special = [ + L.U.Keys.TAB, + L.U.Keys.ENTER, + L.U.Keys.LEFT, + L.U.Keys.RIGHT, + L.U.Keys.DOWN, + L.U.Keys.UP, + L.U.Keys.APPLE, + L.U.Keys.SHIFT, + L.U.Keys.ALT, + L.U.Keys.CTRL, + ] + if (special.indexOf(e.keyCode) === -1) { + this.search() + } + }, + + onBlur: function () { + setTimeout(() => this.hide(), 100) + }, + + clear: function () { + this.RESULTS = [] + this.CURRENT = null + this.CACHE = '' + this.container.innerHTML = '' + }, + + hide: function () { + this.clear() + this.container.style.display = 'none' + this.input.value = '' + }, + + setChoice: function (choice) { + choice = choice || this.RESULTS[this.CURRENT] + if (choice) { + this.input.value = choice.item.label + this.options.on_select(choice) + this.displaySelected(choice) + this.hide() + if (this.options.callback) { + L.Util.bind(this.options.callback, this)(choice) + } + } + }, + + search: function () { + const val = this.input.value + if (val.length < this.options.minChar) { + this.clear() + return + } + if (`${val}` === `${this.CACHE}`) return + else this.CACHE = val + this._do_search( + val, + function (data) { + this.handleResults(data.data) + }, + this + ) + }, + + createResult: function (item) { + const el = L.DomUtil.element('li', {}, this.container) + el.textContent = item.label + const result = { + item: item, + el: el, + } + L.DomEvent.on( + el, + 'mouseover', + function () { + this.CURRENT = result + this.highlight() + }, + this + ) + L.DomEvent.on( + el, + 'mousedown', + function () { + this.setChoice() + }, + this + ) + return result + }, + + resultToIndex: function (result) { + let out = null + this.forEach(this.RESULTS, (item, index) => { + if (item.item.value == result.item.value) { + out = index + return + } + }) + return out + }, + + handleResults: function (data) { + this.clear() + this.container.style.display = 'block' + this.resizeContainer() + this.forEach(data, (item) => { + this.RESULTS.push(this.createResult(item)) + }) + this.CURRENT = 0 + this.highlight() + //TODO manage no results + }, + + highlight: function () { + this.forEach(this.RESULTS, (result, index) => { + if (index === this.CURRENT) L.DomUtil.addClass(result.el, 'on') + else L.DomUtil.removeClass(result.el, 'on') + }) + }, + + getLeft: function (el) { + let tmp = el.offsetLeft + el = el.offsetParent + while (el) { + tmp += el.offsetLeft + el = el.offsetParent + } + return tmp + }, + + getTop: function (el) { + let tmp = el.offsetTop + el = el.offsetParent + while (el) { + tmp += el.offsetTop + el = el.offsetParent + } + return tmp + }, + + forEach: function (els, callback) { + Array.prototype.forEach.call(els, callback) + }, +}) L.U.AutoComplete.Ajax = L.U.AutoComplete.extend({ + initialize: function (el, options) { + L.U.AutoComplete.prototype.initialize.call(this, el, options) + if (!this.el) return this + this.createInput() + this.createContainer() + this.selected_container = this.initSelectedContainer() + }, - initialize: function (el, options) { - L.U.AutoComplete.prototype.initialize.call(this, el, options); - if (!this.el) return this; - this.createInput(); - this.createContainer(); - this.selected_container = this.initSelectedContainer(); - }, - - optionToResult: function (option) { - return { - value: option.value, - label: option.innerHTML - }; - }, - - _do_search: function (val, callback, context) { - val = val.toLowerCase(); - this.xhr.get('/agnocomplete/AutocompleteUser/?q=' + encodeURIComponent(val), {callback: callback, context: context || this}); + optionToResult: function (option) { + return { + value: option.value, + label: option.innerHTML, } + }, -}); + _do_search: function (val, callback, context) { + val = val.toLowerCase() + this.xhr.get(`/agnocomplete/AutocompleteUser/?q=${encodeURIComponent(val)}`, { + callback: callback, + context: context || this, + }) + }, +}) L.U.AutoComplete.Ajax.SelectMultiple = L.U.AutoComplete.Ajax.extend({ + initSelectedContainer: function () { + return L.DomUtil.after( + this.input, + L.DomUtil.element('ul', { className: 'umap-multiresult' }) + ) + }, - initSelectedContainer: function () { - return L.DomUtil.after(this.input, L.DomUtil.element('ul', {className: 'umap-multiresult'})); - }, - - displaySelected: function (result) { - var result_el = L.DomUtil.element('li', {}, this.selected_container); - result_el.textContent = result.item.label; - var close = L.DomUtil.element('span', {className: 'close'}, result_el); - close.textContent = '×'; - L.DomEvent.on(close, 'click', function () { - this.selected_container.removeChild(result_el); - this.options.on_unselect(result); - }, this); - this.hide(); - } - -}); - + displaySelected: function (result) { + const result_el = L.DomUtil.element('li', {}, this.selected_container) + result_el.textContent = result.item.label + const close = L.DomUtil.element('span', { className: 'close' }, result_el) + close.textContent = '×' + L.DomEvent.on( + close, + 'click', + function () { + this.selected_container.removeChild(result_el) + this.options.on_unselect(result) + }, + this + ) + this.hide() + }, +}) L.U.AutoComplete.Ajax.Select = L.U.AutoComplete.Ajax.extend({ + initSelectedContainer: function () { + return L.DomUtil.after( + this.input, + L.DomUtil.element('div', { className: 'umap-singleresult' }) + ) + }, - initSelectedContainer: function () { - return L.DomUtil.after(this.input, L.DomUtil.element('div', {className: 'umap-singleresult'})); - }, - - displaySelected: function (result) { - var result_el = L.DomUtil.element('div', {}, this.selected_container); - result_el.textContent = result.item.label; - var close = L.DomUtil.element('span', {className: 'close'}, result_el); - close.textContent = '×'; - this.input.style.display = 'none'; - L.DomEvent.on(close, 'click', function () { - this.selected_container.innerHTML = ''; - this.input.style.display = 'block'; - }, this); - this.hide(); - } - -}); + displaySelected: function (result) { + const result_el = L.DomUtil.element('div', {}, this.selected_container) + result_el.textContent = result.item.label + const close = L.DomUtil.element('span', { className: 'close' }, result_el) + close.textContent = '×' + this.input.style.display = 'none' + L.DomEvent.on( + close, + 'click', + function () { + this.selected_container.innerHTML = '' + this.input.style.display = 'block' + }, + this + ) + this.hide() + }, +}) diff --git a/umap/static/umap/js/umap.controls.js b/umap/static/umap/js/umap.controls.js index b7b9bff7..766c1611 100644 --- a/umap/static/umap/js/umap.controls.js +++ b/umap/static/umap/js/umap.controls.js @@ -1,1129 +1,1386 @@ L.U.BaseAction = L.ToolbarAction.extend({ - - initialize: function (map) { - this.map = map; - this.options.toolbarIcon = { - className: this.options.className, - tooltip: this.options.tooltip - }; - L.ToolbarAction.prototype.initialize.call(this); - if (this.options.helpMenu && !this.map.helpMenuActions[this.options.className]) this.map.helpMenuActions[this.options.className] = this; + initialize: function (map) { + this.map = map + this.options.toolbarIcon = { + className: this.options.className, + tooltip: this.options.tooltip, } - -}); + L.ToolbarAction.prototype.initialize.call(this) + if (this.options.helpMenu && !this.map.helpMenuActions[this.options.className]) + this.map.helpMenuActions[this.options.className] = this + }, +}) L.U.ImportAction = L.U.BaseAction.extend({ + options: { + helpMenu: true, + className: 'upload-data dark', + tooltip: `${L._('Import data')} (Ctrl+I)`, + }, - options: { - helpMenu: true, - className: 'upload-data dark', - tooltip: L._('Import data') + ' (Ctrl+I)' - }, - - addHooks: function () { - this.map.importPanel(); - } - -}); + addHooks: function () { + this.map.importPanel() + }, +}) L.U.EditPropertiesAction = L.U.BaseAction.extend({ + options: { + helpMenu: true, + className: 'update-map-settings dark', + tooltip: L._('Edit map settings'), + }, - options: { - helpMenu: true, - className: 'update-map-settings dark', - tooltip: L._('Edit map settings') - }, - - addHooks: function () { - this.map.edit(); - } - -}); + addHooks: function () { + this.map.edit() + }, +}) L.U.ChangeTileLayerAction = L.U.BaseAction.extend({ + options: { + helpMenu: true, + className: 'dark update-map-tilelayers', + tooltip: L._('Change tilelayers'), + }, - options: { - helpMenu: true, - className: 'dark update-map-tilelayers', - tooltip: L._('Change tilelayers') - }, - - addHooks: function () { - this.map.updateTileLayers(); - } - -}); + addHooks: function () { + this.map.updateTileLayers() + }, +}) L.U.ManageDatalayersAction = L.U.BaseAction.extend({ + options: { + className: 'dark manage-datalayers', + tooltip: L._('Manage layers'), + }, - options: { - className: 'dark manage-datalayers', - tooltip: L._('Manage layers') - }, - - addHooks: function () { - this.map.manageDatalayers(); - } - -}); + addHooks: function () { + this.map.manageDatalayers() + }, +}) L.U.UpdateExtentAction = L.U.BaseAction.extend({ + options: { + className: 'update-map-extent dark', + tooltip: L._('Save this center and zoom'), + }, - options: { - className: 'update-map-extent dark', - tooltip: L._('Save this center and zoom') - }, - - addHooks: function () { - this.map.updateExtent(); - } - -}); + addHooks: function () { + this.map.updateExtent() + }, +}) L.U.UpdatePermsAction = L.U.BaseAction.extend({ + options: { + className: 'update-map-permissions dark', + tooltip: L._('Update permissions and editors'), + }, - options: { - className: 'update-map-permissions dark', - tooltip: L._('Update permissions and editors') - }, - - addHooks: function () { - this.map.permissions.edit(); - } - -}); + addHooks: function () { + this.map.permissions.edit() + }, +}) L.U.DrawMarkerAction = L.U.BaseAction.extend({ + options: { + helpMenu: true, + className: 'umap-draw-marker dark', + tooltip: L._('Draw a marker'), + }, - options: { - helpMenu: true, - className: 'umap-draw-marker dark', - tooltip: L._('Draw a marker') - }, - - addHooks: function () { - this.map.startMarker(); - } - -}); + addHooks: function () { + this.map.startMarker() + }, +}) L.U.DrawPolylineAction = L.U.BaseAction.extend({ + options: { + helpMenu: true, + className: 'umap-draw-polyline dark', + tooltip: L._('Draw a polyline'), + }, - options: { - helpMenu: true, - className: 'umap-draw-polyline dark', - tooltip: L._('Draw a polyline') - }, - - addHooks: function () { - this.map.startPolyline(); - } - -}); + addHooks: function () { + this.map.startPolyline() + }, +}) L.U.DrawPolygonAction = L.U.BaseAction.extend({ + options: { + helpMenu: true, + className: 'umap-draw-polygon dark', + tooltip: L._('Draw a polygon'), + }, - options: { - helpMenu: true, - className: 'umap-draw-polygon dark', - tooltip: L._('Draw a polygon') - }, - - addHooks: function () { - this.map.startPolygon(); - } - -}); + addHooks: function () { + this.map.startPolygon() + }, +}) L.U.AddPolylineShapeAction = L.U.BaseAction.extend({ + options: { + className: 'umap-draw-polyline-multi dark', + tooltip: L._('Add a line to the current multi'), + }, - options: { - className: 'umap-draw-polyline-multi dark', - tooltip: L._('Add a line to the current multi') - }, - - addHooks: function () { - this.map.editedFeature.editor.newShape(); - } - -}); + addHooks: function () { + this.map.editedFeature.editor.newShape() + }, +}) L.U.AddPolygonShapeAction = L.U.AddPolylineShapeAction.extend({ - - options: { - className: 'umap-draw-polygon-multi dark', - tooltip: L._('Add a polygon to the current multi') - } - -}); + options: { + className: 'umap-draw-polygon-multi dark', + tooltip: L._('Add a polygon to the current multi'), + }, +}) L.U.BaseFeatureAction = L.ToolbarAction.extend({ + initialize: function (map, feature, latlng) { + this.map = map + this.feature = feature + this.latlng = latlng + L.ToolbarAction.prototype.initialize.call(this) + this.postInit() + }, - initialize: function (map, feature, latlng) { - this.map = map; - this.feature = feature; - this.latlng = latlng; - L.ToolbarAction.prototype.initialize.call(this); - this.postInit(); - }, + postInit: function () {}, - postInit: function () {}, + hideToolbar: function () { + this.map.removeLayer(this.toolbar) + }, - hideToolbar: function () { - this.map.removeLayer(this.toolbar); - }, - - addHooks: function () { - this.onClick({latlng: this.latlng}); - this.hideToolbar(); - } - -}); + addHooks: function () { + this.onClick({ latlng: this.latlng }) + this.hideToolbar() + }, +}) L.U.CreateHoleAction = L.U.BaseFeatureAction.extend({ - - options: { - toolbarIcon: { - className: 'umap-new-hole', - tooltip: L._('Start a hole here') - } + options: { + toolbarIcon: { + className: 'umap-new-hole', + tooltip: L._('Start a hole here'), }, + }, - onClick: function (e) { - this.feature.startHole(e); - } - -}); + onClick: function (e) { + this.feature.startHole(e) + }, +}) L.U.ToggleEditAction = L.U.BaseFeatureAction.extend({ - - options: { - toolbarIcon: { - className: 'umap-toggle-edit', - tooltip: L._('Toggle edit mode (Shift+Click)') - } + options: { + toolbarIcon: { + className: 'umap-toggle-edit', + tooltip: L._('Toggle edit mode (Shift+Click)'), }, + }, - onClick: function (e) { - if (this.feature._toggleEditing) this.feature._toggleEditing(e); // Path - else this.feature.edit(e); // Marker - } - -}); + onClick: function (e) { + if (this.feature._toggleEditing) this.feature._toggleEditing(e) // Path + else this.feature.edit(e) // Marker + }, +}) L.U.DeleteFeatureAction = L.U.BaseFeatureAction.extend({ - - options: { - toolbarIcon: { - className: 'umap-delete-all', - tooltip: L._('Delete this feature') - } + options: { + toolbarIcon: { + className: 'umap-delete-all', + tooltip: L._('Delete this feature'), }, + }, - postInit: function () { - if (!this.feature.isMulti()) this.options.toolbarIcon.className = 'umap-delete-one-of-one'; - }, + postInit: function () { + if (!this.feature.isMulti()) + this.options.toolbarIcon.className = 'umap-delete-one-of-one' + }, - onClick: function (e) { - this.feature.confirmDelete(e); - } - -}); + onClick: function (e) { + this.feature.confirmDelete(e) + }, +}) L.U.DeleteShapeAction = L.U.BaseFeatureAction.extend({ - - options: { - toolbarIcon: { - className: 'umap-delete-one-of-multi', - tooltip: L._('Delete this shape') - } + options: { + toolbarIcon: { + className: 'umap-delete-one-of-multi', + tooltip: L._('Delete this shape'), }, + }, - onClick: function (e) { - this.feature.enableEdit().deleteShapeAt(e.latlng); - } - -}); + onClick: function (e) { + this.feature.enableEdit().deleteShapeAt(e.latlng) + }, +}) L.U.ExtractShapeFromMultiAction = L.U.BaseFeatureAction.extend({ - - options: { - toolbarIcon: { - className: 'umap-extract-shape-from-multi', - tooltip: L._('Extract shape to separate feature') - } + options: { + toolbarIcon: { + className: 'umap-extract-shape-from-multi', + tooltip: L._('Extract shape to separate feature'), }, + }, - onClick: function (e) { - this.feature.isolateShape(e.latlng); - } - -}); + onClick: function (e) { + this.feature.isolateShape(e.latlng) + }, +}) L.U.BaseVertexAction = L.U.BaseFeatureAction.extend({ - - initialize: function (map, feature, latlng, vertex) { - this.vertex = vertex; - L.U.BaseFeatureAction.prototype.initialize.call(this, map, feature, latlng); - } - -}); + initialize: function (map, feature, latlng, vertex) { + this.vertex = vertex + L.U.BaseFeatureAction.prototype.initialize.call(this, map, feature, latlng) + }, +}) L.U.DeleteVertexAction = L.U.BaseVertexAction.extend({ - - options: { - toolbarIcon: { - className: 'umap-delete-vertex', - tooltip: L._('Delete this vertex (Alt+Click)') - } + options: { + toolbarIcon: { + className: 'umap-delete-vertex', + tooltip: L._('Delete this vertex (Alt+Click)'), }, + }, - onClick: function () { - this.vertex.delete(); - } - -}); + onClick: function () { + this.vertex.delete() + }, +}) L.U.SplitLineAction = L.U.BaseVertexAction.extend({ - - options: { - toolbarIcon: { - className: 'umap-split-line', - tooltip: L._('Split line') - } + options: { + toolbarIcon: { + className: 'umap-split-line', + tooltip: L._('Split line'), }, + }, - onClick: function () { - this.vertex.split(); - } - -}); + onClick: function () { + this.vertex.split() + }, +}) L.U.ContinueLineAction = L.U.BaseVertexAction.extend({ - - options: { - toolbarIcon: { - className: 'umap-continue-line', - tooltip: L._('Continue line') - } + options: { + toolbarIcon: { + className: 'umap-continue-line', + tooltip: L._('Continue line'), }, + }, - onClick: function () { - this.vertex.continue(); - } - -}); + onClick: function () { + this.vertex.continue() + }, +}) // Leaflet.Toolbar doesn't allow twice same toolbar class… -L.U.SettingsToolbar = L.Toolbar.Control.extend({}); +L.U.SettingsToolbar = L.Toolbar.Control.extend({}) L.U.DrawToolbar = L.Toolbar.Control.extend({ + initialize: function (options) { + L.Toolbar.Control.prototype.initialize.call(this, options) + this.map = this.options.map + this.map.on('seteditedfeature', this.redraw, this) + }, - initialize: function (options) { - L.Toolbar.Control.prototype.initialize.call(this, options); - this.map = this.options.map; - this.map.on('seteditedfeature', this.redraw, this); - }, - - appendToContainer: function (container) { - this.options.actions = []; - if (this.map.options.enableMarkerDraw) { - this.options.actions.push(L.U.DrawMarkerAction); - } - if (this.map.options.enablePolylineDraw) { - this.options.actions.push(L.U.DrawPolylineAction); - if (this.map.editedFeature && this.map.editedFeature instanceof L.U.Polyline) { - this.options.actions.push(L.U.AddPolylineShapeAction); - } - } - if (this.map.options.enablePolygonDraw) { - this.options.actions.push(L.U.DrawPolygonAction); - if (this.map.editedFeature && this.map.editedFeature instanceof L.U.Polygon) { - this.options.actions.push(L.U.AddPolygonShapeAction); - } - } - L.Toolbar.Control.prototype.appendToContainer.call(this, container); - }, - - redraw: function () { - var container = this._control.getContainer(); - container.innerHTML = ''; - this.appendToContainer(container); + appendToContainer: function (container) { + this.options.actions = [] + if (this.map.options.enableMarkerDraw) { + this.options.actions.push(L.U.DrawMarkerAction) } + if (this.map.options.enablePolylineDraw) { + this.options.actions.push(L.U.DrawPolylineAction) + if (this.map.editedFeature && this.map.editedFeature instanceof L.U.Polyline) { + this.options.actions.push(L.U.AddPolylineShapeAction) + } + } + if (this.map.options.enablePolygonDraw) { + this.options.actions.push(L.U.DrawPolygonAction) + if (this.map.editedFeature && this.map.editedFeature instanceof L.U.Polygon) { + this.options.actions.push(L.U.AddPolygonShapeAction) + } + } + L.Toolbar.Control.prototype.appendToContainer.call(this, container) + }, -}); - + redraw: function () { + const container = this._control.getContainer() + container.innerHTML = '' + this.appendToContainer(container) + }, +}) L.U.EditControl = L.Control.extend({ + options: { + position: 'topright', + }, - options: { - position: 'topright' - }, + onAdd: function (map) { + const container = L.DomUtil.create( + 'div', + 'leaflet-control-edit-enable umap-control' + ), + edit = L.DomUtil.create('a', '', container) + edit.href = '#' + edit.title = `${L._('Enable editing')} (Ctrl+E)` - onAdd: function (map) { - var container = L.DomUtil.create('div', 'leaflet-control-edit-enable umap-control'), - edit = L.DomUtil.create('a', '', container); - edit.href = '#'; - edit.title = L._('Enable editing') + ' (Ctrl+E)'; - - L.DomEvent - .addListener(edit, 'click', L.DomEvent.stop) - .addListener(edit, 'click', map.enableEdit, map); - return container; - } - -}); + L.DomEvent.addListener(edit, 'click', L.DomEvent.stop).addListener( + edit, + 'click', + map.enableEdit, + map + ) + return container + }, +}) /* Share control */ L.Control.Embed = L.Control.extend({ + options: { + position: 'topleft', + }, - options: { - position: 'topleft' - }, + onAdd: function (map) { + const container = L.DomUtil.create('div', 'leaflet-control-embed umap-control') - onAdd: function (map) { - var container = L.DomUtil.create('div', 'leaflet-control-embed umap-control'); + const link = L.DomUtil.create('a', '', container) + link.href = '#' + link.title = L._('Embed and share this map') - var link = L.DomUtil.create('a', '', container); - link.href = '#'; - link.title = L._('Embed and share this map'); + L.DomEvent.on(link, 'click', L.DomEvent.stop) + .on(link, 'click', map.renderShareBox, map) + .on(link, 'dblclick', L.DomEvent.stopPropagation) - L.DomEvent - .on(link, 'click', L.DomEvent.stop) - .on(link, 'click', map.renderShareBox, map) - .on(link, 'dblclick', L.DomEvent.stopPropagation); - - return container; - } -}); + return container + }, +}) L.U.MoreControls = L.Control.extend({ + options: { + position: 'topleft', + }, - options: { - position: 'topleft' - }, + onAdd: function () { + const container = L.DomUtil.create('div', ''), + more = L.DomUtil.create('a', 'umap-control-more umap-control-text', container), + less = L.DomUtil.create('a', 'umap-control-less umap-control-text', container) + more.href = '#' + more.title = L._('More controls') - onAdd: function () { - var container = L.DomUtil.create('div', ''), - more = L.DomUtil.create('a', 'umap-control-more umap-control-text', container), - less = L.DomUtil.create('a', 'umap-control-less umap-control-text', container); - more.href = '#'; - more.title = L._('More controls'); + L.DomEvent.on(more, 'click', L.DomEvent.stop).on(more, 'click', this.toggle, this) - L.DomEvent - .on(more, 'click', L.DomEvent.stop) - .on(more, 'click', this.toggle, this); + less.href = '#' + less.title = L._('Hide controls') - less.href = '#'; - less.title = L._('Hide controls'); + L.DomEvent.on(less, 'click', L.DomEvent.stop).on(less, 'click', this.toggle, this) - L.DomEvent - .on(less, 'click', L.DomEvent.stop) - .on(less, 'click', this.toggle, this); + return container + }, - return container; - }, + toggle: function () { + const pos = this.getPosition(), + corner = this._map._controlCorners[pos], + className = 'umap-more-controls' + if (L.DomUtil.hasClass(corner, className)) L.DomUtil.removeClass(corner, className) + else L.DomUtil.addClass(corner, className) + }, +}) - toggle: function () { - var pos = this.getPosition(), - corner = this._map._controlCorners[pos], - className = 'umap-more-controls'; - if (L.DomUtil.hasClass(corner, className)) L.DomUtil.removeClass(corner, className); - else L.DomUtil.addClass(corner, className); +L.U.PermanentCreditsControl = L.Control.extend({ + options: { + position: 'bottomleft', + }, + + initialize: function (map, options) { + this.map = map + L.Control.prototype.initialize.call(this, options) + }, + + onAdd: function () { + const paragraphContainer = L.DomUtil.create( + 'div', + 'umap-permanent-credits-container' + ), + creditsParagraph = L.DomUtil.create('p', '', paragraphContainer) + + this.paragraphContainer = paragraphContainer + this.setCredits() + this.setBackground() + + return paragraphContainer + }, + + setCredits: function () { + this.paragraphContainer.innerHTML = L.Util.toHTML(this.map.options.permanentCredit) + }, + + setBackground: function () { + if (this.map.options.permanentCreditBackground) { + this.paragraphContainer.style.backgroundColor = '#FFFFFFB0' + } else { + this.paragraphContainer.style.backgroundColor = '' } - -}); - + }, +}) L.U.DataLayersControl = L.Control.extend({ + options: { + position: 'topleft', + }, - options: { - position: 'topleft' - }, + labels: { + zoomToLayer: L._('Zoom to layer extent'), + toggleLayer: L._('Show/hide layer'), + editLayer: L._('Edit'), + }, - labels: { - zoomToLayer: L._('Zoom to layer extent'), - toggleLayer: L._('Show/hide layer'), - editLayer: L._('Edit') - }, + initialize: function (map, options) { + this.map = map + L.Control.prototype.initialize.call(this, options) + }, - initialize: function (map, options) { - this.map = map; - L.Control.prototype.initialize.call(this, options); - }, + _initLayout: function (map) { + const container = (this._container = L.DomUtil.create( + 'div', + 'leaflet-control-browse umap-control' + )), + actions = L.DomUtil.create('div', 'umap-browse-actions', container) + this._datalayers_container = L.DomUtil.create( + 'ul', + 'umap-browse-datalayers', + actions + ) - _initLayout: function (map) { - var container = this._container = L.DomUtil.create('div', 'leaflet-control-browse umap-control'), - actions = L.DomUtil.create('div', 'umap-browse-actions', container); - this._datalayers_container = L.DomUtil.create('ul', 'umap-browse-datalayers', actions); + const link = L.DomUtil.create('a', 'umap-browse-link', actions) + link.href = '#' + link.title = link.textContent = L._('Browse data') - var link = L.DomUtil.create('a', 'umap-browse-link', actions); - link.href = '#'; - link.title = link.textContent = L._('Browse data'); + const toggle = L.DomUtil.create('a', 'umap-browse-toggle', container) + toggle.href = '#' + toggle.title = L._('See data layers') - var toggle = L.DomUtil.create('a', 'umap-browse-toggle', container); - toggle.href = '#'; - toggle.title = L._('See data layers') + L.DomEvent.on(toggle, 'click', L.DomEvent.stop) - L.DomEvent - .on(toggle, 'click', L.DomEvent.stop); + L.DomEvent.on(link, 'click', L.DomEvent.stop).on( + link, + 'click', + map.openBrowser, + map + ) - L.DomEvent - .on(link, 'click', L.DomEvent.stop) - .on(link, 'click', map.openBrowser, map); + map.whenReady(function () { + this.update() + }, this) - map.whenReady(function () { - this.update(); - }, this); - - if (L.Browser.pointer) { - L.DomEvent.disableClickPropagation(container); - L.DomEvent.on(container, 'mousewheel', L.DomEvent.stopPropagation); - L.DomEvent.on(container, 'MozMousePixelScroll', L.DomEvent.stopPropagation); - } - if (!L.Browser.touch) { - L.DomEvent.on(container, { - mouseenter: this.expand, - mouseleave: this.collapse - }, this); - } else { - L.DomEvent.on(container, 'click', L.DomEvent.stopPropagation); - L.DomEvent.on(toggle, 'click', L.DomEvent.stop) - .on(toggle, 'click', this.expand, this); - map.on('click', this.collapse, this); - } - - return container; - }, - - onAdd: function (map) { - if (!this._container) this._initLayout(map); - if (map.options.datalayersControl === 'expanded') this.expand(); - return this._container; - }, - - onRemove: function (map) { - this.collapse(); - }, - - update: function () { - if (this._datalayers_container && this._map) { - this._datalayers_container.innerHTML = ''; - this._map.eachDataLayerReverse(function (datalayer) { - this.addDataLayer(this._datalayers_container, datalayer); - }, this) - } - }, - - expand: function () { - L.DomUtil.addClass(this._container, 'expanded'); - }, - - collapse: function () { - if (this._map.options.datalayersControl === 'expanded') return; - L.DomUtil.removeClass(this._container, 'expanded'); - }, - - addDataLayer: function (container, datalayer, draggable) { - var datalayerLi = L.DomUtil.create('li', '', container); - if (draggable) L.DomUtil.element('i', {className: 'drag-handle', title: L._('Drag to reorder')}, datalayerLi); - datalayer.renderToolbox(datalayerLi); - var title = L.DomUtil.add('span', 'layer-title', datalayerLi, datalayer.options.name); - - datalayerLi.id = 'browse_data_toggle_' + L.stamp(datalayer); - L.DomUtil.classIf(datalayerLi, 'off', !datalayer.isVisible()); - - title.textContent = datalayer.options.name; - }, - - newDataLayer: function () { - var datalayer = this.map.createDataLayer({}); - datalayer.edit(); - }, - - openPanel: function () { - if (!this.map.editEnabled) return; - var container = L.DomUtil.create('ul', 'umap-browse-datalayers'); - this.map.eachDataLayerReverse(function (datalayer) { - this.addDataLayer(container, datalayer, true); - }, this); - var orderable = new L.U.Orderable(container); - orderable.on('drop', function (e) { - var layer = this.map.datalayers[e.src.dataset.id], - other = this.map.datalayers[e.dst.dataset.id], - minIndex = Math.min(e.initialIndex, e.finalIndex); - if (e.finalIndex === 0) layer.bringToTop(); - else if (e.finalIndex > e.initialIndex) layer.insertBefore(other); - else layer.insertAfter(other); - this.map.eachDataLayerReverse(function (datalayer) { - if (datalayer.getRank() >= minIndex) datalayer.isDirty = true; - }); - this.map.indexDatalayers(); - }, this); - - var bar = L.DomUtil.create('div', 'button-bar', container), - add = L.DomUtil.create('a', 'show-on-edit block add-datalayer button', bar); - add.href = '#'; - add.textContent = add.title = L._('Add a layer'); - - L.DomEvent - .on(add, 'click', L.DomEvent.stop) - .on(add, 'click', this.newDataLayer, this); - - this.map.ui.openPanel({data: {html: container}, className: 'dark'}); + if (L.Browser.pointer) { + L.DomEvent.disableClickPropagation(container) + L.DomEvent.on(container, 'mousewheel', L.DomEvent.stopPropagation) + L.DomEvent.on(container, 'MozMousePixelScroll', L.DomEvent.stopPropagation) + } + if (!L.Browser.touch) { + L.DomEvent.on( + container, + { + mouseenter: this.expand, + mouseleave: this.collapse, + }, + this + ) + } else { + L.DomEvent.on(container, 'click', L.DomEvent.stopPropagation) + L.DomEvent.on(toggle, 'click', L.DomEvent.stop).on( + toggle, + 'click', + this.expand, + this + ) + map.on('click', this.collapse, this) } -}); + return container + }, + + onAdd: function (map) { + if (!this._container) this._initLayout(map) + if (map.options.datalayersControl === 'expanded') this.expand() + return this._container + }, + + onRemove: function (map) { + this.collapse() + }, + + update: function () { + if (this._datalayers_container && this._map) { + this._datalayers_container.innerHTML = '' + this._map.eachDataLayerReverse(function (datalayer) { + this.addDataLayer(this._datalayers_container, datalayer) + }, this) + } + }, + + expand: function () { + L.DomUtil.addClass(this._container, 'expanded') + }, + + collapse: function () { + if (this._map.options.datalayersControl === 'expanded') return + L.DomUtil.removeClass(this._container, 'expanded') + }, + + addDataLayer: function (container, datalayer, draggable) { + const datalayerLi = L.DomUtil.create('li', '', container) + if (draggable) + L.DomUtil.element( + 'i', + { className: 'drag-handle', title: L._('Drag to reorder') }, + datalayerLi + ) + datalayer.renderToolbox(datalayerLi) + const title = L.DomUtil.add( + 'span', + 'layer-title', + datalayerLi, + datalayer.options.name + ) + + datalayerLi.id = `browse_data_toggle_${L.stamp(datalayer)}` + L.DomUtil.classIf(datalayerLi, 'off', !datalayer.isVisible()) + + title.textContent = datalayer.options.name + }, + + newDataLayer: function () { + const datalayer = this.map.createDataLayer({}) + datalayer.edit() + }, + + openPanel: function () { + if (!this.map.editEnabled) return + const container = L.DomUtil.create('ul', 'umap-browse-datalayers') + this.map.eachDataLayerReverse(function (datalayer) { + this.addDataLayer(container, datalayer, true) + }, this) + const orderable = new L.U.Orderable(container) + orderable.on( + 'drop', + function (e) { + const layer = this.map.datalayers[e.src.dataset.id], + other = this.map.datalayers[e.dst.dataset.id], + minIndex = Math.min(e.initialIndex, e.finalIndex) + if (e.finalIndex === 0) layer.bringToTop() + else if (e.finalIndex > e.initialIndex) layer.insertBefore(other) + else layer.insertAfter(other) + this.map.eachDataLayerReverse((datalayer) => { + if (datalayer.getRank() >= minIndex) datalayer.isDirty = true + }) + this.map.indexDatalayers() + }, + this + ) + + const bar = L.DomUtil.create('div', 'button-bar', container), + add = L.DomUtil.create('a', 'show-on-edit block add-datalayer button', bar) + add.href = '#' + add.textContent = add.title = L._('Add a layer') + + L.DomEvent.on(add, 'click', L.DomEvent.stop).on( + add, + 'click', + this.newDataLayer, + this + ) + + this.map.ui.openPanel({ data: { html: container }, className: 'dark' }) + }, +}) L.U.DataLayer.include({ + renderToolbox: function (container) { + const toggle = L.DomUtil.create('i', 'layer-toggle', container), + zoomTo = L.DomUtil.create('i', 'layer-zoom_to', container), + edit = L.DomUtil.create('i', 'layer-edit show-on-edit', container), + table = L.DomUtil.create('i', 'layer-table-edit show-on-edit', container), + remove = L.DomUtil.create('i', 'layer-delete show-on-edit', container) + zoomTo.title = L._('Zoom to layer extent') + toggle.title = L._('Show/hide layer') + edit.title = L._('Edit') + table.title = L._('Edit properties in a table') + remove.title = L._('Delete layer') + L.DomEvent.on(toggle, 'click', this.toggle, this) + L.DomEvent.on(zoomTo, 'click', this.zoomTo, this) + L.DomEvent.on(edit, 'click', this.edit, this) + L.DomEvent.on(table, 'click', this.tableEdit, this) + L.DomEvent.on( + remove, + 'click', + function () { + if (!this.isVisible()) return + if (!confirm(L._('Are you sure you want to delete this layer?'))) return + this._delete() + this.map.ui.closePanel() + }, + this + ) + L.DomUtil.addClass(container, this.getHidableClass()) + L.DomUtil.classIf(container, 'off', !this.isVisible()) + container.dataset.id = L.stamp(this) + }, - renderToolbox: function (container) { - var toggle = L.DomUtil.create('i', 'layer-toggle', container), - zoomTo = L.DomUtil.create('i', 'layer-zoom_to', container), - edit = L.DomUtil.create('i', 'layer-edit show-on-edit', container), - table = L.DomUtil.create('i', 'layer-table-edit show-on-edit', container), - remove = L.DomUtil.create('i', 'layer-delete show-on-edit', container); - zoomTo.title = L._('Zoom to layer extent'); - toggle.title = L._('Show/hide layer'); - edit.title = L._('Edit'); - table.title = L._('Edit properties in a table'); - remove.title = L._('Delete layer'); - L.DomEvent.on(toggle, 'click', this.toggle, this); - L.DomEvent.on(zoomTo, 'click', this.zoomTo, this); - L.DomEvent.on(edit, 'click', this.edit, this); - L.DomEvent.on(table, 'click', this.tableEdit, this); - L.DomEvent.on(remove, 'click', function () { - if (!this.isVisible()) return; - if (!confirm(L._('Are you sure you want to delete this layer?'))) return; - this._delete(); - this.map.ui.closePanel(); - }, this); - L.DomUtil.addClass(container, this.getHidableClass()); - L.DomUtil.classIf(container, 'off', !this.isVisible()); - container.dataset.id = L.stamp(this); - }, + getHidableElements: function () { + return document.querySelectorAll(`.${this.getHidableClass()}`) + }, - getHidableElements: function () { - return document.querySelectorAll('.' + this.getHidableClass()); - }, + getHidableClass: function () { + return `show_with_datalayer_${L.stamp(this)}` + }, - getHidableClass: function () { - return 'show_with_datalayer_' + L.stamp(this); - }, - - propagateRemote: function () { - var els = this.getHidableElements(); - for (var i = 0; i < els.length; i++) { - L.DomUtil.classIf(els[i], 'remotelayer', this.isRemoteLayer()); - } - }, - - propagateHide: function () { - var els = this.getHidableElements(); - for (var i = 0; i < els.length; i++) { - L.DomUtil.addClass(els[i], 'off'); - } - }, - - propagateShow: function () { - this.onceLoaded(function () { - var els = this.getHidableElements(); - for (var i = 0; i < els.length; i++) { - L.DomUtil.removeClass(els[i], 'off'); - } - }, this); + propagateRemote: function () { + const els = this.getHidableElements() + for (let i = 0; i < els.length; i++) { + L.DomUtil.classIf(els[i], 'remotelayer', this.isRemoteLayer()) } + }, -}); + propagateHide: function () { + const els = this.getHidableElements() + for (let i = 0; i < els.length; i++) { + L.DomUtil.addClass(els[i], 'off') + } + }, + + propagateShow: function () { + this.onceLoaded(function () { + const els = this.getHidableElements() + for (let i = 0; i < els.length; i++) { + L.DomUtil.removeClass(els[i], 'off') + } + }, this) + }, +}) L.U.DataLayer.addInitHook(function () { - this.on('hide', this.propagateHide); - this.on('show', this.propagateShow); - this.propagateShow(); -}); - + this.on('hide', this.propagateHide) + this.on('show', this.propagateShow) + this.propagateShow() +}) L.U.Map.include({ + _openBrowser: function () { + const browserContainer = L.DomUtil.create('div', 'umap-browse-data') - _openBrowser: function () { - var browserContainer = L.DomUtil.create('div', 'umap-browse-data'), - title = L.DomUtil.add('h3', 'umap-browse-title', browserContainer, this.options.name), - filter = L.DomUtil.create('input', '', browserContainer), - filterValue = '', - featuresContainer = L.DomUtil.create('div', 'umap-browse-features', browserContainer), - filterKeys = this.getFilterKeys(); - filter.type = 'text'; - filter.placeholder = L._('Filter…'); - filter.value = this.options.filter || ''; + const title = L.DomUtil.add( + 'h3', + 'umap-browse-title', + browserContainer, + this.options.name + ) - var addFeature = function (feature) { - var feature_li = L.DomUtil.create('li', feature.getClassName() + ' feature'), - zoom_to = L.DomUtil.create('i', 'feature-zoom_to', feature_li), - edit = L.DomUtil.create('i', 'show-on-edit feature-edit', feature_li), - color = L.DomUtil.create('i', 'feature-color', feature_li), - title = L.DomUtil.create('span', 'feature-title', feature_li), - symbol = feature._getIconUrl ? L.U.Icon.prototype.formatUrl(feature._getIconUrl(), feature): null; - zoom_to.title = L._('Bring feature to center'); - edit.title = L._('Edit this feature'); - title.textContent = feature.getDisplayName() || '—'; - color.style.backgroundColor = feature.getOption('color'); - if (symbol) { - color.style.backgroundImage = 'url(' + symbol + ')'; - } - L.DomEvent.on(zoom_to, 'click', function (e) { - e.callback = L.bind(this.view, this); - this.bringToCenter(e); - }, feature); - L.DomEvent.on(title, 'click', function (e) { - e.callback = L.bind(this.view, this) - this.bringToCenter(e); - }, feature); - L.DomEvent.on(edit, 'click', function () { - this.edit(); - }, feature); - return feature_li; - }; + const filter = L.DomUtil.create('input', '', browserContainer) + let filterValue = '' - var append = function (datalayer) { - var container = L.DomUtil.create('div', datalayer.getHidableClass(), featuresContainer), - headline = L.DomUtil.create('h5', '', container); - container.id = 'browse_data_datalayer_' + datalayer.umap_id; - datalayer.renderToolbox(headline); - L.DomUtil.add('span', '', headline, datalayer.options.name); - var ul = L.DomUtil.create('ul', '', container); - L.DomUtil.classIf(container, 'off', !datalayer.isVisible()); + const featuresContainer = L.DomUtil.create( + 'div', + 'umap-browse-features', + browserContainer + ) - var build = function () { - ul.innerHTML = ''; - datalayer.eachFeature(function (feature) { - if (filterValue && !feature.matchFilter(filterValue, filterKeys)) return; - ul.appendChild(addFeature(feature)); - }); - }; - build(); - datalayer.on('datachanged', build); - datalayer.map.ui.once('panel:closed', function () { - datalayer.off('datachanged', build); - }); - datalayer.map.ui.once('panel:ready', function () { - datalayer.map.ui.once('panel:ready', function () { - datalayer.off('datachanged', build); - }); - }); - }; + const filterKeys = this.getFilterKeys() + filter.type = 'text' + filter.placeholder = L._('Filter…') + filter.value = this.options.filter || '' - var appendAll = function () { - this.options.filter = filterValue = filter.value; - featuresContainer.innerHTML = ''; - this.eachBrowsableDataLayer(function (datalayer) { - append(datalayer); - }); - }; - var resetLayers = function () { - this.eachBrowsableDataLayer(function (datalayer) { - datalayer.resetLayer(true); - }); - } - L.bind(appendAll, this)(); - L.DomEvent.on(filter, 'input', appendAll, this); - L.DomEvent.on(filter, 'input', resetLayers, this); - var link = L.DomUtil.create('li', ''); - L.DomUtil.create('i', 'umap-icon-16 umap-caption', link); - var label = L.DomUtil.create('span', '', link); - label.textContent = label.title = L._('About'); - L.DomEvent.on(link, 'click', this.displayCaption, this); - this.ui.openPanel({data: {html: browserContainer}, actions: [link]}); + const addFeature = (feature) => { + const feature_li = L.DomUtil.create('li', `${feature.getClassName()} feature`), + zoom_to = L.DomUtil.create('i', 'feature-zoom_to', feature_li), + edit = L.DomUtil.create('i', 'show-on-edit feature-edit', feature_li), + color = L.DomUtil.create('i', 'feature-color', feature_li), + title = L.DomUtil.create('span', 'feature-title', feature_li), + symbol = feature._getIconUrl + ? L.U.Icon.prototype.formatUrl(feature._getIconUrl(), feature) + : null + zoom_to.title = L._('Bring feature to center') + edit.title = L._('Edit this feature') + title.textContent = feature.getDisplayName() || '—' + color.style.backgroundColor = feature.getOption('color') + if (symbol) { + color.style.backgroundImage = `url(${symbol})` + } + L.DomEvent.on( + zoom_to, + 'click', + function (e) { + e.callback = L.bind(this.view, this) + this.zoomTo(e) + }, + feature + ) + L.DomEvent.on( + title, + 'click', + function (e) { + e.callback = L.bind(this.view, this) + this.zoomTo(e) + }, + feature + ) + L.DomEvent.on( + edit, + 'click', + function () { + this.edit() + }, + feature + ) + return feature_li } -}); + const append = (datalayer) => { + const container = L.DomUtil.create( + 'div', + datalayer.getHidableClass(), + featuresContainer + ), + headline = L.DomUtil.create('h5', '', container) + container.id = `browse_data_datalayer_${datalayer.umap_id}` + datalayer.renderToolbox(headline) + L.DomUtil.add('span', '', headline, datalayer.options.name) + const ul = L.DomUtil.create('ul', '', container) + L.DomUtil.classIf(container, 'off', !datalayer.isVisible()) + const build = () => { + ul.innerHTML = '' + datalayer.eachFeature((feature) => { + if ( + (filterValue && !feature.matchFilter(filterValue, filterKeys)) || + feature.properties.isVisible === false + ) + return + ul.appendChild(addFeature(feature)) + }) + } + build() + datalayer.on('datachanged', build) + datalayer.map.ui.once('panel:closed', () => { + datalayer.off('datachanged', build) + }) + datalayer.map.ui.once('panel:ready', () => { + datalayer.map.ui.once('panel:ready', () => { + datalayer.off('datachanged', build) + }) + }) + } + const appendAll = function () { + this.options.filter = filterValue = filter.value + featuresContainer.innerHTML = '' + this.eachBrowsableDataLayer((datalayer) => { + append(datalayer) + }) + } + const resetLayers = function () { + this.eachBrowsableDataLayer((datalayer) => { + datalayer.resetLayer(true) + }) + } + L.bind(appendAll, this)() + L.DomEvent.on(filter, 'input', appendAll, this) + L.DomEvent.on(filter, 'input', resetLayers, this) + const link = L.DomUtil.create('li', '') + L.DomUtil.create('i', 'umap-icon-16 umap-caption', link) + const label = L.DomUtil.create('span', '', link) + label.textContent = label.title = L._('About') + L.DomEvent.on(link, 'click', this.displayCaption, this) + this.ui.openPanel({ data: { html: browserContainer }, actions: [link] }) + }, + + _openFilter: function () { + const filterContainer = L.DomUtil.create('div', 'umap-filter-data'), + title = L.DomUtil.add( + 'h3', + 'umap-filter-title', + filterContainer, + this.options.name + ), + propertiesContainer = L.DomUtil.create( + 'div', + 'umap-filter-properties', + filterContainer + ), + advancedFilterKeys = this.getAdvancedFilterKeys() + + const advancedFiltersFull = {} + let filtersAlreadyLoaded = true + if (!this.getMap().options.advancedFilters) { + this.getMap().options.advancedFilters = {} + filtersAlreadyLoaded = false + } + advancedFilterKeys.forEach((property) => { + advancedFiltersFull[property] = [] + if (!filtersAlreadyLoaded || !this.getMap().options.advancedFilters[property]) { + this.getMap().options.advancedFilters[property] = [] + } + }) + this.eachDataLayer((datalayer) => { + datalayer.eachFeature((feature) => { + advancedFilterKeys.forEach((property) => { + if (feature.properties[property]) { + if (!advancedFiltersFull[property].includes(feature.properties[property])) { + advancedFiltersFull[property].push(feature.properties[property]) + } + } + }) + }) + }) + + const addPropertyValue = function (property, value) { + const property_li = L.DomUtil.create('li', ''), + filter_check = L.DomUtil.create('input', '', property_li), + filter_label = L.DomUtil.create('label', '', property_li) + filter_check.type = 'checkbox' + filter_check.id = `checkbox_${property}_${value}` + filter_check.checked = + this.getMap().options.advancedFilters[property] && + this.getMap().options.advancedFilters[property].includes(value) + filter_check.setAttribute('data-property', property) + filter_check.setAttribute('data-value', value) + filter_label.htmlFor = `checkbox_${property}_${value}` + filter_label.innerHTML = value + L.DomEvent.on( + filter_check, + 'change', + function (e) { + const property = e.srcElement.dataset.property + const value = e.srcElement.dataset.value + if (e.srcElement.checked) { + this.getMap().options.advancedFilters[property].push(value) + } else { + this.getMap().options.advancedFilters[property].splice( + this.getMap().options.advancedFilters[property].indexOf(value), + 1 + ) + } + L.bind(filterFeatures, this)() + }, + this + ) + return property_li + } + + const addProperty = function (property) { + const container = L.DomUtil.create( + 'div', + 'property-container', + propertiesContainer + ), + headline = L.DomUtil.add('h5', '', container, property) + const ul = L.DomUtil.create('ul', '', container) + const orderedValues = advancedFiltersFull[property] + orderedValues.sort() + orderedValues.forEach((value) => { + ul.appendChild(L.bind(addPropertyValue, this)(property, value)) + }) + } + + const filterFeatures = function () { + let noResults = true + this.eachDataLayer((datalayer) => { + datalayer.eachFeature(function (feature) { + feature.properties.isVisible = true + for (const [property, values] of Object.entries( + this.map.options.advancedFilters + )) { + if (values.length > 0) { + if ( + !feature.properties[property] || + !values.includes(feature.properties[property]) + ) { + feature.properties.isVisible = false + } + } + } + if (feature.properties.isVisible) { + noResults = false + if (!this.isLoaded()) this.fetchData() + this.map.addLayer(feature) + this.fire('show') + } else { + this.map.removeLayer(feature) + this.fire('hide') + } + }) + }) + if (noResults) { + this.help.show('advancedFiltersNoResults') + } else { + this.help.hide() + } + } + + propertiesContainer.innerHTML = '' + advancedFilterKeys.forEach((property) => { + L.bind(addProperty, this)(property) + }) + + const link = L.DomUtil.create('li', '') + L.DomUtil.create('i', 'umap-icon-16 umap-caption', link) + const label = L.DomUtil.create('span', '', link) + label.textContent = label.title = L._('About') + L.DomEvent.on(link, 'click', this.displayCaption, this) + this.ui.openPanel({ data: { html: filterContainer }, actions: [link] }) + }, +}) L.U.TileLayerControl = L.Control.extend({ + options: { + position: 'topleft', + }, - options: { - position: 'topleft' - }, + initialize: function (map, options) { + this.map = map + L.Control.prototype.initialize.call(this, options) + }, - initialize: function (map, options) { - this.map = map; - L.Control.prototype.initialize.call(this, options); - }, + onAdd: function () { + const container = L.DomUtil.create('div', 'leaflet-control-tilelayers umap-control') - onAdd: function () { - var container = L.DomUtil.create('div', 'leaflet-control-tilelayers umap-control'); + const link = L.DomUtil.create('a', '', container) + link.href = '#' + link.title = L._('Change map background') - var link = L.DomUtil.create('a', '', container); - link.href = '#'; - link.title = L._('Change map background'); + L.DomEvent.on(link, 'click', L.DomEvent.stop) + .on(link, 'click', this.openSwitcher, this) + .on(link, 'dblclick', L.DomEvent.stopPropagation) - L.DomEvent - .on(link, 'click', L.DomEvent.stop) - .on(link, 'click', this.openSwitcher, this) - .on(link, 'dblclick', L.DomEvent.stopPropagation); + return container + }, - return container; - }, + openSwitcher: function (options) { + this._tilelayers_container = L.DomUtil.create( + 'ul', + 'umap-tilelayer-switcher-container' + ) + this.buildList(options) + }, - openSwitcher: function (options) { - this._tilelayers_container = L.DomUtil.create('ul', 'umap-tilelayer-switcher-container'); - this.buildList(options); - }, + buildList: function (options) { + this.map.eachTileLayer(function (tilelayer) { + if ( + window.location.protocol === 'https:' && + tilelayer.options.url_template.indexOf('http:') === 0 + ) + return + this.addTileLayerElement(tilelayer, options) + }, this) + this.map.ui.openPanel({ + data: { html: this._tilelayers_container }, + className: options.className, + }) + }, - buildList: function (options) { - this.map.eachTileLayer(function (tilelayer) { - if (window.location.protocol === 'https:' && tilelayer.options.url_template.indexOf('http:') === 0) return; - this.addTileLayerElement(tilelayer, options); - }, this); - this.map.ui.openPanel({data: {html: this._tilelayers_container}, className: options.className}); - }, - - addTileLayerElement: function (tilelayer, options) { - var selectedClass = this.map.hasLayer(tilelayer) ? 'selected' : '', - el = L.DomUtil.create('li', selectedClass, this._tilelayers_container), - img = L.DomUtil.create('img', '', el), - name = L.DomUtil.create('div', '', el); - img.src = L.Util.template(tilelayer.options.url_template, this.map.demoTileInfos); - name.textContent = tilelayer.options.name; - L.DomEvent.on(el, 'click', function () { - this.map.selectTileLayer(tilelayer); - this.map.ui.closePanel(); - if (options && options.callback) options.callback(tilelayer); - }, this); - } - - -}); + addTileLayerElement: function (tilelayer, options) { + const selectedClass = this.map.hasLayer(tilelayer) ? 'selected' : '', + el = L.DomUtil.create('li', selectedClass, this._tilelayers_container), + img = L.DomUtil.create('img', '', el), + name = L.DomUtil.create('div', '', el) + img.src = L.Util.template(tilelayer.options.url_template, this.map.demoTileInfos) + img.loading = 'lazy' + name.textContent = tilelayer.options.name + L.DomEvent.on( + el, + 'click', + function () { + this.map.selectTileLayer(tilelayer) + this.map.ui.closePanel() + if (options && options.callback) options.callback(tilelayer) + }, + this + ) + }, +}) L.U.AttributionControl = L.Control.Attribution.extend({ + options: { + prefix: '', + }, - options: { - prefix: '' - }, - - _update: function () { - L.Control.Attribution.prototype._update.call(this); - if (this._map.options.shortCredit) { - L.DomUtil.add('span', '', this._container, ' — ' + L.Util.toHTML(this._map.options.shortCredit)); - } - var link = L.DomUtil.add('a', '', this._container, ' — ' + L._('About')); - L.DomEvent - .on(link, 'click', L.DomEvent.stop) - .on(link, 'click', this._map.displayCaption, this._map) - .on(link, 'dblclick', L.DomEvent.stop); - if (window.top === window.self) { - // We are not in iframe mode - var home = L.DomUtil.add('a', '', this._container, ' — ' + L._('Home')); - home.href = '/'; - } + _update: function () { + L.Control.Attribution.prototype._update.call(this) + if (this._map.options.shortCredit) { + L.DomUtil.add( + 'span', + '', + this._container, + ` — ${L.Util.toHTML(this._map.options.shortCredit)}` + ) } + if (this._map.options.captionMenus) { + const link = L.DomUtil.add('a', '', this._container, ` — ${L._('About')}`) + L.DomEvent.on(link, 'click', L.DomEvent.stop) + .on(link, 'click', this._map.displayCaption, this._map) + .on(link, 'dblclick', L.DomEvent.stop) + } + if (window.top === window.self && this._map.options.captionMenus) { + // We are not in iframe mode + const home = L.DomUtil.add('a', '', this._container, ` — ${L._('Home')}`) + home.href = '/' + } + }, +}) -}); +L.U.StarControl = L.Control.extend({ + options: { + position: 'topleft', + }, + onAdd: function (map) { + const status = map.options.starred ? ' starred' : '' + const container = L.DomUtil.create( + 'div', + `leaflet-control-star umap-control${status}` + ), + link = L.DomUtil.create('a', '', container) + link.href = '#' + link.title = L._('Star this map') + L.DomEvent.on(link, 'click', L.DomEvent.stop) + .on(link, 'click', map.star, map) + .on(link, 'dblclick', L.DomEvent.stopPropagation) + + return container + }, +}) L.U.Search = L.PhotonSearch.extend({ + initialize: function (map, input, options) { + L.PhotonSearch.prototype.initialize.call(this, map, input, options) + this.options.url = map.options.urls.search + }, - initialize: function (map, input, options) { - L.PhotonSearch.prototype.initialize.call(this, map, input, options); - this.options.url = map.options.urls.search; - }, + onBlur: function (e) { + // Overrided because we don't want to hide the results on blur. + this.fire('blur') + }, - onBlur: function (e) { - // Overrided because we don't want to hide the results on blur. - this.fire('blur'); - }, + formatResult: function (feature, el) { + const self = this + const tools = L.DomUtil.create('span', 'search-result-tools', el), + zoom = L.DomUtil.create('i', 'feature-zoom_to', tools), + edit = L.DomUtil.create('i', 'feature-edit show-on-edit', tools) + zoom.title = L._('Zoom to this place') + edit.title = L._('Save this location as new feature') + // We need to use "mousedown" because Leaflet.Photon listen to mousedown + // on el. + L.DomEvent.on(zoom, 'mousedown', (e) => { + L.DomEvent.stop(e) + self.zoomToFeature(feature) + }) + L.DomEvent.on(edit, 'mousedown', (e) => { + L.DomEvent.stop(e) + const datalayer = self.map.defaultDataLayer() + const layer = datalayer.geojsonToFeatures(feature) + layer.isDirty = true + layer.edit() + }) + this._formatResult(feature, el) + }, - formatResult: function (feature, el) { - var self = this; - var tools = L.DomUtil.create('span', 'search-result-tools', el), - zoom = L.DomUtil.create('i', 'feature-zoom_to', tools), - edit = L.DomUtil.create('i', 'feature-edit show-on-edit', tools); - zoom.title = L._('Zoom to this place'); - edit.title = L._('Save this location as new feature'); - // We need to use "mousedown" because Leaflet.Photon listen to mousedown - // on el. - L.DomEvent.on(zoom, 'mousedown', function (e) { - L.DomEvent.stop(e); - self.zoomToFeature(feature); - }); - L.DomEvent.on(edit, 'mousedown', function (e) { - L.DomEvent.stop(e); - var datalayer = self.map.defaultDataLayer(); - var layer = datalayer.geojsonToFeatures(feature); - layer.isDirty = true; - layer.edit(); - }); - this._formatResult(feature, el); - }, + zoomToFeature: function (feature) { + const zoom = Math.max(this.map.getZoom(), 16) // Never unzoom. + this.map.setView( + [feature.geometry.coordinates[1], feature.geometry.coordinates[0]], + zoom + ) + }, - zoomToFeature: function (feature) { - var zoom = Math.max(this.map.getZoom(), 16); // Never unzoom. - this.map.setView([feature.geometry.coordinates[1], feature.geometry.coordinates[0]], zoom); - }, - - onSelected: function (feature) { - this.zoomToFeature(feature); - this.map.ui.closePanel(); - } - -}); + onSelected: function (feature) { + this.zoomToFeature(feature) + this.map.ui.closePanel() + }, +}) L.U.SearchControl = L.Control.extend({ + options: { + position: 'topleft', + }, - options: { - position: 'topleft', - }, + onAdd: function (map) { + const container = L.DomUtil.create('div', 'leaflet-control-search umap-control'), + self = this - onAdd: function (map) { - var container = L.DomUtil.create('div', 'leaflet-control-search umap-control'), - self = this; + L.DomEvent.disableClickPropagation(container) + const link = L.DomUtil.create('a', '', container) + link.href = '#' + link.title = L._('Search a place name') + L.DomEvent.on(link, 'click', (e) => { + L.DomEvent.stop(e) + self.openPanel(map) + }) + return container + }, - L.DomEvent.disableClickPropagation(container); - var link = L.DomUtil.create('a', '', container); - link.href = '#'; - link.title = L._('Search a place name') - L.DomEvent.on(link, 'click', function (e) { - L.DomEvent.stop(e); - self.openPanel(map); - }); - return container; - }, - - openPanel: function (map) { - var options = { - limit: 10, - noResultLabel: L._('No results'), - } - if (map.options.photonUrl) options.url = map.options.photonUrl; - var container = L.DomUtil.create('div', ''); - - var title = L.DomUtil.create('h3', '', container); - title.textContent = L._('Search location'); - var input = L.DomUtil.create('input', 'photon-input', container); - var resultsContainer = L.DomUtil.create('div', 'photon-autocomplete', container); - this.search = new L.U.Search(map, input, options); - var id = Math.random(); - this.search.on('ajax:send', function () { - map.fire('dataloading', {id: id}); - }); - this.search.on('ajax:return', function () { - map.fire('dataload', {id: id}); - }); - this.search.resultsContainer = resultsContainer; - map.ui.once('panel:ready', function () { - input.focus(); - }); - map.ui.openPanel({data: {html: container}}); + openPanel: function (map) { + const options = { + limit: 10, + noResultLabel: L._('No results'), } + if (map.options.photonUrl) options.url = map.options.photonUrl + const container = L.DomUtil.create('div', '') -}); - + const title = L.DomUtil.create('h3', '', container) + title.textContent = L._('Search location') + const input = L.DomUtil.create('input', 'photon-input', container) + const resultsContainer = L.DomUtil.create('div', 'photon-autocomplete', container) + this.search = new L.U.Search(map, input, options) + const id = Math.random() + this.search.on('ajax:send', () => { + map.fire('dataloading', { id: id }) + }) + this.search.on('ajax:return', () => { + map.fire('dataload', { id: id }) + }) + this.search.resultsContainer = resultsContainer + map.ui.once('panel:ready', () => { + input.focus() + }) + map.ui.openPanel({ data: { html: container } }) + }, +}) L.Control.MiniMap.include({ + initialize: function (layer, options) { + L.Util.setOptions(this, options) + this._layer = this._cloneLayer(layer) + }, - initialize: function (layer, options) { - L.Util.setOptions(this, options); - this._layer = this._cloneLayer(layer); - }, - - onMainMapBaseLayerChange: function (e) { - var layer = this._cloneLayer(e.layer); - if (this._miniMap.hasLayer(this._layer)) { - this._miniMap.removeLayer(this._layer); - } - this._layer = layer; - this._miniMap.addLayer(this._layer); - }, - - _cloneLayer: function (layer) { - return new L.TileLayer(layer._url, L.Util.extend({}, layer.options)); + onMainMapBaseLayerChange: function (e) { + const layer = this._cloneLayer(e.layer) + if (this._miniMap.hasLayer(this._layer)) { + this._miniMap.removeLayer(this._layer) } + this._layer = layer + this._miniMap.addLayer(this._layer) + }, -}); - + _cloneLayer: function (layer) { + return new L.TileLayer(layer._url, L.Util.extend({}, layer.options)) + }, +}) L.Control.Loading.include({ + onAdd: function (map) { + this._container = L.DomUtil.create('div', 'umap-loader', map._controlContainer) + map.on('baselayerchange', this._layerAdd, this) + this._addMapListeners(map) + this._map = map + }, - onAdd: function (map) { - this._container = L.DomUtil.create('div', 'umap-loader', map._controlContainer); - map.on('baselayerchange', this._layerAdd, this); - this._addMapListeners(map); - this._map = map; - }, - - _showIndicator: function () { - L.DomUtil.addClass(this._map._container, 'umap-loading'); - }, - - _hideIndicator: function() { - L.DomUtil.removeClass(this._map._container, 'umap-loading'); - } - -}); + _showIndicator: function () { + L.DomUtil.addClass(this._map._container, 'umap-loading') + }, + _hideIndicator: function () { + L.DomUtil.removeClass(this._map._container, 'umap-loading') + }, +}) /* -* Make it dynamic -*/ + * Make it dynamic + */ L.U.ContextMenu = L.Map.ContextMenu.extend({ + _createItems: function (e) { + this._map.setContextMenuItems(e) + L.Map.ContextMenu.prototype._createItems.call(this) + }, - _createItems: function (e) { - this._map.setContextMenuItems(e); - L.Map.ContextMenu.prototype._createItems.call(this); - }, - - _showAtPoint: function (pt, e) { - this._items = []; - this._container.innerHTML = ''; - this._createItems(e); - L.Map.ContextMenu.prototype._showAtPoint.call(this, pt, e); - } - -}); + _showAtPoint: function (pt, e) { + this._items = [] + this._container.innerHTML = '' + this._createItems(e) + L.Map.ContextMenu.prototype._showAtPoint.call(this, pt, e) + }, +}) L.U.IframeExporter = L.Evented.extend({ + options: { + includeFullScreenLink: true, + currentView: false, + keepCurrentDatalayers: false, + viewCurrentFeature: false, + }, - options: { - includeFullScreenLink: true, - currentView: false, - keepCurrentDatalayers: false, - viewCurrentFeature: false - }, + queryString: { + scaleControl: false, + miniMap: false, + scrollWheelZoom: false, + zoomControl: true, + allowEdit: false, + moreControl: true, + searchControl: null, + tilelayersControl: null, + embedControl: null, + datalayersControl: true, + onLoadPanel: 'none', + captionBar: false, + captionMenus: true, + }, - queryString: { - scaleControl: false, - miniMap: false, - scrollWheelZoom: false, - zoomControl: true, - allowEdit: false, - moreControl: true, - searchControl: null, - tilelayersControl: null, - embedControl: null, - datalayersControl: true, - onLoadPanel: 'none', - captionBar: false - }, + dimensions: { + width: '100%', + height: '300px', + }, - dimensions: { - width: '100%', - height: '300px' - }, + initialize: function (map) { + this.map = map + this.baseUrl = L.Util.getBaseUrl() + // Use map default, not generic default + this.queryString.onLoadPanel = this.map.options.onLoadPanel + }, - initialize: function (map) { - this.map = map; - this.baseUrl = L.Util.getBaseUrl(); - // Use map default, not generic default - this.queryString.onLoadPanel = this.map.options.onLoadPanel; - }, + getMap: function () { + return this.map + }, - getMap: function () { - return this.map; - }, - - build: function () { - var datalayers = []; - if (this.options.viewCurrentFeature && this.map.currentFeature) { - this.queryString.feature = this.map.currentFeature.getSlug(); - } - if (this.options.keepCurrentDatalayers) { - this.map.eachDataLayer(function (datalayer) { - if (datalayer.isVisible() && datalayer.umap_id) { - datalayers.push(datalayer.umap_id); - } - }); - this.queryString.datalayers = datalayers.join(','); - } else { - delete this.queryString.datalayers; - } - var currentView = this.options.currentView ? window.location.hash : '', - iframeUrl = this.baseUrl + '?' + L.Util.buildQueryString(this.queryString) + currentView, - code = ''; - if (this.options.includeFullScreenLink) { - code += '

' + L._('See full screen') + '

'; - } - return code; + buildUrl: function () { + const datalayers = [] + if (this.options.viewCurrentFeature && this.map.currentFeature) { + this.queryString.feature = this.map.currentFeature.getSlug() } + if (this.options.keepCurrentDatalayers) { + this.map.eachDataLayer((datalayer) => { + if (datalayer.isVisible() && datalayer.umap_id) { + datalayers.push(datalayer.umap_id) + } + }) + this.queryString.datalayers = datalayers.join(',') + } else { + delete this.queryString.datalayers + } + const currentView = this.options.currentView ? window.location.hash : '' + return `${this.baseUrl}?${L.Util.buildQueryString(this.queryString)}${currentView}` + }, -}); + build: function () { + const iframeUrl = this.buildUrl() + let code = `` + if (this.options.includeFullScreenLink) { + code += `

${L._('See full screen')}

` + } + return code + }, +}) L.U.Editable = L.Editable.extend({ + initialize: function (map, options) { + L.Editable.prototype.initialize.call(this, map, options) + this.on( + 'editable:drawing:start editable:drawing:click editable:drawing:move', + this.drawingTooltip + ) + this.on('editable:drawing:end', this.closeTooltip) + // Layer for items added by users + this.on('editable:drawing:cancel', (e) => { + if (e.layer._latlngs && e.layer._latlngs.length < e.layer.editor.MIN_VERTEX) + e.layer.del() + if (e.layer instanceof L.U.Marker) e.layer.del() + }) + this.on('editable:drawing:commit', function (e) { + e.layer.isDirty = true + if (this.map.editedFeature !== e.layer) e.layer.edit(e) + }) + this.on('editable:editing', (e) => { + const layer = e.layer + layer.isDirty = true + if (layer._tooltip && layer.isTooltipOpen()) { + layer._tooltip.setLatLng(layer.getCenter()) + layer._tooltip.update() + } + }) + this.on('editable:vertex:ctrlclick', (e) => { + const index = e.vertex.getIndex() + if (index === 0 || (index === e.vertex.getLastIndex() && e.vertex.continue)) + e.vertex.continue() + }) + this.on('editable:vertex:altclick', (e) => { + if (e.vertex.editor.vertexCanBeDeleted(e.vertex)) e.vertex.delete() + }) + this.on('editable:vertex:rawclick', this.onVertexRawClick) + }, - initialize: function (map, options) { - L.Editable.prototype.initialize.call(this, map, options); - this.on('editable:drawing:start editable:drawing:click', this.drawingTooltip); - this.on('editable:drawing:end', this.closeTooltip); - // Layer for items added by users - this.on('editable:drawing:cancel', function (e) { - if (e.layer._latlngs && e.layer._latlngs.length < e.layer.editor.MIN_VERTEX) e.layer.del(); - if (e.layer instanceof L.U.Marker) e.layer.del(); - }); - this.on('editable:drawing:commit', function (e) { - e.layer.isDirty = true; - if (this.map.editedFeature !== e.layer) e.layer.edit(e); - }); - this.on('editable:editing', function (e) { - var layer = e.layer; - layer.isDirty = true; - if (layer._tooltip && layer.isTooltipOpen()) { - layer._tooltip.setLatLng(layer.getCenter()); - layer._tooltip.update(); - } - }); - this.on('editable:vertex:ctrlclick', function (e) { - var index = e.vertex.getIndex(); - if (index === 0 || index === e.vertex.getLastIndex() && e.vertex.continue) e.vertex.continue(); - }); - this.on('editable:vertex:altclick', function (e) { - if (e.vertex.editor.vertexCanBeDeleted(e.vertex)) e.vertex.delete(); - }); - this.on('editable:vertex:rawclick', this.onVertexRawClick); - }, + createPolyline: function (latlngs) { + return new L.U.Polyline(this.map, latlngs) + }, - createPolyline: function (latlngs) { - return new L.U.Polyline(this.map, latlngs); - }, + createPolygon: function (latlngs) { + const polygon = new L.U.Polygon(this.map, latlngs) + return polygon + }, - createPolygon: function (latlngs) { - var polygon = new L.U.Polygon(this.map, latlngs); - return polygon; - }, + createMarker: function (latlng) { + return new L.U.Marker(this.map, latlng) + }, - createMarker: function (latlng) { - return new L.U.Marker(this.map, latlng); - }, + connectCreatedToMap: function (layer) { + // Overrided from Leaflet.Editable + const datalayer = this.map.defaultDataLayer() + datalayer.addLayer(layer) + layer.isDirty = true + return layer + }, - connectCreatedToMap: function (layer) { - // Overrided from Leaflet.Editable - var datalayer = this.map.defaultDataLayer(); - datalayer.addLayer(layer); - layer.isDirty = true; - return layer; - }, - - drawingTooltip: function (e) { - var content; - if (e.layer instanceof L.Marker) content = L._('Click to add a marker'); - else if (e.layer instanceof L.Polyline) { - if (!e.layer.editor._drawnLatLngs.length) { - if (e.layer instanceof L.Polygon) content = L._('Click to start drawing a polygon'); - else if (e.layer instanceof L.Polyline) content = L._('Click to start drawing a line'); - } else if (e.layer.editor._drawnLatLngs.length < e.layer.editor.MIN_VERTEX) { - content = L._('Click to continue drawing'); - } else { - content = L._('Click last point to finish shape'); - } - } - if (content) this.map.ui.tooltip({content: content}); - }, - - closeTooltip: function () { - this.map.ui.closeTooltip(); - }, - - onVertexRawClick: function (e) { - e.layer.onVertexRawClick(e); - L.DomEvent.stop(e); - e.cancel(); + drawingTooltip: function (e) { + if (e.layer instanceof L.Marker && e.type != 'editable:drawing:move') { + this.map.ui.tooltip({ content: L._('Click to add a marker') }) + } + if (!(e.layer instanceof L.Polyline)) { + // only continue with Polylines and Polygons + return } -}); + let content + let measure + if (e.layer.editor._drawnLatLngs) { + // when drawing (a Polyline or Polygon) + if (!e.layer.editor._drawnLatLngs.length) { + // when drawing first point + if (e.layer instanceof L.Polygon) { + content = L._('Click to start drawing a polygon') + } else if (e.layer instanceof L.Polyline) { + content = L._('Click to start drawing a line') + } + } else { + const tmpLatLngs = e.layer.editor._drawnLatLngs.slice() + tmpLatLngs.push(e.latlng) + measure = e.layer.getMeasure(tmpLatLngs) + + if (e.layer.editor._drawnLatLngs.length < e.layer.editor.MIN_VERTEX) { + // when drawing second point + content = L._('Click to continue drawing') + } else { + // when drawing third point (or more) + content = L._('Click last point to finish shape') + } + } + } else { + // when moving an existing point + measure = e.layer.getMeasure() + } + if (measure) { + if (e.layer instanceof L.Polygon) { + content += L._(' (area: {measure})', { measure: measure }) + } else if (e.layer instanceof L.Polyline) { + content += L._(' (length: {measure})', { measure: measure }) + } + } + if (content) { + this.map.ui.tooltip({ content: content }) + } + }, + + closeTooltip: function () { + this.map.ui.closeTooltip() + }, + + onVertexRawClick: function (e) { + e.layer.onVertexRawClick(e) + L.DomEvent.stop(e) + e.cancel() + }, +}) diff --git a/umap/static/umap/js/umap.core.js b/umap/static/umap/js/umap.core.js index 02afe2cd..cd4b8b8d 100644 --- a/umap/static/umap/js/umap.core.js +++ b/umap/static/umap/js/umap.core.js @@ -1,556 +1,643 @@ /* Poor man pub/sub handler, enough for now */ -L.UmapSingleton = L.Evented.extend({}); -L.U = new L.UmapSingleton(); -L.U.Map = L.Map.extend({}); +L.UmapSingleton = L.Evented.extend({}) +L.U = new L.UmapSingleton() +L.U.Map = L.Map.extend({}) /* -* Utils -*/ -L.Util.queryString = function (name, fallback) { - var decode = function (s) { return decodeURIComponent(s.replace(/\+/g, ' ')); }; - var qs = window.location.search.slice(1).split('&'), qa = {}; - for (var i in qs) { - var key = qs[i].split('='); - if (!key) continue; - qa[decode(key[0])] = key[1] ? decode(key[1]) : 1; + * Utils + */ +L.Util.queryString = (name, fallback) => { + const decode = (s) => decodeURIComponent(s.replace(/\+/g, ' ')) + const qs = window.location.search.slice(1).split('&'), + qa = {} + for (const i in qs) { + const key = qs[i].split('=') + if (!key) continue + qa[decode(key[0])] = key[1] ? decode(key[1]) : 1 + } + return qa[name] || fallback +} + +L.Util.booleanFromQueryString = (name) => { + const value = L.Util.queryString(name) + return value === '1' || value === 'true' +} + +L.Util.setFromQueryString = (options, name) => { + const value = L.Util.queryString(name) + if (typeof value !== 'undefined') options[name] = value +} + +L.Util.setBooleanFromQueryString = (options, name) => { + const value = L.Util.queryString(name) + if (typeof value !== 'undefined') options[name] = value == '1' || value == 'true' +} +L.Util.setNullableBooleanFromQueryString = (options, name) => { + let value = L.Util.queryString(name) + if (typeof value !== 'undefined') { + if (value === 'null') value = null + else if (value === '0' || value === 'false') value = false + else value = true + options[name] = value + } +} +L.Util.escapeHTML = (s) => { + s = s ? s.toString() : '' + s = DOMPurify.sanitize(s, { + USE_PROFILES: { html: true }, + ADD_TAGS: ['iframe'], + ALLOWED_TAGS: [ + 'h3', + 'h4', + 'h5', + 'hr', + 'strong', + 'em', + 'ul', + 'li', + 'a', + 'div', + 'iframe', + 'img', + 'br', + ], + ADD_ATTR: ['target', 'allow', 'allowfullscreen', 'frameborder', 'scrolling'], + ALLOWED_ATTR: ['href', 'src', 'width', 'height'], + }) + return s +} +L.Util.toHTML = (r) => { + if (!r) return '' + let ii + + // detect newline format + const newline = r.indexOf('\r\n') != -1 ? '\r\n' : r.indexOf('\n') != -1 ? '\n' : '' + + // headings and hr + r = r.replace(/^### (.*)/gm, '
$1
') + r = r.replace(/^## (.*)/gm, '

$1

') + r = r.replace(/^# (.*)/gm, '

$1

') + r = r.replace(/^---/gm, '
') + + // bold, italics + r = r.replace(/\*\*(.*?)\*\*/g, '$1') + r = r.replace(/\*(.*?)\*/g, '$1') + + // unordered lists + r = r.replace(/^\*\* (.*)/gm, '
    • $1
') + r = r.replace(/^\* (.*)/gm, '
  • $1
') + for (ii = 0; ii < 3; ii++) + r = r.replace(new RegExp(`${newline}
    `, 'g'), newline) + + // links + r = r.replace(/(\[\[http)/g, '[[h_t_t_p') // Escape for avoiding clash between [[http://xxx]] and http://xxx + r = r.replace(/({{http)/g, '{{h_t_t_p') + r = r.replace(/(=http)/g, '=h_t_t_p') // http://xxx as query string, see https://github.com/umap-project/umap/issues/607 + r = r.replace(/(https?:[^ \<)\n]*)/g, '$1') + r = r.replace(/\[\[(h_t_t_ps?:[^\]|]*?)\]\]/g, '$1') + r = r.replace( + /\[\[(h_t_t_ps?:[^|]*?)\|(.*?)\]\]/g, + '$2' + ) + r = r.replace(/\[\[([^\]|]*?)\]\]/g, '$1') + r = r.replace(/\[\[([^|]*?)\|(.*?)\]\]/g, '$2') + + // iframe + r = r.replace( + /{{{(h_t_t_ps?[^ |{]*)}}}/g, + '
    ' + ) + r = r.replace( + /{{{(h_t_t_ps?[^ |{]*)\|(\d*)(px)?}}}/g, + '
    ' + ) + r = r.replace( + /{{{(h_t_t_ps?[^ |{]*)\|(\d*)(px)?\*(\d*)(px)?}}}/g, + '
    ' + ) + + // images + r = r.replace(/{{([^\]|]*?)}}/g, '') + r = r.replace(/{{([^|]*?)\|(\d*?)}}/g, '') + + //Unescape http + r = r.replace(/(h_t_t_p)/g, 'http') + + // Preserver line breaks + if (newline) r = r.replace(new RegExp(`${newline}(?=[^]+)`, 'g'), `
    ${newline}`) + + r = L.Util.escapeHTML(r) + + return r +} +L.Util.isObject = (what) => typeof what === 'object' && what !== null +L.Util.CopyJSON = (geojson) => JSON.parse(JSON.stringify(geojson)) +L.Util.detectFileType = (f) => { + const filename = f.name ? escape(f.name.toLowerCase()) : '' + function ext(_) { + return filename.indexOf(_) !== -1 + } + if (f.type === 'application/vnd.google-earth.kml+xml' || ext('.kml')) { + return 'kml' + } + if (ext('.gpx')) return 'gpx' + if (ext('.geojson') || ext('.json')) return 'geojson' + if (f.type === 'text/csv' || ext('.csv') || ext('.tsv') || ext('.dsv')) { + return 'csv' + } + if (ext('.xml') || ext('.osm')) return 'osm' + if (ext('.umap')) return 'umap' +} + +L.Util.usableOption = (options, option) => + options[option] !== undefined && options[option] !== '' + +L.Util.greedyTemplate = (str, data, ignore) => { + function getValue(data, path) { + let value = data + for (let i = 0; i < path.length; i++) { + value = value[path[i]] + if (value === undefined) break } - return qa[name] || fallback; -}; + return value + } -L.Util.booleanFromQueryString = function (name) { - var value = L.Util.queryString(name); - return value === '1' || value === 'true'; -}; - -L.Util.setFromQueryString = function (options, name) { - var value = L.Util.queryString(name); - if (typeof value !== 'undefined') options[name] = value; -}; - -L.Util.setBooleanFromQueryString = function (options, name) { - var value = L.Util.queryString(name); - if (typeof value !== 'undefined') options[name] = value == '1' || value == 'true'; -}; -L.Util.setNullableBooleanFromQueryString = function (options, name) { - var value = L.Util.queryString(name); - if (typeof value !== 'undefined') { - if (value === 'null') value = null; - else if (value === '0' || value === 'false') value = false; - else value = true; - options[name] = value; + return str.replace( + /\{ *([\w_\:\.\|]+)(?:\|("[^"]*"))? *\}/g, + (str, key, staticFallback) => { + const vars = key.split('|') + let value + let path + if (staticFallback !== undefined) { + vars.push(staticFallback) + } + for (let i = 0; i < vars.length; i++) { + path = vars[i] + if (path.startsWith('"') && path.endsWith('"')) + value = path.substring(1, path.length - 1) // static default value. + else value = getValue(data, path.split('.')) + if (value !== undefined) break + } + if (value === undefined) { + if (ignore) value = str + else value = '' + } + return value } -}; -L.Util.escapeHTML = function (s) { - s = s? s.toString() : ''; - return s.replace(/ { + const sortKeys = (sortKey || 'name').split(',') - // Escape tags - r = r.replace(/$1'); - r = r.replace(/^## (.*)/gm, '

    $1

    '); - r = r.replace(/^# (.*)/gm, '

    $1

    '); - r = r.replace(/^---/gm, '
    '); - - // bold, italics - r = r.replace(/\*\*(.*?)\*\*/g, '$1'); - r = r.replace(/\*(.*?)\*/g, '$1'); - - // unordered lists - r = r.replace(/^\*\* (.*)/gm, '
      • $1
    '); - r = r.replace(/^\* (.*)/gm, '
    • $1
    '); - for (ii = 0; ii < 3; ii++) r = r.replace(new RegExp('
' + newline + '
    ', 'g'), newline); - - // links - r = r.replace(/(\[\[http)/g, '[[h_t_t_p'); // Escape for avoiding clash between [[http://xxx]] and http://xxx - r = r.replace(/({{http)/g, '{{h_t_t_p'); - r = r.replace(/(=http)/g, '=h_t_t_p'); // http://xxx as query string, see https://github.com/umap-project/umap/issues/607 - r = r.replace(/(https?:[^ \<)\n]*)/g, '$1'); - r = r.replace(/\[\[(h_t_t_ps?:[^\]|]*?)\]\]/g, '$1'); - r = r.replace(/\[\[(h_t_t_ps?:[^|]*?)\|(.*?)\]\]/g, '$2'); - r = r.replace(/\[\[([^\]|]*?)\]\]/g, '$1'); - r = r.replace(/\[\[([^|]*?)\|(.*?)\]\]/g, '$2'); - - // iframe - r = r.replace(/{{{(h_t_t_ps?[^ |{]*)}}}/g, '
    '); - r = r.replace(/{{{(h_t_t_ps?[^ |{]*)\|(\d*)(px)?}}}/g, '
    '); - r = r.replace(/{{{(h_t_t_ps?[^ |{]*)\|(\d*)(px)?\*(\d*)(px)?}}}/g, '
    '); - - // images - r = r.replace(/{{([^\]|]*?)}}/g, ''); - r = r.replace(/{{([^|]*?)\|(\d*?)}}/g, ''); - - //Unescape http - r = r.replace(/(h_t_t_p)/g, 'http'); - - // Preserver line breaks - if (newline) r = r.replace(new RegExp(newline + '(?=[^]+)', 'g'), '
    ' + newline); - - return r; -}; -L.Util.isObject = function (what) { - return typeof what === 'object' && what !== null; -}; -L.Util.CopyJSON = function (geojson) { - return JSON.parse(JSON.stringify(geojson)); -}; -L.Util.detectFileType = function (f) { - var filename = f.name ? escape(f.name.toLowerCase()) : ''; - function ext(_) { - return filename.indexOf(_) !== -1; + const sort = (a, b, i) => { + const sortKey = sortKeys[i] + let score + const valA = a.properties[sortKey] || '' + const valB = b.properties[sortKey] || '' + if (!valA) { + score = -1 + } else if (!valB) { + score = 1 + } else { + score = valA.toString().toLowerCase().localeCompare(valB.toString().toLowerCase()) } - if (f.type === 'application/vnd.google-earth.kml+xml' || ext('.kml')) { - return 'kml'; + if (score === 0 && sortKeys[i + 1]) return sort(a, b, i + 1) + return score + } + + features.sort((a, b) => { + if (!a.properties || !b.properties) { + return 0 } - if (ext('.gpx')) return 'gpx'; - if (ext('.geojson') || ext('.json')) return 'geojson'; - if (f.type === 'text/csv' || ext('.csv') || ext('.tsv') || ext('.dsv')) { - return 'csv'; + return sort(a, b, 0) + }) + + return features +} + +L.Util.flattenCoordinates = (coords) => { + while (coords[0] && typeof coords[0][0] !== 'number') coords = coords[0] + return coords +} + +L.Util.buildQueryString = (params) => { + const query_string = [] + for (const key in params) { + query_string.push(`${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`) + } + return query_string.join('&') +} + +L.Util.getBaseUrl = () => `//${window.location.host}${window.location.pathname}` + +L.DomUtil.add = (tagName, className, container, content) => { + const el = L.DomUtil.create(tagName, className, container) + if (content) { + if (content.nodeType && content.nodeType === 1) { + el.appendChild(content) + } else { + el.innerHTML = content } - if (ext('.xml') || ext('.osm')) return 'osm'; - if (ext('.umap')) return 'umap'; -}; + } + return el +} -L.Util.usableOption = function (options, option) { - return options[option] !== undefined && options[option] !== ''; -}; - -L.Util.greedyTemplate = function (str, data, ignore) { - function getValue(data, path) { - var value = data - for (var i = 0; i < path.length; i++) { - value = value[path[i]] - if (value === undefined) break; - } - return value; +L.DomUtil.createFieldset = (container, legend, options) => { + options = options || {} + const fieldset = L.DomUtil.create('div', 'fieldset toggle', container) + const legendEl = L.DomUtil.add('h5', 'legend style_options_toggle', fieldset, legend) + const fieldsEl = L.DomUtil.add('div', 'fields with-transition', fieldset) + L.DomEvent.on(legendEl, 'click', function () { + if (L.DomUtil.hasClass(fieldset, 'on')) { + L.DomUtil.removeClass(fieldset, 'on') + } else { + L.DomUtil.addClass(fieldset, 'on') + if (options.callback) options.callback.call(options.context || this) } + }) + return fieldsEl +} - return str.replace(/\{ *([\w_\:\.\|]+)(?:\|("[^"]*"))? *\}/g, function (str, key, staticFallback) { - var vars = key.split('|'), value, path; - if (staticFallback !== undefined) { - vars.push(staticFallback); - } - for (var i = 0; i < vars.length; i++) { - path = vars[i]; - if (path.startsWith('"') && path.endsWith('"')) value = path.substring(1, path.length -1); // static default value. - else value = getValue(data, path.split('.')); - if (value !== undefined) break; - } - if (value === undefined) { - if (ignore) value = str; - else value = ''; - } - return value; - }); -}; +L.DomUtil.classIf = (el, className, bool) => { + if (bool) L.DomUtil.addClass(el, className) + else L.DomUtil.removeClass(el, className) +} -L.Util.sortFeatures = function (features, sortKey) { - var sortKeys = (sortKey || 'name').split(','); +L.DomUtil.element = (what, attrs, parent) => { + const el = document.createElement(what) + for (const attr in attrs) { + el[attr] = attrs[attr] + } + if (typeof parent !== 'undefined') { + parent.appendChild(el) + } + return el +} - var sort = function (a, b, i) { - var sortKey = sortKeys[i], score, - valA = a.properties[sortKey] || '', - valB = b.properties[sortKey] || ''; - if (!valA) { - score = -1; - } else if (!valB) { - score = 1; - } else { - score = valA.toString().toLowerCase().localeCompare(valB.toString().toLowerCase()); - } - if (score === 0 && sortKeys[i + 1]) return sort(a, b, i + 1); - return score; - }; +L.DomUtil.before = (target, el) => { + target.parentNode.insertBefore(el, target) + return el +} - features.sort(function (a, b) { - if (!a.properties || !b.properties) { - return 0; - } - return sort(a, b, 0); - }); +L.DomUtil.after = (target, el) => { + target.parentNode.insertBefore(el, target.nextSibling) + return el +} +L.DomUtil.RGBRegex = /rgb *\( *([0-9]{1,3}) *, *([0-9]{1,3}) *, *([0-9]{1,3}) *\)/ - return features; -}; +L.DomUtil.TextColorFromBackgroundColor = (el) => { + let out = '#000000' + if (!window.getComputedStyle) { + return out + } + let rgb = window.getComputedStyle(el).getPropertyValue('background-color') + rgb = L.DomUtil.RGBRegex.exec(rgb) + if (!rgb || rgb.length !== 4) { + return out + } + rgb = parseInt(rgb[1], 10) + parseInt(rgb[2], 10) + parseInt(rgb[3], 10) + if (rgb < (255 * 3) / 2) { + out = '#ffffff' + } + return out +} +L.DomEvent.once = (el, types, fn, context) => { + // cf https://github.com/Leaflet/Leaflet/pull/3528#issuecomment-134551575 -L.Util.flattenCoordinates = function (coords) { - while (coords[0] && typeof coords[0][0] !== 'number') coords = coords[0]; - return coords; -}; - - -L.Util.buildQueryString = function (params) { - var query_string = []; - for (var key in params) { - query_string.push(encodeURIComponent(key) + '=' + encodeURIComponent(params[key])); + if (typeof types === 'object') { + for (const type in types) { + L.DomEvent.once(el, type, types[type], fn) } - return query_string.join('&'); -}; - -L.Util.getBaseUrl = function () { - return '//' + window.location.host + window.location.pathname; -}; - -L.DomUtil.add = function (tagName, className, container, content) { - var el = L.DomUtil.create(tagName, className, container); - if (content) { - if (content.nodeType && content.nodeType === 1) { - el.appendChild(content); - } - else { - el.innerHTML = content; - } - } - return el; -}; - -L.DomUtil.createFieldset = function (container, legend, options) { - options = options || {}; - var fieldset = L.DomUtil.create('div', 'fieldset toggle', container); - var legendEl = L.DomUtil.add('h5', 'legend style_options_toggle', fieldset, legend); - var fieldsEl = L.DomUtil.add('div', 'fields with-transition', fieldset); - L.DomEvent.on(legendEl, 'click', function () { - if (L.DomUtil.hasClass(fieldset, 'on')) { - L.DomUtil.removeClass(fieldset, 'on'); - } else { - L.DomUtil.addClass(fieldset, 'on'); - if (options.callback) options.callback.call(options.context || this); - } - }); - return fieldsEl; -}; - -L.DomUtil.classIf = function (el, className, bool) { - if (bool) L.DomUtil.addClass(el, className); - else L.DomUtil.removeClass(el, className); -}; - - -L.DomUtil.element = function (what, attrs, parent) { - var el = document.createElement(what); - for (var attr in attrs) { - el[attr] = attrs[attr]; - } - if (typeof parent !== 'undefined') { - parent.appendChild(el); - } - return el; -}; - - -L.DomUtil.before = function (target, el) { - target.parentNode.insertBefore(el, target); - return el; -}; - -L.DomUtil.after = function (target, el) -{ - target.parentNode.insertBefore(el, target.nextSibling); - return el; -}; - -L.DomUtil.RGBRegex = /rgb *\( *([0-9]{1,3}) *, *([0-9]{1,3}) *, *([0-9]{1,3}) *\)/; - -L.DomUtil.TextColorFromBackgroundColor = function (el) { - var out = '#000000'; - if (!window.getComputedStyle) {return out;} - var rgb = window.getComputedStyle(el).getPropertyValue('background-color'); - rgb = L.DomUtil.RGBRegex.exec(rgb); - if (!rgb || rgb.length !== 4) {return out;} - rgb = parseInt(rgb[1], 10) + parseInt(rgb[2], 10) + parseInt(rgb[3], 10); - if (rgb < (255 * 3 / 2)) { - out = '#ffffff'; - } - return out; -}; -L.DomEvent.once = function (el, types, fn, context) { - // cf https://github.com/Leaflet/Leaflet/pull/3528#issuecomment-134551575 - - if (typeof types === 'object') { - for (var type in types) { - L.DomEvent.once(el, type, types[type], fn); - } - return L.DomEvent; - } - - var handler = L.bind(function () { - L.DomEvent - .off(el, types, fn, context) - .off(el, types, handler, context); - }, L.DomEvent); - - // add a listener that's executed once and removed after that return L.DomEvent - .on(el, types, fn, context) - .on(el, types, handler, context); -}; + } + const handler = L.bind(() => { + L.DomEvent.off(el, types, fn, context).off(el, types, handler, context) + }, L.DomEvent) + + // add a listener that's executed once and removed after that + return L.DomEvent.on(el, types, fn, context).on(el, types, handler, context) +} /* -* Global events -*/ + * Global events + */ L.U.Keys = { - LEFT: 37, - UP: 38, - RIGHT: 39, - DOWN: 40, - TAB: 9, - ENTER: 13, - ESC: 27, - APPLE: 91, - SHIFT: 16, - ALT: 17, - CTRL: 18, - E: 69, - F: 70, - H: 72, - I: 73, - L: 76, - M: 77, - P: 80, - S: 83, - Z: 90 -}; - + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40, + TAB: 9, + ENTER: 13, + ESC: 27, + APPLE: 91, + SHIFT: 16, + ALT: 17, + CTRL: 18, + E: 69, + F: 70, + H: 72, + I: 73, + L: 76, + M: 77, + P: 80, + S: 83, + Z: 90, +} L.U.Help = L.Class.extend({ + initialize: function (map) { + this.map = map + this.box = L.DomUtil.create( + 'div', + 'umap-help-box with-transition dark', + document.body + ) + const closeLink = L.DomUtil.create('a', 'umap-close-link', this.box) + closeLink.href = '#' + L.DomUtil.add('i', 'umap-close-icon', closeLink) + const label = L.DomUtil.create('span', '', closeLink) + label.title = label.textContent = L._('Close') + this.content = L.DomUtil.create('div', 'umap-help-content', this.box) + L.DomEvent.on(closeLink, 'click', this.hide, this) + }, - initialize: function (map) { - this.map = map; - this.box = L.DomUtil.create('div', 'umap-help-box with-transition dark', document.body); - var closeLink = L.DomUtil.create('a', 'umap-close-link', this.box); - closeLink.href = '#'; - L.DomUtil.add('i', 'umap-close-icon', closeLink); - var label = L.DomUtil.create('span', '', closeLink); - label.title = label.textContent = L._('Close'); - this.content = L.DomUtil.create('div', 'umap-help-content', this.box); - L.DomEvent.on(closeLink, 'click', this.hide, this); - }, + onKeyDown: function (e) { + const key = e.keyCode, + ESC = 27 + if (key === ESC) { + this.hide() + } + }, - onKeyDown: function (e) { - var key = e.keyCode, - ESC = 27; - if (key === ESC) { - this.hide(); - } - }, + show: function () { + this.content.innerHTML = '' + for (let i = 0, name; i < arguments.length; i++) { + name = arguments[i] + L.DomUtil.add('div', 'umap-help-entry', this.content, this.resolve(name)) + } + L.DomUtil.addClass(document.body, 'umap-help-on') + }, - show: function () { - this.content.innerHTML = ''; - for (var i = 0, name; i < arguments.length; i++) { - name = arguments[i]; - L.DomUtil.add('div', 'umap-help-entry', this.content, this.resolve(name)); - } - L.DomUtil.addClass(document.body, 'umap-help-on'); - }, + hide: function () { + L.DomUtil.removeClass(document.body, 'umap-help-on') + }, - hide: function () { - L.DomUtil.removeClass(document.body, 'umap-help-on'); - }, + visible: function () { + return L.DomUtil.hasClass(document.body, 'umap-help-on') + }, - visible: function () { - return L.DomUtil.hasClass(document.body, 'umap-help-on') - }, + resolve: function (name) { + return typeof this[name] === 'function' ? this[name]() : this[name] + }, - resolve: function (name) { - return typeof this[name] === 'function' ? this[name]() : this[name]; - }, + button: function (container, entries) { + const helpButton = L.DomUtil.create('a', 'umap-help-button', container) + helpButton.href = '#' + if (entries) { + L.DomEvent.on(helpButton, 'click', L.DomEvent.stop).on( + helpButton, + 'click', + function (e) { + const args = typeof entries === 'string' ? [entries] : entries + this.show.apply(this, args) + }, + this + ) + } + return helpButton + }, - button: function (container, entries) { - var helpButton = L.DomUtil.create('a', 'umap-help-button', container); - helpButton.href = '#'; - if (entries) { - L.DomEvent - .on(helpButton, 'click', L.DomEvent.stop) - .on(helpButton, 'click', function (e) { - var args = typeof entries === 'string' ? [entries] : entries; - this.show.apply(this, args); - }, this); - } - return helpButton; - }, + edit: function () { + const container = L.DomUtil.create('div', ''), + self = this, + title = L.DomUtil.create('h3', '', container), + actionsContainer = L.DomUtil.create('ul', 'umap-edit-actions', container) + const addAction = (action) => { + const actionContainer = L.DomUtil.add('li', '', actionsContainer) + L.DomUtil.add('i', action.options.className, actionContainer), + L.DomUtil.add('span', '', actionContainer, action.options.tooltip) + L.DomEvent.on(actionContainer, 'click', action.addHooks, action) + L.DomEvent.on(actionContainer, 'click', self.hide, self) + } + title.textContent = L._('Where do we go from here?') + for (const id in this.map.helpMenuActions) { + addAction(this.map.helpMenuActions[id]) + } + return container + }, - edit: function () { - var container = L.DomUtil.create('div', ''), - self = this, - title = L.DomUtil.create('h3', '', container), - actionsContainer = L.DomUtil.create('ul', 'umap-edit-actions', container); - var addAction = function (action) { - var actionContainer = L.DomUtil.add('li', '', actionsContainer); - L.DomUtil.add('i', action.options.className, actionContainer), - L.DomUtil.add('span', '', actionContainer, action.options.tooltip); - L.DomEvent.on(actionContainer, 'click', action.addHooks, action); - L.DomEvent.on(actionContainer, 'click', self.hide, self); - }; - title.textContent = L._('Where do we go from here?'); - for (var id in this.map.helpMenuActions) { - addAction(this.map.helpMenuActions[id]); - } - return container; - }, + importFormats: function () { + const container = L.DomUtil.create('div') + L.DomUtil.add('h3', '', container, 'GeojSON') + L.DomUtil.add('p', '', container, L._('All properties are imported.')) + L.DomUtil.add('h3', '', container, 'GPX') + L.DomUtil.add('p', '', container, `${L._('Properties imported:')}name, desc`) + L.DomUtil.add('h3', '', container, 'KML') + L.DomUtil.add('p', '', container, `${L._('Properties imported:')}name, description`) + L.DomUtil.add('h3', '', container, 'CSV') + L.DomUtil.add( + 'p', + '', + container, + L._( + 'Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.' + ) + ) + L.DomUtil.add('h3', '', container, 'uMap') + L.DomUtil.add( + 'p', + '', + container, + L._('Imports all umap data, including layers and settings.') + ) + return container + }, - importFormats: function () { - var container = L.DomUtil.create('div'); - L.DomUtil.add('h3', '', container, 'GeojSON'); - L.DomUtil.add('p', '', container, L._('All properties are imported.')); - L.DomUtil.add('h3', '', container, 'GPX'); - L.DomUtil.add('p', '', container, L._('Properties imported:') + 'name, desc'); - L.DomUtil.add('h3', '', container, 'KML'); - L.DomUtil.add('p', '', container, L._('Properties imported:') + 'name, description'); - L.DomUtil.add('h3', '', container, 'CSV'); - L.DomUtil.add('p', '', container, L._('Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.')); - L.DomUtil.add('h3', '', container, 'uMap'); - L.DomUtil.add('p', '', container, L._('Imports all umap data, including layers and settings.')); - return container; - }, + textFormatting: function () { + const container = L.DomUtil.create('div'), + title = L.DomUtil.add('h3', '', container, L._('Text formatting')), + elements = L.DomUtil.create('ul', '', container) + L.DomUtil.add('li', '', elements, L._('*simple star for italic*')) + L.DomUtil.add('li', '', elements, L._('**double star for bold**')) + L.DomUtil.add('li', '', elements, L._('# one hash for main heading')) + L.DomUtil.add('li', '', elements, L._('## two hashes for second heading')) + L.DomUtil.add('li', '', elements, L._('### three hashes for third heading')) + L.DomUtil.add('li', '', elements, L._('Simple link: [[http://example.com]]')) + L.DomUtil.add( + 'li', + '', + elements, + L._('Link with text: [[http://example.com|text of the link]]') + ) + L.DomUtil.add('li', '', elements, L._('Image: {{http://image.url.com}}')) + L.DomUtil.add( + 'li', + '', + elements, + L._('Image with custom width (in px): {{http://image.url.com|width}}') + ) + L.DomUtil.add('li', '', elements, L._('Iframe: {{{http://iframe.url.com}}}')) + L.DomUtil.add( + 'li', + '', + elements, + L._('Iframe with custom height (in px): {{{http://iframe.url.com|height}}}') + ) + L.DomUtil.add( + 'li', + '', + elements, + L._( + 'Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}' + ) + ) + L.DomUtil.add('li', '', elements, L._('--- for an horizontal rule')) + return container + }, - textFormatting: function () { - var container = L.DomUtil.create('div'), - title = L.DomUtil.add('h3', '', container, L._('Text formatting')), - elements = L.DomUtil.create('ul', '', container); - L.DomUtil.add('li', '', elements, L._('*simple star for italic*')); - L.DomUtil.add('li', '', elements, L._('**double star for bold**')); - L.DomUtil.add('li', '', elements, L._('# one hash for main heading')); - L.DomUtil.add('li', '', elements, L._('## two hashes for second heading')); - L.DomUtil.add('li', '', elements, L._('### three hashes for third heading')); - L.DomUtil.add('li', '', elements, L._('Simple link: [[http://example.com]]')); - L.DomUtil.add('li', '', elements, L._('Link with text: [[http://example.com|text of the link]]')); - L.DomUtil.add('li', '', elements, L._('Image: {{http://image.url.com}}')); - L.DomUtil.add('li', '', elements, L._('Image with custom width (in px): {{http://image.url.com|width}}')); - L.DomUtil.add('li', '', elements, L._('Iframe: {{{http://iframe.url.com}}}')); - L.DomUtil.add('li', '', elements, L._('Iframe with custom height (in px): {{{http://iframe.url.com|height}}}')); - L.DomUtil.add('li', '', elements, L._('Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}')); - L.DomUtil.add('li', '', elements, L._('--- for an horizontal rule')); - return container; - }, - - dynamicProperties: function () { - var container = L.DomUtil.create('div'); - L.DomUtil.add('h3', '', container, L._('Dynamic properties')); - L.DomUtil.add('p', '', container, L._('Use placeholders with feature properties between brackets, eg. {name}, they will be dynamically replaced by the corresponding values.')); - return container; - }, - - formatURL: L._('Supported variables that will be dynamically replaced') + ': {bbox}, {lat}, {lng}, {zoom}, {east}, {north}..., {left}, {top}...', - formatIconSymbol: L._('Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with "http://myserver.org/images/{name}.png", the {name} variable will be replaced by the "name" value of each marker.'), - colorValue: L._('Must be a valid CSS value (eg.: DarkBlue or #123456)'), - smoothFactor: L._('How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)'), - dashArray: L._('A comma separated list of numbers that defines the stroke dash pattern. Ex.: "5, 10, 15".'), - zoomTo: L._('Zoom level for automatic zooms'), - labelKey: L._('The name of the property to use as feature label (ex.: "nom")'), - stroke: L._('Whether to display or not polygons paths.'), - fill: L._('Whether to fill polygons with color.'), - fillColor: L._('Optional. Same as color if not set.'), - shortCredit: L._('Will be displayed in the bottom right corner of the map'), - longCredit: L._('Will be visible in the caption of the map'), - sortKey: L._('Property to use for sorting features'), - slugKey: L._('The name of the property to use as feature unique identifier.'), - filterKey: L._('Comma separated list of properties to use when filtering features'), - interactive: L._('If false, the polygon will act as a part of the underlying map.'), - outlink: L._('Define link to open in a new window on polygon click.'), - dynamicRemoteData: L._('Fetch data each time map view changes.'), - proxyRemoteData: L._('To use if remote server doesn\'t allow cross domain (slower)'), - browsable: L._('Set it to false to hide this layer from the slideshow, the data browser, the popup navigation…') -}); + dynamicProperties: function () { + const container = L.DomUtil.create('div') + L.DomUtil.add('h3', '', container, L._('Dynamic properties')) + L.DomUtil.add( + 'p', + '', + container, + L._( + 'Use placeholders with feature properties between brackets, eg. {name}, they will be dynamically replaced by the corresponding values.' + ) + ) + return container + }, + formatURL: `${L._( + 'Supported variables that will be dynamically replaced' + )}: {bbox}, {lat}, {lng}, {zoom}, {east}, {north}..., {left}, {top}...`, + formatIconSymbol: L._( + 'Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with "http://myserver.org/images/{name}.png", the {name} variable will be replaced by the "name" value of each marker.' + ), + colorValue: L._('Must be a valid CSS value (eg.: DarkBlue or #123456)'), + smoothFactor: L._( + 'How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)' + ), + dashArray: L._( + 'A comma separated list of numbers that defines the stroke dash pattern. Ex.: "5, 10, 15".' + ), + zoomTo: L._('Zoom level for automatic zooms'), + labelKey: L._('The name of the property to use as feature label (ex.: "nom")'), + stroke: L._('Whether to display or not polygons paths.'), + fill: L._('Whether to fill polygons with color.'), + fillColor: L._('Optional. Same as color if not set.'), + shortCredit: L._('Will be displayed in the bottom right corner of the map'), + longCredit: L._('Will be visible in the caption of the map'), + permanentCredit: L._( + 'Will be permanently visible in the bottom left corner of the map' + ), + sortKey: L._('Property to use for sorting features'), + slugKey: L._('The name of the property to use as feature unique identifier.'), + filterKey: L._('Comma separated list of properties to use when filtering features'), + advancedFilterKey: L._( + 'Comma separated list of properties to use for checkbox filtering' + ), + advancedFiltersNoResults: L._('No results for these filters'), + interactive: L._('If false, the polygon will act as a part of the underlying map.'), + outlink: L._('Define link to open in a new window on polygon click.'), + dynamicRemoteData: L._('Fetch data each time map view changes.'), + proxyRemoteData: L._("To use if remote server doesn't allow cross domain (slower)"), + browsable: L._( + 'Set it to false to hide this layer from the slideshow, the data browser, the popup navigation…' + ), +}) L.U.Orderable = L.Evented.extend({ + options: { + selector: 'li', + color: '#374E75', + }, - options: { - selector: 'li', - color: '#374E75' - }, + initialize: function (parent, options) { + L.Util.setOptions(this, options) + this.parent = parent + this.src = null + this.dst = null + this.els = this.parent.querySelectorAll(this.options.selector) + for (let i = 0; i < this.els.length; i++) this.makeDraggable(this.els[i]) + }, - initialize: function (parent, options) { - L.Util.setOptions(this, options); - this.parent = parent; - this.src = null; - this.dst = null; - this.els = this.parent.querySelectorAll(this.options.selector); - for (var i = 0; i < this.els.length; i++) this.makeDraggable(this.els[i]); - }, + makeDraggable: function (node) { + node.draggable = true + L.DomEvent.on(node, 'dragstart', this.onDragStart, this) + L.DomEvent.on(node, 'dragenter', this.onDragEnter, this) + L.DomEvent.on(node, 'dragover', this.onDragOver, this) + L.DomEvent.on(node, 'dragleave', this.onDragLeave, this) + L.DomEvent.on(node, 'drop', this.onDrop, this) + L.DomEvent.on(node, 'dragend', this.onDragEnd, this) + }, - makeDraggable: function (node) { - node.draggable = true; - L.DomEvent.on(node, 'dragstart', this.onDragStart, this); - L.DomEvent.on(node, 'dragenter', this.onDragEnter, this); - L.DomEvent.on(node, 'dragover', this.onDragOver, this); - L.DomEvent.on(node, 'dragleave', this.onDragLeave, this); - L.DomEvent.on(node, 'drop', this.onDrop, this); - L.DomEvent.on(node, 'dragend', this.onDragEnd, this); - }, + nodeIndex: function (node) { + return Array.prototype.indexOf.call(this.parent.children, node) + }, - nodeIndex: function (node) { - return Array.prototype.indexOf.call(this.parent.children, node); - }, - - findTarget: function (node) { - while (node) { - if (this.nodeIndex(node) !== -1) return node; - node = node.parentNode; - } - }, - - onDragStart: function (e) { - // e.target is the source node. - this.src = e.target; - this.initialIndex = this.nodeIndex(this.src); - this.srcBackgroundColor = this.src.style.backgroundColor; - this.src.style.backgroundColor = this.options.color; - e.dataTransfer.effectAllowed = 'move'; - e.dataTransfer.setData('text/html', this.src.innerHTML); - }, - - onDragOver: function (e) { - if (e.preventDefault) e.preventDefault(); // Necessary. Allows us to drop. - e.dataTransfer.dropEffect = 'move'; - return false; - }, - - onDragEnter: function (e) { - // e.target is the current hover target. - var dst = this.findTarget(e.target); - if (!dst || dst === this.src) return; - this.dst = dst; - var targetIndex = this.nodeIndex(this.dst), - srcIndex = this.nodeIndex(this.src); - if (targetIndex > srcIndex) this.parent.insertBefore(this.dst, this.src); - else this.parent.insertBefore(this.src, this.dst); - }, - - onDragLeave: function (e) { - // e.target is previous target element. - }, - - onDrop: function (e) { - // e.target is current target element. - if (e.stopPropagation) e.stopPropagation(); // Stops the browser from redirecting. - if (!this.dst) return; - this.fire('drop', { - src: this.src, - initialIndex: this.initialIndex, - finalIndex: this.nodeIndex(this.src), - dst: this.dst - }); - return false; - }, - - onDragEnd: function (e) { - // e.target is the source node. - this.src.style.backgroundColor = this.srcBackgroundColor; + findTarget: function (node) { + while (node) { + if (this.nodeIndex(node) !== -1) return node + node = node.parentNode } + }, -}); + onDragStart: function (e) { + // e.target is the source node. + this.src = e.target + this.initialIndex = this.nodeIndex(this.src) + this.srcBackgroundColor = this.src.style.backgroundColor + this.src.style.backgroundColor = this.options.color + e.dataTransfer.effectAllowed = 'move' + e.dataTransfer.setData('text/html', this.src.innerHTML) + }, + + onDragOver: function (e) { + if (e.preventDefault) e.preventDefault() // Necessary. Allows us to drop. + e.dataTransfer.dropEffect = 'move' + return false + }, + + onDragEnter: function (e) { + // e.target is the current hover target. + const dst = this.findTarget(e.target) + if (!dst || dst === this.src) return + this.dst = dst + const targetIndex = this.nodeIndex(this.dst), + srcIndex = this.nodeIndex(this.src) + if (targetIndex > srcIndex) this.parent.insertBefore(this.dst, this.src) + else this.parent.insertBefore(this.src, this.dst) + }, + + onDragLeave: function (e) { + // e.target is previous target element. + }, + + onDrop: function (e) { + // e.target is current target element. + if (e.stopPropagation) e.stopPropagation() // Stops the browser from redirecting. + if (!this.dst) return + this.fire('drop', { + src: this.src, + initialIndex: this.initialIndex, + finalIndex: this.nodeIndex(this.src), + dst: this.dst, + }) + return false + }, + + onDragEnd: function (e) { + // e.target is the source node. + this.src.style.backgroundColor = this.srcBackgroundColor + }, +}) L.LatLng.prototype.isValid = function () { - return !isNaN(this.lat) && !isNaN(this.lng); + return !isNaN(this.lat) && !isNaN(this.lng) } diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index f4f51ae2..753c4b8f 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -1,1063 +1,1121 @@ L.U.FeatureMixin = { + staticOptions: {}, - staticOptions: {}, + initialize: function (map, latlng, options) { + this.map = map + if (typeof options === 'undefined') { + options = {} + } + // DataLayer the marker belongs to + this.datalayer = options.datalayer || null + this.properties = { _umap_options: {} } + if (options.geojson) { + this.populate(options.geojson) + } + let isDirty = false + const self = this + try { + Object.defineProperty(this, 'isDirty', { + get: function () { + return isDirty + }, + set: function (status) { + if (!isDirty && status) { + self.fire('isdirty') + } + isDirty = status + if (self.datalayer) { + self.datalayer.isDirty = status + } + }, + }) + } catch (e) { + // Certainly IE8, which has a limited version of defineProperty + } + this.preInit() + this.addInteractions() + this.parentClass.prototype.initialize.call(this, latlng, options) + }, - initialize: function (map, latlng, options) { - this.map = map; - if(typeof options === 'undefined') { - options = {}; - } - // DataLayer the marker belongs to - this.datalayer = options.datalayer || null; - this.properties = {_umap_options: {}}; - if (options.geojson) { - this.populate(options.geojson); - } - var isDirty = false, - self = this; - try { - Object.defineProperty(this, 'isDirty', { - get: function () { - return isDirty; - }, - set: function (status) { - if (!isDirty && status) { - self.fire('isdirty'); - } - isDirty = status; - if (self.datalayer) { - self.datalayer.isDirty = status; - } - } - }); - } - catch (e) { - // Certainly IE8, which has a limited version of defineProperty - } - this.preInit(); - this.addInteractions(); - this.parentClass.prototype.initialize.call(this, latlng, options); - }, + preInit: function () {}, - preInit: function () {}, + isReadOnly: function () { + return this.datalayer && this.datalayer.isRemoteLayer() + }, - isReadOnly: function () { - return this.datalayer && this.datalayer.isRemoteLayer(); - }, + getSlug: function () { + return this.properties[this.map.options.slugKey || 'name'] || '' + }, - getSlug: function () { - return this.properties[this.map.options.slugKey || 'name'] || ''; - }, + getPermalink: function () { + const slug = this.getSlug() + if (slug) + return `${L.Util.getBaseUrl()}?${L.Util.buildQueryString({ feature: slug })}${ + window.location.hash + }` + }, - getPermalink: function () { - const slug = this.getSlug(); - if (slug) return L.Util.getBaseUrl() + "?" + L.Util.buildQueryString({feature: slug}) + window.location.hash; - }, + view: function (e) { + if (this.map.editEnabled) return + const outlink = this.properties._umap_options.outlink, + target = this.properties._umap_options.outlinkTarget + if (outlink) { + switch (target) { + case 'self': + window.location = outlink + break + case 'parent': + window.top.location = outlink + break + default: + const win = window.open(this.properties._umap_options.outlink) + } + return + } + // TODO deal with an event instead? + if (this.map.slideshow) this.map.slideshow.current = this + this.map.currentFeature = this + this.attachPopup() + this.openPopup((e && e.latlng) || this.getCenter()) + }, - view: function(e) { - if (this.map.editEnabled) return; - var outlink = this.properties._umap_options.outlink, - target = this.properties._umap_options.outlinkTarget - if (outlink) { - switch (target) { - case 'self': - window.location = outlink; - break; - case 'parent': - window.top.location = outlink; - break; - default: - var win = window.open(this.properties._umap_options.outlink); - } - return; - } - // TODO deal with an event instead? - if (this.map.slideshow) this.map.slideshow.current = this; - this.map.currentFeature = this; - this.attachPopup(); - this.openPopup(e && e.latlng || this.getCenter()); - }, + openPopup: function () { + if (this.map.editEnabled) return + this.parentClass.prototype.openPopup.apply(this, arguments) + }, - openPopup: function () { - if (this.map.editEnabled) return; - this.parentClass.prototype.openPopup.apply(this, arguments); - }, + edit: function (e) { + if (!this.map.editEnabled || this.isReadOnly()) return + const container = L.DomUtil.create('div', 'umap-datalayer-container') - edit: function(e) { - if(!this.map.editEnabled || this.isReadOnly()) return; - var container = L.DomUtil.create('div', 'umap-datalayer-container'); + let builder = new L.U.FormBuilder(this, ['datalayer'], { + callback: function () { + this.edit(e) + }, // removeLayer step will close the edit panel, let's reopen it + }) + container.appendChild(builder.build()) - var builder = new L.U.FormBuilder(this, ['datalayer'], { - callback: function () {this.edit(e);} // removeLayer step will close the edit panel, let's reopen it - }); - container.appendChild(builder.build()); + const properties = [] + let property + for (let i = 0; i < this.datalayer._propertiesIndex.length; i++) { + property = this.datalayer._propertiesIndex[i] + if (L.Util.indexOf(['name', 'description'], property) !== -1) { + continue + } + properties.push([`properties.${property}`, { label: property }]) + } + // We always want name and description for now (properties management to come) + properties.unshift('properties.description') + properties.unshift('properties.name') + builder = new L.U.FormBuilder(this, properties, { + id: 'umap-feature-properties', + callback: this.resetTooltip, + }) + container.appendChild(builder.build()) + this.appendEditFieldsets(container) + const advancedActions = L.DomUtil.createFieldset(container, L._('Advanced actions')) + this.getAdvancedEditActions(advancedActions) + this.map.ui.openPanel({ data: { html: container }, className: 'dark' }) + this.map.editedFeature = this + if (!this.isOnScreen()) this.zoomTo(e) + }, - var properties = [], property; - for (var i = 0; i < this.datalayer._propertiesIndex.length; i++) { - property = this.datalayer._propertiesIndex[i]; - if (L.Util.indexOf(['name', 'description'], property) !== -1) {continue;} - properties.push(['properties.' + property, {label: property}]); - } - // We always want name and description for now (properties management to come) - properties.unshift('properties.description'); - properties.unshift('properties.name'); - builder = new L.U.FormBuilder(this, properties, - { - id: 'umap-feature-properties', - callback: this.resetTooltip - } - ); - container.appendChild(builder.build()); - this.appendEditFieldsets(container); - var advancedActions = L.DomUtil.createFieldset(container, L._('Advanced actions')); - this.getAdvancedEditActions(advancedActions); - this.map.ui.openPanel({data: {html: container}, className: 'dark'}); - this.map.editedFeature = this; - if (!this.isOnScreen()) this.bringToCenter(e); - }, + getAdvancedEditActions: function (container) { + const deleteLink = L.DomUtil.create('a', 'button umap-delete', container) + deleteLink.href = '#' + deleteLink.textContent = L._('Delete') + L.DomEvent.on( + deleteLink, + 'click', + function (e) { + L.DomEvent.stop(e) + if (this.confirmDelete()) this.map.ui.closePanel() + }, + this + ) + }, - getAdvancedEditActions: function (container) { - var deleteLink = L.DomUtil.create('a', 'button umap-delete', container); - deleteLink.href = '#'; - deleteLink.textContent = L._('Delete'); - L.DomEvent.on(deleteLink, 'click', function (e) { - L.DomEvent.stop(e); - if (this.confirmDelete()) this.map.ui.closePanel(); - }, this); - }, + appendEditFieldsets: function (container) { + const optionsFields = this.getShapeOptions() + let builder = new L.U.FormBuilder(this, optionsFields, { + id: 'umap-feature-shape-properties', + callback: this._redraw, + }) + const shapeProperties = L.DomUtil.createFieldset(container, L._('Shape properties')) + shapeProperties.appendChild(builder.build()) - appendEditFieldsets: function (container) { - var optionsFields = this.getShapeOptions(); - var builder = new L.U.FormBuilder(this, optionsFields, { - id: 'umap-feature-shape-properties', - callback: this._redraw - }); - var shapeProperties = L.DomUtil.createFieldset(container, L._('Shape properties')); - shapeProperties.appendChild(builder.build()); + const advancedOptions = this.getAdvancedOptions() + builder = new L.U.FormBuilder(this, advancedOptions, { + id: 'umap-feature-advanced-properties', + callback: this._redraw, + }) + const advancedProperties = L.DomUtil.createFieldset( + container, + L._('Advanced properties') + ) + advancedProperties.appendChild(builder.build()) - var advancedOptions = this.getAdvancedOptions(); - var builder = new L.U.FormBuilder(this, advancedOptions, { - id: 'umap-feature-advanced-properties', - callback: this._redraw - }); - var advancedProperties = L.DomUtil.createFieldset(container, L._('Advanced properties')); - advancedProperties.appendChild(builder.build()); + const interactionOptions = this.getInteractionOptions() + builder = new L.U.FormBuilder(this, interactionOptions, { + callback: this._redraw, + }) + const popupFieldset = L.DomUtil.createFieldset( + container, + L._('Interaction options') + ) + popupFieldset.appendChild(builder.build()) + }, - var interactionOptions = this.getInteractionOptions(); - builder = new L.U.FormBuilder(this, interactionOptions, { - callback: this._redraw - }); - var popupFieldset = L.DomUtil.createFieldset(container, L._('Interaction options')); - popupFieldset.appendChild(builder.build()); + getInteractionOptions: function () { + return [ + 'properties._umap_options.popupShape', + 'properties._umap_options.popupTemplate', + 'properties._umap_options.showLabel', + 'properties._umap_options.labelDirection', + 'properties._umap_options.labelInteractive', + ] + }, - }, + endEdit: function () {}, - getInteractionOptions: function () { - return [ - 'properties._umap_options.popupShape', - 'properties._umap_options.popupTemplate', - 'properties._umap_options.showLabel', - 'properties._umap_options.labelDirection', - 'properties._umap_options.labelInteractive' - ]; - }, + getDisplayName: function (fallback) { + if (fallback === undefined) fallback = this.datalayer.options.name + const key = this.getOption('labelKey') || 'name' + // Variables mode. + if (key.indexOf('{') != -1) + return L.Util.greedyTemplate(key, this.extendedProperties()) + // Simple mode. + return this.properties[key] || this.properties.title || fallback + }, - endEdit: function () {}, + hasPopupFooter: function () { + if (L.Browser.ielt9) return false + if (this.datalayer.isRemoteLayer() && this.datalayer.options.remoteData.dynamic) + return false + return this.map.options.displayPopupFooter + }, - getDisplayName: function (fallback) { - if (fallback === undefined) fallback = this.datalayer.options.name; - var key = this.getOption('labelKey') || 'name'; - // Variables mode. - if (key.indexOf("{") != -1) return L.Util.greedyTemplate(key, this.extendedProperties()); - // Simple mode. - return this.properties[key] || this.properties.title || fallback; - }, + getPopupClass: function () { + const old = this.getOption('popupTemplate') // Retrocompat. + return L.U.Popup[this.getOption('popupShape') || old] || L.U.Popup + }, - hasPopupFooter: function () { - if (L.Browser.ielt9) return false; - if (this.datalayer.isRemoteLayer() && this.datalayer.options.remoteData.dynamic) return false; - return this.map.options.displayPopupFooter; - }, + attachPopup: function () { + const Class = this.getPopupClass() + this.bindPopup(new Class(this)) + }, - getPopupClass: function () { - var old = this.getOption('popupTemplate'); // Retrocompat. - return L.U.Popup[this.getOption('popupShape') || old] || L.U.Popup; - }, + confirmDelete: function () { + if (confirm(L._('Are you sure you want to delete the feature?'))) { + this.del() + return true + } + return false + }, - attachPopup: function () { - var Class = this.getPopupClass(); - this.bindPopup(new Class(this)); - }, + del: function () { + this.isDirty = true + this.map.closePopup() + if (this.datalayer) { + this.datalayer.removeLayer(this) + this.disconnectFromDataLayer(this.datalayer) + } + }, - confirmDelete: function () { - if (confirm(L._('Are you sure you want to delete the feature?'))) { - this.del(); - return true; - } - return false; - }, + connectToDataLayer: function (datalayer) { + this.datalayer = datalayer + this.options.renderer = this.datalayer.renderer + }, - del: function () { - this.isDirty = true; - this.map.closePopup(); - if (this.datalayer) { - this.datalayer.removeLayer(this); - this.disconnectFromDataLayer(this.datalayer); - } - }, + disconnectFromDataLayer: function (datalayer) { + if (this.datalayer === datalayer) { + this.datalayer = null + } + }, - connectToDataLayer: function (datalayer) { - this.datalayer = datalayer; - this.options.renderer = this.datalayer.renderer; - }, + populate: function (feature) { + this.properties = L.extend({}, feature.properties) + this.properties._umap_options = L.extend( + {}, + this.properties._storage_options, + this.properties._umap_options + ) + // Retrocompat + if (this.properties._umap_options.clickable === false) { + this.properties._umap_options.interactive = false + delete this.properties._umap_options.clickable + } + }, - disconnectFromDataLayer: function (datalayer) { - if (this.datalayer === datalayer) { - this.datalayer = null; - } - }, + changeDataLayer: function (datalayer) { + if (this.datalayer) { + this.datalayer.isDirty = true + this.datalayer.removeLayer(this) + } + datalayer.addLayer(this) + datalayer.isDirty = true + this._redraw() + }, - populate: function (feature) { - this.properties = L.extend({}, feature.properties); - this.properties._umap_options = L.extend({}, this.properties._storage_options, this.properties._umap_options); - // Retrocompat - if (this.properties._umap_options.clickable === false) { - this.properties._umap_options.interactive = false; - delete this.properties._umap_options.clickable; - } - }, + getOption: function (option, fallback) { + let value = fallback + if (typeof this.staticOptions[option] !== 'undefined') { + value = this.staticOptions[option] + } else if (L.Util.usableOption(this.properties._umap_options, option)) { + value = this.properties._umap_options[option] + } else if (this.datalayer) { + value = this.datalayer.getOption(option) + } else { + value = this.map.getOption(option) + } + return value + }, - changeDataLayer: function(datalayer) { - if(this.datalayer) { - this.datalayer.isDirty = true; - this.datalayer.removeLayer(this); - } - datalayer.addLayer(this); - datalayer.isDirty = true; - this._redraw(); - }, + zoomTo: function (e) { + e = e || {} + const easing = e.easing !== undefined ? e.easing : this.map.options.easing + if (easing) { + this.map.flyTo(this.getCenter(), this.getBestZoom()) + } else { + const latlng = e.latlng || this.getCenter() + this.map.setView(latlng, this.getBestZoom() || this.map.getZoom()) + } + if (e.callback) e.callback.call(this) + }, - getOption: function (option, fallback) { - var value = fallback; - if (typeof this.staticOptions[option] !== 'undefined') { - value = this.staticOptions[option]; - } - else if (L.Util.usableOption(this.properties._umap_options, option)) { - value = this.properties._umap_options[option]; - } - else if (this.datalayer) { - value = this.datalayer.getOption(option); - } - else { - value = this.map.getOption(option); - } - return value; - }, + getBestZoom: function () { + return this.getOption('zoomTo') + }, - bringToCenter: function (e) { - e = e || {}; - var latlng = e.latlng || this.getCenter(); - this.map.setView(latlng, e.zoomTo || this.map.getZoom()); - if (e.callback) e.callback.call(this); - }, + getNext: function () { + return this.datalayer.getNextFeature(this) + }, - zoomTo: function (e) { - e = e || {}; - var easing = e.easing !== undefined ? e.easing : this.map.options.easing; - if (easing) this.flyTo(); - else this.bringToCenter({zoomTo: this.getBestZoom(), callback: e.callback}); - }, + getPrevious: function () { + return this.datalayer.getPreviousFeature(this) + }, - getBestZoom: function () { - return this.getOption('zoomTo'); - }, + cloneProperties: function () { + const properties = L.extend({}, this.properties) + properties._umap_options = L.extend({}, properties._umap_options) + if (Object.keys && Object.keys(properties._umap_options).length === 0) { + delete properties._umap_options // It can make a difference on big data sets + } + return properties + }, - flyTo: function () { - this.map.flyTo(this.getCenter(), this.getBestZoom()); - }, + deleteProperty: function (property) { + delete this.properties[property] + this.makeDirty() + }, - getNext: function () { - return this.datalayer.getNextFeature(this); - }, + renameProperty: function (from, to) { + this.properties[to] = this.properties[from] + this.deleteProperty(from) + }, - getPrevious: function () { - return this.datalayer.getPreviousFeature(this); - }, + toGeoJSON: function () { + const geojson = this.parentClass.prototype.toGeoJSON.call(this) + geojson.properties = this.cloneProperties() + delete geojson.properties._storage_options + return geojson + }, - cloneProperties: function () { - var properties = L.extend({}, this.properties); - properties._umap_options = L.extend({}, properties._umap_options); - if (Object.keys && Object.keys(properties._umap_options).length === 0) { - delete properties._umap_options; // It can make a difference on big data sets - } - return properties; - }, + addInteractions: function () { + this.on('contextmenu editable:vertex:contextmenu', this._showContextMenu, this) + this.on('click', this._onClick) + }, - deleteProperty: function (property) { - delete this.properties[property]; - this.makeDirty(); - }, - - renameProperty: function (from, to) { - this.properties[to] = this.properties[from]; - this.deleteProperty(from); - }, - - toGeoJSON: function () { - var geojson = this.parentClass.prototype.toGeoJSON.call(this); - geojson.properties = this.cloneProperties(); - return geojson; - }, - - addInteractions: function () { - this.on('contextmenu editable:vertex:contextmenu', this._showContextMenu, this); - this.on('click', this._onClick); - }, - - _onClick: function (e) { - if (this.map.measureTools && this.map.measureTools.enabled()) return; - this._popupHandlersAdded = true; // Prevent leaflet from managing event - if(!this.map.editEnabled) { - this.view(e); - } else if (!this.isReadOnly()) { - if(e.originalEvent.shiftKey) { - if(this._toggleEditing) - this._toggleEditing(e); - else - this.edit(e); - } - else { - new L.Toolbar.Popup(e.latlng, { - className: 'leaflet-inplace-toolbar', - anchor: this.getPopupToolbarAnchor(), - actions: this.getInplaceToolbarActions(e) - }).addTo(this.map, this, e.latlng); - } - } - L.DomEvent.stop(e); - }, - - getPopupToolbarAnchor: function () { - return [0, 0]; - }, - - getInplaceToolbarActions: function (e) { - return [L.U.ToggleEditAction, L.U.DeleteFeatureAction]; - }, - - _showContextMenu: function (e) { - L.DomEvent.stop(e); - var pt = this.map.mouseEventToContainerPoint(e.originalEvent); - e.relatedTarget = this; - this.map.contextmenu.showAt(pt, e); - }, - - makeDirty: function () { - this.isDirty = true; - }, - - getMap: function () { - return this.map; - }, - - getContextMenuItems: function (e) { - var permalink = this.getPermalink(), - items = []; - if (permalink) items.push({text: L._('Permalink'), callback: function() {window.open(permalink);}}); - if (this.map.editEnabled && !this.isReadOnly()) { - items = items.concat(this.getContextMenuEditItems(e)); - } - return items; - }, - - getContextMenuEditItems: function () { - var items = ['-']; - if (this.map.editedFeature !== this) { - items.push( - { - text: L._('Edit this feature'), - callback: this.edit, - context: this, - iconCls: 'umap-edit' - } - ); - } - items = items.concat( - { - text: L._('Edit feature\'s layer'), - callback: this.datalayer.edit, - context: this.datalayer, - iconCls: 'umap-edit' - }, - { - text: L._('Delete this feature'), - callback: this.confirmDelete, - context: this, - iconCls: 'umap-delete' - }, - { - text: L._('Clone this feature'), - callback: this.clone, - context: this - } - ); - return items; - }, - - onRemove: function (map) { - this.parentClass.prototype.onRemove.call(this, map); - if (this.map.editedFeature === this) { - this.endEdit(); - this.map.ui.closePanel(); - } - }, - - resetTooltip: function () { - var displayName = this.getDisplayName(null), - showLabel = this.getOption('showLabel'), - oldLabelHover = this.getOption('labelHover'), - options = { - direction: this.getOption('labelDirection'), - interactive: this.getOption('labelInteractive') - }; - if (oldLabelHover && showLabel) showLabel = null; // Retrocompat. - options.permanent = showLabel === true; - this.unbindTooltip(); - if ((showLabel === true || showLabel === null) && displayName) this.bindTooltip(L.Util.escapeHTML(displayName), options); - }, - - matchFilter: function (filter, keys) { - filter = filter.toLowerCase(); - for (var i = 0; i < keys.length; i++) { - if ((this.properties[keys[i]] || '').toLowerCase().indexOf(filter) !== -1) return true; - } - return false; - }, - - onVertexRawClick: function (e) { + _onClick: function (e) { + if (this.map.measureTools && this.map.measureTools.enabled()) return + this._popupHandlersAdded = true // Prevent leaflet from managing event + if (!this.map.editEnabled) { + this.view(e) + } else if (!this.isReadOnly()) { + if (e.originalEvent.shiftKey) { + if (this._toggleEditing) this._toggleEditing(e) + else this.edit(e) + } else { new L.Toolbar.Popup(e.latlng, { - className: 'leaflet-inplace-toolbar', - actions: this.getVertexActions(e) - }).addTo(this.map, this, e.latlng, e.vertex); - }, + className: 'leaflet-inplace-toolbar', + anchor: this.getPopupToolbarAnchor(), + actions: this.getInplaceToolbarActions(e), + }).addTo(this.map, this, e.latlng) + } + } + L.DomEvent.stop(e) + }, - getVertexActions: function () { - return [L.U.DeleteVertexAction]; - }, + getPopupToolbarAnchor: function () { + return [0, 0] + }, - isMulti: function () { - return false; - }, + getInplaceToolbarActions: function (e) { + return [L.U.ToggleEditAction, L.U.DeleteFeatureAction] + }, - clone: function () { - var layer = this.datalayer.geojsonToFeatures(this.toGeoJSON()); - layer.isDirty = true; - layer.edit(); - return layer; - }, + _showContextMenu: function (e) { + L.DomEvent.stop(e) + const pt = this.map.mouseEventToContainerPoint(e.originalEvent) + e.relatedTarget = this + this.map.contextmenu.showAt(pt, e) + }, - extendedProperties: function () { - // Include context properties - properties = this.map.getGeoContext(); - center = this.getCenter(); - properties.lat = center.lat; - properties.lon = center.lng; - properties.lng = center.lng; - properties.rank = this.getRank() + 1; - if (typeof this.getMeasure !== 'undefined') { - properties.measure = this.getMeasure(); - } - return L.extend(properties, this.properties); - }, + makeDirty: function () { + this.isDirty = true + }, - getRank: function () { - return this.datalayer._index.indexOf(L.stamp(this)); + getMap: function () { + return this.map + }, + + getContextMenuItems: function (e) { + const permalink = this.getPermalink() + let items = [] + if (permalink) + items.push({ + text: L._('Permalink'), + callback: function () { + window.open(permalink) + }, + }) + if (this.map.editEnabled && !this.isReadOnly()) { + items = items.concat(this.getContextMenuEditItems(e)) + } + return items + }, + + getContextMenuEditItems: function () { + let items = ['-'] + if (this.map.editedFeature !== this) { + items.push({ + text: L._('Edit this feature'), + callback: this.edit, + context: this, + iconCls: 'umap-edit', + }) + } + items = items.concat( + { + text: L._("Edit feature's layer"), + callback: this.datalayer.edit, + context: this.datalayer, + iconCls: 'umap-edit', + }, + { + text: L._('Delete this feature'), + callback: this.confirmDelete, + context: this, + iconCls: 'umap-delete', + }, + { + text: L._('Clone this feature'), + callback: this.clone, + context: this, + } + ) + return items + }, + + onRemove: function (map) { + this.parentClass.prototype.onRemove.call(this, map) + if (this.map.editedFeature === this) { + this.endEdit() + this.map.ui.closePanel() + } + }, + + resetTooltip: function () { + const displayName = this.getDisplayName(null) + let showLabel = this.getOption('showLabel') + const oldLabelHover = this.getOption('labelHover') + + const options = { + direction: this.getOption('labelDirection'), + interactive: this.getOption('labelInteractive'), } -}; + if (oldLabelHover && showLabel) showLabel = null // Retrocompat. + options.permanent = showLabel === true + this.unbindTooltip() + if ((showLabel === true || showLabel === null) && displayName) + this.bindTooltip(L.Util.escapeHTML(displayName), options) + }, + + matchFilter: function (filter, keys) { + filter = filter.toLowerCase() + for (let i = 0; i < keys.length; i++) { + if ((this.properties[keys[i]] || '').toLowerCase().indexOf(filter) !== -1) + return true + } + return false + }, + + onVertexRawClick: function (e) { + new L.Toolbar.Popup(e.latlng, { + className: 'leaflet-inplace-toolbar', + actions: this.getVertexActions(e), + }).addTo(this.map, this, e.latlng, e.vertex) + }, + + getVertexActions: function () { + return [L.U.DeleteVertexAction] + }, + + isMulti: function () { + return false + }, + + clone: function () { + const layer = this.datalayer.geojsonToFeatures(this.toGeoJSON()) + layer.isDirty = true + layer.edit() + return layer + }, + + extendedProperties: function () { + // Include context properties + properties = this.map.getGeoContext() + center = this.getCenter() + properties.lat = center.lat + properties.lon = center.lng + properties.lng = center.lng + properties.rank = this.getRank() + 1 + if (typeof this.getMeasure !== 'undefined') { + properties.measure = this.getMeasure() + } + return L.extend(properties, this.properties) + }, + + getRank: function () { + return this.datalayer._index.indexOf(L.stamp(this)) + }, +} L.U.Marker = L.Marker.extend({ - parentClass: L.Marker, - includes: [L.U.FeatureMixin], + parentClass: L.Marker, + includes: [L.U.FeatureMixin], - preInit: function () { - this.setIcon(this.getIcon()); - }, + preInit: function () { + this.setIcon(this.getIcon()) + }, - addInteractions: function () { - L.U.FeatureMixin.addInteractions.call(this); - this.on('dragend', function (e) { - this.isDirty = true; - this.edit(e); - }, this); - if (!this.isReadOnly()) this.on('mouseover', this._enableDragging); - this.on('mouseout', this._onMouseOut); - this._popupHandlersAdded = true; // prevent Leaflet from binding event on bindPopup - }, + addInteractions: function () { + L.U.FeatureMixin.addInteractions.call(this) + this.on( + 'dragend', + function (e) { + this.isDirty = true + this.edit(e) + }, + this + ) + if (!this.isReadOnly()) this.on('mouseover', this._enableDragging) + this.on('mouseout', this._onMouseOut) + this._popupHandlersAdded = true // prevent Leaflet from binding event on bindPopup + }, - _onMouseOut: function () { - if(this.dragging && this.dragging._draggable && !this.dragging._draggable._moving) { - // Do not disable if the mouse went out while dragging - this._disableDragging(); - } - }, - - _enableDragging: function () { - // TODO: start dragging after 1 second on mouse down - if(this.map.editEnabled) { - if (!this.editEnabled()) this.enableEdit(); - // Enabling dragging on the marker override the Draggable._OnDown - // event, which, as it stopPropagation, refrain the call of - // _onDown with map-pane element, which is responsible to - // set the _moved to false, and thus to enable the click. - // We should find a cleaner way to handle this. - this.map.dragging._draggable._moved = false; - } - }, - - _disableDragging: function () { - if(this.map.editEnabled) { - if (this.editor && this.editor.drawing) return; // when creating a new marker, the mouse can trigger the mouseover/mouseout event - // do not listen to them - this.disableEdit(); - } - }, - - _redraw: function() { - if (this.datalayer && this.datalayer.isVisible()) { - this._initIcon(); - this.update(); - } - }, - - _initIcon: function () { - this.options.icon = this.getIcon(); - L.Marker.prototype._initIcon.call(this); - this.resetTooltip(); - }, - - disconnectFromDataLayer: function (datalayer) { - this.options.icon.datalayer = null; - L.U.FeatureMixin.disconnectFromDataLayer.call(this, datalayer); - }, - - _getIconUrl: function (name) { - if (typeof name === 'undefined') name = 'icon'; - return this.getOption(name + 'Url'); - }, - - getIconClass: function () { - return this.getOption('iconClass'); - }, - - getIcon: function () { - var Class = L.U.Icon[this.getIconClass()] || L.U.Icon.Default; - return new Class(this.map, {feature: this}); - }, - - getCenter: function () { - return this._latlng; - }, - - getClassName: function () { - return 'marker'; - }, - - getShapeOptions: function () { - return [ - 'properties._umap_options.color', - 'properties._umap_options.iconClass', - 'properties._umap_options.iconUrl' - ]; - }, - - getAdvancedOptions: function () { - return [ - 'properties._umap_options.zoomTo' - ]; - }, - - appendEditFieldsets: function (container) { - L.U.FeatureMixin.appendEditFieldsets.call(this, container); - var coordinatesOptions = [ - ['_latlng.lat', {handler: 'FloatInput', label: L._('Latitude')}], - ['_latlng.lng', {handler: 'FloatInput', label: L._('Longitude')}] - ]; - var builder = new L.U.FormBuilder(this, coordinatesOptions, { - callback: function () { - if (!this._latlng.isValid()) return this.map.ui.alert({content: L._('Invalid latitude or longitude'), level: 'error'}); - this._redraw(); - this.bringToCenter(); - }, - callbackContext: this - }); - var fieldset = L.DomUtil.createFieldset(container, L._('Coordinates')); - fieldset.appendChild(builder.build()); - }, - - bringToCenter: function (e) { - if (this.datalayer.isClustered() && !this._icon) { - // callback is mandatory for zoomToShowLayer - this.datalayer.layer.zoomToShowLayer(this, e.callback || function (){}); - } else { - L.U.FeatureMixin.bringToCenter.call(this, e); - } - }, - - isOnScreen: function () { - var bounds = this.map.getBounds(); - return bounds.contains(this._latlng); - }, - - getPopupToolbarAnchor: function () { - return this.options.icon.options.popupAnchor; + _onMouseOut: function () { + if ( + this.dragging && + this.dragging._draggable && + !this.dragging._draggable._moving + ) { + // Do not disable if the mouse went out while dragging + this._disableDragging() } + }, -}); + _enableDragging: function () { + // TODO: start dragging after 1 second on mouse down + if (this.map.editEnabled) { + if (!this.editEnabled()) this.enableEdit() + // Enabling dragging on the marker override the Draggable._OnDown + // event, which, as it stopPropagation, refrain the call of + // _onDown with map-pane element, which is responsible to + // set the _moved to false, and thus to enable the click. + // We should find a cleaner way to handle this. + this.map.dragging._draggable._moved = false + } + }, + _disableDragging: function () { + if (this.map.editEnabled) { + if (this.editor && this.editor.drawing) return // when creating a new marker, the mouse can trigger the mouseover/mouseout event + // do not listen to them + this.disableEdit() + } + }, + + _redraw: function () { + if (this.datalayer && this.datalayer.isVisible()) { + this._initIcon() + this.update() + } + }, + + _initIcon: function () { + this.options.icon = this.getIcon() + L.Marker.prototype._initIcon.call(this) + this.resetTooltip() + }, + + disconnectFromDataLayer: function (datalayer) { + this.options.icon.datalayer = null + L.U.FeatureMixin.disconnectFromDataLayer.call(this, datalayer) + }, + + _getIconUrl: function (name) { + if (typeof name === 'undefined') name = 'icon' + return this.getOption(`${name}Url`) + }, + + getIconClass: function () { + return this.getOption('iconClass') + }, + + getIcon: function () { + const Class = L.U.Icon[this.getIconClass()] || L.U.Icon.Default + return new Class(this.map, { feature: this }) + }, + + getCenter: function () { + return this._latlng + }, + + getClassName: function () { + return 'marker' + }, + + getShapeOptions: function () { + return [ + 'properties._umap_options.color', + 'properties._umap_options.iconClass', + 'properties._umap_options.iconUrl', + ] + }, + + getAdvancedOptions: function () { + return ['properties._umap_options.zoomTo'] + }, + + appendEditFieldsets: function (container) { + L.U.FeatureMixin.appendEditFieldsets.call(this, container) + const coordinatesOptions = [ + ['_latlng.lat', { handler: 'FloatInput', label: L._('Latitude') }], + ['_latlng.lng', { handler: 'FloatInput', label: L._('Longitude') }], + ] + const builder = new L.U.FormBuilder(this, coordinatesOptions, { + callback: function () { + if (!this._latlng.isValid()) + return this.map.ui.alert({ + content: L._('Invalid latitude or longitude'), + level: 'error', + }) + this._redraw() + this.zoomTo({ easing: false }) + }, + callbackContext: this, + }) + const fieldset = L.DomUtil.createFieldset(container, L._('Coordinates')) + fieldset.appendChild(builder.build()) + }, + + zoomTo: function (e) { + if (this.datalayer.isClustered() && !this._icon) { + // callback is mandatory for zoomToShowLayer + this.datalayer.layer.zoomToShowLayer(this, e.callback || (() => {})) + } else { + L.U.FeatureMixin.zoomTo.call(this, e) + } + }, + + isOnScreen: function () { + const bounds = this.map.getBounds() + return bounds.contains(this._latlng) + }, + + getPopupToolbarAnchor: function () { + return this.options.icon.options.popupAnchor + }, +}) L.U.PathMixin = { + connectToDataLayer: function (datalayer) { + L.U.FeatureMixin.connectToDataLayer.call(this, datalayer) + // We keep markers on their own layer on top of the paths. + this.options.pane = this.datalayer.pane + }, - connectToDataLayer: function (datalayer) { - L.U.FeatureMixin.connectToDataLayer.call(this, datalayer); - // We keep markers on their own layer on top of the paths. - this.options.pane = this.datalayer.pane; - }, - - edit: function (e) { - if(this.map.editEnabled) { - if (!this.editEnabled()) this.enableEdit(); - L.U.FeatureMixin.edit.call(this, e); - } - }, - - _toggleEditing: function(e) { - if(this.map.editEnabled) { - if(this.editEnabled()) { - this.endEdit(); - this.map.ui.closePanel(); - } - else { - this.edit(e); - } - } - // FIXME: disable when disabling global edit - L.DomEvent.stop(e); - }, - - styleOptions: [ - 'smoothFactor', - 'color', - 'opacity', - 'stroke', - 'weight', - 'fill', - 'fillColor', - 'fillOpacity', - 'dashArray', - 'interactive' - ], - - getShapeOptions: function () { - return [ - 'properties._umap_options.color', - 'properties._umap_options.opacity', - 'properties._umap_options.weight' - ]; - }, - - getAdvancedOptions: function () { - return [ - 'properties._umap_options.smoothFactor', - 'properties._umap_options.dashArray', - 'properties._umap_options.zoomTo' - ]; - }, - - setStyle: function (options) { - options = options || {}; - var option; - for (var idx in this.styleOptions) { - option = this.styleOptions[idx]; - options[option] = this.getOption(option); - } - if (options.interactive) this.options.pointerEvents = 'visiblePainted'; - else this.options.pointerEvents = 'stroke'; - this.parentClass.prototype.setStyle.call(this, options); - }, - - _redraw: function () { - this.setStyle(); - this.resetTooltip(); - }, - - onAdd: function (map) { - this._container = null; - this.setStyle(); - // Show tooltip again when Leaflet.label allow static label on path. - // cf https://github.com/Leaflet/Leaflet/pull/3952 - // this.map.on('showmeasure', this.showMeasureTooltip, this); - // this.map.on('hidemeasure', this.removeTooltip, this); - this.parentClass.prototype.onAdd.call(this, map); - if (this.editing && this.editing.enabled()) this.editing.addHooks(); - this.resetTooltip(); - }, - - onRemove: function (map) { - // this.map.off('showmeasure', this.showMeasureTooltip, this); - // this.map.off('hidemeasure', this.removeTooltip, this); - if (this.editing && this.editing.enabled()) this.editing.removeHooks(); - L.U.FeatureMixin.onRemove.call(this, map); - }, - - getBestZoom: function () { - if (this.options.zoomTo) return this.options.zoomTo; - var bounds = this.getBounds(); - return this.map.getBoundsZoom(bounds, true); - }, - - endEdit: function () { - this.disableEdit(); - L.U.FeatureMixin.endEdit.call(this); - }, - - _onMouseOver: function () { - if (this.map.measureTools && this.map.measureTools.enabled()) { - this.map.ui.tooltip({content: this.getMeasure(), anchor: this}); - } else if (this.map.editEnabled && !this.map.editedFeature) { - this.map.ui.tooltip({content: L._('Click to edit'), anchor: this}); - } - }, - - addInteractions: function () { - L.U.FeatureMixin.addInteractions.call(this); - this.on('mouseover', this._onMouseOver); - this.on('edit', this.makeDirty); - this.on('drag editable:drag', this._onDrag); - }, - - _onDrag: function () { - if (this._tooltip) this._tooltip.setLatLng(this.getCenter()); - }, - - transferShape: function (at, to) { - var shape = this.enableEdit().deleteShapeAt(at); - this.disableEdit(); - if (!shape) return; - to.enableEdit().appendShape(shape); - if (!this._latlngs.length || !this._latlngs[0].length) this.del(); - }, - - isolateShape: function (at) { - if (!this.isMulti()) return; - var shape = this.enableEdit().deleteShapeAt(at); - this.disableEdit(); - if (!shape) return; - var properties = this.cloneProperties(); - var other = new (this instanceof L.U.Polyline ? L.U.Polyline : L.U.Polygon)(this.map, shape, {geojson: {properties: properties}}); - this.datalayer.addLayer(other); - other.edit(); - return other; - }, - - getContextMenuItems: function (e) { - var items = L.U.FeatureMixin.getContextMenuItems.call(this, e); - items.push({ - text: L._('Display measure'), - callback: function () { - this.map.ui.alert({content: this.getMeasure(), level: 'info'}) - }, - context: this - }) - if (this.map.editEnabled && !this.isReadOnly() && this.isMulti()) { - items = items.concat(this.getContextMenuMultiItems(e)); - } - return items; - }, - - getContextMenuMultiItems: function (e) { - var items = ['-', { - text: L._('Remove shape from the multi'), - callback: function () { - this.enableEdit().deleteShapeAt(e.latlng); - }, - context: this - }]; - var shape = this.shapeAt(e.latlng); - if (this._latlngs.indexOf(shape) > 0) { - items.push({ - text: L._('Make main shape'), - callback: function () { - this.enableEdit().deleteShape(shape); - this.editor.prependShape(shape); - }, - context: this - }); - } - return items; - }, - - getContextMenuEditItems: function (e) { - var items = L.U.FeatureMixin.getContextMenuEditItems.call(this, e); - if (this.map.editedFeature && this.isSameClass(this.map.editedFeature) && this.map.editedFeature !== this) { - items.push({ - text: L._('Transfer shape to edited feature'), - callback: function () { - this.transferShape(e.latlng, this.map.editedFeature); - }, - context: this - }); - } - if (this.isMulti()) { - items.push({ - text: L._('Extract shape to separate feature'), - callback: function () { - this.isolateShape(e.latlng, this.map.editedFeature); - }, - context: this - }); - } - return items; - }, - - getInplaceToolbarActions: function (e) { - var items = L.U.FeatureMixin.getInplaceToolbarActions.call(this, e); - if (this.isMulti()) { - items.push(L.U.DeleteShapeAction); - items.push(L.U.ExtractShapeFromMultiAction); - } - return items; - }, - - isOnScreen: function () { - var bounds = this.map.getBounds(); - return bounds.overlaps(this.getBounds()); + edit: function (e) { + if (this.map.editEnabled) { + if (!this.editEnabled()) this.enableEdit() + L.U.FeatureMixin.edit.call(this, e) } + }, -}; + _toggleEditing: function (e) { + if (this.map.editEnabled) { + if (this.editEnabled()) { + this.endEdit() + this.map.ui.closePanel() + } else { + this.edit(e) + } + } + // FIXME: disable when disabling global edit + L.DomEvent.stop(e) + }, + + styleOptions: [ + 'smoothFactor', + 'color', + 'opacity', + 'stroke', + 'weight', + 'fill', + 'fillColor', + 'fillOpacity', + 'dashArray', + 'interactive', + ], + + getShapeOptions: function () { + return [ + 'properties._umap_options.color', + 'properties._umap_options.opacity', + 'properties._umap_options.weight', + ] + }, + + getAdvancedOptions: function () { + return [ + 'properties._umap_options.smoothFactor', + 'properties._umap_options.dashArray', + 'properties._umap_options.zoomTo', + ] + }, + + setStyle: function (options) { + options = options || {} + let option + for (const idx in this.styleOptions) { + option = this.styleOptions[idx] + options[option] = this.getOption(option) + } + if (options.interactive) this.options.pointerEvents = 'visiblePainted' + else this.options.pointerEvents = 'stroke' + this.parentClass.prototype.setStyle.call(this, options) + }, + + _redraw: function () { + this.setStyle() + this.resetTooltip() + }, + + onAdd: function (map) { + this._container = null + this.setStyle() + // Show tooltip again when Leaflet.label allow static label on path. + // cf https://github.com/Leaflet/Leaflet/pull/3952 + // this.map.on('showmeasure', this.showMeasureTooltip, this); + // this.map.on('hidemeasure', this.removeTooltip, this); + this.parentClass.prototype.onAdd.call(this, map) + if (this.editing && this.editing.enabled()) this.editing.addHooks() + this.resetTooltip() + }, + + onRemove: function (map) { + // this.map.off('showmeasure', this.showMeasureTooltip, this); + // this.map.off('hidemeasure', this.removeTooltip, this); + if (this.editing && this.editing.enabled()) this.editing.removeHooks() + L.U.FeatureMixin.onRemove.call(this, map) + }, + + getBestZoom: function () { + return this.getOption('zoomTo') || this.map.getBoundsZoom(this.getBounds(), true) + }, + + endEdit: function () { + this.disableEdit() + L.U.FeatureMixin.endEdit.call(this) + }, + + _onMouseOver: function () { + if (this.map.measureTools && this.map.measureTools.enabled()) { + this.map.ui.tooltip({ content: this.getMeasure(), anchor: this }) + } else if (this.map.editEnabled && !this.map.editedFeature) { + this.map.ui.tooltip({ content: L._('Click to edit'), anchor: this }) + } + }, + + addInteractions: function () { + L.U.FeatureMixin.addInteractions.call(this) + this.on('mouseover', this._onMouseOver) + this.on('edit', this.makeDirty) + this.on('drag editable:drag', this._onDrag) + }, + + _onDrag: function () { + if (this._tooltip) this._tooltip.setLatLng(this.getCenter()) + }, + + transferShape: function (at, to) { + const shape = this.enableEdit().deleteShapeAt(at) + this.disableEdit() + if (!shape) return + to.enableEdit().appendShape(shape) + if (!this._latlngs.length || !this._latlngs[0].length) this.del() + }, + + isolateShape: function (at) { + if (!this.isMulti()) return + const shape = this.enableEdit().deleteShapeAt(at) + this.disableEdit() + if (!shape) return + const properties = this.cloneProperties() + const other = new (this instanceof L.U.Polyline ? L.U.Polyline : L.U.Polygon)( + this.map, + shape, + { geojson: { properties: properties } } + ) + this.datalayer.addLayer(other) + other.edit() + return other + }, + + getContextMenuItems: function (e) { + let items = L.U.FeatureMixin.getContextMenuItems.call(this, e) + items.push({ + text: L._('Display measure'), + callback: function () { + this.map.ui.alert({ content: this.getMeasure(), level: 'info' }) + }, + context: this, + }) + if (this.map.editEnabled && !this.isReadOnly() && this.isMulti()) { + items = items.concat(this.getContextMenuMultiItems(e)) + } + return items + }, + + getContextMenuMultiItems: function (e) { + const items = [ + '-', + { + text: L._('Remove shape from the multi'), + callback: function () { + this.enableEdit().deleteShapeAt(e.latlng) + }, + context: this, + }, + ] + const shape = this.shapeAt(e.latlng) + if (this._latlngs.indexOf(shape) > 0) { + items.push({ + text: L._('Make main shape'), + callback: function () { + this.enableEdit().deleteShape(shape) + this.editor.prependShape(shape) + }, + context: this, + }) + } + return items + }, + + getContextMenuEditItems: function (e) { + const items = L.U.FeatureMixin.getContextMenuEditItems.call(this, e) + if ( + this.map.editedFeature && + this.isSameClass(this.map.editedFeature) && + this.map.editedFeature !== this + ) { + items.push({ + text: L._('Transfer shape to edited feature'), + callback: function () { + this.transferShape(e.latlng, this.map.editedFeature) + }, + context: this, + }) + } + if (this.isMulti()) { + items.push({ + text: L._('Extract shape to separate feature'), + callback: function () { + this.isolateShape(e.latlng, this.map.editedFeature) + }, + context: this, + }) + } + return items + }, + + getInplaceToolbarActions: function (e) { + const items = L.U.FeatureMixin.getInplaceToolbarActions.call(this, e) + if (this.isMulti()) { + items.push(L.U.DeleteShapeAction) + items.push(L.U.ExtractShapeFromMultiAction) + } + return items + }, + + isOnScreen: function () { + const bounds = this.map.getBounds() + return bounds.overlaps(this.getBounds()) + }, +} L.U.Polyline = L.Polyline.extend({ - parentClass: L.Polyline, - includes: [L.U.FeatureMixin, L.U.PathMixin], + parentClass: L.Polyline, + includes: [L.U.FeatureMixin, L.U.PathMixin], - staticOptions: { - stroke: true, - fill: false - }, + staticOptions: { + stroke: true, + fill: false, + }, - isSameClass: function (other) { - return other instanceof L.U.Polyline; - }, + isSameClass: function (other) { + return other instanceof L.U.Polyline + }, - getClassName: function () { - return 'polyline'; - }, + getClassName: function () { + return 'polyline' + }, - getMeasure: function () { - var length = L.GeoUtil.lineLength(this.map, this._defaultShape()); - return L.GeoUtil.readableDistance(length, this.map.measureTools.getMeasureUnit()); - }, + getMeasure: function (shape) { + const length = L.GeoUtil.lineLength(this.map, shape || this._defaultShape()) + return L.GeoUtil.readableDistance(length, this.map.measureTools.getMeasureUnit()) + }, - getContextMenuEditItems: function (e) { - var items = L.U.PathMixin.getContextMenuEditItems.call(this, e), - vertexClicked = e.vertex, index; - if (!this.isMulti()) { - items.push({ - text: L._('Transform to polygon'), - callback: this.toPolygon, - context: this - }); - } - if (vertexClicked) { - index = e.vertex.getIndex(); - if (index !== 0 && index !== e.vertex.getLastIndex()) { - items.push({ - text: L._('Split line'), - callback: e.vertex.split, - context: e.vertex - }); - } else if (index === 0 || index === e.vertex.getLastIndex()) { - items.push({ - text: L._('Continue line (Ctrl+Click)'), - callback: e.vertex.continue, - context: e.vertex.continue - }); - } - } - return items; - }, - - getContextMenuMultiItems: function (e) { - var items = L.U.PathMixin.getContextMenuMultiItems.call(this, e); - items.push({ - text: L._('Merge lines'), - callback: this.mergeShapes, - context: this - }); - return items; - }, - - toPolygon: function () { - var geojson = this.toGeoJSON(); - geojson.geometry.type = 'Polygon'; - geojson.geometry.coordinates = [L.Util.flattenCoordinates(geojson.geometry.coordinates)]; - var polygon = this.datalayer.geojsonToFeatures(geojson); - polygon.edit(); - this.del(); - }, - - getAdvancedEditActions: function (container) { - L.U.FeatureMixin.getAdvancedEditActions.call(this, container); - var toPolygon = L.DomUtil.create('a', 'button umap-to-polygon', container); - toPolygon.href = '#'; - toPolygon.textContent = L._('Transform to polygon'); - L.DomEvent.on(toPolygon, 'click', this.toPolygon, this); - }, - - _mergeShapes: function (from, to) { - var toLeft = to[0], - toRight = to[to.length - 1], - fromLeft = from[0], - fromRight = from[from.length - 1], - l2ldistance = toLeft.distanceTo(fromLeft), - l2rdistance = toLeft.distanceTo(fromRight), - r2ldistance = toRight.distanceTo(fromLeft), - r2rdistance = toRight.distanceTo(fromRight), - toMerge; - if (l2rdistance < Math.min(l2ldistance, r2ldistance, r2rdistance)) { - toMerge = [from, to]; - } else if (r2ldistance < Math.min(l2ldistance, l2rdistance, r2rdistance)) { - toMerge = [to, from]; - } else if (r2rdistance < Math.min(l2ldistance, l2rdistance, r2ldistance)) { - from.reverse(); - toMerge = [to, from]; - } else { - from.reverse(); - toMerge = [from, to]; - } - var a = toMerge[0], - b = toMerge[1], - p1 = this.map.latLngToContainerPoint(a[a.length - 1]), - p2 = this.map.latLngToContainerPoint(b[0]), - tolerance = 5; // px on screen - if (Math.abs(p1.x - p2.x) <= tolerance && Math.abs(p1.y - p2.y) <= tolerance) { - a.pop(); - } - return a.concat(b); - }, - - mergeShapes: function () { - if (!this.isMulti()) return; - var latlngs = this.getLatLngs(); - if (!latlngs.length) return; - while (latlngs.length > 1) { - latlngs.splice(0, 2, this._mergeShapes(latlngs[1], latlngs[0])); - } - this.setLatLngs(latlngs[0]); - if (!this.editEnabled()) this.edit(); - this.editor.reset(); - this.isDirty = true; - }, - - isMulti: function () { - return !L.LineUtil.isFlat(this._latlngs) && this._latlngs.length > 1; - }, - - getVertexActions: function (e) { - var actions = L.U.FeatureMixin.getVertexActions.call(this, e), - index = e.vertex.getIndex(); - if (index === 0 || index === e.vertex.getLastIndex()) actions.push(L.U.ContinueLineAction); - else actions.push(L.U.SplitLineAction); - return actions; + getContextMenuEditItems: function (e) { + const items = L.U.PathMixin.getContextMenuEditItems.call(this, e) + const vertexClicked = e.vertex + let index + if (!this.isMulti()) { + items.push({ + text: L._('Transform to polygon'), + callback: this.toPolygon, + context: this, + }) } + if (vertexClicked) { + index = e.vertex.getIndex() + if (index !== 0 && index !== e.vertex.getLastIndex()) { + items.push({ + text: L._('Split line'), + callback: e.vertex.split, + context: e.vertex, + }) + } else if (index === 0 || index === e.vertex.getLastIndex()) { + items.push({ + text: L._('Continue line (Ctrl+Click)'), + callback: e.vertex.continue, + context: e.vertex.continue, + }) + } + } + return items + }, -}); + getContextMenuMultiItems: function (e) { + const items = L.U.PathMixin.getContextMenuMultiItems.call(this, e) + items.push({ + text: L._('Merge lines'), + callback: this.mergeShapes, + context: this, + }) + return items + }, + + toPolygon: function () { + const geojson = this.toGeoJSON() + geojson.geometry.type = 'Polygon' + geojson.geometry.coordinates = [ + L.Util.flattenCoordinates(geojson.geometry.coordinates), + ] + const polygon = this.datalayer.geojsonToFeatures(geojson) + polygon.edit() + this.del() + }, + + getAdvancedEditActions: function (container) { + L.U.FeatureMixin.getAdvancedEditActions.call(this, container) + const toPolygon = L.DomUtil.create('a', 'button umap-to-polygon', container) + toPolygon.href = '#' + toPolygon.textContent = L._('Transform to polygon') + L.DomEvent.on(toPolygon, 'click', this.toPolygon, this) + }, + + _mergeShapes: function (from, to) { + const toLeft = to[0] + const toRight = to[to.length - 1] + const fromLeft = from[0] + const fromRight = from[from.length - 1] + const l2ldistance = toLeft.distanceTo(fromLeft) + const l2rdistance = toLeft.distanceTo(fromRight) + const r2ldistance = toRight.distanceTo(fromLeft) + const r2rdistance = toRight.distanceTo(fromRight) + let toMerge + if (l2rdistance < Math.min(l2ldistance, r2ldistance, r2rdistance)) { + toMerge = [from, to] + } else if (r2ldistance < Math.min(l2ldistance, l2rdistance, r2rdistance)) { + toMerge = [to, from] + } else if (r2rdistance < Math.min(l2ldistance, l2rdistance, r2ldistance)) { + from.reverse() + toMerge = [to, from] + } else { + from.reverse() + toMerge = [from, to] + } + const a = toMerge[0], + b = toMerge[1], + p1 = this.map.latLngToContainerPoint(a[a.length - 1]), + p2 = this.map.latLngToContainerPoint(b[0]), + tolerance = 5 // px on screen + if (Math.abs(p1.x - p2.x) <= tolerance && Math.abs(p1.y - p2.y) <= tolerance) { + a.pop() + } + return a.concat(b) + }, + + mergeShapes: function () { + if (!this.isMulti()) return + const latlngs = this.getLatLngs() + if (!latlngs.length) return + while (latlngs.length > 1) { + latlngs.splice(0, 2, this._mergeShapes(latlngs[1], latlngs[0])) + } + this.setLatLngs(latlngs[0]) + if (!this.editEnabled()) this.edit() + this.editor.reset() + this.isDirty = true + }, + + isMulti: function () { + return !L.LineUtil.isFlat(this._latlngs) && this._latlngs.length > 1 + }, + + getVertexActions: function (e) { + const actions = L.U.FeatureMixin.getVertexActions.call(this, e), + index = e.vertex.getIndex() + if (index === 0 || index === e.vertex.getLastIndex()) + actions.push(L.U.ContinueLineAction) + else actions.push(L.U.SplitLineAction) + return actions + }, +}) L.U.Polygon = L.Polygon.extend({ - parentClass: L.Polygon, - includes: [L.U.FeatureMixin, L.U.PathMixin], + parentClass: L.Polygon, + includes: [L.U.FeatureMixin, L.U.PathMixin], - isSameClass: function (other) { - return other instanceof L.U.Polygon; - }, + isSameClass: function (other) { + return other instanceof L.U.Polygon + }, - getClassName: function () { - return 'polygon'; - }, + getClassName: function () { + return 'polygon' + }, - getShapeOptions: function () { - var options = L.U.PathMixin.getShapeOptions(); - options.push('properties._umap_options.stroke', - 'properties._umap_options.fill', - 'properties._umap_options.fillColor', - 'properties._umap_options.fillOpacity' - ); - return options; - }, + getShapeOptions: function () { + const options = L.U.PathMixin.getShapeOptions() + options.push( + 'properties._umap_options.stroke', + 'properties._umap_options.fill', + 'properties._umap_options.fillColor', + 'properties._umap_options.fillOpacity' + ) + return options + }, - getInteractionOptions: function () { - var options = [ - ['properties._umap_options.interactive', {handler: 'Switch', label: L._('Allow interactions'), helpEntries: 'interactive', inheritable: true}], - ['properties._umap_options.outlink', {label: L._('Link to…'), helpEntries: 'outlink', placeholder: 'http://...', inheritable: true}], - ['properties._umap_options.outlinkTarget', {handler: 'OutlinkTarget', label: L._('Open link in…'), inheritable: true}] - ]; - return options.concat(L.U.FeatureMixin.getInteractionOptions()); - }, + getInteractionOptions: function () { + const options = [ + [ + 'properties._umap_options.interactive', + { + handler: 'Switch', + label: L._('Allow interactions'), + helpEntries: 'interactive', + inheritable: true, + }, + ], + [ + 'properties._umap_options.outlink', + { + label: L._('Link to…'), + helpEntries: 'outlink', + placeholder: 'http://...', + inheritable: true, + }, + ], + [ + 'properties._umap_options.outlinkTarget', + { handler: 'OutlinkTarget', label: L._('Open link in…'), inheritable: true }, + ], + ] + return options.concat(L.U.FeatureMixin.getInteractionOptions()) + }, - getMeasure: function () { - var area = L.GeoUtil.geodesicArea(this._defaultShape()); - return L.GeoUtil.readableArea(area, this.map.measureTools.getMeasureUnit()); - }, + getMeasure: function (shape) { + const area = L.GeoUtil.geodesicArea(shape || this._defaultShape()) + return L.GeoUtil.readableArea(area, this.map.measureTools.getMeasureUnit()) + }, - getContextMenuEditItems: function (e) { - var items = L.U.PathMixin.getContextMenuEditItems.call(this, e), - shape = this.shapeAt(e.latlng); - // No multi and no holes. - if (shape && !this.isMulti() && (L.LineUtil.isFlat(shape) || shape.length === 1)) { - items.push({ - text: L._('Transform to lines'), - callback: this.toPolyline, - context: this - }); - } - items.push({ - text: L._('Start a hole here'), - callback: this.startHole, - context: this - }); - return items; - }, - - startHole: function (e) { - this.enableEdit().newHole(e.latlng); - }, - - toPolyline: function () { - var geojson = this.toGeoJSON(); - geojson.geometry.type = 'LineString'; - geojson.geometry.coordinates = L.Util.flattenCoordinates(geojson.geometry.coordinates); - var polyline = this.datalayer.geojsonToFeatures(geojson); - polyline.edit(); - this.del(); - }, - - getAdvancedEditActions: function (container) { - L.U.FeatureMixin.getAdvancedEditActions.call(this, container); - var toPolyline = L.DomUtil.create('a', 'button umap-to-polyline', container); - toPolyline.href = '#'; - toPolyline.textContent = L._('Transform to lines'); - L.DomEvent.on(toPolyline, 'click', this.toPolyline, this); - }, - - isMulti: function () { - // Change me when Leaflet#3279 is merged. - return !L.LineUtil.isFlat(this._latlngs) && !L.LineUtil.isFlat(this._latlngs[0]) && this._latlngs.length > 1; - }, - - getInplaceToolbarActions: function (e) { - var items = L.U.PathMixin.getInplaceToolbarActions.call(this, e); - items.push(L.U.CreateHoleAction); - return items; + getContextMenuEditItems: function (e) { + const items = L.U.PathMixin.getContextMenuEditItems.call(this, e), + shape = this.shapeAt(e.latlng) + // No multi and no holes. + if (shape && !this.isMulti() && (L.LineUtil.isFlat(shape) || shape.length === 1)) { + items.push({ + text: L._('Transform to lines'), + callback: this.toPolyline, + context: this, + }) } + items.push({ + text: L._('Start a hole here'), + callback: this.startHole, + context: this, + }) + return items + }, -}); + startHole: function (e) { + this.enableEdit().newHole(e.latlng) + }, + + toPolyline: function () { + const geojson = this.toGeoJSON() + geojson.geometry.type = 'LineString' + geojson.geometry.coordinates = L.Util.flattenCoordinates( + geojson.geometry.coordinates + ) + const polyline = this.datalayer.geojsonToFeatures(geojson) + polyline.edit() + this.del() + }, + + getAdvancedEditActions: function (container) { + L.U.FeatureMixin.getAdvancedEditActions.call(this, container) + const toPolyline = L.DomUtil.create('a', 'button umap-to-polyline', container) + toPolyline.href = '#' + toPolyline.textContent = L._('Transform to lines') + L.DomEvent.on(toPolyline, 'click', this.toPolyline, this) + }, + + isMulti: function () { + // Change me when Leaflet#3279 is merged. + return ( + !L.LineUtil.isFlat(this._latlngs) && + !L.LineUtil.isFlat(this._latlngs[0]) && + this._latlngs.length > 1 + ) + }, + + getInplaceToolbarActions: function (e) { + const items = L.U.PathMixin.getInplaceToolbarActions.call(this, e) + items.push(L.U.CreateHoleAction) + return items + }, +}) diff --git a/umap/static/umap/js/umap.forms.js b/umap/static/umap/js/umap.forms.js index 88c03703..a37d48f0 100644 --- a/umap/static/umap/js/umap.forms.js +++ b/umap/static/umap/js/umap.forms.js @@ -1,792 +1,1096 @@ L.FormBuilder.Element.include({ - - getParentNode: function () { - if (this.options.wrapper) { - return L.DomUtil.create(this.options.wrapper, this.options.wrapperClass || '', this.form); - } - var className = 'formbox'; - if (this.options.inheritable) { - className += this.get(true) === undefined ? ' inheritable undefined' : ' inheritable '; - } - className += ' umap-field-' + this.name; - this.wrapper = L.DomUtil.create('div', className, this.form); - this.header = L.DomUtil.create('div', 'header', this.wrapper); - if (this.options.inheritable) { - var undefine = L.DomUtil.add('a', 'button undefine', this.header, L._('clear')); - var define = L.DomUtil.add('a', 'button define', this.header, L._('define')); - L.DomEvent.on(define, 'click', function (e) { - L.DomEvent.stop(e); - this.fetch(); - this.fire('define'); - L.DomUtil.removeClass(this.wrapper, 'undefined'); - }, this); - L.DomEvent.on(undefine, 'click', function (e) { - L.DomEvent.stop(e); - L.DomUtil.addClass(this.wrapper, 'undefined'); - this.clear(); - this.sync(); - }, this); - } - this.quickContainer = L.DomUtil.create('span', 'quick-actions show-on-defined', this.header); - this.extendedContainer = L.DomUtil.create('div', 'show-on-defined', this.wrapper); - return this.extendedContainer; - }, - - getLabelParent: function () { - return this.header; - }, - - clear: function () { - this.input.value = ''; - }, - - get: function (own) { - if (!this.options.inheritable || own) return this.builder.getter(this.field); - var path = this.field.split('.'), - key = path[path.length - 1]; - return this.obj.getOption(key); - }, - - buildLabel: function () { - if (this.options.label) { - this.label = L.DomUtil.create('label', '', this.getLabelParent()); - this.label.textContent = this.label.title = this.options.label; - if (this.options.helpEntries) this.builder.map.help.button(this.label, this.options.helpEntries); - else if (this.options.helpTooltip) { - var info = L.DomUtil.create('i', 'info', this.label); - L.DomEvent.on(info, 'mouseover', function () { - this.builder.map.ui.tooltip({anchor: info, content: this.options.helpTooltip, position: 'top'}); - }, this); - } - } + getParentNode: function () { + if (this.options.wrapper) { + return L.DomUtil.create( + this.options.wrapper, + this.options.wrapperClass || '', + this.form + ) } + let className = 'formbox' + if (this.options.inheritable) { + className += + this.get(true) === undefined ? ' inheritable undefined' : ' inheritable ' + } + className += ` umap-field-${this.name}` + this.wrapper = L.DomUtil.create('div', className, this.form) + this.header = L.DomUtil.create('div', 'header', this.wrapper) + if (this.options.inheritable) { + const undefine = L.DomUtil.add('a', 'button undefine', this.header, L._('clear')) + const define = L.DomUtil.add('a', 'button define', this.header, L._('define')) + L.DomEvent.on( + define, + 'click', + function (e) { + L.DomEvent.stop(e) + this.fetch() + this.fire('define') + L.DomUtil.removeClass(this.wrapper, 'undefined') + }, + this + ) + L.DomEvent.on( + undefine, + 'click', + function (e) { + L.DomEvent.stop(e) + L.DomUtil.addClass(this.wrapper, 'undefined') + this.clear() + this.sync() + }, + this + ) + } + this.quickContainer = L.DomUtil.create( + 'span', + 'quick-actions show-on-defined', + this.header + ) + this.extendedContainer = L.DomUtil.create('div', 'show-on-defined', this.wrapper) + return this.extendedContainer + }, -}); + getLabelParent: function () { + return this.header + }, + + clear: function () { + this.input.value = '' + }, + + get: function (own) { + if (!this.options.inheritable || own) return this.builder.getter(this.field) + const path = this.field.split('.'), + key = path[path.length - 1] + return this.obj.getOption(key) + }, + + buildLabel: function () { + if (this.options.label) { + this.label = L.DomUtil.create('label', '', this.getLabelParent()) + this.label.textContent = this.label.title = this.options.label + if (this.options.helpEntries) + this.builder.map.help.button(this.label, this.options.helpEntries) + else if (this.options.helpTooltip) { + const info = L.DomUtil.create('i', 'info', this.label) + L.DomEvent.on( + info, + 'mouseover', + function () { + this.builder.map.ui.tooltip({ + anchor: info, + content: this.options.helpTooltip, + position: 'top', + }) + }, + this + ) + } + } + }, +}) L.FormBuilder.Select.include({ + clear: function () { + this.select.value = '' + }, - clear: function () { - this.select.value = ''; - }, - - getDefault: function () { - if (this.options.inheritable) return undefined; - return this.getOptions()[0][0]; - } - -}); + getDefault: function () { + if (this.options.inheritable) return undefined + return this.getOptions()[0][0] + }, +}) L.FormBuilder.CheckBox.include({ + value: function () { + return L.DomUtil.hasClass(this.wrapper, 'undefined') + ? undefined + : this.input.checked + }, - value: function () { - return L.DomUtil.hasClass(this.wrapper, 'undefined') ? undefined : this.input.checked; - }, - - clear: function () { - this.fetch(); - } - -}); + clear: function () { + this.fetch() + }, +}) L.FormBuilder.ColorPicker = L.FormBuilder.Input.extend({ + colors: [ + 'Black', + 'Navy', + 'DarkBlue', + 'MediumBlue', + 'Blue', + 'DarkGreen', + 'Green', + 'Teal', + 'DarkCyan', + 'DeepSkyBlue', + 'DarkTurquoise', + 'MediumSpringGreen', + 'Lime', + 'SpringGreen', + 'Aqua', + 'Cyan', + 'MidnightBlue', + 'DodgerBlue', + 'LightSeaGreen', + 'ForestGreen', + 'SeaGreen', + 'DarkSlateGray', + 'DarkSlateGrey', + 'LimeGreen', + 'MediumSeaGreen', + 'Turquoise', + 'RoyalBlue', + 'SteelBlue', + 'DarkSlateBlue', + 'MediumTurquoise', + 'Indigo', + 'DarkOliveGreen', + 'CadetBlue', + 'CornflowerBlue', + 'MediumAquaMarine', + 'DimGray', + 'DimGrey', + 'SlateBlue', + 'OliveDrab', + 'SlateGray', + 'SlateGrey', + 'LightSlateGray', + 'LightSlateGrey', + 'MediumSlateBlue', + 'LawnGreen', + 'Chartreuse', + 'Aquamarine', + 'Maroon', + 'Purple', + 'Olive', + 'Gray', + 'Grey', + 'SkyBlue', + 'LightSkyBlue', + 'BlueViolet', + 'DarkRed', + 'DarkMagenta', + 'SaddleBrown', + 'DarkSeaGreen', + 'LightGreen', + 'MediumPurple', + 'DarkViolet', + 'PaleGreen', + 'DarkOrchid', + 'YellowGreen', + 'Sienna', + 'Brown', + 'DarkGray', + 'DarkGrey', + 'LightBlue', + 'GreenYellow', + 'PaleTurquoise', + 'LightSteelBlue', + 'PowderBlue', + 'FireBrick', + 'DarkGoldenRod', + 'MediumOrchid', + 'RosyBrown', + 'DarkKhaki', + 'Silver', + 'MediumVioletRed', + 'IndianRed', + 'Peru', + 'Chocolate', + 'Tan', + 'LightGray', + 'LightGrey', + 'Thistle', + 'Orchid', + 'GoldenRod', + 'PaleVioletRed', + 'Crimson', + 'Gainsboro', + 'Plum', + 'BurlyWood', + 'LightCyan', + 'Lavender', + 'DarkSalmon', + 'Violet', + 'PaleGoldenRod', + 'LightCoral', + 'Khaki', + 'AliceBlue', + 'HoneyDew', + 'Azure', + 'SandyBrown', + 'Wheat', + 'Beige', + 'WhiteSmoke', + 'MintCream', + 'GhostWhite', + 'Salmon', + 'AntiqueWhite', + 'Linen', + 'LightGoldenRodYellow', + 'OldLace', + 'Red', + 'Fuchsia', + 'Magenta', + 'DeepPink', + 'OrangeRed', + 'Tomato', + 'HotPink', + 'Coral', + 'DarkOrange', + 'LightSalmon', + 'Orange', + 'LightPink', + 'Pink', + 'Gold', + 'PeachPuff', + 'NavajoWhite', + 'Moccasin', + 'Bisque', + 'MistyRose', + 'BlanchedAlmond', + 'PapayaWhip', + 'LavenderBlush', + 'SeaShell', + 'Cornsilk', + 'LemonChiffon', + 'FloralWhite', + 'Snow', + 'Yellow', + 'LightYellow', + 'Ivory', + 'White', + ], - colors: [ - 'Black', 'Navy', 'DarkBlue', 'MediumBlue', 'Blue', 'DarkGreen', - 'Green', 'Teal', 'DarkCyan', 'DeepSkyBlue', 'DarkTurquoise', - 'MediumSpringGreen', 'Lime', 'SpringGreen', 'Aqua', 'Cyan', - 'MidnightBlue', 'DodgerBlue', 'LightSeaGreen', 'ForestGreen', - 'SeaGreen', 'DarkSlateGray', 'DarkSlateGrey', 'LimeGreen', - 'MediumSeaGreen', 'Turquoise', 'RoyalBlue', 'SteelBlue', - 'DarkSlateBlue', 'MediumTurquoise', 'Indigo', 'DarkOliveGreen', - 'CadetBlue', 'CornflowerBlue', 'MediumAquaMarine', 'DimGray', - 'DimGrey', 'SlateBlue', 'OliveDrab', 'SlateGray', 'SlateGrey', - 'LightSlateGray', 'LightSlateGrey', 'MediumSlateBlue', 'LawnGreen', - 'Chartreuse', 'Aquamarine', 'Maroon', 'Purple', 'Olive', 'Gray', - 'Grey', 'SkyBlue', 'LightSkyBlue', 'BlueViolet', 'DarkRed', - 'DarkMagenta', 'SaddleBrown', 'DarkSeaGreen', 'LightGreen', - 'MediumPurple', 'DarkViolet', 'PaleGreen', 'DarkOrchid', - 'YellowGreen', 'Sienna', 'Brown', 'DarkGray', 'DarkGrey', - 'LightBlue', 'GreenYellow', 'PaleTurquoise', 'LightSteelBlue', - 'PowderBlue', 'FireBrick', 'DarkGoldenRod', 'MediumOrchid', - 'RosyBrown', 'DarkKhaki', 'Silver', 'MediumVioletRed', 'IndianRed', - 'Peru', 'Chocolate', 'Tan', 'LightGray', 'LightGrey', 'Thistle', - 'Orchid', 'GoldenRod', 'PaleVioletRed', 'Crimson', 'Gainsboro', - 'Plum', 'BurlyWood', 'LightCyan', 'Lavender', 'DarkSalmon', - 'Violet', 'PaleGoldenRod', 'LightCoral', 'Khaki', 'AliceBlue', - 'HoneyDew', 'Azure', 'SandyBrown', 'Wheat', 'Beige', 'WhiteSmoke', - 'MintCream', 'GhostWhite', 'Salmon', 'AntiqueWhite', 'Linen', - 'LightGoldenRodYellow', 'OldLace', 'Red', 'Fuchsia', 'Magenta', - 'DeepPink', 'OrangeRed', 'Tomato', 'HotPink', 'Coral', 'DarkOrange', - 'LightSalmon', 'Orange', 'LightPink', 'Pink', 'Gold', 'PeachPuff', - 'NavajoWhite', 'Moccasin', 'Bisque', 'MistyRose', 'BlanchedAlmond', - 'PapayaWhip', 'LavenderBlush', 'SeaShell', 'Cornsilk', - 'LemonChiffon', 'FloralWhite', 'Snow', 'Yellow', 'LightYellow', - 'Ivory', 'White' - ], + getParentNode: function () { + L.FormBuilder.CheckBox.prototype.getParentNode.call(this) + return this.quickContainer + }, - getParentNode: function () { - L.FormBuilder.CheckBox.prototype.getParentNode.call(this); - return this.quickContainer; - }, - - build: function () { - L.FormBuilder.Input.prototype.build.call(this); - this.input.placeholder = this.options.placeholder || L._('Inherit'); - this.container = L.DomUtil.create('div', 'umap-color-picker', this.extendedContainer); - this.container.style.display = 'none'; - for (var idx in this.colors) { - this.addColor(this.colors[idx]); - } - this.spreadColor(); - this.input.autocomplete = 'off'; - L.DomEvent.on(this.input, 'focus', this.onFocus, this); - L.DomEvent.on(this.input, 'blur', this.onBlur, this); - L.DomEvent.on(this.input, 'change', this.sync, this); - this.on('define', this.onFocus); - }, - - onFocus: function () { - this.container.style.display = 'block'; - this.spreadColor(); - }, - - onBlur: function () { - var self = this, - closePicker = function () { - self.container.style.display = 'none'; - }; - // We must leave time for the click to be listened. - window.setTimeout(closePicker, 100); - }, - - sync: function () { - this.spreadColor(); - L.FormBuilder.Input.prototype.sync.call(this); - }, - - spreadColor: function () { - if (this.input.value) this.input.style.backgroundColor = this.input.value; - else this.input.style.backgroundColor = 'inherit'; - }, - - addColor: function (colorName) { - var span = L.DomUtil.create('span', '', this.container); - span.style.backgroundColor = span.title = colorName; - var updateColorInput = function () { - this.input.value = colorName; - this.sync(); - this.container.style.display = 'none'; - }; - L.DomEvent.on(span, 'mousedown', updateColorInput, this); + build: function () { + L.FormBuilder.Input.prototype.build.call(this) + this.input.placeholder = this.options.placeholder || L._('Inherit') + this.container = L.DomUtil.create( + 'div', + 'umap-color-picker', + this.extendedContainer + ) + this.container.style.display = 'none' + for (const idx in this.colors) { + this.addColor(this.colors[idx]) } + this.spreadColor() + this.input.autocomplete = 'off' + L.DomEvent.on(this.input, 'focus', this.onFocus, this) + L.DomEvent.on(this.input, 'blur', this.onBlur, this) + L.DomEvent.on(this.input, 'change', this.sync, this) + this.on('define', this.onFocus) + }, -}); + onFocus: function () { + this.container.style.display = 'block' + this.spreadColor() + }, + + onBlur: function () { + const self = this, + closePicker = () => { + self.container.style.display = 'none' + } + // We must leave time for the click to be listened. + window.setTimeout(closePicker, 100) + }, + + sync: function () { + this.spreadColor() + L.FormBuilder.Input.prototype.sync.call(this) + }, + + spreadColor: function () { + if (this.input.value) this.input.style.backgroundColor = this.input.value + else this.input.style.backgroundColor = 'inherit' + }, + + addColor: function (colorName) { + const span = L.DomUtil.create('span', '', this.container) + span.style.backgroundColor = span.title = colorName + const updateColorInput = function () { + this.input.value = colorName + this.sync() + this.container.style.display = 'none' + } + L.DomEvent.on(span, 'mousedown', updateColorInput, this) + }, +}) L.FormBuilder.TextColorPicker = L.FormBuilder.ColorPicker.extend({ - colors: [ - 'Black', 'DarkSlateGrey', 'DimGrey', 'SlateGrey', 'LightSlateGrey', - 'Grey', 'DarkGrey', 'LightGrey', 'White' - ] - -}); + colors: [ + 'Black', + 'DarkSlateGrey', + 'DimGrey', + 'SlateGrey', + 'LightSlateGrey', + 'Grey', + 'DarkGrey', + 'LightGrey', + 'White', + ], +}) L.FormBuilder.IconClassSwitcher = L.FormBuilder.Select.extend({ - - selectOptions: [ - ['Default', L._('Default')], - ['Circle', L._('Circle')], - ['Drop', L._('Drop')], - ['Ball', L._('Ball')] - ] - -}); + selectOptions: [ + ['Default', L._('Default')], + ['Circle', L._('Circle')], + ['Drop', L._('Drop')], + ['Ball', L._('Ball')], + ], +}) L.FormBuilder.ProxyTTLSelect = L.FormBuilder.Select.extend({ - - selectOptions: [ - [undefined, L._('No cache')], - ['300', L._('5 min')], - ['3600', L._('1 hour')], - ['86400', L._('1 day')] - ] - -}); + selectOptions: [ + [undefined, L._('No cache')], + ['300', L._('5 min')], + ['3600', L._('1 hour')], + ['86400', L._('1 day')], + ], +}) L.FormBuilder.PopupShape = L.FormBuilder.Select.extend({ - - selectOptions: [ - ['Default', L._('Popup')], - ['Large', L._('Popup (large)')], - ['Panel', L._('Side panel')], - ] - -}); + selectOptions: [ + ['Default', L._('Popup')], + ['Large', L._('Popup (large)')], + ['Panel', L._('Side panel')], + ], +}) L.FormBuilder.PopupContent = L.FormBuilder.Select.extend({ - - selectOptions: [ - ['Default', L._('Default')], - ['Table', L._('Table')], - ['GeoRSSImage', L._('GeoRSS (title + image)')], - ['GeoRSSLink', L._('GeoRSS (only link)')], - ] - -}); + selectOptions: [ + ['Default', L._('Default')], + ['Table', L._('Table')], + ['GeoRSSImage', L._('GeoRSS (title + image)')], + ['GeoRSSLink', L._('GeoRSS (only link)')], + ], +}) L.FormBuilder.LayerTypeChooser = L.FormBuilder.Select.extend({ - - selectOptions: [ - ['Default', L._('Default')], - ['Cluster', L._('Clustered')], - ['Heat', L._('Heatmap')] - ] - -}); + selectOptions: [ + ['Default', L._('Default')], + ['Cluster', L._('Clustered')], + ['Heat', L._('Heatmap')], + ], +}) L.FormBuilder.SlideshowDelay = L.FormBuilder.IntSelect.extend({ - - getOptions: function () { - var options = []; - for (var i = 1; i < 30; i++) { - options.push([i * 1000, L._('{delay} seconds', {delay: i})]); - } - return options; + getOptions: function () { + const options = [] + for (let i = 1; i < 30; i++) { + options.push([i * 1000, L._('{delay} seconds', { delay: i })]) } - -}); + return options + }, +}) L.FormBuilder.DataLayerSwitcher = L.FormBuilder.Select.extend({ + getOptions: function () { + const options = [] + this.builder.map.eachDataLayerReverse((datalayer) => { + if (datalayer.isLoaded() && !datalayer.isRemoteLayer() && datalayer.canBrowse()) { + options.push([L.stamp(datalayer), datalayer.getName()]) + } + }) + return options + }, - getOptions: function () { - var options = []; - this.builder.map.eachDataLayerReverse(function (datalayer) { - if(datalayer.isLoaded() && !datalayer.isRemoteLayer() && datalayer.canBrowse()) { - options.push([L.stamp(datalayer), datalayer.getName()]); - } - }); - return options; - }, + toHTML: function () { + return L.stamp(this.obj.datalayer) + }, - toHTML: function () { - return L.stamp(this.obj.datalayer); - }, + toJS: function () { + return this.builder.map.datalayers[this.value()] + }, - toJS: function () { - return this.builder.map.datalayers[this.value()]; - }, - - set: function () { - this.builder.map.lastUsedDataLayer = this.toJS(); - this.obj.changeDataLayer(this.toJS()); - } - -}); + set: function () { + this.builder.map.lastUsedDataLayer = this.toJS() + this.obj.changeDataLayer(this.toJS()) + }, +}) L.FormBuilder.onLoadPanel = L.FormBuilder.Select.extend({ - - selectOptions: [ - ['none', L._('None')], - ['caption', L._('Caption')], - ['databrowser', L._('Data browser')] - ] - -}); + selectOptions: [ + ['none', L._('None')], + ['caption', L._('Caption')], + ['databrowser', L._('Data browser')], + ['datafilters', L._('Data filters')], + ], +}) L.FormBuilder.DataFormat = L.FormBuilder.Select.extend({ - - selectOptions: [ - [undefined, L._('Choose the data format')], - ['geojson', 'geojson'], - ['osm', 'osm'], - ['csv', 'csv'], - ['gpx', 'gpx'], - ['kml', 'kml'], - ['georss', 'georss'] - ] - -}); + selectOptions: [ + [undefined, L._('Choose the data format')], + ['geojson', 'geojson'], + ['osm', 'osm'], + ['csv', 'csv'], + ['gpx', 'gpx'], + ['kml', 'kml'], + ['georss', 'georss'], + ], +}) L.FormBuilder.LabelDirection = L.FormBuilder.Select.extend({ - - selectOptions: [ - ['auto', L._('Automatic')], - ['left', L._('On the left')], - ['right', L._('On the right')], - ['top', L._('On the top')], - ['bottom', L._('On the bottom')] - ] - -}); + selectOptions: [ + ['auto', L._('Automatic')], + ['left', L._('On the left')], + ['right', L._('On the right')], + ['top', L._('On the top')], + ['bottom', L._('On the bottom')], + ], +}) L.FormBuilder.LicenceChooser = L.FormBuilder.Select.extend({ - - getOptions: function () { - var licences = [], - licencesList = this.builder.obj.options.licences, - licence; - for (var i in licencesList) { - licence = licencesList[i]; - licences.push([i, licence.name]); - } - return licences; - }, - - toHTML: function () { - return this.get().name; - }, - - toJS: function () { - return this.builder.obj.options.licences[this.value()]; + getOptions: function () { + const licences = [] + const licencesList = this.builder.obj.options.licences + let licence + for (const i in licencesList) { + licence = licencesList[i] + licences.push([i, licence.name]) } + return licences + }, -}); + toHTML: function () { + return this.get().name + }, + toJS: function () { + return this.builder.obj.options.licences[this.value()] + }, +}) L.FormBuilder.NullableBoolean = L.FormBuilder.Select.extend({ - selectOptions: [ - [undefined, L._('inherit')], - [true, L._('yes')], - [false, L._('no')] - ], + selectOptions: [ + [undefined, L._('inherit')], + [true, L._('yes')], + [false, L._('no')], + ], - toJS: function () { - var value = this.value(); - switch (value) { - case 'true': - case true: - value = true; - break; - case 'false': - case false: - value = false; - break; - default: - value = undefined; - } - return value; + toJS: function () { + let value = this.value() + switch (value) { + case 'true': + case true: + value = true + break + case 'false': + case false: + value = false + break + default: + value = undefined } - -}); - + return value + }, +}) L.FormBuilder.BlurInput.include({ - - build: function () { - this.options.className = 'blur'; - L.FormBuilder.Input.prototype.build.call(this); - var button = L.DomUtil.create('span', 'button blur-button'); - L.DomUtil.after(this.input, button); - } - -}); + build: function () { + this.options.className = 'blur' + L.FormBuilder.Input.prototype.build.call(this) + const button = L.DomUtil.create('span', 'button blur-button') + L.DomUtil.after(this.input, button) + }, +}) L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({ + type: function () { + return 'hidden' + }, - type: function () { - return 'hidden'; - }, + build: function () { + this.options.helpText = this.builder.map.help.formatIconSymbol + L.FormBuilder.BlurInput.prototype.build.call(this) + this.parentContainer = L.DomUtil.create( + 'div', + 'umap-form-iconfield', + this.parentNode + ) + this.buttonsContainer = L.DomUtil.create('div', '', this.parentContainer) + this.pictogramsContainer = L.DomUtil.create( + 'div', + 'umap-pictogram-list', + this.parentContainer + ) + this.input.type = 'hidden' + this.input.placeholder = L._('Symbol or url') + this.udpatePreview() + this.on('define', this.fetchIconList) + }, - build: function () { - this.options.helpText = this.builder.map.help.formatIconSymbol; - L.FormBuilder.BlurInput.prototype.build.call(this); - this.parentContainer = L.DomUtil.create('div', 'umap-form-iconfield', this.parentNode); - this.buttonsContainer = L.DomUtil.create('div', '', this.parentContainer); - this.pictogramsContainer = L.DomUtil.create('div', 'umap-pictogram-list', this.parentContainer); - this.input.type = 'hidden'; - this.input.placeholder = L._('Symbol or url'); - this.udpatePreview(); - this.on('define', this.fetchIconList); - }, + isUrl: function () { + return this.value().indexOf('/') !== -1 + }, - isUrl: function () { - return (this.value().indexOf('/') !== -1); - }, - - udpatePreview: function () { - if (this.value()&& this.value().indexOf('{') === -1) { // Do not try to render URL with variables - if (this.isUrl()) { - var img = L.DomUtil.create('img', '', L.DomUtil.create('div', 'umap-icon-choice', this.buttonsContainer)); - img.src = this.value(); - L.DomEvent.on(img, 'click', this.fetchIconList, this); - } else { - var el = L.DomUtil.create('span', '', L.DomUtil.create('div', 'umap-icon-choice', this.buttonsContainer)); - el.textContent = this.value(); - L.DomEvent.on(el, 'click', this.fetchIconList, this); - } - } - this.button = L.DomUtil.create('a', '', this.buttonsContainer); - this.button.textContent = this.value() ? L._('Change symbol') : L._('Add symbol'); - this.button.href = '#'; - L.DomEvent - .on(this.button, 'click', L.DomEvent.stop) - .on(this.button, 'click', this.fetchIconList, this); - }, - - addIconPreview: function (pictogram) { - var baseClass = 'umap-icon-choice', - value = pictogram.src, - className = value === this.value() ? baseClass + ' selected' : baseClass, - container = L.DomUtil.create('div', className, this.pictogramsContainer), - img = L.DomUtil.create('img', '', container); - img.src = value; - if (pictogram.name && pictogram.attribution) { - img.title = pictogram.name + ' — © ' + pictogram.attribution; - } - L.DomEvent.on(container, 'click', function (e) { - this.input.value = value; - this.sync(); - this.unselectAll(this.pictogramsContainer); - L.DomUtil.addClass(container, 'selected'); - this.pictogramsContainer.innerHTML = ''; - this.udpatePreview(); - }, this); - }, - - clear: function () { - this.input.value = ''; - this.unselectAll(this.pictogramsContainer); - this.sync(); - this.pictogramsContainer.innerHTML = ''; - this.udpatePreview(); - }, - - buildIconList: function (data) { - this.pictogramsContainer.innerHTML = ''; - this.buttonsContainer.innerHTML = ''; - for (var idx in data.pictogram_list) { - this.addIconPreview(data.pictogram_list[idx]); - } - var cancelButton = L.DomUtil.create('a', '', this.pictogramsContainer); - cancelButton.textContent = L._('Cancel'); - cancelButton.href = '#'; - cancelButton.style.display = 'block'; - cancelButton.style.clear = 'both'; - L.DomEvent - .on(cancelButton, 'click', L.DomEvent.stop) - .on(cancelButton, 'click', function (e) { - this.pictogramsContainer.innerHTML = ''; - this.udpatePreview(); - }, this); - var customButton = L.DomUtil.create('a', '', this.pictogramsContainer); - customButton.textContent = L._('Set symbol'); - customButton.href = '#'; - customButton.style.display = 'block'; - customButton.style.clear = 'both'; - this.builder.map.help.button(customButton, 'formatIconSymbol'); - L.DomEvent - .on(customButton, 'click', L.DomEvent.stop) - .on(customButton, 'click', function (e) { - this.input.type = 'text'; - this.pictogramsContainer.innerHTML = ''; - }, this); - }, - - fetchIconList: function (e) { - this.builder.map.get(this.builder.map.options.urls.pictogram_list_json, { - callback: this.buildIconList, - context: this - }); - }, - - unselectAll: function (container) { - var els = container.querySelectorAll('div.selected'); - for (var el in els) { - if (els.hasOwnProperty(el)) L.DomUtil.removeClass(els[el], 'selected'); - } + udpatePreview: function () { + if (this.value() && this.value().indexOf('{') === -1) { + // Do not try to render URL with variables + if (this.isUrl()) { + const img = L.DomUtil.create( + 'img', + '', + L.DomUtil.create('div', 'umap-icon-choice', this.buttonsContainer) + ) + img.src = this.value() + L.DomEvent.on(img, 'click', this.fetchIconList, this) + } else { + const el = L.DomUtil.create( + 'span', + '', + L.DomUtil.create('div', 'umap-icon-choice', this.buttonsContainer) + ) + el.textContent = this.value() + L.DomEvent.on(el, 'click', this.fetchIconList, this) + } } + this.button = L.DomUtil.create('a', '', this.buttonsContainer) + this.button.textContent = this.value() ? L._('Change symbol') : L._('Add symbol') + this.button.href = '#' + L.DomEvent.on(this.button, 'click', L.DomEvent.stop).on( + this.button, + 'click', + this.fetchIconList, + this + ) + }, -}); + addIconPreview: function (pictogram) { + const baseClass = 'umap-icon-choice', + value = pictogram.src, + className = value === this.value() ? `${baseClass} selected` : baseClass, + container = L.DomUtil.create('div', className, this.pictogramsContainer), + img = L.DomUtil.create('img', '', container) + img.src = value + if (pictogram.name && pictogram.attribution) { + img.title = `${pictogram.name} — © ${pictogram.attribution}` + } + L.DomEvent.on( + container, + 'click', + function (e) { + this.input.value = value + this.sync() + this.unselectAll(this.pictogramsContainer) + L.DomUtil.addClass(container, 'selected') + this.pictogramsContainer.innerHTML = '' + this.udpatePreview() + }, + this + ) + }, + + clear: function () { + this.input.value = '' + this.unselectAll(this.pictogramsContainer) + this.sync() + this.pictogramsContainer.innerHTML = '' + this.udpatePreview() + }, + + buildIconList: function (data) { + this.pictogramsContainer.innerHTML = '' + this.buttonsContainer.innerHTML = '' + for (const idx in data.pictogram_list) { + this.addIconPreview(data.pictogram_list[idx]) + } + const cancelButton = L.DomUtil.create('a', '', this.pictogramsContainer) + cancelButton.textContent = L._('Cancel') + cancelButton.href = '#' + cancelButton.style.display = 'block' + cancelButton.style.clear = 'both' + L.DomEvent.on(cancelButton, 'click', L.DomEvent.stop).on( + cancelButton, + 'click', + function (e) { + this.pictogramsContainer.innerHTML = '' + this.udpatePreview() + }, + this + ) + const customButton = L.DomUtil.create('a', '', this.pictogramsContainer) + customButton.textContent = L._('Set symbol') + customButton.href = '#' + customButton.style.display = 'block' + customButton.style.clear = 'both' + this.builder.map.help.button(customButton, 'formatIconSymbol') + L.DomEvent.on(customButton, 'click', L.DomEvent.stop).on( + customButton, + 'click', + function (e) { + this.input.type = 'text' + this.pictogramsContainer.innerHTML = '' + }, + this + ) + }, + + fetchIconList: function (e) { + this.builder.map.get(this.builder.map.options.urls.pictogram_list_json, { + callback: this.buildIconList, + context: this, + }) + }, + + unselectAll: function (container) { + const els = container.querySelectorAll('div.selected') + for (const el in els) { + if (els.hasOwnProperty(el)) L.DomUtil.removeClass(els[el], 'selected') + } + }, +}) L.FormBuilder.Url = L.FormBuilder.Input.extend({ - - type: function () { - return 'url'; - } - -}); + type: function () { + return 'url' + }, +}) L.FormBuilder.Switch = L.FormBuilder.CheckBox.extend({ + getParentNode: function () { + L.FormBuilder.CheckBox.prototype.getParentNode.call(this) + if (this.options.inheritable) return this.quickContainer + return this.extendedContainer + }, - getParentNode: function () { - L.FormBuilder.CheckBox.prototype.getParentNode.call(this); - if (this.options.inheritable) return this.quickContainer; - return this.extendedContainer; - }, - - build: function () { - L.FormBuilder.CheckBox.prototype.build.apply(this); - if (this.options.inheritable) this.label = L.DomUtil.create('label', '', this.input.parentNode); - else this.input.parentNode.appendChild(this.label); - L.DomUtil.addClass(this.input.parentNode, 'with-switch'); - var id = (this.builder.options.id || Date.now()) + '.' + this.name; - this.label.setAttribute('for', id); - L.DomUtil.addClass(this.input, 'switch'); - this.input.id = id; - } - -}); + build: function () { + L.FormBuilder.CheckBox.prototype.build.apply(this) + if (this.options.inheritable) + this.label = L.DomUtil.create('label', '', this.input.parentNode) + else this.input.parentNode.appendChild(this.label) + L.DomUtil.addClass(this.input.parentNode, 'with-switch') + const id = `${this.builder.options.id || Date.now()}.${this.name}` + this.label.setAttribute('for', id) + L.DomUtil.addClass(this.input, 'switch') + this.input.id = id + }, +}) L.FormBuilder.MultiChoice = L.FormBuilder.Element.extend({ + default: 'null', + className: 'umap-multiplechoice', - default: 'null', - className: 'umap-multiplechoice', + clear: function () { + const checked = this.container.querySelector('input[type="radio"]:checked') + if (checked) checked.checked = false + }, - clear: function () { - var checked = this.container.querySelector('input[type="radio"]:checked'); - if (checked) checked.checked = false; - }, + fetch: function () { + let value = (this.backup = this.toHTML()) + if (!this.container.querySelector(`input[type="radio"][value="${value}"]`)) + value = this.default + this.container.querySelector(`input[type="radio"][value="${value}"]`).checked = true + }, - fetch: function () { - var value = this.backup = this.toHTML(); - if (!this.container.querySelector('input[type="radio"][value="' + value + '"]')) value = this.default; - this.container.querySelector('input[type="radio"][value="' + value + '"]').checked = true; - }, + value: function () { + const checked = this.container.querySelector('input[type="radio"]:checked') + if (checked) return checked.value + }, - value: function () { - var checked = this.container.querySelector('input[type="radio"]:checked'); - if (checked) return checked.value; - }, + getChoices: function () { + return this.options.choices || this.choices + }, - getChoices: function () { - return this.options.choices || this.choices; - }, - - build: function () { - var choices = this.getChoices(); - this.container = L.DomUtil.create('div', this.className + ' by' + choices.length, this.parentNode); - for (var i = 0; i < choices.length; i++) { - this.addChoice(choices[i][0], choices[i][1], i); - } - this.fetch(); - }, - - addChoice: function (value, label, counter) { - var input = L.DomUtil.create('input', '', this.container); - label = L.DomUtil.add('label', '', this.container, label); - input.type = 'radio'; - input.name = this.name; - input.value = value; - var id = Date.now() + '.' + this.name + '.' + counter; - label.setAttribute('for', id); - input.id = id; - L.DomEvent.on(input, 'change', this.sync, this); + build: function () { + const choices = this.getChoices() + this.container = L.DomUtil.create( + 'div', + `${this.className} by${choices.length}`, + this.parentNode + ) + for (let i = 0; i < choices.length; i++) { + this.addChoice(choices[i][0], choices[i][1], i) } + this.fetch() + }, -}); + addChoice: function (value, label, counter) { + const input = L.DomUtil.create('input', '', this.container) + label = L.DomUtil.add('label', '', this.container, label) + input.type = 'radio' + input.name = this.name + input.value = value + const id = `${Date.now()}.${this.name}.${counter}` + label.setAttribute('for', id) + input.id = id + L.DomEvent.on(input, 'change', this.sync, this) + }, +}) L.FormBuilder.TernaryChoices = L.FormBuilder.MultiChoice.extend({ + default: 'null', - default: 'null', - - toJS: function () { - var value = this.value(); - switch (value) { - case 'true': - case true: - value = true; - break; - case 'false': - case false: - value = false; - break; - default: - value = null; - } - return value; + toJS: function () { + let value = this.value() + switch (value) { + case 'true': + case true: + value = true + break + case 'false': + case false: + value = false + break + default: + value = null } - -}); + return value + }, +}) L.FormBuilder.ControlChoice = L.FormBuilder.TernaryChoices.extend({ - - choices: [ - [true, L._('always')], - [false, L._('never')], - ['null', L._('hidden')] - ] - -}); - + choices: [ + [true, L._('always')], + [false, L._('never')], + ['null', L._('hidden')], + ], +}) L.FormBuilder.LabelChoice = L.FormBuilder.TernaryChoices.extend({ + default: false, - default: false, - - choices: [ - [true, L._('always')], - [false, L._('never')], - ['null', L._('on hover')] - ] - -}); + choices: [ + [true, L._('always')], + [false, L._('never')], + ['null', L._('on hover')], + ], +}) L.FormBuilder.DataLayersControl = L.FormBuilder.ControlChoice.extend({ + choices: [ + [true, L._('collapsed')], + ['expanded', L._('expanded')], + [false, L._('never')], + ['null', L._('hidden')], + ], - choices: [ - [true, L._('collapsed')], - ['expanded', L._('expanded')], - [false, L._('never')], - ['null', L._('hidden')] - ], - - toJS: function () { - var value = this.value(); - if (value !== 'expanded') value = L.FormBuilder.ControlChoice.prototype.toJS.call(this); - return value; - } - -}); + toJS: function () { + let value = this.value() + if (value !== 'expanded') + value = L.FormBuilder.ControlChoice.prototype.toJS.call(this) + return value + }, +}) L.FormBuilder.OutlinkTarget = L.FormBuilder.MultiChoice.extend({ + default: 'blank', - default: 'blank', - - choices: [ - ['blank', L._('new window')], - ['self', L._('iframe')], - ['parent', L._('parent window')] - ] - -}); + choices: [ + ['blank', L._('new window')], + ['self', L._('iframe')], + ['parent', L._('parent window')], + ], +}) L.FormBuilder.Range = L.FormBuilder.Input.extend({ + type: function () { + return 'range' + }, - type: function () { - return 'range'; - }, + value: function () { + return L.DomUtil.hasClass(this.wrapper, 'undefined') ? undefined : this.input.value + }, - value: function () { - return L.DomUtil.hasClass(this.wrapper, 'undefined') ? undefined : this.input.value; + buildHelpText: function () { + const datalist = L.DomUtil.create( + 'datalist', + 'umap-field-datalist', + this.getHelpTextParent() + ) + datalist.id = `range-${this.options.label || this.name}` + this.input.setAttribute('list', datalist.id) + let options = '' + for (let i = this.options.min; i <= this.options.max; i += this.options.step) { + options += `` } - -}); - + datalist.innerHTML = options + }, +}) L.FormBuilder.ManageOwner = L.FormBuilder.Element.extend({ - - build: function () { - var options = { - className: 'edit-owner', - on_select: L.bind(this.onSelect, this) - }; - this.autocomplete = new L.U.AutoComplete.Ajax.Select(this.parentNode, options); - var owner = this.toHTML(); - if (owner) this.autocomplete.displaySelected({'item': {'value': owner.id, 'label': owner.name}}); - }, - - value: function () { - return this._value; - }, - - onSelect: function (choice) { - this._value = { - 'id': choice.item.value, - 'name': choice.item.label, - 'url': choice.item.url - }; - this.set(); + build: function () { + const options = { + className: 'edit-owner', + on_select: L.bind(this.onSelect, this), } + this.autocomplete = new L.U.AutoComplete.Ajax.Select(this.parentNode, options) + const owner = this.toHTML() + if (owner) + this.autocomplete.displaySelected({ + item: { value: owner.id, label: owner.name }, + }) + }, + value: function () { + return this._value + }, -}); - + onSelect: function (choice) { + this._value = { + id: choice.item.value, + name: choice.item.label, + url: choice.item.url, + } + this.set() + }, +}) L.FormBuilder.ManageEditors = L.FormBuilder.Element.extend({ - - build: function () { - var options = { - className: 'edit-editors', - on_select: L.bind(this.onSelect, this), - on_unselect: L.bind(this.onUnselect, this) - }; - this.autocomplete = new L.U.AutoComplete.Ajax.SelectMultiple(this.parentNode, options); - this._values = this.toHTML(); - if (this._values) for (var i = 0; i < this._values.length; i++) this.autocomplete.displaySelected({'item': {'value': this._values[i].id, 'label': this._values[i].name}}); - }, - - value: function () { - return this._values; - }, - - onSelect: function (choice) { - this._values.push({ - 'id': choice.item.value, - 'name': choice.item.label, - 'url': choice.item.url - }); - this.set(); - }, - - onUnselect: function (choice) { - var index = this._values.findIndex(function (item) {return item.id === choice.item.value}); - if (index !== -1) { - this._values.splice(index, 1); - this.set(); - } + build: function () { + const options = { + className: 'edit-editors', + on_select: L.bind(this.onSelect, this), + on_unselect: L.bind(this.onUnselect, this), } + this.autocomplete = new L.U.AutoComplete.Ajax.SelectMultiple( + this.parentNode, + options + ) + this._values = this.toHTML() + if (this._values) + for (let i = 0; i < this._values.length; i++) + this.autocomplete.displaySelected({ + item: { value: this._values[i].id, label: this._values[i].name }, + }) + }, -}); + value: function () { + return this._values + }, + + onSelect: function (choice) { + this._values.push({ + id: choice.item.value, + name: choice.item.label, + url: choice.item.url, + }) + this.set() + }, + + onUnselect: function (choice) { + const index = this._values.findIndex((item) => item.id === choice.item.value) + if (index !== -1) { + this._values.splice(index, 1) + this.set() + } + }, +}) L.U.FormBuilder = L.FormBuilder.extend({ + options: { + className: 'umap-form', + }, - options: { - className: 'umap-form' + defaultOptions: { + name: { label: L._('name') }, + description: { + label: L._('description'), + handler: 'Textarea', + helpEntries: 'textFormatting', }, - - defaultOptions: { - name: {label: L._('name')}, - description: {label: L._('description'), handler: 'Textarea', helpEntries: 'textFormatting'}, - color: {handler: 'ColorPicker', label: L._('color'), helpEntries: 'colorValue', inheritable: true}, - opacity: {handler: 'Range', min: 0.1, max: 1, step: 0.1, label: L._('opacity'), inheritable: true}, - stroke: {handler: 'Switch', label: L._('stroke'), helpEntries: 'stroke', inheritable: true}, - weight: {handler: 'Range', min: 1, max: 20, step: 1, label: L._('weight'), inheritable: true}, - fill: {handler: 'Switch', label: L._('fill'), helpEntries: 'fill', inheritable: true}, - fillColor: {handler: 'ColorPicker', label: L._('fill color'), helpEntries: 'fillColor', inheritable: true}, - fillOpacity: {handler: 'Range', min: 0.1, max: 1, step: 0.1, label: L._('fill opacity'), inheritable: true}, - smoothFactor: {handler: 'Range', min: 0, max: 10, step: 0.5, label: L._('Simplify'), helpEntries: 'smoothFactor', inheritable: true}, - dashArray: {label: L._('dash array'), helpEntries: 'dashArray', inheritable: true}, - iconClass: {handler: 'IconClassSwitcher', label: L._('Icon shape'), inheritable: true}, - iconUrl: {handler: 'IconUrl', label: L._('Icon symbol'), inheritable: true, helpText: L.U.Help.formatIconSymbol}, - popupShape: {handler: 'PopupShape', label: L._('Popup shape'), inheritable: true}, - popupTemplate: {handler: 'PopupContent', label: L._('Popup content style'), inheritable: true}, - popupContentTemplate: {label: L._('Popup content template'), handler: 'Textarea', helpEntries: ['dynamicProperties', 'textFormatting'], placeholder: '# {name}', inheritable: true}, - datalayer: {handler: 'DataLayerSwitcher', label: L._('Choose the layer of the feature')}, - moreControl: {handler: 'Switch', label: L._('Do you want to display the «more» control?')}, - scrollWheelZoom: {handler: 'Switch', label: L._('Allow scroll wheel zoom?')}, - miniMap: {handler: 'Switch', label: L._('Do you want to display a minimap?')}, - scaleControl: {handler: 'Switch', label: L._('Do you want to display the scale control?')}, - onLoadPanel: {handler: 'onLoadPanel', label: L._('Do you want to display a panel on load?')}, - displayPopupFooter: {handler: 'Switch', label: L._('Do you want to display popup footer?')}, - captionBar: {handler: 'Switch', label: L._('Do you want to display a caption bar?')}, - zoomTo: {handler: 'IntInput', placeholder: L._('Inherit'), helpEntries: 'zoomTo', label: L._('Default zoom level'), inheritable: true}, - showLabel: {handler: 'LabelChoice', label: L._('Display label'), inheritable: true}, - labelDirection: {handler: 'LabelDirection', label: L._('Label direction'), inheritable: true}, - labelInteractive: {handler: 'Switch', label: L._('Labels are clickable'), inheritable: true}, - labelKey: {helpEntries: 'labelKey', placeholder: L._('Default: name'), label: L._('Label key'), inheritable: true}, - zoomControl: {handler: 'ControlChoice', label: L._('Display the zoom control')}, - searchControl: {handler: 'ControlChoice', label: L._('Display the search control')}, - fullscreenControl: {handler: 'ControlChoice', label: L._('Display the fullscreen control')}, - embedControl: {handler: 'ControlChoice', label: L._('Display the embed control')}, - locateControl: {handler: 'ControlChoice', label: L._('Display the locate control')}, - measureControl: {handler: 'ControlChoice', label: L._('Display the measure control')}, - tilelayersControl: {handler: 'ControlChoice', label: L._('Display the tile layers control')}, - editinosmControl: {handler: 'ControlChoice', label: L._('Display the control to open OpenStreetMap editor')}, - datalayersControl: {handler: 'DataLayersControl', label: L._('Display the data layers control')}, + color: { + handler: 'ColorPicker', + label: L._('color'), + helpEntries: 'colorValue', + inheritable: true, }, - - initialize: function (obj, fields, options) { - this.map = obj.getMap(); - L.FormBuilder.prototype.initialize.call(this, obj, fields, options); - this.on('finish', this.finish); + opacity: { + handler: 'Range', + min: 0.1, + max: 1, + step: 0.1, + label: L._('opacity'), + inheritable: true, }, - - setter: function (field, value) { - L.FormBuilder.prototype.setter.call(this, field, value); - this.obj.isDirty = true; + stroke: { + handler: 'Switch', + label: L._('stroke'), + helpEntries: 'stroke', + inheritable: true, }, + weight: { + handler: 'Range', + min: 1, + max: 20, + step: 1, + label: L._('weight'), + inheritable: true, + }, + fill: { + handler: 'Switch', + label: L._('fill'), + helpEntries: 'fill', + inheritable: true, + }, + fillColor: { + handler: 'ColorPicker', + label: L._('fill color'), + helpEntries: 'fillColor', + inheritable: true, + }, + fillOpacity: { + handler: 'Range', + min: 0.1, + max: 1, + step: 0.1, + label: L._('fill opacity'), + inheritable: true, + }, + smoothFactor: { + handler: 'Range', + min: 0, + max: 10, + step: 0.5, + label: L._('Simplify'), + helpEntries: 'smoothFactor', + inheritable: true, + }, + dashArray: { + label: L._('dash array'), + helpEntries: 'dashArray', + inheritable: true, + }, + iconClass: { + handler: 'IconClassSwitcher', + label: L._('Icon shape'), + inheritable: true, + }, + iconUrl: { + handler: 'IconUrl', + label: L._('Icon symbol'), + inheritable: true, + helpText: L.U.Help.formatIconSymbol, + }, + popupShape: { handler: 'PopupShape', label: L._('Popup shape'), inheritable: true }, + popupTemplate: { + handler: 'PopupContent', + label: L._('Popup content style'), + inheritable: true, + }, + popupContentTemplate: { + label: L._('Popup content template'), + handler: 'Textarea', + helpEntries: ['dynamicProperties', 'textFormatting'], + placeholder: '# {name}', + inheritable: true, + }, + datalayer: { + handler: 'DataLayerSwitcher', + label: L._('Choose the layer of the feature'), + }, + moreControl: { + handler: 'Switch', + label: L._('Do you want to display the «more» control?'), + }, + scrollWheelZoom: { handler: 'Switch', label: L._('Allow scroll wheel zoom?') }, + miniMap: { handler: 'Switch', label: L._('Do you want to display a minimap?') }, + scaleControl: { + handler: 'Switch', + label: L._('Do you want to display the scale control?'), + }, + onLoadPanel: { + handler: 'onLoadPanel', + label: L._('Do you want to display a panel on load?'), + }, + displayPopupFooter: { + handler: 'Switch', + label: L._('Do you want to display popup footer?'), + }, + captionBar: { + handler: 'Switch', + label: L._('Do you want to display a caption bar?'), + }, + captionMenus: { + handler: 'Switch', + label: L._('Do you want to display caption menus?'), + }, + zoomTo: { + handler: 'IntInput', + placeholder: L._('Inherit'), + helpEntries: 'zoomTo', + label: L._('Default zoom level'), + inheritable: true, + }, + showLabel: { + handler: 'LabelChoice', + label: L._('Display label'), + inheritable: true, + }, + labelDirection: { + handler: 'LabelDirection', + label: L._('Label direction'), + inheritable: true, + }, + labelInteractive: { + handler: 'Switch', + label: L._('Labels are clickable'), + inheritable: true, + }, + labelKey: { + helpEntries: 'labelKey', + placeholder: L._('Default: name'), + label: L._('Label key'), + inheritable: true, + }, + zoomControl: { handler: 'ControlChoice', label: L._('Display the zoom control') }, + searchControl: { + handler: 'ControlChoice', + label: L._('Display the search control'), + }, + fullscreenControl: { + handler: 'ControlChoice', + label: L._('Display the fullscreen control'), + }, + embedControl: { handler: 'ControlChoice', label: L._('Display the embed control') }, + locateControl: { + handler: 'ControlChoice', + label: L._('Display the locate control'), + }, + measureControl: { + handler: 'ControlChoice', + label: L._('Display the measure control'), + }, + tilelayersControl: { + handler: 'ControlChoice', + label: L._('Display the tile layers control'), + }, + editinosmControl: { + handler: 'ControlChoice', + label: L._('Display the control to open OpenStreetMap editor'), + }, + datalayersControl: { + handler: 'DataLayersControl', + label: L._('Display the data layers control'), + }, + starControl: { + handler: 'ControlChoice', + label: L._('Display the star map button'), + }, + }, - finish: function () { - this.map.ui.closePanel(); - } + initialize: function (obj, fields, options) { + this.map = obj.getMap() + L.FormBuilder.prototype.initialize.call(this, obj, fields, options) + this.on('finish', this.finish) + }, -}); + setter: function (field, value) { + L.FormBuilder.prototype.setter.call(this, field, value) + this.obj.isDirty = true + }, + + finish: function () { + this.map.ui.closePanel() + }, +}) diff --git a/umap/static/umap/js/umap.icon.js b/umap/static/umap/js/umap.icon.js index 2faad1b3..b68f278f 100644 --- a/umap/static/umap/js/umap.icon.js +++ b/umap/static/umap/js/umap.icon.js @@ -1,189 +1,195 @@ L.U.Icon = L.DivIcon.extend({ - initialize: function(map, options) { - this.map = map; - var default_options = { - iconSize: null, // Made in css - iconUrl: this.map.getDefaultOption('iconUrl'), - feature: null - }; - options = L.Util.extend({}, default_options, options); - L.Icon.prototype.initialize.call(this, options); - this.feature = this.options.feature; - if (this.feature && this.feature.isReadOnly()) { - this.options.className += ' readonly'; - } - }, - - _getIconUrl: function (name) { - var url; - if(this.feature && this.feature._getIconUrl(name)) url = this.feature._getIconUrl(name); - else url = this.options[name + 'Url']; - return this.formatUrl(url, this.feature); - }, - - _getColor: function () { - var color; - if(this.feature) color = this.feature.getOption('color'); - else if (this.options.color) color = this.options.color; - else color = this.map.getDefaultOption('color'); - return color; - }, - - formatUrl: function (url, feature) { - return L.Util.greedyTemplate(url || '', feature ? feature.extendedProperties() : {}); + initialize: function (map, options) { + this.map = map + const default_options = { + iconSize: null, // Made in css + iconUrl: this.map.getDefaultOption('iconUrl'), + feature: null, } + options = L.Util.extend({}, default_options, options) + L.Icon.prototype.initialize.call(this, options) + this.feature = this.options.feature + if (this.feature && this.feature.isReadOnly()) { + this.options.className += ' readonly' + } + }, -}); + _getIconUrl: function (name) { + let url + if (this.feature && this.feature._getIconUrl(name)) + url = this.feature._getIconUrl(name) + else url = this.options[`${name}Url`] + return this.formatUrl(url, this.feature) + }, + + _getColor: function () { + let color + if (this.feature) color = this.feature.getOption('color') + else if (this.options.color) color = this.options.color + else color = this.map.getDefaultOption('color') + return color + }, + + formatUrl: function (url, feature) { + return L.Util.greedyTemplate(url || '', feature ? feature.extendedProperties() : {}) + }, +}) L.U.Icon.Default = L.U.Icon.extend({ - default_options: { - iconAnchor: new L.Point(16, 40), - popupAnchor: new L.Point(0, -40), - tooltipAnchor: new L.Point(16, -24), - className: 'umap-div-icon' - }, + default_options: { + iconAnchor: new L.Point(16, 40), + popupAnchor: new L.Point(0, -40), + tooltipAnchor: new L.Point(16, -24), + className: 'umap-div-icon', + }, - initialize: function(map, options) { - options = L.Util.extend({}, this.default_options, options); - L.U.Icon.prototype.initialize.call(this, map, options); - }, + initialize: function (map, options) { + options = L.Util.extend({}, this.default_options, options) + L.U.Icon.prototype.initialize.call(this, map, options) + }, - _setColor: function() { - var color = this._getColor(); - this.elements.container.style.backgroundColor = color; - this.elements.arrow.style.borderTopColor = color; - }, + _setColor: function () { + const color = this._getColor() + this.elements.container.style.backgroundColor = color + this.elements.arrow.style.borderTopColor = color + }, - createIcon: function() { - this.elements = {}; - this.elements.main = L.DomUtil.create('div'); - this.elements.container = L.DomUtil.create('div', 'icon_container', this.elements.main); - this.elements.arrow = L.DomUtil.create('div', 'icon_arrow', this.elements.main); - var src = this._getIconUrl('icon'); - if (src) { - // An url. - if (src.indexOf('http') === 0 || src.indexOf('/') === 0 || src.indexOf('data:image') === 0) { - this.elements.img = L.DomUtil.create('img', null, this.elements.container); - this.elements.img.src = src; - } else { - this.elements.span = L.DomUtil.create('span', null, this.elements.container) - this.elements.span.textContent = src; - } - } - this._setColor(); - this._setIconStyles(this.elements.main, 'icon'); - return this.elements.main; + createIcon: function () { + this.elements = {} + this.elements.main = L.DomUtil.create('div') + this.elements.container = L.DomUtil.create( + 'div', + 'icon_container', + this.elements.main + ) + this.elements.arrow = L.DomUtil.create('div', 'icon_arrow', this.elements.main) + const src = this._getIconUrl('icon') + if (src) { + // An url. + if ( + src.indexOf('http') === 0 || + src.indexOf('/') === 0 || + src.indexOf('data:image') === 0 + ) { + this.elements.img = L.DomUtil.create('img', null, this.elements.container) + this.elements.img.src = src + } else { + this.elements.span = L.DomUtil.create('span', null, this.elements.container) + this.elements.span.textContent = src + } } - -}); + this._setColor() + this._setIconStyles(this.elements.main, 'icon') + return this.elements.main + }, +}) L.U.Icon.Circle = L.U.Icon.extend({ - initialize: function(map, options) { - var default_options = { - iconAnchor: new L.Point(6, 6), - popupAnchor: new L.Point(0, -6), - tooltipAnchor: new L.Point(6, 0), - className: 'umap-circle-icon' - }; - options = L.Util.extend({}, default_options, options); - L.U.Icon.prototype.initialize.call(this, map, options); - }, - - _setColor: function() { - this.elements.main.style.backgroundColor = this._getColor(); - }, - - createIcon: function() { - this.elements = {}; - this.elements.main = L.DomUtil.create('div'); - this.elements.main.innerHTML = ' '; - this._setColor(); - this._setIconStyles(this.elements.main, 'icon'); - return this.elements.main; + initialize: function (map, options) { + const default_options = { + iconAnchor: new L.Point(6, 6), + popupAnchor: new L.Point(0, -6), + tooltipAnchor: new L.Point(6, 0), + className: 'umap-circle-icon', } + options = L.Util.extend({}, default_options, options) + L.U.Icon.prototype.initialize.call(this, map, options) + }, -}); + _setColor: function () { + this.elements.main.style.backgroundColor = this._getColor() + }, + + createIcon: function () { + this.elements = {} + this.elements.main = L.DomUtil.create('div') + this.elements.main.innerHTML = ' ' + this._setColor() + this._setIconStyles(this.elements.main, 'icon') + return this.elements.main + }, +}) L.U.Icon.Drop = L.U.Icon.Default.extend({ - default_options: { - iconAnchor: new L.Point(16, 42), - popupAnchor: new L.Point(0, -42), - tooltipAnchor: new L.Point(16, -24), - className: 'umap-drop-icon' - } -}); + default_options: { + iconAnchor: new L.Point(16, 42), + popupAnchor: new L.Point(0, -42), + tooltipAnchor: new L.Point(16, -24), + className: 'umap-drop-icon', + }, +}) L.U.Icon.Ball = L.U.Icon.Default.extend({ - default_options: { - iconAnchor: new L.Point(8, 30), - popupAnchor: new L.Point(0, -28), - tooltipAnchor: new L.Point(8, -23), - className: 'umap-ball-icon' - }, + default_options: { + iconAnchor: new L.Point(8, 30), + popupAnchor: new L.Point(0, -28), + tooltipAnchor: new L.Point(8, -23), + className: 'umap-ball-icon', + }, - createIcon: function() { - this.elements = {}; - this.elements.main = L.DomUtil.create('div'); - this.elements.container = L.DomUtil.create('div', 'icon_container', this.elements.main); - this.elements.arrow = L.DomUtil.create('div', 'icon_arrow', this.elements.main); - this._setColor(); - this._setIconStyles(this.elements.main, 'icon'); - return this.elements.main; - }, + createIcon: function () { + this.elements = {} + this.elements.main = L.DomUtil.create('div') + this.elements.container = L.DomUtil.create( + 'div', + 'icon_container', + this.elements.main + ) + this.elements.arrow = L.DomUtil.create('div', 'icon_arrow', this.elements.main) + this._setColor() + this._setIconStyles(this.elements.main, 'icon') + return this.elements.main + }, - _setColor: function() { - var color = this._getColor('color'), - background; - if (L.Browser.ielt9) { - background = color; - } - else if (L.Browser.webkit) { - background = '-webkit-gradient( radial, 6 38%, 0, 6 38%, 8, from(white), to(' + color + ') )'; - } - else { - background = 'radial-gradient(circle at 6px 38% , white -4px, ' + color + ' 8px) repeat scroll 0 0 transparent'; - } - this.elements.container.style.background = background; + _setColor: function () { + const color = this._getColor('color') + let background + if (L.Browser.ielt9) { + background = color + } else if (L.Browser.webkit) { + background = `-webkit-gradient( radial, 6 38%, 0, 6 38%, 8, from(white), to(${color}) )` + } else { + background = `radial-gradient(circle at 6px 38% , white -4px, ${color} 8px) repeat scroll 0 0 transparent` } + this.elements.container.style.background = background + }, +}) -}); - -var _CACHE_COLOR = {}; +const _CACHE_COLOR = {} L.U.Icon.Cluster = L.DivIcon.extend({ - options: { - iconSize: [40, 40] - }, + options: { + iconSize: [40, 40], + }, - initialize: function (datalayer, cluster) { - this.datalayer = datalayer; - this.cluster = cluster; - }, + initialize: function (datalayer, cluster) { + this.datalayer = datalayer + this.cluster = cluster + }, - createIcon: function () { - var container = L.DomUtil.create('div', 'leaflet-marker-icon marker-cluster'), - div = L.DomUtil.create('div', '', container), - span = L.DomUtil.create('span', '', div), - backgroundColor = this.datalayer.getColor(); - span.textContent = this.cluster.getChildCount(); - div.style.backgroundColor = backgroundColor; - return container; - }, + createIcon: function () { + const container = L.DomUtil.create('div', 'leaflet-marker-icon marker-cluster'), + div = L.DomUtil.create('div', '', container), + span = L.DomUtil.create('span', '', div), + backgroundColor = this.datalayer.getColor() + span.textContent = this.cluster.getChildCount() + div.style.backgroundColor = backgroundColor + return container + }, - computeTextColor: function (el) { - var color, - backgroundColor = this.datalayer.getColor(); - if (this.datalayer.options.cluster && this.datalayer.options.cluster.textColor) { - color = this.datalayer.options.cluster.textColor; - } - if (!color) { - if (typeof _CACHE_COLOR[backgroundColor] === 'undefined') { - color = L.DomUtil.TextColorFromBackgroundColor(el); - _CACHE_COLOR[backgroundColor] = color; - } else { - color = _CACHE_COLOR[backgroundColor]; - } - } - return color; + computeTextColor: function (el) { + let color + const backgroundColor = this.datalayer.getColor() + if (this.datalayer.options.cluster && this.datalayer.options.cluster.textColor) { + color = this.datalayer.options.cluster.textColor } - -}); + if (!color) { + if (typeof _CACHE_COLOR[backgroundColor] === 'undefined') { + color = L.DomUtil.TextColorFromBackgroundColor(el) + _CACHE_COLOR[backgroundColor] = color + } else { + color = _CACHE_COLOR[backgroundColor] + } + } + return color + }, +}) diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 92ca44a2..ce0a5ef3 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -1,1703 +1,2230 @@ L.Map.mergeOptions({ - base_layers: null, - overlay_layers: null, - datalayers: [], - center: [4, 50], - zoom: 6, - hash: true, - default_color: 'DarkBlue', - default_smoothFactor: 1.0, - default_opacity: 0.5, - default_fillOpacity: 0.3, - default_stroke: true, - default_fill: true, - default_weight: 3, - default_iconClass: 'Default', - default_zoomTo: 16, - default_popupContentTemplate: '# {name}\n{description}', - default_interactive: true, - default_labelDirection: 'auto', - attributionControl: false, - allowEdit: true, - embedControl: true, - zoomControl: true, - datalayersControl: true, - searchControl: true, - editInOSMControl: false, - editInOSMControlOptions: false, - scaleControl: true, - noControl: false, // Do not render any control. - miniMap: false, - name: '', - description: '', - displayPopupFooter: false, - demoTileInfos: {s: 'a', z: 9, x: 265, y: 181, r: ''}, - licences: [], - licence: '', - enableMarkerDraw: true, - enablePolygonDraw: true, - enablePolylineDraw: true, - limitBounds: {}, - importPresets: [ - // {url: 'http://localhost:8019/en/datalayer/1502/', label: 'Simplified World Countries', format: 'geojson'} - ], - moreControl: true, - captionBar: false, - slideshow: {}, - clickable: true, - easing: true, - permissions: {} -}); + overlay: null, + datalayers: [], + center: [4, 50], + zoom: 6, + hash: true, + default_color: 'DarkBlue', + default_smoothFactor: 1.0, + default_opacity: 0.5, + default_fillOpacity: 0.3, + default_stroke: true, + default_fill: true, + default_weight: 3, + default_iconClass: 'Default', + default_popupContentTemplate: '# {name}\n{description}', + default_interactive: true, + default_labelDirection: 'auto', + attributionControl: false, + allowEdit: true, + embedControl: true, + zoomControl: true, + datalayersControl: true, + searchControl: true, + editInOSMControl: false, + editInOSMControlOptions: false, + scaleControl: true, + noControl: false, // Do not render any control. + miniMap: false, + name: '', + description: '', + displayPopupFooter: false, + demoTileInfos: { s: 'a', z: 9, x: 265, y: 181, r: '' }, + licences: [], + licence: '', + enableMarkerDraw: true, + enablePolygonDraw: true, + enablePolylineDraw: true, + limitBounds: {}, + importPresets: [ + // {url: 'http://localhost:8019/en/datalayer/1502/', label: 'Simplified World Countries', format: 'geojson'} + ], + moreControl: true, + captionBar: false, + captionMenus: true, + slideshow: {}, + clickable: true, + easing: false, + permissions: {}, + permanentCreditBackground: true, +}) L.U.Map.include({ - - HIDDABLE_CONTROLS: ['zoom', 'search', 'fullscreen', 'embed', 'locate', 'measure', 'tilelayers', 'editinosm', 'datalayers'], - - initialize: function (el, geojson) { - - if (geojson.properties && geojson.properties.locale) L.setLocale(geojson.properties.locale); - - // Don't let default autocreation of controls - var zoomControl = typeof geojson.properties.zoomControl !== 'undefined' ? geojson.properties.zoomControl : true; - geojson.properties.zoomControl = false; - var fullscreenControl = typeof geojson.properties.fullscreenControl !== 'undefined' ? geojson.properties.fullscreenControl : true; - geojson.properties.fullscreenControl = false; - L.Util.setBooleanFromQueryString(geojson.properties, 'scrollWheelZoom'); - L.Map.prototype.initialize.call(this, el, geojson.properties); - - this.ui = new L.U.UI(this._container); - this.xhr = new L.U.Xhr(this.ui); - this.xhr.on('dataloding', function (e) { - this.fire('dataloding', e); - }); - this.xhr.on('datalaod', function (e) { - this.fire('datalaod', e); - }); - - this.initLoader(); - this.name = this.options.name; - this.description = this.options.description; - this.demoTileInfos = this.options.demoTileInfos; - if (geojson.geometry) this.options.center = geojson.geometry; - this.options.zoomControl = zoomControl; - this.options.fullscreenControl = fullscreenControl; - L.Util.setBooleanFromQueryString(this.options, 'moreControl'); - L.Util.setBooleanFromQueryString(this.options, 'scaleControl'); - L.Util.setBooleanFromQueryString(this.options, 'miniMap'); - L.Util.setBooleanFromQueryString(this.options, 'allowEdit'); - L.Util.setBooleanFromQueryString(this.options, 'displayDataBrowserOnLoad'); - L.Util.setBooleanFromQueryString(this.options, 'displayCaptionOnLoad'); - L.Util.setBooleanFromQueryString(this.options, 'captionBar'); - for (var i = 0; i < this.HIDDABLE_CONTROLS.length; i++) { - L.Util.setNullableBooleanFromQueryString(this.options, this.HIDDABLE_CONTROLS[i] + 'Control'); - } - this.datalayersOnLoad = L.Util.queryString('datalayers'); - this.options.onLoadPanel = L.Util.queryString('onLoadPanel', this.options.onLoadPanel); - if (this.datalayersOnLoad) this.datalayersOnLoad = this.datalayersOnLoad.toString().split(','); - - if (L.Browser.ielt9) this.options.allowEdit = false; // TODO include ie9 - - var editedFeature = null, - self = this; - try { - Object.defineProperty(this, 'editedFeature', { - get: function () { - return editedFeature; - }, - set: function (feature) { - if (editedFeature && editedFeature !== feature) { - editedFeature.endEdit(); - } - editedFeature = feature; - self.fire('seteditedfeature'); - } - }); - } - catch (e) { - // Certainly IE8, which has a limited version of defineProperty - } - - if (this.options.hash) this.addHash(); - this.initCenter(); - this.handleLimitBounds(); - - this.initTileLayers(this.options.tilelayers); - - // Global storage for retrieving datalayers and features - this.datalayers = {}; - this.datalayers_index = []; - this.dirty_datalayers = []; - this.features_index = {}; - - // Retrocompat - if (this.options.slideshow && this.options.slideshow.delay && this.options.slideshow.active === undefined) this.options.slideshow.active = true; - - this.initControls(); - - // create datalayers - this.initDatalayers(); - - if (this.options.displayCaptionOnLoad) { - // Retrocompat - if (!this.options.onLoadPanel) { - this.options.onLoadPanel = 'caption'; - } - delete this.options.displayCaptionOnLoad; - } - if (this.options.displayDataBrowserOnLoad) { - // Retrocompat - if (!this.options.onLoadPanel) { - this.options.onLoadPanel = 'databrowser'; - } - delete this.options.displayDataBrowserOnLoad; - } - - this.ui.on('panel:closed', function () { - this.invalidateSize({pan: false}); - }, this); - - var isDirty = false; // global status - try { - Object.defineProperty(this, 'isDirty', { - get: function () { - return isDirty || this.dirty_datalayers.length; - }, - set: function (status) { - if (!isDirty && status) self.fire('isdirty'); - isDirty = status; - self.checkDirty(); - } - }); - } - catch (e) { - // Certainly IE8, which has a limited version of defineProperty - } - this.on('baselayerchange', function (e) { - if (this._controls.miniMap) this._controls.miniMap.onMainMapBaseLayerChange(e); - }, this); - - // Creation mode - if (!this.options.umap_id) { - this.isDirty = true; - this._default_extent = true; - this.options.name = L._('Untitled map'); - this.options.allowEdit = true; - var datalayer = this.createDataLayer(); - datalayer.connectToMap(); - this.enableEdit(); - var dataUrl = L.Util.queryString('dataUrl', null), - dataFormat = L.Util.queryString('dataFormat', 'geojson'); - if (dataUrl) { - dataUrl = decodeURIComponent(dataUrl); - dataUrl = this.localizeUrl(dataUrl); - dataUrl = this.proxyUrl(dataUrl); - datalayer.importFromUrl(dataUrl, dataFormat); - } - } - - this.help = new L.U.Help(this); - this.slideshow = new L.U.Slideshow(this, this.options.slideshow); - this.permissions = new L.U.MapPermissions(this); - this.initCaptionBar(); - if (this.options.allowEdit) { - this.editTools = new L.U.Editable(this); - this.ui.on('panel:closed panel:open', function () { - this.editedFeature = null; - }, this); - this.initEditBar(); - } - this.initShortcuts(); - this.onceDatalayersLoaded(function () { - if (this.options.onLoadPanel === 'databrowser') this.openBrowser(); - else if (this.options.onLoadPanel === 'caption') this.displayCaption(); - }); - this.onceDataLoaded(function () { - const slug = L.Util.queryString('feature'); - if (slug && this.features_index[slug]) this.features_index[slug].view(); - }); - - - window.onbeforeunload = function (e) { - var msg = L._('You have unsaved changes.'); - if (self.isDirty) { - e.returnValue = msg; - return msg; - } - }; - this.backup(); - this.initContextMenu(); - this.on('click contextmenu.show', this.closeInplaceToolbar); - }, - - initControls: function () { - this.helpMenuActions = {}; - this._controls = {}; - - if (this.options.allowEdit && !this.options.noControl) { - new L.U.EditControl(this).addTo(this); - - new L.U.DrawToolbar({map: this}).addTo(this); - - var editActions = [ - L.U.ImportAction, - L.U.EditPropertiesAction, - L.U.ChangeTileLayerAction, - L.U.ManageDatalayersAction, - L.U.UpdateExtentAction, - L.U.UpdatePermsAction - ]; - new L.U.SettingsToolbar({actions: editActions}).addTo(this); - } - this._controls.zoom = new L.Control.Zoom({zoomInTitle: L._('Zoom in'), zoomOutTitle: L._('Zoom out')}); - this._controls.datalayers = new L.U.DataLayersControl(this); - this._controls.locate = L.control.locate({ - strings: { - title: L._('Center map on your location'), - }, - showPopup: false, - // We style this control in our own CSS for consistency with other controls, - // but the control breaks if we don't specify a class here, so a fake class - // will do. - icon: 'umap-fake-class', - iconLoading: 'umap-fake-class', - flyTo: true, - }); - this._controls.fullscreen = new L.Control.Fullscreen({title: {'false': L._('View Fullscreen'), 'true': L._('Exit Fullscreen')}}); - this._controls.search = new L.U.SearchControl(); - this._controls.embed = new L.Control.Embed(this, this.options.embedOptions); - this._controls.tilelayers = new L.U.TileLayerControl(this); - this._controls.editinosm = new L.Control.EditInOSM({ - position: 'topleft', - widgetOptions: {helpText: L._('Open this map extent in a map editor to provide more accurate data to OpenStreetMap')} - }); - this._controls.measure = (new L.MeasureControl()).initHandler(this); - this._controls.more = new L.U.MoreControls(); - this._controls.scale = L.control.scale(); - if (this.options.scrollWheelZoom) this.scrollWheelZoom.enable(); - else this.scrollWheelZoom.disable(); - this.renderControls(); - }, - - renderControls: function () { - L.DomUtil.classIf(document.body, 'umap-caption-bar-enabled', this.options.captionBar || (this.options.slideshow && this.options.slideshow.active)); - L.DomUtil.classIf(document.body, 'umap-slideshow-enabled', this.options.slideshow && this.options.slideshow.active); - for (var i in this._controls) { - this.removeControl(this._controls[i]); - } - if (this.options.noControl) return; - - this._controls.attribution = (new L.U.AttributionControl()).addTo(this); - if (this.options.miniMap && !this.options.noControl) { - this.whenReady(function () { - if (this.selected_tilelayer) { - this._controls.miniMap = new L.Control.MiniMap(this.selected_tilelayer).addTo(this); - this._controls.miniMap._miniMap.invalidateSize(); - } - }); - } - var name, status, control; - for (var i = 0; i < this.HIDDABLE_CONTROLS.length; i++) { - name = this.HIDDABLE_CONTROLS[i]; - status = this.options[name + 'Control']; - if (status === false) continue; - control = this._controls[name]; - control.addTo(this); - if (status === undefined || status === null) L.DomUtil.addClass(control._container, 'display-on-more'); - else L.DomUtil.removeClass(control._container, 'display-on-more'); - } - if (this.options.moreControl) this._controls.more.addTo(this); - if (this.options.scaleControl) this._controls.scale.addTo(this); - }, - - initDatalayers: function () { - var toload = dataToload = seen = this.options.datalayers.length, - self = this, - datalayer; - var loaded = function () { - self.datalayersLoaded = true; - self.fire('datalayersloaded'); - }; - var decrementToLoad = function () { - toload--; - if (toload === 0) loaded(); - }; - var dataLoaded = function () { - self.dataLoaded = true; - self.fire('dataloaded'); - }; - var decrementDataToLoad = function () { - dataToload--; - if (dataToload === 0) dataLoaded(); - }; - for (var j = 0; j < this.options.datalayers.length; j++) { - datalayer = this.createDataLayer(this.options.datalayers[j]); - if (datalayer.displayedOnLoad()) datalayer.onceLoaded(decrementToLoad); - else decrementToLoad(); - if (datalayer.displayedOnLoad()) datalayer.onceDataLoaded(decrementDataToLoad); - else decrementDataToLoad(); - } - if (seen === 0) loaded() && dataLoaded(); // no datalayer - }, - - indexDatalayers: function () { - var panes = this.getPane('overlayPane'), - pane; - this.datalayers_index = []; - for (var i = 0; i < panes.children.length; i++) { - pane = panes.children[i]; - if (!pane.dataset || !pane.dataset.id) continue; - this.datalayers_index.push(this.datalayers[pane.dataset.id]); - } - this.updateDatalayersControl(); - }, - - ensurePanesOrder: function () { - this.eachDataLayer(function (datalayer) { - datalayer.bringToTop(); - }); - }, - - onceDatalayersLoaded: function (callback, context) { - // Once datalayers **metadata** have been loaded - if (this.datalayersLoaded) { - callback.call(context || this, this); - } else { - this.once('datalayersloaded', callback, context); - } - return this; - }, - - onceDataLoaded: function (callback, context) { - // Once datalayers **data** have been loaded - if (this.dataLoaded) { - callback.call(context || this, this); - } else { - this.once('dataloaded', callback, context); - } - return this; - }, - - updateDatalayersControl: function () { - if (this._controls.datalayers) this._controls.datalayers.update(); - }, - - backupOptions: function () { - this._backupOptions = L.extend({}, this.options); - this._backupOptions.tilelayer = L.extend({}, this.options.tilelayer); - this._backupOptions.limitBounds = L.extend({}, this.options.limitBounds); - this._backupOptions.permissions = L.extend({}, this.permissions.options); - }, - - resetOptions: function () { - this.options = L.extend({}, this._backupOptions); - this.options.tilelayer = L.extend({}, this._backupOptions.tilelayer); - this.permissions.options = L.extend({}, this._backupOptions.permissions); - }, - - initShortcuts: function () { - var globalShortcuts = function (e) { - var key = e.keyCode, - modifierKey = e.ctrlKey || e.metaKey; - - /* Generic shortcuts */ - if (key === L.U.Keys.F && modifierKey) { - L.DomEvent.stop(e); - this.search(); - } else if (e.keyCode === L.U.Keys.ESC) { - if (this.help.visible()) this.help.hide(); - else this.ui.closePanel(); - } - - if (!this.options.allowEdit) return; - - /* Edit mode only shortcuts */ - if (key === L.U.Keys.E && modifierKey && !this.editEnabled) { - L.DomEvent.stop(e); - this.enableEdit(); - } else if (key === L.U.Keys.E && modifierKey && this.editEnabled && !this.isDirty) { - L.DomEvent.stop(e); - this.disableEdit(); - this.ui.closePanel(); - } - if (key === L.U.Keys.S && modifierKey) { - L.DomEvent.stop(e); - if (this.isDirty) { - this.save(); - } - } - if (key === L.U.Keys.Z && modifierKey && this.isDirty) { - L.DomEvent.stop(e); - this.askForReset(); - } - if (key === L.U.Keys.M && modifierKey && this.editEnabled) { - L.DomEvent.stop(e); - this.editTools.startMarker(); - } - if (key === L.U.Keys.P && modifierKey && this.editEnabled) { - L.DomEvent.stop(e); - this.editTools.startPolygon(); - } - if (key === L.U.Keys.L && modifierKey && this.editEnabled) { - L.DomEvent.stop(e); - this.editTools.startPolyline(); - } - if (key === L.U.Keys.I && modifierKey && this.editEnabled) { - L.DomEvent.stop(e); - this.importPanel(); - } - if (key === L.U.Keys.H && modifierKey && this.editEnabled) { - L.DomEvent.stop(e); - this.help.show('edit'); - } - if (e.keyCode === L.U.Keys.ESC) { - if (this.editEnabled) this.editTools.stopDrawing(); - if (this.measureTools.enabled()) this.measureTools.stopDrawing(); - } - }; - L.DomEvent.addListener(document, 'keydown', globalShortcuts, this); - }, - - initTileLayers: function () { - this.tilelayers = []; - for(var i in this.options.tilelayers) { - if(this.options.tilelayers.hasOwnProperty(i)) { - this.tilelayers.push(this.createTileLayer(this.options.tilelayers[i])); - if (this.options.tilelayer && this.options.tilelayer.url_template === this.options.tilelayers[i].url_template) { - // Keep control over the displayed attribution for non custom tilelayers - this.options.tilelayer.attribution = this.options.tilelayers[i].attribution; - } - } - } - if (this.options.tilelayer && this.options.tilelayer.url_template && this.options.tilelayer.attribution) { - this.customTilelayer = this.createTileLayer(this.options.tilelayer); - this.selectTileLayer(this.customTilelayer); - } else { - this.selectTileLayer(this.tilelayers[0]); - } - }, - - createTileLayer: function (tilelayer) { - return new L.TileLayer(tilelayer.url_template, tilelayer); - }, - - selectTileLayer: function (tilelayer) { - if (tilelayer === this.selected_tilelayer) { return; } - try { - this.addLayer(tilelayer); - this.fire('baselayerchange', {layer: tilelayer}); - if (this.selected_tilelayer) { - this.removeLayer(this.selected_tilelayer); - } - this.selected_tilelayer = tilelayer; - if (!isNaN(this.selected_tilelayer.options.minZoom) && this.getZoom() < this.selected_tilelayer.options.minZoom) { - this.setZoom(this.selected_tilelayer.options.minZoom); - } - if (!isNaN(this.selected_tilelayer.options.maxZoom) && this.getZoom() > this.selected_tilelayer.options.maxZoom) { - this.setZoom(this.selected_tilelayer.options.maxZoom); - } - } catch (e) { - this.removeLayer(tilelayer); - this.ui.alert({content: L._('Error in the tilelayer URL') + ': ' + tilelayer._url, level: 'error'}); - // Users can put tilelayer URLs by hand, and if they add wrong {variable}, - // Leaflet throw an error, and then the map is no more editable - } - }, - - eachTileLayer: function (method, context) { - var urls = []; - for (var i in this.tilelayers) { - if (this.tilelayers.hasOwnProperty(i)) { - method.call(context, this.tilelayers[i]); - urls.push(this.tilelayers[i]._url); - } - } - if (this.customTilelayer && (Array.prototype.indexOf && urls.indexOf(this.customTilelayer._url) === -1)) { - method.call(context || this, this.customTilelayer); - } - }, - - initCenter: function () { - if (this.options.hash && this._hash.parseHash(location.hash)) { - // FIXME An invalid hash will cause the load to fail - this._hash.update(); - } - else if(this.options.locate && this.options.locate.setView) { - // Prevent from making two setViews at init - // which is not very fluid... - this.locate(this.options.locate); - } - else { - this.options.center = this.latLng(this.options.center); - this.setView(this.options.center, this.options.zoom); - } - }, - - latLng: function(a, b, c) { - // manage geojson case and call original method - if (!(a instanceof L.LatLng) && a.coordinates) { - // Guess it's a geojson - a = [a.coordinates[1], a.coordinates[0]]; - } - return L.latLng(a, b, c); - }, - - handleLimitBounds: function () { - var south = parseFloat(this.options.limitBounds.south), - west = parseFloat(this.options.limitBounds.west), - north = parseFloat(this.options.limitBounds.north), - east = parseFloat(this.options.limitBounds.east); - if (!isNaN(south) && !isNaN(west) && !isNaN(north) && !isNaN(east)) { - var bounds = L.latLngBounds([[south, west], [north, east]]); - this.options.minZoom = this.getBoundsZoom(bounds, false); - try { - this.setMaxBounds(bounds); - } catch (e) { - // Unusable bounds, like -2 -2 -2 -2? - console.error('Error limiting bounds', e); - } - } else { - this.options.minZoom = 0; - this.setMaxBounds(); - } - }, - - setMaxBounds: function (bounds) { - // Hack. Remove me when fix is released: - // https://github.com/Leaflet/Leaflet/pull/4494 - bounds = L.latLngBounds(bounds); - - if (!bounds.isValid()) { - this.options.maxBounds = null; - return this.off('moveend', this._panInsideMaxBounds); - } - return L.Map.prototype.setMaxBounds.call(this, bounds); - }, - - createDataLayer: function(datalayer) { - datalayer = datalayer || {name: L._('Layer') + ' ' + (this.datalayers_index.length + 1)}; - return new L.U.DataLayer(this, datalayer); - }, - - getDefaultOption: function (option) { - return this.options['default_' + option]; - }, - - getOption: function (option) { - if (L.Util.usableOption(this.options, option)) return this.options[option]; - return this.getDefaultOption(option); - }, - - updateExtent: function() { - this.options.center = this.getCenter(); - this.options.zoom = this.getZoom(); - this.isDirty = true; - this._default_extent = false; - this.ui.alert({content: L._('The zoom and center have been set.'), 'level': 'info'}); - }, - - updateTileLayers: function () { - var self = this, - callback = function (tilelayer) { - self.options.tilelayer = tilelayer.toJSON(); - self.isDirty = true; - }; - if (this._controls.tilelayers) this._controls.tilelayers.openSwitcher({callback: callback, className: 'dark'}); - }, - - manageDatalayers: function () { - if (this._controls.datalayers) this._controls.datalayers.openPanel(); - }, - - renderShareBox: function () { - var container = L.DomUtil.create('div', 'umap-share'), - embedTitle = L.DomUtil.add('h4', '', container, L._('Embed the map')), - iframe = L.DomUtil.create('textarea', 'umap-share-iframe', container), - option; - var UIFields = [ - ['dimensions.width', {handler: 'Input', label: L._('width')}], - ['dimensions.height', {handler: 'Input', label: L._('height')}], - ['options.includeFullScreenLink', {handler: 'Switch', label: L._('Include full screen link?')}], - ['options.currentView', {handler: 'Switch', label: L._('Current view instead of default map view?')}], - ['options.keepCurrentDatalayers', {handler: 'Switch', label: L._('Keep current visible layers')}], - ['options.viewCurrentFeature', {handler: 'Switch', label: L._('Open current feature on load')}], - 'queryString.moreControl', - 'queryString.scrollWheelZoom', - 'queryString.miniMap', - 'queryString.scaleControl', - 'queryString.onLoadPanel', - 'queryString.captionBar' - ]; - for (var i = 0; i < this.HIDDABLE_CONTROLS.length; i++) { - UIFields.push('queryString.' + this.HIDDABLE_CONTROLS[i] + 'Control'); - } - var iframeExporter = new L.U.IframeExporter(this); - var buildIframeCode = function () { - iframe.innerHTML = iframeExporter.build(); - }; - buildIframeCode(); - var builder = new L.U.FormBuilder(iframeExporter, UIFields, { - callback: buildIframeCode - }); - var iframeOptions = L.DomUtil.createFieldset(container, L._('Iframe export options')); - iframeOptions.appendChild(builder.build()); - if (this.options.shortUrl) { - L.DomUtil.create('hr', '', container); - L.DomUtil.add('h4', '', container, L._('Short URL')); - var shortUrl = L.DomUtil.create('input', 'umap-short-url', container); - shortUrl.type = 'text'; - shortUrl.value = this.options.shortUrl; - } - L.DomUtil.create('hr', '', container); - L.DomUtil.add('h4', '', container, L._('Download data')); - var typeInput = L.DomUtil.create('select', '', container); - typeInput.name = 'format'; - var exportCaveat = L.DomUtil.add('small', 'help-text', container, L._('Only visible features will be downloaded.')); - exportCaveat.id = 'export_caveat_text'; - var toggleCaveat = function () { - if (typeInput.value === 'umap') exportCaveat.style.display = 'none'; - else exportCaveat.style.display = 'inherit'; - } - L.DomEvent.on(typeInput, 'change', toggleCaveat); - var types = { - geojson: { - formatter: function (map) {return JSON.stringify(map.toGeoJSON(), null, 2);}, - ext: '.geojson', - filetype: 'application/json' - }, - gpx: { - formatter: function (map) {return togpx(map.toGeoJSON());}, - ext: '.gpx', - filetype: 'application/xml' - }, - kml: { - formatter: function (map) {return tokml(map.toGeoJSON());}, - ext: '.kml', - filetype: 'application/vnd.google-earth.kml+xml' - }, - umap: { - name: L._('Full map data'), - formatter: function (map) {return map.serialize();}, - ext: '.umap', - filetype: 'application/json', - selected: true - } - }; - for (var key in types) { - if (types.hasOwnProperty(key)) { - option = L.DomUtil.create('option', '', typeInput); - option.value = key; - option.textContent = types[key].name || key; - if (types[key].selected) option.selected = true; - } - } - toggleCaveat(); - var download = L.DomUtil.create('a', 'button', container); - download.textContent = L._('Download data'); - L.DomEvent.on(download, 'click', function () { - var type = types[typeInput.value], - content = type.formatter(this), - name = this.options.name || 'data'; - name = name.replace(/[^a-z0-9]/gi, '_').toLowerCase(); - download.download = name + type.ext; - window.URL = window.URL || window.webkitURL; - var blob = new Blob([content], {type: type.filetype}); - download.href = window.URL.createObjectURL(blob); - }, this); - this.ui.openPanel({data: {html: container}}); - }, - - toGeoJSON: function () { - var features = []; - this.eachDataLayer(function (datalayer) { - if (datalayer.isVisible()) { - features = features.concat(datalayer.featuresToGeoJSON()); - } - }); - var geojson = { - type: 'FeatureCollection', - features: features - }; - return geojson; - }, - - importPanel: function () { - var container = L.DomUtil.create('div', 'umap-upload'), - title = L.DomUtil.create('h4', '', container), - presetBox = L.DomUtil.create('div', 'formbox', container), - presetSelect = L.DomUtil.create('select', '', presetBox), - fileBox = L.DomUtil.create('div', 'formbox', container), - fileInput = L.DomUtil.create('input', '', fileBox), - urlInput = L.DomUtil.create('input', '', container), - rawInput = L.DomUtil.create('textarea', '', container), - typeLabel = L.DomUtil.create('label', '', container), - layerLabel = L.DomUtil.create('label', '', container), - clearLabel = L.DomUtil.create('label', '', container), - submitInput = L.DomUtil.create('input', '', container), - map = this, option, - types = ['geojson', 'csv', 'gpx', 'kml', 'osm', 'georss', 'umap']; - title.textContent = L._('Import data'); - fileInput.type = 'file'; - fileInput.multiple = 'multiple'; - submitInput.type = 'button'; - submitInput.value = L._('Import'); - submitInput.className = 'button'; - typeLabel.textContent = L._('Choose the format of the data to import'); - this.help.button(typeLabel, 'importFormats'); - var typeInput = L.DomUtil.create('select', '', typeLabel); - typeInput.name = 'format'; - layerLabel.textContent = L._('Choose the layer to import in'); - var layerInput = L.DomUtil.create('select', '', layerLabel); - layerInput.name = 'datalayer'; - urlInput.type = 'text'; - urlInput.placeholder = L._('Provide an URL here'); - rawInput.placeholder = L._('Paste your data here'); - clearLabel.textContent = L._('Replace layer content'); - var clearFlag = L.DomUtil.create('input', '', clearLabel); - clearFlag.type = 'checkbox'; - clearFlag.name = 'clear'; - this.eachDataLayerReverse(function (datalayer) { - if (datalayer.isLoaded()) { - var id = L.stamp(datalayer); - option = L.DomUtil.create('option', '', layerInput); - option.value = id; - option.textContent = datalayer.options.name; - } - }); - L.DomUtil.element('option', {value: '', textContent: L._('Import in a new layer')}, layerInput); - L.DomUtil.element('option', {value: '', textContent: L._('Choose the data format')}, typeInput); - for (var i = 0; i < types.length; i++) { - option = L.DomUtil.create('option', '', typeInput); - option.value = option.textContent = types[i]; - } - if (this.options.importPresets.length) { - var noPreset = L.DomUtil.create('option', '', presetSelect); - noPreset.value = noPreset.textContent = L._('Choose a preset'); - for (var j = 0; j < this.options.importPresets.length; j++) { - option = L.DomUtil.create('option', '', presetSelect); - option.value = this.options.importPresets[j].url; - option.textContent = this.options.importPresets[j].label; - } - } else { - presetBox.style.display = 'none'; - } - - var submit = function () { - var type = typeInput.value, - layerId = layerInput[layerInput.selectedIndex].value, - layer; - if (type === 'umap') { - this.once('postsync', function () { - this.setView(this.latLng(this.options.center), this.options.zoom); - }); - } - if (layerId) layer = map.datalayers[layerId]; - if (layer && clearFlag.checked) layer.empty(); - if (fileInput.files.length) { - var file; - for (var i = 0, file; file = fileInput.files[i]; i++) { - type = type || L.Util.detectFileType(file); - if (!type) { - this.ui.alert({content: L._('Unable to detect format of file {filename}', {filename: file.name}), level: 'error'}); - continue; - } - if (type === 'umap') { - this.importFromFile(file, 'umap'); - } else { - var importLayer = layer; - if (!layer) importLayer = this.createDataLayer({name: file.name}); - importLayer.importFromFile(file, type); - } - } - } else { - if (!type) return this.ui.alert({content: L._('Please choose a format'), level: 'error'}); - if (rawInput.value && type === 'umap') { - try { - this.importRaw(rawInput.value, type); - } catch (e) { - this.ui.alert({content: L._('Invalid umap data'), level: 'error'}); - console.error(e); - } - } else { - if (!layer) layer = this.createDataLayer(); - if (rawInput.value) layer.importRaw(rawInput.value, type); - else if (urlInput.value) layer.importFromUrl(urlInput.value, type); - else if (presetSelect.selectedIndex > 0) layer.importFromUrl(presetSelect[presetSelect.selectedIndex].value, type); - } - } - }; - L.DomEvent.on(submitInput, 'click', submit, this); - L.DomEvent.on(fileInput, 'change', function (e) { - var type = '', newType; - for (var i = 0; i < e.target.files.length; i++) { - newType = L.Util.detectFileType(e.target.files[i]); - if (!type && newType) type = newType; - if (type && newType !== type) { - type = ''; - break; - } - } - typeInput.value = type; - }, this); - this.ui.openPanel({data: {html: container}, className: 'dark'}); - }, - - importRaw: function(rawData) { - var importedData = JSON.parse(rawData); - - var mustReindex = false; - - for (var i = 0; i < this.editableOptions.length; i++) { - var option = this.editableOptions[i]; - if (typeof importedData.properties[option] !== 'undefined') { - this.options[option] = importedData.properties[option]; - if (option === 'sortKey') mustReindex = true; - } - } - - if (importedData.geometry) this.options.center = this.latLng(importedData.geometry); - var self = this; - importedData.layers.forEach( function (geojson) { - var dataLayer = self.createDataLayer(); - dataLayer.fromUmapGeoJSON(geojson); - }); - - this.initTileLayers(); - this.renderControls(); - this.handleLimitBounds(); - this.eachDataLayer(function (datalayer) { - if (mustReindex) datalayer.reindex(); - datalayer.redraw(); - }); - this.fire('postsync'); - this.isDirty = true; - }, - - importFromFile: function (file) { - var reader = new FileReader(); - reader.readAsText(file); - var self = this; - reader.onload = function (e) { - var rawData = e.target.result; - try { - self.importRaw(rawData); - } catch (e) { - console.error('Error importing data', e); - self.ui.alert({content: L._('Invalid umap data in {filename}', {filename: file.name}), level: 'error'}); - } - }; - }, - - openBrowser: function () { - this.onceDatalayersLoaded(function () { - this._openBrowser(); - }); - }, - - displayCaption: function () { - var container = L.DomUtil.create('div', 'umap-caption'), - title = L.DomUtil.create('h3', '', container); - title.textContent = this.options.name; - this.permissions.addOwnerLink('h5', container); - if (this.options.description) { - var description = L.DomUtil.create('div', 'umap-map-description', container); - description.innerHTML = L.Util.toHTML(this.options.description); - } - var datalayerContainer = L.DomUtil.create('div', 'datalayer-container', container); - this.eachVisibleDataLayer(function (datalayer) { - var p = L.DomUtil.create('p', '', datalayerContainer), - color = L.DomUtil.create('span', 'datalayer-color', p), - headline = L.DomUtil.create('strong', '', p), - description = L.DomUtil.create('span', '', p); - datalayer.onceLoaded(function () { - color.style.backgroundColor = this.getColor(); - if (datalayer.options.description) { - description.innerHTML = L.Util.toHTML(datalayer.options.description); - } - }); - datalayer.renderToolbox(headline); - L.DomUtil.add('span', '', headline, datalayer.options.name + ' '); - }); - var creditsContainer = L.DomUtil.create('div', 'credits-container', container), - credits = L.DomUtil.createFieldset(creditsContainer, L._('Credits')); - title = L.DomUtil.add('h5', '', credits, L._('User content credits')); - if (this.options.shortCredit || this.options.longCredit) { - L.DomUtil.add('p', '', credits, L.Util.toHTML(this.options.longCredit || this.options.shortCredit)); - } - if (this.options.licence) { - var licence = L.DomUtil.add('p', '', credits, L._('Map user content has been published under licence') + ' '), - link = L.DomUtil.add('a', '', licence, this.options.licence.name); - link.href = this.options.licence.url; - } else { - L.DomUtil.add('p', '', credits, L._('No licence has been set')); - } - L.DomUtil.create('hr', '', credits); - title = L.DomUtil.create('h5', '', credits); - title.textContent = L._('Map background credits'); - var tilelayerCredit = L.DomUtil.create('p', '', credits), - name = L.DomUtil.create('strong', '', tilelayerCredit), - attribution = L.DomUtil.create('span', '', tilelayerCredit); - name.textContent = this.selected_tilelayer.options.name + ' '; - attribution.innerHTML = this.selected_tilelayer.getAttribution(); - L.DomUtil.create('hr', '', credits); - var umapCredit = L.DomUtil.create('p', '', credits), - urls = { - leaflet: 'http://leafletjs.com', - django: 'https://www.djangoproject.com', - umap: 'http://wiki.openstreetmap.org/wiki/UMap' - }; - umapCredit.innerHTML = L._('Powered by Leaflet and Django, glued by uMap project.', urls); - var browser = L.DomUtil.create('li', ''); - L.DomUtil.create('i', 'umap-icon-16 umap-list', browser); - var label = L.DomUtil.create('span', '', browser); - label.textContent = label.title = L._('Browse data'); - L.DomEvent.on(browser, 'click', this.openBrowser, this); - this.ui.openPanel({data: {html: container}, actions: [browser]}); - }, - - eachDataLayer: function (method, context) { - for (var i = 0; i < this.datalayers_index.length; i++) { - method.call(context, this.datalayers_index[i]); - } - }, - - eachDataLayerReverse: function (method, context, filter) { - for (var i = this.datalayers_index.length - 1; i >= 0; i--) { - if (filter && !filter.call(context, this.datalayers_index[i])) continue; - method.call(context, this.datalayers_index[i]); - } - }, - - eachBrowsableDataLayer: function (method, context) { - this.eachDataLayerReverse(method, context, function (d) { return d.allowBrowse(); }); - }, - - eachVisibleDataLayer: function (method, context) { - this.eachDataLayerReverse(method, context, function (d) { return d.isVisible(); }); - }, - - findDataLayer: function (method, context) { - for (var i = this.datalayers_index.length - 1; i >= 0; i--) { - if (method.call(context, this.datalayers_index[i])) return this.datalayers_index[i]; - } - }, - - backup: function () { - this.backupOptions(); - this._datalayers_index_bk = [].concat(this.datalayers_index); - }, - - reset: function () { - if (this.editTools) this.editTools.stopDrawing(); - this.resetOptions(); - this.datalayers_index = [].concat(this._datalayers_index_bk); - this.dirty_datalayers.slice().forEach(function (datalayer) { - if (datalayer.isDeleted) datalayer.connectToMap(); - datalayer.reset(); - }); - this.ensurePanesOrder(); - this.dirty_datalayers = []; - this.updateDatalayersControl(); - this.initTileLayers(); - this.isDirty = false; - }, - - checkDirty: function () { - L.DomUtil.classIf(this._container, 'umap-is-dirty', this.isDirty); - }, - - addDirtyDatalayer: function (datalayer) { - if (this.dirty_datalayers.indexOf(datalayer) === -1) { - this.dirty_datalayers.push(datalayer); - this.isDirty = true; - } - }, - - removeDirtyDatalayer: function (datalayer) { - if (this.dirty_datalayers.indexOf(datalayer) !== -1) { - this.dirty_datalayers.splice(this.dirty_datalayers.indexOf(datalayer), 1); - this.checkDirty(); - } - }, - - continueSaving: function () { - if (this.dirty_datalayers.length) this.dirty_datalayers[0].save(); - else this.fire('saved'); - }, - - editableOptions: [ - 'zoom', - 'scrollWheelZoom', - 'scaleControl', - 'moreControl', - 'miniMap', - 'displayPopupFooter', - 'onLoadPanel', - 'tilelayersControl', - 'name', - 'description', - 'licence', - 'tilelayer', - 'limitBounds', - 'color', - 'iconClass', - 'iconUrl', - 'smoothFactor', - 'opacity', - 'weight', - 'fill', - 'fillColor', - 'fillOpacity', - 'dashArray', - 'popupShape', - 'popupTemplate', - 'popupContentTemplate', - 'zoomTo', - 'captionBar', - 'slideshow', - 'sortKey', - 'labelKey', - 'filterKey', - 'slugKey', - 'showLabel', - 'labelDirection', - 'labelInteractive', - 'shortCredit', - 'longCredit', - 'zoomControl', - 'datalayersControl', - 'searchControl', - 'locateControl', - 'fullscreenControl', - 'editinosmControl', - 'embedControl', - 'measureControl', - 'tilelayersControl', - 'easing' - ], - - exportOptions: function () { - var properties = {}; - for (var i = this.editableOptions.length - 1; i >= 0; i--) { - if (typeof this.options[this.editableOptions[i]] !== 'undefined') { - properties[this.editableOptions[i]] = this.options[this.editableOptions[i]]; - } - } - return properties; - }, - - serialize: function () { - var umapfile = { - type: 'umap', - uri: window.location.href, - properties: this.exportOptions(), - geometry: this.geometry(), - layers: [] - }; - - this.eachDataLayer(function (datalayer) { - umapfile.layers.push(datalayer.umapGeoJSON()); - }); - - return JSON.stringify(umapfile, null, 2); - }, - - save: function () { - if (!this.isDirty) return; - if (this._default_extent) this.updateExtent(); - var geojson = { - type: 'Feature', - geometry: this.geometry(), - properties: this.exportOptions() - }; - this.backup(); - var formData = new FormData(); - formData.append('name', this.options.name); - formData.append('center', JSON.stringify(this.geometry())); - formData.append('settings', JSON.stringify(geojson)); - this.post(this.getSaveUrl(), { - data: formData, - context: this, - callback: function (data) { - var duration = 3000; - if (!this.options.umap_id) { - duration = 100000; // we want a longer message at map creation (TODO UGLY) - this.options.umap_id = data.id; - this.permissions.setOptions(data.permissions) - } else if (!this.permissions.isDirty) { - // Do not override local changes to permissions, - // but update in case some other editors changed them in the meantime. - this.permissions.setOptions(data.permissions) - } - // Update URL in case the name has changed. - if (history && history.pushState) history.pushState({}, this.options.name, data.url); - else window.location = data.url; - if (data.info) msg = data.info; - else msg = L._('Map has been saved!'); - this.once('saved', function () { - this.isDirty = false; - this.ui.alert({content: msg, level: 'info', duration: duration}); - }); - this.ui.closePanel(); - this.permissions.save(); - } - }); - }, - - getEditUrl: function() { - return L.Util.template(this.options.urls.map_update, {'map_id': this.options.umap_id}); - }, - - getCreateUrl: function() { - return L.Util.template(this.options.urls.map_create); - }, - - getSaveUrl: function () { - return (this.options.umap_id && this.getEditUrl()) || this.getCreateUrl(); - }, - - geometry: function() { - /* Return a GeoJSON geometry Object */ - var latlng = this.latLng(this.options.center || this.getCenter()); - return { - type: 'Point', - coordinates: [ - latlng.lng, - latlng.lat - ] - }; - }, - - defaultDataLayer: function () { - var datalayer, fallback; - datalayer = this.lastUsedDataLayer; - if (datalayer && !datalayer.isRemoteLayer() && datalayer.canBrowse() && datalayer.isVisible()) { - return datalayer; - } - datalayer = this.findDataLayer(function (datalayer) { - if (!datalayer.isRemoteLayer() && datalayer.canBrowse()) { - fallback = datalayer; - if (datalayer.isVisible()) return true; - } - }); - if (datalayer) return datalayer; - if (fallback) { - // No datalayer visible, let's force one - this.addLayer(fallback.layer); - return fallback; - } - return this.createDataLayer(); - }, - - getDataLayerByUmapId: function (umap_id) { - return this.findDataLayer(function (d) { return d.umap_id == umap_id; }); - }, - - edit: function () { - if(!this.editEnabled) return; - var container = L.DomUtil.create('div','umap-edit-container'), - metadataFields = [ - 'options.name', - 'options.description' - ], - title = L.DomUtil.create('h4', '', container); - title.textContent = L._('Edit map properties'); - var builder = new L.U.FormBuilder(this, metadataFields); - var form = builder.build(); - container.appendChild(form); - var UIFields = []; - for (var i = 0; i < this.HIDDABLE_CONTROLS.length; i++) { - UIFields.push('options.' + this.HIDDABLE_CONTROLS[i] + 'Control'); - } - UIFields = UIFields.concat([ - 'options.moreControl', - 'options.scrollWheelZoom', - 'options.miniMap', - 'options.scaleControl', - 'options.onLoadPanel', - 'options.displayPopupFooter', - 'options.captionBar' - ]); - builder = new L.U.FormBuilder(this, UIFields, { - callback: this.renderControls, - callbackContext: this - }); - var controlsOptions = L.DomUtil.createFieldset(container, L._('User interface options')); - controlsOptions.appendChild(builder.build()); - - var shapeOptions = [ - 'options.color', - 'options.iconClass', - 'options.iconUrl', - 'options.opacity', - 'options.weight', - 'options.fill', - 'options.fillColor', - 'options.fillOpacity' - ]; - - builder = new L.U.FormBuilder(this, shapeOptions, { - callback: function (e) { - this.eachDataLayer(function (datalayer) { - datalayer.redraw(); - }); - } - }); - var defaultShapeProperties = L.DomUtil.createFieldset(container, L._('Default shape properties')); - defaultShapeProperties.appendChild(builder.build()); - - var optionsFields = [ - 'options.smoothFactor', - 'options.dashArray', - 'options.zoomTo', - ['options.easing', {handler: 'Switch', label: L._('Advanced transition')}], - 'options.labelKey', - ['options.sortKey', {handler: 'BlurInput', helpEntries: 'sortKey', placeholder: L._('Default: name'), label: L._('Sort key'), inheritable: true}], - ['options.filterKey', {handler: 'Input', helpEntries: 'filterKey', placeholder: L._('Default: name'), label: L._('Filter keys'), inheritable: true}], - ['options.slugKey', {handler: 'BlurInput', helpEntries: 'slugKey', placeholder: L._('Default: name'), label: L._('Feature identifier key')}] - ]; - - builder = new L.U.FormBuilder(this, optionsFields, { - callback: function (e) { - this.eachDataLayer(function (datalayer) { - if (e.helper.field === 'options.sortKey') datalayer.reindex(); - datalayer.redraw(); - }); - } - }); - var defaultProperties = L.DomUtil.createFieldset(container, L._('Default properties')); - defaultProperties.appendChild(builder.build()); - - var popupFields = [ - 'options.popupShape', - 'options.popupTemplate', - 'options.popupContentTemplate', - 'options.showLabel', - 'options.labelDirection', - 'options.labelInteractive' - ]; - builder = new L.U.FormBuilder(this, popupFields, { - callback: function (e) { - if (e.helper.field === 'options.popupTemplate' || e.helper.field === 'options.popupContentTemplate' || e.helper.field === 'options.popupShape') return; - this.eachDataLayer(function (datalayer) { - datalayer.redraw(); - }) - } - }); - var popupFieldset = L.DomUtil.createFieldset(container, L._('Default interaction options')); - popupFieldset.appendChild(builder.build()); - - if (!L.Util.isObject(this.options.tilelayer)) { - this.options.tilelayer = {}; - } - var tilelayerFields = [ - ['options.tilelayer.name', {handler: 'BlurInput', placeholder: L._('display name')}], - ['options.tilelayer.url_template', {handler: 'BlurInput', helpText: L._('Supported scheme') + ': http://{s}.domain.com/{z}/{x}/{y}.png', placeholder: 'url'}], - ['options.tilelayer.maxZoom', {handler: 'BlurIntInput', placeholder: L._('max zoom')}], - ['options.tilelayer.minZoom', {handler: 'BlurIntInput', placeholder: L._('min zoom')}], - ['options.tilelayer.attribution', {handler: 'BlurInput', placeholder: L._('attribution')}], - ['options.tilelayer.tms', {handler: 'Switch', label: L._('TMS format')}] - ]; - var customTilelayer = L.DomUtil.createFieldset(container, L._('Custom background')); - builder = new L.U.FormBuilder(this, tilelayerFields, { - callback: this.initTileLayers, - callbackContext: this - }); - customTilelayer.appendChild(builder.build()); - - if (!L.Util.isObject(this.options.limitBounds)) { - this.options.limitBounds = {}; - } - var limitBounds = L.DomUtil.createFieldset(container, L._('Limit bounds')); - var boundsFields = [ - ['options.limitBounds.south', {handler: 'BlurFloatInput', placeholder: L._('max South')}], - ['options.limitBounds.west', {handler: 'BlurFloatInput', placeholder: L._('max West')}], - ['options.limitBounds.north', {handler: 'BlurFloatInput', placeholder: L._('max North')}], - ['options.limitBounds.east', {handler: 'BlurFloatInput', placeholder: L._('max East')}] - ]; - var boundsBuilder = new L.U.FormBuilder(this, boundsFields, { - callback: this.handleLimitBounds, - callbackContext: this - }); - limitBounds.appendChild(boundsBuilder.build()); - var boundsButtons = L.DomUtil.create('div', 'button-bar half', limitBounds); - var setCurrentButton = L.DomUtil.add('a', 'button', boundsButtons, L._('Use current bounds')); - setCurrentButton.href = '#'; - L.DomEvent.on(setCurrentButton, 'click', function () { - var bounds = this.getBounds(); - this.options.limitBounds.south = L.Util.formatNum(bounds.getSouth()); - this.options.limitBounds.west = L.Util.formatNum(bounds.getWest()); - this.options.limitBounds.north = L.Util.formatNum(bounds.getNorth()); - this.options.limitBounds.east = L.Util.formatNum(bounds.getEast()); - boundsBuilder.fetchAll(); - this.isDirty = true; - this.handleLimitBounds(); - }, this); - var emptyBounds = L.DomUtil.add('a', 'button', boundsButtons, L._('Empty')); - emptyBounds.href = '#'; - L.DomEvent.on(emptyBounds, 'click', function () { - this.options.limitBounds.south = null; - this.options.limitBounds.west = null; - this.options.limitBounds.north = null; - this.options.limitBounds.east = null; - boundsBuilder.fetchAll(); - this.isDirty = true; - this.handleLimitBounds(); - }, this); - - var slideshow = L.DomUtil.createFieldset(container, L._('Slideshow')); - var slideshowFields = [ - ['options.slideshow.active', {handler: 'Switch', label: L._('Activate slideshow mode')}], - ['options.slideshow.delay', {handler: 'SlideshowDelay', helpText: L._('Delay between two transitions when in play mode')}], - ['options.slideshow.easing', {handler: 'Switch', label: L._('Smart transitions'), inheritable: true}], - ['options.slideshow.autoplay', {handler: 'Switch', label: L._('Autostart when map is loaded')}] - ]; - var slideshowHandler = function () { - this.slideshow.setOptions(this.options.slideshow); - this.renderControls(); - }; - var slideshowBuilder = new L.U.FormBuilder(this, slideshowFields, { - callback: slideshowHandler, - callbackContext: this - }); - slideshow.appendChild(slideshowBuilder.build()); - - var credits = L.DomUtil.createFieldset(container, L._('Credits')); - var creditsFields = [ - ['options.licence', {handler: 'LicenceChooser', label: L._('licence')}], - ['options.shortCredit', {handler: 'Input', label: L._('Short credits'), helpEntries: ['shortCredit', 'textFormatting']}], - ['options.longCredit', {handler: 'Textarea', label: L._('Long credits'), helpEntries: ['longCredit', 'textFormatting']}] - ]; - var creditsBuilder = new L.U.FormBuilder(this, creditsFields, { - callback: function () {this._controls.attribution._update();}, - callbackContext: this - }); - credits.appendChild(creditsBuilder.build()); - - var advancedActions = L.DomUtil.createFieldset(container, L._('Advanced actions')); - var advancedButtons = L.DomUtil.create('div', 'button-bar half', advancedActions); - var del = L.DomUtil.create('a', 'button umap-delete', advancedButtons); - del.href = '#'; - del.textContent = L._('Delete'); - L.DomEvent - .on(del, 'click', L.DomEvent.stop) - .on(del, 'click', this.del, this); - var clone = L.DomUtil.create('a', 'button umap-clone', advancedButtons); - clone.href = '#'; - clone.textContent = L._('Clone'); - clone.title = L._('Clone this map'); - L.DomEvent - .on(clone, 'click', L.DomEvent.stop) - .on(clone, 'click', this.clone, this); - var empty = L.DomUtil.create('a', 'button umap-empty', advancedButtons); - empty.href = '#'; - empty.textContent = L._('Empty'); - empty.title = L._('Delete all layers'); - L.DomEvent - .on(empty, 'click', L.DomEvent.stop) - .on(empty, 'click', this.empty, this); - var download = L.DomUtil.create('a', 'button umap-download', advancedButtons); - download.href = '#'; - download.textContent = L._('Download'); - download.title = L._('Open download panel'); - L.DomEvent - .on(download, 'click', L.DomEvent.stop) - .on(download, 'click', this.renderShareBox, this); - this.ui.openPanel({data: {html: container}, className: 'dark'}); - }, - - enableEdit: function() { - L.DomUtil.addClass(document.body, 'umap-edit-enabled'); - this.editEnabled = true; - this.fire('edit:enabled'); - }, - - disableEdit: function() { - if (this.isDirty) return; - L.DomUtil.removeClass(document.body, 'umap-edit-enabled'); - this.editedFeature = null; - this.editEnabled = false; - this.fire('edit:disabled'); - }, - - getDisplayName: function () { - return this.options.name || L._('Untitled map'); - }, - - initCaptionBar: function () { - var container = L.DomUtil.create('div', 'umap-caption-bar', this._controlContainer), - name = L.DomUtil.create('h3', '', container); - L.DomEvent.disableClickPropagation(container); - this.permissions.addOwnerLink('span', container); - var about = L.DomUtil.add('a', 'umap-about-link', container, ' — ' + L._('About')); - about.href = '#'; - L.DomEvent.on(about, 'click', this.displayCaption, this); - var browser = L.DomUtil.add('a', 'umap-open-browser-link', container, ' | ' + L._('Browse data')); - browser.href = '#'; - L.DomEvent.on(browser, 'click', L.DomEvent.stop) - .on(browser, 'click', this.openBrowser, this); - var setName = function () { - name.textContent = this.getDisplayName(); - }; - L.bind(setName, this)(); - this.on('postsync', L.bind(setName, this)); - this.onceDatalayersLoaded(function () { - this.slideshow.renderToolbox(container); - }); - }, - - initEditBar: function () { - var container = L.DomUtil.create('div', 'umap-main-edit-toolbox with-transition dark', this._controlContainer), - title = L.DomUtil.add('h3', '', container, L._('Editing') + ' '), - name = L.DomUtil.create('a', 'umap-click-to-edit', title), - setName = function () { - name.textContent = this.getDisplayName(); - }; - L.bind(setName, this)(); - L.DomEvent.on(name, 'click', this.edit, this); - this.on('postsync', L.bind(setName, this)); - this.help.button(title, 'edit'); - var save = L.DomUtil.create('a', 'leaflet-control-edit-save button', container); - save.href = '#'; - save.title = L._('Save current edits') + ' (Ctrl+S)'; - save.textContent = L._('Save'); - var cancel = L.DomUtil.create('a', 'leaflet-control-edit-cancel button', container); - cancel.href = '#'; - cancel.title = L._('Cancel edits'); - cancel.textContent = L._('Cancel'); - var disable = L.DomUtil.create('a', 'leaflet-control-edit-disable', container); - disable.href = '#'; - disable.title = disable.textContent = L._('Disable editing'); - - - L.DomEvent - .addListener(disable, 'click', L.DomEvent.stop) - .addListener(disable, 'click', function (e) { - this.disableEdit(e); - this.ui.closePanel(); - }, this); - - L.DomEvent - .addListener(save, 'click', L.DomEvent.stop) - .addListener(save, 'click', this.save, this); - - L.DomEvent - .addListener(cancel, 'click', L.DomEvent.stop) - .addListener(cancel, 'click', this.askForReset, this); - }, - - askForReset: function (e) { - if (!confirm(L._('Are you sure you want to cancel your changes?'))) return; - this.reset(); - this.disableEdit(e); - this.ui.closePanel(); - }, - - startMarker: function () { - return this.editTools.startMarker(); - }, - - startPolyline: function () { - return this.editTools.startPolyline(); - }, - - startPolygon: function () { - return this.editTools.startPolygon(); - }, - - del: function () { - if (confirm(L._('Are you sure you want to delete this map?'))) { - var url = L.Util.template(this.options.urls.map_delete, {'map_id': this.options.umap_id}); - this.post(url); - } - }, - - clone: function () { - if (confirm(L._('Are you sure you want to clone this map and all its datalayers?'))) { - var url = L.Util.template(this.options.urls.map_clone, {'map_id': this.options.umap_id}); - this.post(url); - } - }, - - empty: function () { - this.eachDataLayerReverse(function (datalayer) { - datalayer._delete(); - }); - }, - - initLoader: function () { - this.loader = new L.Control.Loading(); - this.loader.onAdd(this); - }, - - post: function (url, options) { - options = options || {}; - options.listener = this; - this.xhr.post(url, options); - }, - - get: function (url, options) { - options = options || {}; - options.listener = this; - this.xhr.get(url, options); - }, - - ajax: function (options) { - options.listener = this; - this.xhr._ajax(options); - }, - - initContextMenu: function () { - this.contextmenu = new L.U.ContextMenu(this); - this.contextmenu.enable(); - }, - - setContextMenuItems: function (e) { - var items = []; - if (this._zoom !== this.getMaxZoom()) { - items.push({ - text: L._('Zoom in'), - callback: function () {this.zoomIn();} - }); - } - if (this._zoom !== this.getMinZoom()) { - items.push({ - text: L._('Zoom out'), - callback: function () {this.zoomOut();} - }); - } - if (e && e.relatedTarget) { - if (e.relatedTarget.getContextMenuItems) { - items = items.concat(e.relatedTarget.getContextMenuItems(e)); - } - } - if (this.options.allowEdit) { - items.push('-'); - if (this.editEnabled) { - if (!this.isDirty) { - items.push({ - text: L._('Stop editing') + ' (Ctrl+E)', - callback: this.disableEdit - }); - } - if (this.options.enableMarkerDraw) { - items.push( - { - text: L._('Draw a marker') + ' (Ctrl+M)', - callback: this.startMarker, - context: this - }); - } - if (this.options.enablePolylineDraw) { - items.push( - { - text: L._('Draw a polygon') + ' (Ctrl+P)', - callback: this.startPolygon, - context: this - }); - } - if (this.options.enablePolygonDraw) { - items.push( - { - text: L._('Draw a line') + ' (Ctrl+L)', - callback: this.startPolyline, - context: this - }); - } - items.push('-'); - items.push({ - text: L._('Help'), - callback: function () { this.help.show('edit');} - }); - } else { - items.push({ - text: L._('Start editing') + ' (Ctrl+E)', - callback: this.enableEdit - }); - } - } - items.push('-', - { - text: L._('Browse data'), - callback: this.openBrowser - }, - { - text: L._('About'), - callback: this.displayCaption - }, - { - text: L._('Search location'), - callback: this.search - } - ); - if (this.options.urls.routing) { - items.push('-', - { - text: L._('Directions from here'), - callback: this.openExternalRouting - } - ); - } - this.options.contextmenuItems = items; - }, - - openExternalRouting: function (e) { - var url = this.options.urls.routing; - if (url) { - var params = { - lat: e.latlng.lat, - lng: e.latlng.lng, - locale: L.locale, - zoom: this.getZoom() - }; - window.open(L.Util.template(url, params)); - } - return; - }, - - getMap: function () { - return this; - }, - - getGeoContext: function () { - var context = { - bbox: this.getBounds().toBBoxString(), - north: this.getBounds().getNorthEast().lat, - east: this.getBounds().getNorthEast().lng, - south: this.getBounds().getSouthWest().lat, - west: this.getBounds().getSouthWest().lng, - lat: this.getCenter().lat, - lng: this.getCenter().lng, - zoom: this.getZoom() - }; - context.left = context.west; - context.bottom = context.south; - context.right = context.east; - context.top = context.north; - return context; - }, - - localizeUrl: function (url) { - return L.Util.greedyTemplate(url, this.getGeoContext(), true); - }, - - proxyUrl: function (url, ttl) { - if (this.options.urls.ajax_proxy) { - url = L.Util.greedyTemplate(this.options.urls.ajax_proxy, {url: encodeURIComponent(url), ttl: ttl}); - } - return url; - }, - - closeInplaceToolbar: function () { - var toolbar = this._toolbars[L.Toolbar.Popup._toolbar_class_id]; - if (toolbar) toolbar.remove(); - }, - - search: function () { - if (this._controls.search) this._controls.search.openPanel(this); - }, - - getFilterKeys: function () { - return (this.options.filterKey || this.options.sortKey || 'name').split(','); + HIDDABLE_CONTROLS: [ + 'zoom', + 'search', + 'fullscreen', + 'embed', + 'locate', + 'measure', + 'tilelayers', + 'editinosm', + 'datalayers', + 'star', + ], + + initialize: function (el, geojson) { + if (geojson.properties && geojson.properties.locale) + L.setLocale(geojson.properties.locale) + + // Don't let default autocreation of controls + const zoomControl = + typeof geojson.properties.zoomControl !== 'undefined' + ? geojson.properties.zoomControl + : true + geojson.properties.zoomControl = false + const fullscreenControl = + typeof geojson.properties.fullscreenControl !== 'undefined' + ? geojson.properties.fullscreenControl + : true + geojson.properties.fullscreenControl = false + L.Util.setBooleanFromQueryString(geojson.properties, 'scrollWheelZoom') + L.Map.prototype.initialize.call(this, el, geojson.properties) + + this.ui = new L.U.UI(this._container) + this.xhr = new L.U.Xhr(this.ui) + this.xhr.on('dataloding', function (e) { + this.fire('dataloding', e) + }) + this.xhr.on('datalaod', function (e) { + this.fire('datalaod', e) + }) + + this.initLoader() + this.name = this.options.name + this.description = this.options.description + this.demoTileInfos = this.options.demoTileInfos + if (geojson.geometry) this.options.center = geojson.geometry + this.options.zoomControl = zoomControl + this.options.fullscreenControl = fullscreenControl + L.Util.setBooleanFromQueryString(this.options, 'moreControl') + L.Util.setBooleanFromQueryString(this.options, 'scaleControl') + L.Util.setBooleanFromQueryString(this.options, 'miniMap') + L.Util.setBooleanFromQueryString(this.options, 'allowEdit') + L.Util.setBooleanFromQueryString(this.options, 'displayDataBrowserOnLoad') + L.Util.setBooleanFromQueryString(this.options, 'displayCaptionOnLoad') + L.Util.setBooleanFromQueryString(this.options, 'captionBar') + L.Util.setBooleanFromQueryString(this.options, 'captionMenus') + for (let i = 0; i < this.HIDDABLE_CONTROLS.length; i++) { + L.Util.setNullableBooleanFromQueryString( + this.options, + `${this.HIDDABLE_CONTROLS[i]}Control` + ) + } + this.datalayersOnLoad = L.Util.queryString('datalayers') + this.options.onLoadPanel = L.Util.queryString( + 'onLoadPanel', + this.options.onLoadPanel + ) + if (this.datalayersOnLoad) + this.datalayersOnLoad = this.datalayersOnLoad.toString().split(',') + + if (L.Browser.ielt9) this.options.allowEdit = false // TODO include ie9 + + let editedFeature = null + const self = this + try { + Object.defineProperty(this, 'editedFeature', { + get: function () { + return editedFeature + }, + set: function (feature) { + if (editedFeature && editedFeature !== feature) { + editedFeature.endEdit() + } + editedFeature = feature + self.fire('seteditedfeature') + }, + }) + } catch (e) { + // Certainly IE8, which has a limited version of defineProperty } -}); + if (this.options.hash) this.addHash() + this.initCenter() + this.handleLimitBounds() + + this.initTileLayers(this.options.tilelayers) + + // Global storage for retrieving datalayers and features + this.datalayers = {} + this.datalayers_index = [] + this.dirty_datalayers = [] + this.features_index = {} + + // Retrocompat + if ( + this.options.slideshow && + this.options.slideshow.delay && + this.options.slideshow.active === undefined + ) + this.options.slideshow.active = true + + this.initControls() + + // create datalayers + this.initDatalayers() + + if (this.options.displayCaptionOnLoad) { + // Retrocompat + if (!this.options.onLoadPanel) { + this.options.onLoadPanel = 'caption' + } + delete this.options.displayCaptionOnLoad + } + if (this.options.displayDataBrowserOnLoad) { + // Retrocompat + if (!this.options.onLoadPanel) { + this.options.onLoadPanel = 'databrowser' + } + delete this.options.displayDataBrowserOnLoad + } + + this.ui.on( + 'panel:closed', + function () { + this.invalidateSize({ pan: false }) + }, + this + ) + + let isDirty = false // global status + try { + Object.defineProperty(this, 'isDirty', { + get: function () { + return isDirty || this.dirty_datalayers.length + }, + set: function (status) { + if (!isDirty && status) self.fire('isdirty') + isDirty = status + self.checkDirty() + }, + }) + } catch (e) { + // Certainly IE8, which has a limited version of defineProperty + } + this.on( + 'baselayerchange', + function (e) { + if (this._controls.miniMap) this._controls.miniMap.onMainMapBaseLayerChange(e) + }, + this + ) + + // Creation mode + if (!this.options.umap_id) { + this.isDirty = true + this._default_extent = true + this.options.name = L._('Untitled map') + this.options.allowEdit = true + const datalayer = this.createDataLayer() + datalayer.connectToMap() + this.enableEdit() + let dataUrl = L.Util.queryString('dataUrl', null) + const dataFormat = L.Util.queryString('dataFormat', 'geojson') + if (dataUrl) { + dataUrl = decodeURIComponent(dataUrl) + dataUrl = this.localizeUrl(dataUrl) + dataUrl = this.proxyUrl(dataUrl) + datalayer.importFromUrl(dataUrl, dataFormat) + } + } + + this.help = new L.U.Help(this) + this.slideshow = new L.U.Slideshow(this, this.options.slideshow) + this.permissions = new L.U.MapPermissions(this) + this.initCaptionBar() + if (this.options.allowEdit) { + this.editTools = new L.U.Editable(this) + this.ui.on( + 'panel:closed panel:open', + function () { + this.editedFeature = null + }, + this + ) + this.initEditBar() + } + this.initShortcuts() + this.onceDatalayersLoaded(function () { + if (this.options.onLoadPanel === 'databrowser') this.openBrowser() + else if (this.options.onLoadPanel === 'caption') this.displayCaption() + else if (this.options.onLoadPanel === 'datafilters') this.openFilter() + }) + this.onceDataLoaded(function () { + const slug = L.Util.queryString('feature') + if (slug && this.features_index[slug]) this.features_index[slug].view() + }) + + window.onbeforeunload = (e) => { + const msg = L._('You have unsaved changes.') + if (self.isDirty) { + e.returnValue = msg + return msg + } + } + this.backup() + this.initContextMenu() + this.on('click contextmenu.show', this.closeInplaceToolbar) + }, + + initControls: function () { + this.helpMenuActions = {} + this._controls = {} + + if (this.options.allowEdit && !this.options.noControl) { + new L.U.EditControl(this).addTo(this) + + new L.U.DrawToolbar({ map: this }).addTo(this) + + const editActions = [ + L.U.ImportAction, + L.U.EditPropertiesAction, + L.U.ChangeTileLayerAction, + L.U.ManageDatalayersAction, + L.U.UpdateExtentAction, + L.U.UpdatePermsAction, + ] + new L.U.SettingsToolbar({ actions: editActions }).addTo(this) + } + this._controls.zoom = new L.Control.Zoom({ + zoomInTitle: L._('Zoom in'), + zoomOutTitle: L._('Zoom out'), + }) + this._controls.datalayers = new L.U.DataLayersControl(this) + this._controls.locate = L.control.locate({ + strings: { + title: L._('Center map on your location'), + }, + showPopup: false, + // We style this control in our own CSS for consistency with other controls, + // but the control breaks if we don't specify a class here, so a fake class + // will do. + icon: 'umap-fake-class', + iconLoading: 'umap-fake-class', + flyTo: this.options.easing, + }) + this._controls.fullscreen = new L.Control.Fullscreen({ + title: { false: L._('View Fullscreen'), true: L._('Exit Fullscreen') }, + }) + this._controls.search = new L.U.SearchControl() + this._controls.embed = new L.Control.Embed(this, this.options.embedOptions) + this._controls.tilelayers = new L.U.TileLayerControl(this) + this._controls.star = new L.U.StarControl(this) + this._controls.editinosm = new L.Control.EditInOSM({ + position: 'topleft', + widgetOptions: { + helpText: L._( + 'Open this map extent in a map editor to provide more accurate data to OpenStreetMap' + ), + }, + }) + this._controls.measure = new L.MeasureControl().initHandler(this) + this._controls.more = new L.U.MoreControls() + this._controls.scale = L.control.scale() + this._controls.permanentCredit = new L.U.PermanentCreditsControl(this) + if (this.options.scrollWheelZoom) this.scrollWheelZoom.enable() + else this.scrollWheelZoom.disable() + this.renderControls() + }, + + renderControls: function () { + L.DomUtil.classIf( + document.body, + 'umap-caption-bar-enabled', + this.options.captionBar || + (this.options.slideshow && this.options.slideshow.active) + ) + L.DomUtil.classIf( + document.body, + 'umap-slideshow-enabled', + this.options.slideshow && this.options.slideshow.active + ) + for (const i in this._controls) { + this.removeControl(this._controls[i]) + } + if (this.options.noControl) return + + this._controls.attribution = new L.U.AttributionControl().addTo(this) + if (this.options.miniMap && !this.options.noControl) { + this.whenReady(function () { + if (this.selected_tilelayer) { + this._controls.miniMap = new L.Control.MiniMap(this.selected_tilelayer).addTo( + this + ) + this._controls.miniMap._miniMap.invalidateSize() + } + }) + } + let name, status, control + for (let i = 0; i < this.HIDDABLE_CONTROLS.length; i++) { + name = this.HIDDABLE_CONTROLS[i] + status = this.options[`${name}Control`] + if (status === false) continue + control = this._controls[name] + control.addTo(this) + if (status === undefined || status === null) + L.DomUtil.addClass(control._container, 'display-on-more') + else L.DomUtil.removeClass(control._container, 'display-on-more') + } + if (this.options.permanentCredit) this._controls.permanentCredit.addTo(this) + if (this.options.moreControl) this._controls.more.addTo(this) + if (this.options.scaleControl) this._controls.scale.addTo(this) + }, + + initDatalayers: function () { + let toload = (dataToload = seen = this.options.datalayers.length) + const self = this + let datalayer + const loaded = () => { + self.datalayersLoaded = true + self.fire('datalayersloaded') + } + const decrementToLoad = () => { + toload-- + if (toload === 0) loaded() + } + const dataLoaded = () => { + self.dataLoaded = true + self.fire('dataloaded') + } + const decrementDataToLoad = () => { + dataToload-- + if (dataToload === 0) dataLoaded() + } + for (let j = 0; j < this.options.datalayers.length; j++) { + datalayer = this.createDataLayer(this.options.datalayers[j]) + if (datalayer.displayedOnLoad()) datalayer.onceLoaded(decrementToLoad) + else decrementToLoad() + if (datalayer.displayedOnLoad()) datalayer.onceDataLoaded(decrementDataToLoad) + else decrementDataToLoad() + } + if (seen === 0) loaded() && dataLoaded() // no datalayer + }, + + indexDatalayers: function () { + const panes = this.getPane('overlayPane') + let pane + this.datalayers_index = [] + for (let i = 0; i < panes.children.length; i++) { + pane = panes.children[i] + if (!pane.dataset || !pane.dataset.id) continue + this.datalayers_index.push(this.datalayers[pane.dataset.id]) + } + this.updateDatalayersControl() + }, + + ensurePanesOrder: function () { + this.eachDataLayer((datalayer) => { + datalayer.bringToTop() + }) + }, + + onceDatalayersLoaded: function (callback, context) { + // Once datalayers **metadata** have been loaded + if (this.datalayersLoaded) { + callback.call(context || this, this) + } else { + this.once('datalayersloaded', callback, context) + } + return this + }, + + onceDataLoaded: function (callback, context) { + // Once datalayers **data** have been loaded + if (this.dataLoaded) { + callback.call(context || this, this) + } else { + this.once('dataloaded', callback, context) + } + return this + }, + + updateDatalayersControl: function () { + if (this._controls.datalayers) this._controls.datalayers.update() + }, + + backupOptions: function () { + this._backupOptions = L.extend({}, this.options) + this._backupOptions.tilelayer = L.extend({}, this.options.tilelayer) + this._backupOptions.limitBounds = L.extend({}, this.options.limitBounds) + this._backupOptions.permissions = L.extend({}, this.permissions.options) + }, + + resetOptions: function () { + this.options = L.extend({}, this._backupOptions) + this.options.tilelayer = L.extend({}, this._backupOptions.tilelayer) + this.permissions.options = L.extend({}, this._backupOptions.permissions) + }, + + initShortcuts: function () { + const globalShortcuts = function (e) { + const key = e.keyCode, + modifierKey = e.ctrlKey || e.metaKey + + /* Generic shortcuts */ + if (key === L.U.Keys.F && modifierKey) { + L.DomEvent.stop(e) + this.search() + } else if (e.keyCode === L.U.Keys.ESC) { + if (this.help.visible()) this.help.hide() + else this.ui.closePanel() + } + + if (!this.options.allowEdit) return + + /* Edit mode only shortcuts */ + if (key === L.U.Keys.E && modifierKey && !this.editEnabled) { + L.DomEvent.stop(e) + this.enableEdit() + } else if ( + key === L.U.Keys.E && + modifierKey && + this.editEnabled && + !this.isDirty + ) { + L.DomEvent.stop(e) + this.disableEdit() + this.ui.closePanel() + } + if (key === L.U.Keys.S && modifierKey) { + L.DomEvent.stop(e) + if (this.isDirty) { + this.save() + } + } + if (key === L.U.Keys.Z && modifierKey && this.isDirty) { + L.DomEvent.stop(e) + this.askForReset() + } + if (key === L.U.Keys.M && modifierKey && this.editEnabled) { + L.DomEvent.stop(e) + this.editTools.startMarker() + } + if (key === L.U.Keys.P && modifierKey && this.editEnabled) { + L.DomEvent.stop(e) + this.editTools.startPolygon() + } + if (key === L.U.Keys.L && modifierKey && this.editEnabled) { + L.DomEvent.stop(e) + this.editTools.startPolyline() + } + if (key === L.U.Keys.I && modifierKey && this.editEnabled) { + L.DomEvent.stop(e) + this.importPanel() + } + if (key === L.U.Keys.H && modifierKey && this.editEnabled) { + L.DomEvent.stop(e) + this.help.show('edit') + } + if (e.keyCode === L.U.Keys.ESC) { + if (this.editEnabled) this.editTools.stopDrawing() + if (this.measureTools.enabled()) this.measureTools.stopDrawing() + } + } + L.DomEvent.addListener(document, 'keydown', globalShortcuts, this) + }, + + initTileLayers: function () { + this.tilelayers = [] + for (const i in this.options.tilelayers) { + if (this.options.tilelayers.hasOwnProperty(i)) { + this.tilelayers.push(this.createTileLayer(this.options.tilelayers[i])) + if ( + this.options.tilelayer && + this.options.tilelayer.url_template === + this.options.tilelayers[i].url_template + ) { + // Keep control over the displayed attribution for non custom tilelayers + this.options.tilelayer.attribution = this.options.tilelayers[i].attribution + } + } + } + if ( + this.options.tilelayer && + this.options.tilelayer.url_template && + this.options.tilelayer.attribution + ) { + this.customTilelayer = this.createTileLayer(this.options.tilelayer) + this.selectTileLayer(this.customTilelayer) + } else { + this.selectTileLayer(this.tilelayers[0]) + } + }, + + createTileLayer: function (tilelayer) { + return new L.TileLayer(tilelayer.url_template, tilelayer) + }, + + selectTileLayer: function (tilelayer) { + if (tilelayer === this.selected_tilelayer) { + return + } + try { + this.addLayer(tilelayer) + this.fire('baselayerchange', { layer: tilelayer }) + if (this.selected_tilelayer) { + this.removeLayer(this.selected_tilelayer) + } + this.selected_tilelayer = tilelayer + if ( + !isNaN(this.selected_tilelayer.options.minZoom) && + this.getZoom() < this.selected_tilelayer.options.minZoom + ) { + this.setZoom(this.selected_tilelayer.options.minZoom) + } + if ( + !isNaN(this.selected_tilelayer.options.maxZoom) && + this.getZoom() > this.selected_tilelayer.options.maxZoom + ) { + this.setZoom(this.selected_tilelayer.options.maxZoom) + } + } catch (e) { + this.removeLayer(tilelayer) + this.ui.alert({ + content: `${L._('Error in the tilelayer URL')}: ${tilelayer._url}`, + level: 'error', + }) + // Users can put tilelayer URLs by hand, and if they add wrong {variable}, + // Leaflet throw an error, and then the map is no more editable + } + this.setOverlay() + }, + + eachTileLayer: function (method, context) { + const urls = [] + for (const i in this.tilelayers) { + if (this.tilelayers.hasOwnProperty(i)) { + method.call(context, this.tilelayers[i]) + urls.push(this.tilelayers[i]._url) + } + } + if ( + this.customTilelayer && + Array.prototype.indexOf && + urls.indexOf(this.customTilelayer._url) === -1 + ) { + method.call(context || this, this.customTilelayer) + } + }, + + setOverlay: function () { + if (!this.options.overlay || !this.options.overlay.url_template) return + const overlay = this.createTileLayer(this.options.overlay) + try { + this.addLayer(overlay) + if (this.overlay) this.removeLayer(this.overlay) + this.overlay = overlay + } catch (e) { + this.removeLayer(overlay) + console.error(e) + this.ui.alert({ + content: `${L._('Error in the overlay URL')}: ${overlay._url}`, + level: 'error', + }) + } + }, + + initCenter: function () { + if (this.options.hash && this._hash.parseHash(location.hash)) { + // FIXME An invalid hash will cause the load to fail + this._hash.update() + } else if (this.options.locate && this.options.locate.setView) { + // Prevent from making two setViews at init + // which is not very fluid... + this.locate(this.options.locate) + } else { + this.options.center = this.latLng(this.options.center) + this.setView(this.options.center, this.options.zoom) + } + }, + + latLng: function (a, b, c) { + // manage geojson case and call original method + if (!(a instanceof L.LatLng) && a.coordinates) { + // Guess it's a geojson + a = [a.coordinates[1], a.coordinates[0]] + } + return L.latLng(a, b, c) + }, + + handleLimitBounds: function () { + const south = parseFloat(this.options.limitBounds.south), + west = parseFloat(this.options.limitBounds.west), + north = parseFloat(this.options.limitBounds.north), + east = parseFloat(this.options.limitBounds.east) + if (!isNaN(south) && !isNaN(west) && !isNaN(north) && !isNaN(east)) { + const bounds = L.latLngBounds([ + [south, west], + [north, east], + ]) + this.options.minZoom = this.getBoundsZoom(bounds, false) + try { + this.setMaxBounds(bounds) + } catch (e) { + // Unusable bounds, like -2 -2 -2 -2? + console.error('Error limiting bounds', e) + } + } else { + this.options.minZoom = 0 + this.setMaxBounds() + } + }, + + setMaxBounds: function (bounds) { + // Hack. Remove me when fix is released: + // https://github.com/Leaflet/Leaflet/pull/4494 + bounds = L.latLngBounds(bounds) + + if (!bounds.isValid()) { + this.options.maxBounds = null + return this.off('moveend', this._panInsideMaxBounds) + } + return L.Map.prototype.setMaxBounds.call(this, bounds) + }, + + createDataLayer: function (datalayer) { + datalayer = datalayer || { + name: `${L._('Layer')} ${this.datalayers_index.length + 1}`, + } + return new L.U.DataLayer(this, datalayer) + }, + + getDefaultOption: function (option) { + return this.options[`default_${option}`] + }, + + getOption: function (option) { + if (L.Util.usableOption(this.options, option)) return this.options[option] + return this.getDefaultOption(option) + }, + + updateExtent: function () { + this.options.center = this.getCenter() + this.options.zoom = this.getZoom() + this.isDirty = true + this._default_extent = false + if (this.options.umap_id) { + // We do not want an extra message during the map creation + // to avoid the double notification/alert. + this.ui.alert({ + content: L._('The zoom and center have been modified.'), + level: 'info', + }) + } + }, + + updateTileLayers: function () { + const self = this, + callback = (tilelayer) => { + self.options.tilelayer = tilelayer.toJSON() + self.isDirty = true + } + if (this._controls.tilelayers) + this._controls.tilelayers.openSwitcher({ callback: callback, className: 'dark' }) + }, + + manageDatalayers: function () { + if (this._controls.datalayers) this._controls.datalayers.openPanel() + }, + + renderShareBox: function () { + const container = L.DomUtil.create('div', 'umap-share') + const embedTitle = L.DomUtil.add('h4', '', container, L._('Embed the map')) + const iframe = L.DomUtil.create('textarea', 'umap-share-iframe', container) + const urlTitle = L.DomUtil.add('h4', '', container, L._('Direct link')) + const exportUrl = L.DomUtil.create('input', 'umap-share-url', container) + let option + exportUrl.type = 'text' + const UIFields = [ + ['dimensions.width', { handler: 'Input', label: L._('width') }], + ['dimensions.height', { handler: 'Input', label: L._('height') }], + [ + 'options.includeFullScreenLink', + { handler: 'Switch', label: L._('Include full screen link?') }, + ], + [ + 'options.currentView', + { handler: 'Switch', label: L._('Current view instead of default map view?') }, + ], + [ + 'options.keepCurrentDatalayers', + { handler: 'Switch', label: L._('Keep current visible layers') }, + ], + [ + 'options.viewCurrentFeature', + { handler: 'Switch', label: L._('Open current feature on load') }, + ], + 'queryString.moreControl', + 'queryString.scrollWheelZoom', + 'queryString.miniMap', + 'queryString.scaleControl', + 'queryString.onLoadPanel', + 'queryString.captionBar', + 'queryString.captionMenus', + ] + for (let i = 0; i < this.HIDDABLE_CONTROLS.length; i++) { + UIFields.push(`queryString.${this.HIDDABLE_CONTROLS[i]}Control`) + } + const iframeExporter = new L.U.IframeExporter(this) + const buildIframeCode = () => { + iframe.innerHTML = iframeExporter.build() + exportUrl.value = window.location.protocol + iframeExporter.buildUrl() + } + buildIframeCode() + const builder = new L.U.FormBuilder(iframeExporter, UIFields, { + callback: buildIframeCode, + }) + const iframeOptions = L.DomUtil.createFieldset(container, L._('Export options')) + iframeOptions.appendChild(builder.build()) + if (this.options.shortUrl) { + L.DomUtil.create('hr', '', container) + L.DomUtil.add('h4', '', container, L._('Short URL')) + const shortUrl = L.DomUtil.create('input', 'umap-short-url', container) + shortUrl.type = 'text' + shortUrl.value = this.options.shortUrl + } + L.DomUtil.create('hr', '', container) + L.DomUtil.add('h4', '', container, L._('Download data')) + const typeInput = L.DomUtil.create('select', '', container) + typeInput.name = 'format' + const exportCaveat = L.DomUtil.add( + 'small', + 'help-text', + container, + L._('Only visible features will be downloaded.') + ) + exportCaveat.id = 'export_caveat_text' + const toggleCaveat = () => { + if (typeInput.value === 'umap') exportCaveat.style.display = 'none' + else exportCaveat.style.display = 'inherit' + } + L.DomEvent.on(typeInput, 'change', toggleCaveat) + const types = { + geojson: { + formatter: function (map) { + return JSON.stringify(map.toGeoJSON(), null, 2) + }, + ext: '.geojson', + filetype: 'application/json', + }, + gpx: { + formatter: function (map) { + return togpx(map.toGeoJSON()) + }, + ext: '.gpx', + filetype: 'application/xml', + }, + kml: { + formatter: function (map) { + return tokml(map.toGeoJSON()) + }, + ext: '.kml', + filetype: 'application/vnd.google-earth.kml+xml', + }, + umap: { + name: L._('Full map data'), + formatter: function (map) { + return map.serialize() + }, + ext: '.umap', + filetype: 'application/json', + selected: true, + }, + } + for (const key in types) { + if (types.hasOwnProperty(key)) { + option = L.DomUtil.create('option', '', typeInput) + option.value = key + option.textContent = types[key].name || key + if (types[key].selected) option.selected = true + } + } + toggleCaveat() + const download = L.DomUtil.create('a', 'button', container) + download.textContent = L._('Download data') + L.DomEvent.on( + download, + 'click', + () => { + const type = types[typeInput.value] + const content = type.formatter(this) + let name = this.options.name || 'data' + name = name.replace(/[^a-z0-9]/gi, '_').toLowerCase() + download.download = name + type.ext + window.URL = window.URL || window.webkitURL + const blob = new Blob([content], { type: type.filetype }) + download.href = window.URL.createObjectURL(blob) + }, + this + ) + this.ui.openPanel({ data: { html: container } }) + }, + + toGeoJSON: function () { + let features = [] + this.eachDataLayer((datalayer) => { + if (datalayer.isVisible()) { + features = features.concat(datalayer.featuresToGeoJSON()) + } + }) + const geojson = { + type: 'FeatureCollection', + features: features, + } + return geojson + }, + + importPanel: function () { + const container = L.DomUtil.create('div', 'umap-upload') + const title = L.DomUtil.create('h4', '', container) + const presetBox = L.DomUtil.create('div', 'formbox', container) + const presetSelect = L.DomUtil.create('select', '', presetBox) + const fileBox = L.DomUtil.create('div', 'formbox', container) + const fileInput = L.DomUtil.create('input', '', fileBox) + const urlInput = L.DomUtil.create('input', '', container) + const rawInput = L.DomUtil.create('textarea', '', container) + const typeLabel = L.DomUtil.create('label', '', container) + const layerLabel = L.DomUtil.create('label', '', container) + const clearLabel = L.DomUtil.create('label', '', container) + const submitInput = L.DomUtil.create('input', '', container) + const map = this + let option + const types = ['geojson', 'csv', 'gpx', 'kml', 'osm', 'georss', 'umap'] + title.textContent = L._('Import data') + fileInput.type = 'file' + fileInput.multiple = 'multiple' + submitInput.type = 'button' + submitInput.value = L._('Import') + submitInput.className = 'button' + typeLabel.textContent = L._('Choose the format of the data to import') + this.help.button(typeLabel, 'importFormats') + const typeInput = L.DomUtil.create('select', '', typeLabel) + typeInput.name = 'format' + layerLabel.textContent = L._('Choose the layer to import in') + const layerInput = L.DomUtil.create('select', '', layerLabel) + layerInput.name = 'datalayer' + urlInput.type = 'text' + urlInput.placeholder = L._('Provide an URL here') + rawInput.placeholder = L._('Paste your data here') + clearLabel.textContent = L._('Replace layer content') + const clearFlag = L.DomUtil.create('input', '', clearLabel) + clearFlag.type = 'checkbox' + clearFlag.name = 'clear' + this.eachDataLayerReverse((datalayer) => { + if (datalayer.isLoaded() && !datalayer.isRemoteLayer()) { + const id = L.stamp(datalayer) + option = L.DomUtil.create('option', '', layerInput) + option.value = id + option.textContent = datalayer.options.name + } + }) + L.DomUtil.element( + 'option', + { value: '', textContent: L._('Import in a new layer') }, + layerInput + ) + L.DomUtil.element( + 'option', + { value: '', textContent: L._('Choose the data format') }, + typeInput + ) + for (let i = 0; i < types.length; i++) { + option = L.DomUtil.create('option', '', typeInput) + option.value = option.textContent = types[i] + } + if (this.options.importPresets.length) { + const noPreset = L.DomUtil.create('option', '', presetSelect) + noPreset.value = noPreset.textContent = L._('Choose a preset') + for (let j = 0; j < this.options.importPresets.length; j++) { + option = L.DomUtil.create('option', '', presetSelect) + option.value = this.options.importPresets[j].url + option.textContent = this.options.importPresets[j].label + } + } else { + presetBox.style.display = 'none' + } + + const submit = function () { + let type = typeInput.value + const layerId = layerInput[layerInput.selectedIndex].value + let layer + if (type === 'umap') { + this.once('postsync', function () { + this.setView(this.latLng(this.options.center), this.options.zoom) + }) + } + if (layerId) layer = map.datalayers[layerId] + if (layer && clearFlag.checked) layer.empty() + if (fileInput.files.length) { + let file + for (let i = 0, file; (file = fileInput.files[i]); i++) { + type = type || L.Util.detectFileType(file) + if (!type) { + this.ui.alert({ + content: L._('Unable to detect format of file {filename}', { + filename: file.name, + }), + level: 'error', + }) + continue + } + if (type === 'umap') { + this.importFromFile(file, 'umap') + } else { + let importLayer = layer + if (!layer) importLayer = this.createDataLayer({ name: file.name }) + importLayer.importFromFile(file, type) + } + } + } else { + if (!type) + return this.ui.alert({ + content: L._('Please choose a format'), + level: 'error', + }) + if (rawInput.value && type === 'umap') { + try { + this.importRaw(rawInput.value, type) + } catch (e) { + this.ui.alert({ content: L._('Invalid umap data'), level: 'error' }) + console.error(e) + } + } else { + if (!layer) layer = this.createDataLayer() + if (rawInput.value) layer.importRaw(rawInput.value, type) + else if (urlInput.value) layer.importFromUrl(urlInput.value, type) + else if (presetSelect.selectedIndex > 0) + layer.importFromUrl(presetSelect[presetSelect.selectedIndex].value, type) + } + } + } + L.DomEvent.on(submitInput, 'click', submit, this) + L.DomEvent.on( + fileInput, + 'change', + (e) => { + let type = '', + newType + for (let i = 0; i < e.target.files.length; i++) { + newType = L.Util.detectFileType(e.target.files[i]) + if (!type && newType) type = newType + if (type && newType !== type) { + type = '' + break + } + } + typeInput.value = type + }, + this + ) + this.ui.openPanel({ data: { html: container }, className: 'dark' }) + }, + + importRaw: function (rawData) { + const importedData = JSON.parse(rawData) + + let mustReindex = false + + for (let i = 0; i < this.editableOptions.length; i++) { + const option = this.editableOptions[i] + if (typeof importedData.properties[option] !== 'undefined') { + this.options[option] = importedData.properties[option] + if (option === 'sortKey') mustReindex = true + } + } + + if (importedData.geometry) this.options.center = this.latLng(importedData.geometry) + const self = this + importedData.layers.forEach((geojson) => { + const dataLayer = self.createDataLayer() + dataLayer.fromUmapGeoJSON(geojson) + }) + + this.initTileLayers() + this.renderControls() + this.handleLimitBounds() + this.eachDataLayer((datalayer) => { + if (mustReindex) datalayer.reindex() + datalayer.redraw() + }) + this.fire('postsync') + this.isDirty = true + }, + + importFromFile: function (file) { + const reader = new FileReader() + reader.readAsText(file) + const self = this + reader.onload = (e) => { + const rawData = e.target.result + try { + self.importRaw(rawData) + } catch (e) { + console.error('Error importing data', e) + self.ui.alert({ + content: L._('Invalid umap data in {filename}', { filename: file.name }), + level: 'error', + }) + } + } + }, + + openBrowser: function () { + this.onceDatalayersLoaded(function () { + this._openBrowser() + }) + }, + + openFilter: function () { + this.onceDatalayersLoaded(function () { + this._openFilter() + }) + }, + + displayCaption: function () { + const container = L.DomUtil.create('div', 'umap-caption') + let title = L.DomUtil.create('h3', '', container) + title.textContent = this.options.name + this.permissions.addOwnerLink('h5', container) + if (this.options.description) { + const description = L.DomUtil.create('div', 'umap-map-description', container) + description.innerHTML = L.Util.toHTML(this.options.description) + } + const datalayerContainer = L.DomUtil.create('div', 'datalayer-container', container) + this.eachVisibleDataLayer((datalayer) => { + const p = L.DomUtil.create('p', '', datalayerContainer), + color = L.DomUtil.create('span', 'datalayer-color', p), + headline = L.DomUtil.create('strong', '', p), + description = L.DomUtil.create('span', '', p) + datalayer.onceLoaded(function () { + color.style.backgroundColor = this.getColor() + if (datalayer.options.description) { + description.innerHTML = L.Util.toHTML(datalayer.options.description) + } + }) + datalayer.renderToolbox(headline) + L.DomUtil.add('span', '', headline, `${datalayer.options.name} `) + }) + const creditsContainer = L.DomUtil.create('div', 'credits-container', container), + credits = L.DomUtil.createFieldset(creditsContainer, L._('Credits')) + title = L.DomUtil.add('h5', '', credits, L._('User content credits')) + if (this.options.shortCredit || this.options.longCredit) { + L.DomUtil.add( + 'p', + '', + credits, + L.Util.toHTML(this.options.longCredit || this.options.shortCredit) + ) + } + if (this.options.licence) { + const licence = L.DomUtil.add( + 'p', + '', + credits, + `${L._('Map user content has been published under licence')} ` + ), + link = L.DomUtil.add('a', '', licence, this.options.licence.name) + link.href = this.options.licence.url + } else { + L.DomUtil.add('p', '', credits, L._('No licence has been set')) + } + L.DomUtil.create('hr', '', credits) + title = L.DomUtil.create('h5', '', credits) + title.textContent = L._('Map background credits') + const tilelayerCredit = L.DomUtil.create('p', '', credits), + name = L.DomUtil.create('strong', '', tilelayerCredit), + attribution = L.DomUtil.create('span', '', tilelayerCredit) + name.textContent = `${this.selected_tilelayer.options.name} ` + attribution.innerHTML = this.selected_tilelayer.getAttribution() + L.DomUtil.create('hr', '', credits) + const umapCredit = L.DomUtil.create('p', '', credits), + urls = { + leaflet: 'http://leafletjs.com', + django: 'https://www.djangoproject.com', + umap: 'http://wiki.openstreetmap.org/wiki/UMap', + } + umapCredit.innerHTML = L._( + 'Powered by Leaflet and Django, glued by uMap project.', + urls + ) + const browser = L.DomUtil.create('li', '') + L.DomUtil.create('i', 'umap-icon-16 umap-list', browser) + const labelBrowser = L.DomUtil.create('span', '', browser) + labelBrowser.textContent = labelBrowser.title = L._('Browse data') + L.DomEvent.on(browser, 'click', this.openBrowser, this) + const actions = [browser] + if (this.options.advancedFilterKey) { + const filter = L.DomUtil.create('li', '') + L.DomUtil.create('i', 'umap-icon-16 umap-add', filter) + const labelFilter = L.DomUtil.create('span', '', filter) + labelFilter.textContent = labelFilter.title = L._('Select data') + L.DomEvent.on(filter, 'click', this.openFilter, this) + actions.push(filter) + } + this.ui.openPanel({ data: { html: container }, actions: actions }) + }, + + eachDataLayer: function (method, context) { + for (let i = 0; i < this.datalayers_index.length; i++) { + method.call(context, this.datalayers_index[i]) + } + }, + + eachDataLayerReverse: function (method, context, filter) { + for (let i = this.datalayers_index.length - 1; i >= 0; i--) { + if (filter && !filter.call(context, this.datalayers_index[i])) continue + method.call(context, this.datalayers_index[i]) + } + }, + + eachBrowsableDataLayer: function (method, context) { + this.eachDataLayerReverse(method, context, (d) => d.allowBrowse()) + }, + + eachVisibleDataLayer: function (method, context) { + this.eachDataLayerReverse(method, context, (d) => d.isVisible()) + }, + + findDataLayer: function (method, context) { + for (let i = this.datalayers_index.length - 1; i >= 0; i--) { + if (method.call(context, this.datalayers_index[i])) + return this.datalayers_index[i] + } + }, + + backup: function () { + this.backupOptions() + this._datalayers_index_bk = [].concat(this.datalayers_index) + }, + + reset: function () { + if (this.editTools) this.editTools.stopDrawing() + this.resetOptions() + this.datalayers_index = [].concat(this._datalayers_index_bk) + this.dirty_datalayers.slice().forEach((datalayer) => { + if (datalayer.isDeleted) datalayer.connectToMap() + datalayer.reset() + }) + this.ensurePanesOrder() + this.dirty_datalayers = [] + this.updateDatalayersControl() + this.initTileLayers() + this.isDirty = false + }, + + checkDirty: function () { + L.DomUtil.classIf(this._container, 'umap-is-dirty', this.isDirty) + }, + + addDirtyDatalayer: function (datalayer) { + if (this.dirty_datalayers.indexOf(datalayer) === -1) { + this.dirty_datalayers.push(datalayer) + this.isDirty = true + } + }, + + removeDirtyDatalayer: function (datalayer) { + if (this.dirty_datalayers.indexOf(datalayer) !== -1) { + this.dirty_datalayers.splice(this.dirty_datalayers.indexOf(datalayer), 1) + this.checkDirty() + } + }, + + continueSaving: function () { + if (this.dirty_datalayers.length) this.dirty_datalayers[0].save() + else this.fire('saved') + }, + + editableOptions: [ + 'zoom', + 'scrollWheelZoom', + 'scaleControl', + 'moreControl', + 'miniMap', + 'displayPopupFooter', + 'onLoadPanel', + 'tilelayersControl', + 'name', + 'description', + 'licence', + 'tilelayer', + 'overlay', + 'limitBounds', + 'color', + 'iconClass', + 'iconUrl', + 'smoothFactor', + 'opacity', + 'weight', + 'fill', + 'fillColor', + 'fillOpacity', + 'dashArray', + 'popupShape', + 'popupTemplate', + 'popupContentTemplate', + 'zoomTo', + 'captionBar', + 'captionMenus', + 'slideshow', + 'sortKey', + 'labelKey', + 'filterKey', + 'advancedFilterKey', + 'slugKey', + 'showLabel', + 'labelDirection', + 'labelInteractive', + 'shortCredit', + 'longCredit', + 'permanentCredit', + 'permanentCreditBackground', + 'zoomControl', + 'datalayersControl', + 'searchControl', + 'locateControl', + 'fullscreenControl', + 'editinosmControl', + 'embedControl', + 'measureControl', + 'tilelayersControl', + 'starControl', + 'easing', + ], + + exportOptions: function () { + const properties = {} + for (let i = this.editableOptions.length - 1; i >= 0; i--) { + if (typeof this.options[this.editableOptions[i]] !== 'undefined') { + properties[this.editableOptions[i]] = this.options[this.editableOptions[i]] + } + } + return properties + }, + + serialize: function () { + const umapfile = { + type: 'umap', + uri: window.location.href, + properties: this.exportOptions(), + geometry: this.geometry(), + layers: [], + } + + this.eachDataLayer((datalayer) => { + umapfile.layers.push(datalayer.umapGeoJSON()) + }) + + return JSON.stringify(umapfile, null, 2) + }, + + save: function () { + if (!this.isDirty) return + if (this._default_extent) this.updateExtent() + const geojson = { + type: 'Feature', + geometry: this.geometry(), + properties: this.exportOptions(), + } + this.backup() + const formData = new FormData() + formData.append('name', this.options.name) + formData.append('center', JSON.stringify(this.geometry())) + formData.append('settings', JSON.stringify(geojson)) + this.post(this.getSaveUrl(), { + data: formData, + context: this, + callback: function (data) { + let duration = 3000 + if (!this.options.umap_id) { + duration = 100000 // we want a longer message at map creation (TODO UGLY) + this.options.umap_id = data.id + this.permissions.setOptions(data.permissions) + } else if (!this.permissions.isDirty) { + // Do not override local changes to permissions, + // but update in case some other editors changed them in the meantime. + this.permissions.setOptions(data.permissions) + } + // Update URL in case the name has changed. + if (history && history.pushState) + history.pushState({}, this.options.name, data.url) + else window.location = data.url + if (data.info) msg = data.info + else msg = L._('Map has been saved!') + this.once('saved', function () { + this.isDirty = false + this.ui.alert({ content: msg, level: 'info', duration: duration }) + }) + this.ui.closePanel() + this.permissions.save() + }, + }) + }, + + getEditUrl: function () { + return L.Util.template(this.options.urls.map_update, { + map_id: this.options.umap_id, + }) + }, + + getCreateUrl: function () { + return L.Util.template(this.options.urls.map_create) + }, + + getSaveUrl: function () { + return (this.options.umap_id && this.getEditUrl()) || this.getCreateUrl() + }, + + star: function () { + if (!this.options.umap_id) + return this.ui.alert({ + content: L._('Please save the map first'), + level: 'error', + }) + let url = L.Util.template(this.options.urls.map_star, { + map_id: this.options.umap_id, + }) + this.post(url, { + context: this, + callback: function (data) { + this.options.starred = data.starred + let msg = data.starred + ? L._('Map has been starred') + : L._('Map has been unstarred') + this.ui.alert({ content: msg, level: 'info' }) + this.renderControls() + }, + }) + }, + + geometry: function () { + /* Return a GeoJSON geometry Object */ + const latlng = this.latLng(this.options.center || this.getCenter()) + return { + type: 'Point', + coordinates: [latlng.lng, latlng.lat], + } + }, + + defaultDataLayer: function () { + let datalayer, fallback + datalayer = this.lastUsedDataLayer + if ( + datalayer && + !datalayer.isRemoteLayer() && + datalayer.canBrowse() && + datalayer.isVisible() + ) { + return datalayer + } + datalayer = this.findDataLayer((datalayer) => { + if (!datalayer.isRemoteLayer() && datalayer.canBrowse()) { + fallback = datalayer + if (datalayer.isVisible()) return true + } + }) + if (datalayer) return datalayer + if (fallback) { + // No datalayer visible, let's force one + this.addLayer(fallback.layer) + return fallback + } + return this.createDataLayer() + }, + + getDataLayerByUmapId: function (umap_id) { + return this.findDataLayer((d) => d.umap_id == umap_id) + }, + + _editControls: function (container) { + let UIFields = [] + for (let i = 0; i < this.HIDDABLE_CONTROLS.length; i++) { + UIFields.push(`options.${this.HIDDABLE_CONTROLS[i]}Control`) + } + UIFields = UIFields.concat([ + 'options.moreControl', + 'options.scrollWheelZoom', + 'options.miniMap', + 'options.scaleControl', + 'options.onLoadPanel', + 'options.displayPopupFooter', + 'options.captionBar', + 'options.captionMenus', + ]) + builder = new L.U.FormBuilder(this, UIFields, { + callback: function () { + this.renderControls() + this.initCaptionBar() + }, + callbackContext: this, + }) + const controlsOptions = L.DomUtil.createFieldset( + container, + L._('User interface options') + ) + controlsOptions.appendChild(builder.build()) + }, + + _editShapeProperties: function (container) { + const shapeOptions = [ + 'options.color', + 'options.iconClass', + 'options.iconUrl', + 'options.opacity', + 'options.weight', + 'options.fill', + 'options.fillColor', + 'options.fillOpacity', + ] + + builder = new L.U.FormBuilder(this, shapeOptions, { + callback: function (e) { + this.eachDataLayer((datalayer) => { + datalayer.redraw() + }) + }, + }) + const defaultShapeProperties = L.DomUtil.createFieldset( + container, + L._('Default shape properties') + ) + defaultShapeProperties.appendChild(builder.build()) + }, + + _editDefaultProperties: function (container) { + const optionsFields = [ + 'options.smoothFactor', + 'options.dashArray', + 'options.zoomTo', + ['options.easing', { handler: 'Switch', label: L._('Animated transitions') }], + 'options.labelKey', + [ + 'options.sortKey', + { + handler: 'BlurInput', + helpEntries: 'sortKey', + placeholder: L._('Default: name'), + label: L._('Sort key'), + inheritable: true, + }, + ], + [ + 'options.filterKey', + { + handler: 'Input', + helpEntries: 'filterKey', + placeholder: L._('Default: name'), + label: L._('Filter keys'), + inheritable: true, + }, + ], + [ + 'options.advancedFilterKey', + { + handler: 'Input', + helpEntries: 'advancedFilterKey', + placeholder: L._('Example: key1,key2,key3'), + label: L._('Advanced filter keys'), + inheritable: true, + }, + ], + [ + 'options.slugKey', + { + handler: 'BlurInput', + helpEntries: 'slugKey', + placeholder: L._('Default: name'), + label: L._('Feature identifier key'), + }, + ], + ] + + builder = new L.U.FormBuilder(this, optionsFields, { + callback: function (e) { + this.initCaptionBar() + this.eachDataLayer((datalayer) => { + if (e.helper.field === 'options.sortKey') datalayer.reindex() + datalayer.redraw() + }) + }, + }) + const defaultProperties = L.DomUtil.createFieldset( + container, + L._('Default properties') + ) + defaultProperties.appendChild(builder.build()) + }, + + _editInteractionsProperties: function (container) { + const popupFields = [ + 'options.popupShape', + 'options.popupTemplate', + 'options.popupContentTemplate', + 'options.showLabel', + 'options.labelDirection', + 'options.labelInteractive', + ] + builder = new L.U.FormBuilder(this, popupFields, { + callback: function (e) { + if ( + e.helper.field === 'options.popupTemplate' || + e.helper.field === 'options.popupContentTemplate' || + e.helper.field === 'options.popupShape' + ) + return + this.eachDataLayer((datalayer) => { + datalayer.redraw() + }) + }, + }) + const popupFieldset = L.DomUtil.createFieldset( + container, + L._('Default interaction options') + ) + popupFieldset.appendChild(builder.build()) + }, + + _editTilelayer: function (container) { + if (!L.Util.isObject(this.options.tilelayer)) { + this.options.tilelayer = {} + } + const tilelayerFields = [ + [ + 'options.tilelayer.name', + { handler: 'BlurInput', placeholder: L._('display name') }, + ], + [ + 'options.tilelayer.url_template', + { + handler: 'BlurInput', + helpText: `${L._('Supported scheme')}: http://{s}.domain.com/{z}/{x}/{y}.png`, + placeholder: 'url', + }, + ], + [ + 'options.tilelayer.maxZoom', + { handler: 'BlurIntInput', placeholder: L._('max zoom') }, + ], + [ + 'options.tilelayer.minZoom', + { handler: 'BlurIntInput', placeholder: L._('min zoom') }, + ], + [ + 'options.tilelayer.attribution', + { handler: 'BlurInput', placeholder: L._('attribution') }, + ], + ['options.tilelayer.tms', { handler: 'Switch', label: L._('TMS format') }], + ] + const customTilelayer = L.DomUtil.createFieldset( + container, + L._('Custom background') + ) + builder = new L.U.FormBuilder(this, tilelayerFields, { + callback: this.initTileLayers, + callbackContext: this, + }) + customTilelayer.appendChild(builder.build()) + }, + + _editOverlay: function (container) { + if (!L.Util.isObject(this.options.overlay)) { + this.options.overlay = {} + } + const overlayFields = [ + [ + 'options.overlay.url_template', + { + handler: 'BlurInput', + helpText: `${L._('Supported scheme')}: http://{s}.domain.com/{z}/{x}/{y}.png`, + placeholder: 'url', + helpText: L._('Background overlay url'), + }, + ], + [ + 'options.overlay.maxZoom', + { handler: 'BlurIntInput', placeholder: L._('max zoom') }, + ], + [ + 'options.overlay.minZoom', + { handler: 'BlurIntInput', placeholder: L._('min zoom') }, + ], + [ + 'options.overlay.attribution', + { handler: 'BlurInput', placeholder: L._('attribution') }, + ], + [ + 'options.overlay.opacity', + { handler: 'Range', min: 0, max: 1, step: 0.1, label: L._('Opacity') }, + ], + ['options.overlay.tms', { handler: 'Switch', label: L._('TMS format') }], + ] + const overlay = L.DomUtil.createFieldset(container, L._('Custom overlay')) + builder = new L.U.FormBuilder(this, overlayFields, { + callback: this.initTileLayers, + callbackContext: this, + }) + overlay.appendChild(builder.build()) + }, + + _editBounds: function (container) { + if (!L.Util.isObject(this.options.limitBounds)) { + this.options.limitBounds = {} + } + const limitBounds = L.DomUtil.createFieldset(container, L._('Limit bounds')) + const boundsFields = [ + [ + 'options.limitBounds.south', + { handler: 'BlurFloatInput', placeholder: L._('max South') }, + ], + [ + 'options.limitBounds.west', + { handler: 'BlurFloatInput', placeholder: L._('max West') }, + ], + [ + 'options.limitBounds.north', + { handler: 'BlurFloatInput', placeholder: L._('max North') }, + ], + [ + 'options.limitBounds.east', + { handler: 'BlurFloatInput', placeholder: L._('max East') }, + ], + ] + const boundsBuilder = new L.U.FormBuilder(this, boundsFields, { + callback: this.handleLimitBounds, + callbackContext: this, + }) + limitBounds.appendChild(boundsBuilder.build()) + const boundsButtons = L.DomUtil.create('div', 'button-bar half', limitBounds) + const setCurrentButton = L.DomUtil.add( + 'a', + 'button', + boundsButtons, + L._('Use current bounds') + ) + setCurrentButton.href = '#' + L.DomEvent.on( + setCurrentButton, + 'click', + function () { + const bounds = this.getBounds() + this.options.limitBounds.south = L.Util.formatNum(bounds.getSouth()) + this.options.limitBounds.west = L.Util.formatNum(bounds.getWest()) + this.options.limitBounds.north = L.Util.formatNum(bounds.getNorth()) + this.options.limitBounds.east = L.Util.formatNum(bounds.getEast()) + boundsBuilder.fetchAll() + this.isDirty = true + this.handleLimitBounds() + }, + this + ) + const emptyBounds = L.DomUtil.add('a', 'button', boundsButtons, L._('Empty')) + emptyBounds.href = '#' + L.DomEvent.on( + emptyBounds, + 'click', + function () { + this.options.limitBounds.south = null + this.options.limitBounds.west = null + this.options.limitBounds.north = null + this.options.limitBounds.east = null + boundsBuilder.fetchAll() + this.isDirty = true + this.handleLimitBounds() + }, + this + ) + }, + + _editSlideshow: function (container) { + const slideshow = L.DomUtil.createFieldset(container, L._('Slideshow')) + const slideshowFields = [ + [ + 'options.slideshow.active', + { handler: 'Switch', label: L._('Activate slideshow mode') }, + ], + [ + 'options.slideshow.delay', + { + handler: 'SlideshowDelay', + helpText: L._('Delay between two transitions when in play mode'), + }, + ], + [ + 'options.slideshow.easing', + { handler: 'Switch', label: L._('Animated transitions'), inheritable: true }, + ], + [ + 'options.slideshow.autoplay', + { handler: 'Switch', label: L._('Autostart when map is loaded') }, + ], + ] + const slideshowHandler = function () { + this.slideshow.setOptions(this.options.slideshow) + this.renderControls() + } + const slideshowBuilder = new L.U.FormBuilder(this, slideshowFields, { + callback: slideshowHandler, + callbackContext: this, + }) + slideshow.appendChild(slideshowBuilder.build()) + }, + + _editCredits: function (container) { + const credits = L.DomUtil.createFieldset(container, L._('Credits')) + const creditsFields = [ + ['options.licence', { handler: 'LicenceChooser', label: L._('licence') }], + [ + 'options.shortCredit', + { + handler: 'Input', + label: L._('Short credits'), + helpEntries: ['shortCredit', 'textFormatting'], + }, + ], + [ + 'options.longCredit', + { + handler: 'Textarea', + label: L._('Long credits'), + helpEntries: ['longCredit', 'textFormatting'], + }, + ], + [ + 'options.permanentCredit', + { + handler: 'Textarea', + label: L._('Permanent credits'), + helpEntries: ['permanentCredit', 'textFormatting'], + }, + ], + [ + 'options.permanentCreditBackground', + { handler: 'Switch', label: L._('Permanent credits background') }, + ], + ] + const creditsBuilder = new L.U.FormBuilder(this, creditsFields, { + callback: this.renderControls, + callbackContext: this, + }) + credits.appendChild(creditsBuilder.build()) + }, + + _advancedActions: function (container) { + const advancedActions = L.DomUtil.createFieldset(container, L._('Advanced actions')) + const advancedButtons = L.DomUtil.create('div', 'button-bar half', advancedActions) + const del = L.DomUtil.create('a', 'button umap-delete', advancedButtons) + del.href = '#' + del.textContent = L._('Delete') + L.DomEvent.on(del, 'click', L.DomEvent.stop).on(del, 'click', this.del, this) + const clone = L.DomUtil.create('a', 'button umap-clone', advancedButtons) + clone.href = '#' + clone.textContent = L._('Clone') + clone.title = L._('Clone this map') + L.DomEvent.on(clone, 'click', L.DomEvent.stop).on(clone, 'click', this.clone, this) + const empty = L.DomUtil.create('a', 'button umap-empty', advancedButtons) + empty.href = '#' + empty.textContent = L._('Empty') + empty.title = L._('Delete all layers') + L.DomEvent.on(empty, 'click', L.DomEvent.stop).on(empty, 'click', this.empty, this) + const download = L.DomUtil.create('a', 'button umap-download', advancedButtons) + download.href = '#' + download.textContent = L._('Download') + download.title = L._('Open download panel') + L.DomEvent.on(download, 'click', L.DomEvent.stop).on( + download, + 'click', + this.renderShareBox, + this + ) + }, + + edit: function () { + if (!this.editEnabled) return + const container = L.DomUtil.create('div', 'umap-edit-container'), + metadataFields = ['options.name', 'options.description'], + title = L.DomUtil.create('h4', '', container) + title.textContent = L._('Edit map properties') + const builder = new L.U.FormBuilder(this, metadataFields) + const form = builder.build() + container.appendChild(form) + this._editControls(container) + this._editShapeProperties(container) + this._editDefaultProperties(container) + this._editInteractionsProperties(container) + this._editTilelayer(container) + this._editOverlay(container) + this._editBounds(container) + this._editSlideshow(container) + this._editCredits(container) + this._advancedActions(container) + + this.ui.openPanel({ data: { html: container }, className: 'dark' }) + }, + + enableEdit: function () { + L.DomUtil.addClass(document.body, 'umap-edit-enabled') + this.editEnabled = true + this.fire('edit:enabled') + }, + + disableEdit: function () { + if (this.isDirty) return + L.DomUtil.removeClass(document.body, 'umap-edit-enabled') + this.editedFeature = null + this.editEnabled = false + this.fire('edit:disabled') + }, + + getDisplayName: function () { + return this.options.name || L._('Untitled map') + }, + + initCaptionBar: function () { + const container = L.DomUtil.create( + 'div', + 'umap-caption-bar', + this._controlContainer + ), + name = L.DomUtil.create('h3', '', container) + L.DomEvent.disableClickPropagation(container) + this.permissions.addOwnerLink('span', container) + if (this.options.captionMenus) { + const about = L.DomUtil.add( + 'a', + 'umap-about-link', + container, + ` — ${L._('About')}` + ) + about.href = '#' + L.DomEvent.on(about, 'click', this.displayCaption, this) + const browser = L.DomUtil.add( + 'a', + 'umap-open-browser-link', + container, + ` | ${L._('Browse data')}` + ) + browser.href = '#' + L.DomEvent.on(browser, 'click', L.DomEvent.stop).on( + browser, + 'click', + this.openBrowser, + this + ) + if (this.options.advancedFilterKey) { + const filter = L.DomUtil.add( + 'a', + 'umap-open-filter-link', + container, + ` | ${L._('Select data')}` + ) + filter.href = '#' + L.DomEvent.on(filter, 'click', L.DomEvent.stop).on( + filter, + 'click', + this.openFilter, + this + ) + } + } + const setName = function () { + name.textContent = this.getDisplayName() + } + L.bind(setName, this)() + this.on('postsync', L.bind(setName, this)) + this.onceDatalayersLoaded(function () { + this.slideshow.renderToolbox(container) + }) + }, + + initEditBar: function () { + const container = L.DomUtil.create( + 'div', + 'umap-main-edit-toolbox with-transition dark', + this._controlContainer + ), + title = L.DomUtil.add('h3', '', container, `${L._('Editing')} `), + name = L.DomUtil.create('a', 'umap-click-to-edit', title), + setName = function () { + name.textContent = this.getDisplayName() + } + L.bind(setName, this)() + L.DomEvent.on(name, 'click', this.edit, this) + this.on('postsync', L.bind(setName, this)) + this.help.button(title, 'edit') + const save = L.DomUtil.create('a', 'leaflet-control-edit-save button', container) + save.href = '#' + save.title = `${L._('Save current edits')} (Ctrl+S)` + save.textContent = L._('Save') + const cancel = L.DomUtil.create( + 'a', + 'leaflet-control-edit-cancel button', + container + ) + cancel.href = '#' + cancel.title = L._('Cancel edits') + cancel.textContent = L._('Cancel') + const disable = L.DomUtil.create('a', 'leaflet-control-edit-disable', container) + disable.href = '#' + disable.title = disable.textContent = L._('Disable editing') + + L.DomEvent.addListener(disable, 'click', L.DomEvent.stop).addListener( + disable, + 'click', + function (e) { + this.disableEdit(e) + this.ui.closePanel() + }, + this + ) + + L.DomEvent.addListener(save, 'click', L.DomEvent.stop).addListener( + save, + 'click', + this.save, + this + ) + + L.DomEvent.addListener(cancel, 'click', L.DomEvent.stop).addListener( + cancel, + 'click', + this.askForReset, + this + ) + }, + + askForReset: function (e) { + if (!confirm(L._('Are you sure you want to cancel your changes?'))) return + this.reset() + this.disableEdit(e) + this.ui.closePanel() + }, + + startMarker: function () { + return this.editTools.startMarker() + }, + + startPolyline: function () { + return this.editTools.startPolyline() + }, + + startPolygon: function () { + return this.editTools.startPolygon() + }, + + del: function () { + if (confirm(L._('Are you sure you want to delete this map?'))) { + const url = L.Util.template(this.options.urls.map_delete, { + map_id: this.options.umap_id, + }) + this.post(url) + } + }, + + clone: function () { + if ( + confirm(L._('Are you sure you want to clone this map and all its datalayers?')) + ) { + const url = L.Util.template(this.options.urls.map_clone, { + map_id: this.options.umap_id, + }) + this.post(url) + } + }, + + empty: function () { + this.eachDataLayerReverse((datalayer) => { + datalayer._delete() + }) + }, + + initLoader: function () { + this.loader = new L.Control.Loading() + this.loader.onAdd(this) + }, + + post: function (url, options) { + options = options || {} + options.listener = this + this.xhr.post(url, options) + }, + + get: function (url, options) { + options = options || {} + options.listener = this + this.xhr.get(url, options) + }, + + ajax: function (options) { + options.listener = this + this.xhr._ajax(options) + }, + + initContextMenu: function () { + this.contextmenu = new L.U.ContextMenu(this) + this.contextmenu.enable() + }, + + setContextMenuItems: function (e) { + let items = [] + if (this._zoom !== this.getMaxZoom()) { + items.push({ + text: L._('Zoom in'), + callback: function () { + this.zoomIn() + }, + }) + } + if (this._zoom !== this.getMinZoom()) { + items.push({ + text: L._('Zoom out'), + callback: function () { + this.zoomOut() + }, + }) + } + if (e && e.relatedTarget) { + if (e.relatedTarget.getContextMenuItems) { + items = items.concat(e.relatedTarget.getContextMenuItems(e)) + } + } + if (this.options.allowEdit) { + items.push('-') + if (this.editEnabled) { + if (!this.isDirty) { + items.push({ + text: `${L._('Stop editing')} (Ctrl+E)`, + callback: this.disableEdit, + }) + } + if (this.options.enableMarkerDraw) { + items.push({ + text: `${L._('Draw a marker')} (Ctrl+M)`, + callback: this.startMarker, + context: this, + }) + } + if (this.options.enablePolylineDraw) { + items.push({ + text: `${L._('Draw a polygon')} (Ctrl+P)`, + callback: this.startPolygon, + context: this, + }) + } + if (this.options.enablePolygonDraw) { + items.push({ + text: `${L._('Draw a line')} (Ctrl+L)`, + callback: this.startPolyline, + context: this, + }) + } + items.push('-') + items.push({ + text: L._('Help'), + callback: function () { + this.help.show('edit') + }, + }) + } else { + items.push({ + text: `${L._('Start editing')} (Ctrl+E)`, + callback: this.enableEdit, + }) + } + } + items.push('-', { + text: L._('Browse data'), + callback: this.openBrowser, + }) + if (this.options.advancedFilterKey) { + items.push({ + text: L._('Select data'), + callback: this.openFilter, + }) + } + items.push( + { + text: L._('About'), + callback: this.displayCaption, + }, + { + text: L._('Search location'), + callback: this.search, + } + ) + if (this.options.urls.routing) { + items.push('-', { + text: L._('Directions from here'), + callback: this.openExternalRouting, + }) + } + this.options.contextmenuItems = items + }, + + openExternalRouting: function (e) { + const url = this.options.urls.routing + if (url) { + const params = { + lat: e.latlng.lat, + lng: e.latlng.lng, + locale: L.locale, + zoom: this.getZoom(), + } + window.open(L.Util.template(url, params)) + } + return + }, + + getMap: function () { + return this + }, + + getGeoContext: function () { + const context = { + bbox: this.getBounds().toBBoxString(), + north: this.getBounds().getNorthEast().lat, + east: this.getBounds().getNorthEast().lng, + south: this.getBounds().getSouthWest().lat, + west: this.getBounds().getSouthWest().lng, + lat: this.getCenter().lat, + lng: this.getCenter().lng, + zoom: this.getZoom(), + } + context.left = context.west + context.bottom = context.south + context.right = context.east + context.top = context.north + return context + }, + + localizeUrl: function (url) { + return L.Util.greedyTemplate(url, this.getGeoContext(), true) + }, + + proxyUrl: function (url, ttl) { + if (this.options.urls.ajax_proxy) { + url = L.Util.greedyTemplate(this.options.urls.ajax_proxy, { + url: encodeURIComponent(url), + ttl: ttl, + }) + } + return url + }, + + closeInplaceToolbar: function () { + const toolbar = this._toolbars[L.Toolbar.Popup._toolbar_class_id] + if (toolbar) toolbar.remove() + }, + + search: function () { + if (this._controls.search) this._controls.search.openPanel(this) + }, + + getFilterKeys: function () { + return (this.options.filterKey || this.options.sortKey || 'name').split(',') + }, + + getAdvancedFilterKeys: function () { + return (this.options.advancedFilterKey || '').split(',') + }, +}) diff --git a/umap/static/umap/js/umap.layer.js b/umap/static/umap/js/umap.layer.js index a92faf29..adcb1a02 100644 --- a/umap/static/umap/js/umap.layer.js +++ b/umap/static/umap/js/umap.layer.js @@ -1,1077 +1,1207 @@ L.U.Layer = { - canBrowse: true, + canBrowse: true, - getFeatures: function () { - return this._layers; - }, + getFeatures: function () { + return this._layers + }, - getEditableOptions: function () {return [];}, + getEditableOptions: function () { + return [] + }, - postUpdate: function () {} - -}; + postUpdate: function () {}, +} L.U.Layer.Default = L.FeatureGroup.extend({ - _type: 'Default', - includes: [L.U.Layer], - - initialize: function (datalayer) { - this.datalayer = datalayer; - L.FeatureGroup.prototype.initialize.call(this); - } - -}); + _type: 'Default', + includes: [L.U.Layer], + initialize: function (datalayer) { + this.datalayer = datalayer + L.FeatureGroup.prototype.initialize.call(this) + }, +}) L.U.MarkerCluster = L.MarkerCluster.extend({ -// Custom class so we can call computeTextColor -// when element is already on the DOM. + // Custom class so we can call computeTextColor + // when element is already on the DOM. - _initIcon: function () { - L.MarkerCluster.prototype._initIcon.call(this); - var div = this._icon.querySelector('div'); - // Compute text color only when icon is added to the DOM. - div.style.color = this._iconObj.computeTextColor(div); - } - -}); + _initIcon: function () { + L.MarkerCluster.prototype._initIcon.call(this) + const div = this._icon.querySelector('div') + // Compute text color only when icon is added to the DOM. + div.style.color = this._iconObj.computeTextColor(div) + }, +}) L.U.Layer.Cluster = L.MarkerClusterGroup.extend({ - _type: 'Cluster', - includes: [L.U.Layer], + _type: 'Cluster', + includes: [L.U.Layer], - initialize: function (datalayer) { - this.datalayer = datalayer; - var options = { - polygonOptions: { - color: this.datalayer.getColor() - }, - iconCreateFunction: function (cluster) { - return new L.U.Icon.Cluster(datalayer, cluster); - } - }; - if (this.datalayer.options.cluster && this.datalayer.options.cluster.radius) { - options.maxClusterRadius = this.datalayer.options.cluster.radius; - } - L.MarkerClusterGroup.prototype.initialize.call(this, options); - this._markerCluster = L.U.MarkerCluster; - }, - - getEditableOptions: function () { - if (!L.Util.isObject(this.datalayer.options.cluster)) { - this.datalayer.options.cluster = {}; - } - return [ - ['options.cluster.radius', {handler: 'BlurIntInput', placeholder: L._('Clustering radius'), helpText: L._('Override clustering radius (default 80)')}], - ['options.cluster.textColor', {handler: 'TextColorPicker', placeholder: L._('Auto'), helpText: L._('Text color for the cluster label')}], - ]; - - }, - - postUpdate: function (e) { - if (e.helper.field === 'options.cluster.radius') { - // No way to reset radius of an already instanciated MarkerClusterGroup... - this.datalayer.resetLayer(true); - return; - } - if (e.helper.field === 'options.color') { - this.options.polygonOptions.color = this.datalayer.getColor(); - } + initialize: function (datalayer) { + this.datalayer = datalayer + const options = { + polygonOptions: { + color: this.datalayer.getColor(), + }, + iconCreateFunction: function (cluster) { + return new L.U.Icon.Cluster(datalayer, cluster) + }, } + if (this.datalayer.options.cluster && this.datalayer.options.cluster.radius) { + options.maxClusterRadius = this.datalayer.options.cluster.radius + } + L.MarkerClusterGroup.prototype.initialize.call(this, options) + this._markerCluster = L.U.MarkerCluster + }, -}); + getEditableOptions: function () { + if (!L.Util.isObject(this.datalayer.options.cluster)) { + this.datalayer.options.cluster = {} + } + return [ + [ + 'options.cluster.radius', + { + handler: 'BlurIntInput', + placeholder: L._('Clustering radius'), + helpText: L._('Override clustering radius (default 80)'), + }, + ], + [ + 'options.cluster.textColor', + { + handler: 'TextColorPicker', + placeholder: L._('Auto'), + helpText: L._('Text color for the cluster label'), + }, + ], + ] + }, + + postUpdate: function (e) { + if (e.helper.field === 'options.cluster.radius') { + // No way to reset radius of an already instanciated MarkerClusterGroup... + this.datalayer.resetLayer(true) + return + } + if (e.helper.field === 'options.color') { + this.options.polygonOptions.color = this.datalayer.getColor() + } + }, +}) L.U.Layer.Heat = L.HeatLayer.extend({ - _type: 'Heat', - includes: [L.U.Layer], - canBrowse: false, + _type: 'Heat', + includes: [L.U.Layer], + canBrowse: false, - initialize: function (datalayer) { - this.datalayer = datalayer; - L.HeatLayer.prototype.initialize.call(this, [], this.datalayer.options.heat); - }, + initialize: function (datalayer) { + this.datalayer = datalayer + L.HeatLayer.prototype.initialize.call(this, [], this.datalayer.options.heat) + }, - addLayer: function (layer) { - if (layer instanceof L.Marker) { - var latlng = layer.getLatLng(), alt; - if (this.datalayer.options.heat && this.datalayer.options.heat.intensityProperty) { - alt = parseFloat(layer.properties[this.datalayer.options.heat.intensityProperty || 0]); - latlng = new L.LatLng(latlng.lat, latlng.lng, alt); - } - this.addLatLng(latlng); - } - }, - - clearLayers: function () { - this.setLatLngs([]); - }, - - redraw: function () { - // setlalngs call _redraw through setAnimFrame, thus async, so this - // can ends with race condition if we remove the layer very faslty after. - // Remove me when https://github.com/Leaflet/Leaflet.heat/pull/53 is released. - if (!this._map) return; - L.HeatLayer.prototype.redraw.call(this); - }, - - getFeatures: function () { - return {}; - }, - - getBounds: function () { - return L.latLngBounds(this._latlngs); - }, - - getEditableOptions: function () { - if (!L.Util.isObject(this.datalayer.options.heat)) { - this.datalayer.options.heat = {}; - } - return [ - ['options.heat.radius', {handler: 'BlurIntInput', placeholder: L._('Heatmap radius'), helpText: L._('Override heatmap radius (default 25)')}], - ['options.heat.intensityProperty', {handler: 'BlurInput', placeholder: L._('Heatmap intensity property'), helpText: L._('Optional intensity property for heatmap')}] - ]; - - }, - - postUpdate: function (e) { - if (e.helper.field === 'options.heat.intensityProperty') { - this.datalayer.resetLayer(true); // We need to repopulate the latlngs - return; - } - if (e.helper.field === 'options.heat.radius') { - this.options.radius = this.datalayer.options.heat.radius; - } - this._updateOptions(); + addLayer: function (layer) { + if (layer instanceof L.Marker) { + let latlng = layer.getLatLng(), + alt + if ( + this.datalayer.options.heat && + this.datalayer.options.heat.intensityProperty + ) { + alt = parseFloat( + layer.properties[this.datalayer.options.heat.intensityProperty || 0] + ) + latlng = new L.LatLng(latlng.lat, latlng.lng, alt) + } + this.addLatLng(latlng) } + }, -}); + clearLayers: function () { + this.setLatLngs([]) + }, + + redraw: function () { + // setlalngs call _redraw through setAnimFrame, thus async, so this + // can ends with race condition if we remove the layer very faslty after. + // Remove me when https://github.com/Leaflet/Leaflet.heat/pull/53 is released. + if (!this._map) return + L.HeatLayer.prototype.redraw.call(this) + }, + + getFeatures: function () { + return {} + }, + + getBounds: function () { + return L.latLngBounds(this._latlngs) + }, + + getEditableOptions: function () { + if (!L.Util.isObject(this.datalayer.options.heat)) { + this.datalayer.options.heat = {} + } + return [ + [ + 'options.heat.radius', + { + handler: 'BlurIntInput', + placeholder: L._('Heatmap radius'), + helpText: L._('Override heatmap radius (default 25)'), + }, + ], + [ + 'options.heat.intensityProperty', + { + handler: 'BlurInput', + placeholder: L._('Heatmap intensity property'), + helpText: L._('Optional intensity property for heatmap'), + }, + ], + ] + }, + + postUpdate: function (e) { + if (e.helper.field === 'options.heat.intensityProperty') { + this.datalayer.resetLayer(true) // We need to repopulate the latlngs + return + } + if (e.helper.field === 'options.heat.radius') { + this.options.radius = this.datalayer.options.heat.radius + } + this._updateOptions() + }, +}) L.U.DataLayer = L.Evented.extend({ + options: { + displayOnLoad: true, + browsable: true, + }, - options: { - displayOnLoad: true, - browsable: true - }, + initialize: function (map, data) { + this.map = map + this._index = Array() + this._layers = {} + this._geojson = null + this._propertiesIndex = [] - initialize: function (map, data) { - this.map = map; - this._index = Array(); - this._layers = {}; - this._geojson = null; - this._propertiesIndex = []; + this.parentPane = this.map.getPane('overlayPane') + this.pane = this.map.createPane(`datalayer${L.stamp(this)}`, this.parentPane) + this.pane.dataset.id = L.stamp(this) + this.renderer = L.svg({ pane: this.pane }) - this.parentPane = this.map.getPane('overlayPane'); - this.pane = this.map.createPane('datalayer' + L.stamp(this), this.parentPane); - this.pane.dataset.id = L.stamp(this); - this.renderer = L.svg({pane: this.pane}); + let isDirty = false + let isDeleted = false + const self = this + try { + Object.defineProperty(this, 'isDirty', { + get: function () { + return isDirty + }, + set: function (status) { + if (!isDirty && status) self.fire('dirty') + isDirty = status + if (status) { + self.map.addDirtyDatalayer(self) + // A layer can be made dirty by indirect action (like dragging layers) + // we need to have it loaded before saving it. + if (!self.isLoaded()) self.fetchData() + } else { + self.map.removeDirtyDatalayer(self) + self.isDeleted = false + } + }, + }) + } catch (e) { + // Certainly IE8, which has a limited version of defineProperty + } + try { + Object.defineProperty(this, 'isDeleted', { + get: function () { + return isDeleted + }, + set: function (status) { + if (!isDeleted && status) self.fire('deleted') + isDeleted = status + if (status) self.isDirty = status + }, + }) + } catch (e) { + // Certainly IE8, which has a limited version of defineProperty + } + this.setUmapId(data.id) + this.setOptions(data) + this.backupOptions() + this.connectToMap() + if (this.displayedOnLoad()) this.show() + if (!this.umap_id) this.isDirty = true + this.onceLoaded(function () { + this.map.on('moveend', this.fetchRemoteData, this) + }) + }, - var isDirty = false, - isDeleted = false, - self = this; - try { - Object.defineProperty(this, 'isDirty', { - get: function () { - return isDirty; - }, - set: function (status) { - if (!isDirty && status) self.fire('dirty'); - isDirty = status; - if (status) { - self.map.addDirtyDatalayer(self); - // A layer can be made dirty by indirect action (like dragging layers) - // we need to have it loaded before saving it. - if (!self.isLoaded()) self.fetchData(); - } else { - self.map.removeDirtyDatalayer(self); - self.isDeleted = false; - } - } - }); - } - catch (e) { - // Certainly IE8, which has a limited version of defineProperty - } - try { - Object.defineProperty(this, 'isDeleted', { - get: function () { - return isDeleted; - }, - set: function (status) { - if (!isDeleted && status) self.fire('deleted'); - isDeleted = status; - if (status) self.isDirty = status; - } - }); - } - catch (e) { - // Certainly IE8, which has a limited version of defineProperty - } - this.setUmapId(data.id); - this.setOptions(data); - this.backupOptions(); - this.connectToMap(); - if (this.displayedOnLoad()) this.show(); - if (!this.umap_id) this.isDirty = true; - this.onceLoaded(function () { - this.map.on('moveend', this.fetchRemoteData, this); - }); - }, + displayedOnLoad: function () { + return ( + (this.map.datalayersOnLoad && + this.umap_id && + this.map.datalayersOnLoad.indexOf(this.umap_id.toString()) !== -1) || + (!this.map.datalayersOnLoad && this.options.displayOnLoad) + ) + }, - displayedOnLoad: function () { - return ((this.map.datalayersOnLoad && this.umap_id && this.map.datalayersOnLoad.indexOf(this.umap_id.toString()) !== -1) || - (!this.map.datalayersOnLoad && this.options.displayOnLoad)); - }, + insertBefore: function (other) { + if (!other) return + this.parentPane.insertBefore(this.pane, other.pane) + }, - insertBefore: function (other) { - if (!other) return; - this.parentPane.insertBefore(this.pane, other.pane); - }, + insertAfter: function (other) { + if (!other) return + this.parentPane.insertBefore(this.pane, other.pane.nextSibling) + }, - insertAfter: function (other) { - if (!other) return; - this.parentPane.insertBefore(this.pane, other.pane.nextSibling); - }, + bringToTop: function () { + this.parentPane.appendChild(this.pane) + }, - bringToTop: function () { - this.parentPane.appendChild(this.pane); - }, + resetLayer: function (force) { + if (this.layer && this.options.type === this.layer._type && !force) return + const visible = this.isVisible() + if (this.layer) this.layer.clearLayers() + // delete this.layer? + if (visible) this.map.removeLayer(this.layer) + const Class = L.U.Layer[this.options.type] || L.U.Layer.Default + this.layer = new Class(this) + const filterKeys = this.map.getFilterKeys(), + filter = this.map.options.filter + this.eachLayer(function (layer) { + if (filter && !layer.matchFilter(filter, filterKeys)) return + this.layer.addLayer(layer) + }) + if (visible) this.map.addLayer(this.layer) + this.propagateRemote() + }, - resetLayer: function (force) { - if (this.layer && this.options.type === this.layer._type && !force) return; - var visible = this.isVisible(); - if (this.layer) this.layer.clearLayers(); - // delete this.layer? - if (visible) this.map.removeLayer(this.layer); - var Class = L.U.Layer[this.options.type] || L.U.Layer.Default; - this.layer = new Class(this); - var filterKeys = this.map.getFilterKeys(), - filter = this.map.options.filter; - this.eachLayer(function (layer) { - if (filter && !layer.matchFilter(filter, filterKeys)) return; - this.layer.addLayer(layer); - }); - if (visible) this.map.addLayer(this.layer); - this.propagateRemote(); - }, + eachLayer: function (method, context) { + for (const i in this._layers) { + method.call(context || this, this._layers[i]) + } + return this + }, - eachLayer: function (method, context) { - for (var i in this._layers) { - method.call(context || this, this._layers[i]); - } - return this; - }, + eachFeature: function (method, context) { + if (this.layer && this.layer.canBrowse) { + for (let i = 0; i < this._index.length; i++) { + method.call(context || this, this._layers[this._index[i]]) + } + } + return this + }, - eachFeature: function (method, context) { - if (this.layer && this.layer.canBrowse) { - for (var i = 0; i < this._index.length; i++) { - method.call(context || this, this._layers[this._index[i]]); + fetchData: function () { + if (!this.umap_id) return + this.map.get(this._dataUrl(), { + callback: function (geojson, response) { + this._last_modified = response.getResponseHeader('Last-Modified') + this.fromUmapGeoJSON(geojson) + this.backupOptions() + this.fire('loaded') + }, + context: this, + }) + }, + + fromGeoJSON: function (geojson) { + this.addData(geojson) + this._geojson = geojson + this.fire('dataloaded') + this.fire('datachanged') + }, + + fromUmapGeoJSON: function (geojson) { + if (geojson._storage) geojson._umap_options = geojson._storage // Retrocompat + if (geojson._umap_options) this.setOptions(geojson._umap_options) + if (this.isRemoteLayer()) this.fetchRemoteData() + else this.fromGeoJSON(geojson) + this._loaded = true + }, + + clear: function () { + this.layer.clearLayers() + this._layers = {} + this._index = Array() + if (this._geojson) { + this.backupData() + this._geojson = null + } + }, + + backupData: function () { + this._geojson_bk = L.Util.CopyJSON(this._geojson) + }, + + reindex: function () { + const features = [] + this.eachFeature((feature) => features.push(feature)) + L.Util.sortFeatures(features, this.map.getOption('sortKey')) + this._index = [] + for (let i = 0; i < features.length; i++) { + this._index.push(L.Util.stamp(features[i])) + } + }, + + fetchRemoteData: function () { + if (!this.isRemoteLayer()) return + const from = parseInt(this.options.remoteData.from, 10), + to = parseInt(this.options.remoteData.to, 10) + if ( + (!isNaN(from) && this.map.getZoom() < from) || + (!isNaN(to) && this.map.getZoom() > to) + ) { + this.clear() + return + } + if (!this.options.remoteData.dynamic && this.hasDataLoaded()) return + if (!this.isVisible()) return + let url = this.map.localizeUrl(this.options.remoteData.url) + if (this.options.remoteData.proxy) + url = this.map.proxyUrl(url, this.options.remoteData.ttl) + this.map.ajax({ + uri: url, + verb: 'GET', + callback: (raw) => { + this.clear() + this.rawToGeoJSON(raw, this.options.remoteData.format, (geojson) => + this.fromGeoJSON(geojson) + ) + }, + }) + }, + + onceLoaded: function (callback, context) { + if (this.isLoaded()) callback.call(context || this, this) + else this.once('loaded', callback, context) + return this + }, + + onceDataLoaded: function (callback, context) { + if (this.hasDataLoaded()) callback.call(context || this, this) + else this.once('dataloaded', callback, context) + return this + }, + + isLoaded: function () { + return !this.umap_id || this._loaded + }, + + hasDataLoaded: function () { + return this._geojson !== null + }, + + setUmapId: function (id) { + // Datalayer is null when listening creation form + if (!this.umap_id && id) this.umap_id = id + }, + + backupOptions: function () { + this._backupOptions = L.Util.CopyJSON(this.options) + }, + + resetOptions: function () { + this.options = L.Util.CopyJSON(this._backupOptions) + }, + + setOptions: function (options) { + this.options = L.Util.CopyJSON(L.U.DataLayer.prototype.options) // Start from fresh. + this.updateOptions(options) + }, + + updateOptions: function (options) { + L.Util.setOptions(this, options) + this.resetLayer() + }, + + connectToMap: function () { + const id = L.stamp(this) + if (!this.map.datalayers[id]) { + this.map.datalayers[id] = this + if (L.Util.indexOf(this.map.datalayers_index, this) === -1) + this.map.datalayers_index.push(this) + } + this.map.updateDatalayersControl() + }, + + _dataUrl: function () { + const template = this.map.options.urls.datalayer_view + + let url = L.Util.template(template, { + pk: this.umap_id, + map_id: this.map.options.umap_id, + }) + + // No browser cache for owners/editors. + if (this.map.options.allowEdit) url = `${url}?${Date.now()}` + return url + }, + + isRemoteLayer: function () { + return !!( + this.options.remoteData && + this.options.remoteData.url && + this.options.remoteData.format + ) + }, + + isClustered: function () { + return this.options.type === 'Cluster' + }, + + addLayer: function (feature) { + const id = L.stamp(feature) + feature.connectToDataLayer(this) + this._index.push(id) + this._layers[id] = feature + this.layer.addLayer(feature) + this.indexProperties(feature) + if (this.hasDataLoaded()) this.fire('datachanged') + this.map.features_index[feature.getSlug()] = feature + }, + + removeLayer: function (feature) { + const id = L.stamp(feature) + feature.disconnectFromDataLayer(this) + this._index.splice(this._index.indexOf(id), 1) + delete this._layers[id] + this.layer.removeLayer(feature) + delete this.map.features_index[feature.getSlug()] + if (this.hasDataLoaded()) this.fire('datachanged') + }, + + indexProperties: function (feature) { + for (const i in feature.properties) + if (typeof feature.properties[i] !== 'object') this.indexProperty(i) + }, + + indexProperty: function (name) { + if (!name) return + if (name.indexOf('_') === 0) return + if (L.Util.indexOf(this._propertiesIndex, name) !== -1) return + this._propertiesIndex.push(name) + }, + + deindexProperty: function (name) { + const idx = this._propertiesIndex.indexOf(name) + if (idx !== -1) this._propertiesIndex.splice(idx, 1) + }, + + addData: function (geojson) { + try { + // Do not fail if remote data is somehow invalid, + // otherwise the layer becomes uneditable. + this.geojsonToFeatures(geojson) + } catch (err) { + console.log('Error with DataLayer', this.umap_id) + console.error(err) + } + }, + + addRawData: function (c, type) { + this.rawToGeoJSON(c, type, (geojson) => this.addData(geojson)) + }, + + rawToGeoJSON: function (c, type, callback) { + const toDom = (x) => new DOMParser().parseFromString(x, 'text/xml') + + // TODO add a duck typing guessType + if (type === 'csv') { + csv2geojson.csv2geojson( + c, + { + delimiter: 'auto', + includeLatLon: false, + }, + (err, result) => { + if (err) { + let message + if (err.type === 'Error') { + message = err.message + } else { + message = L._('{count} errors during import: {message}', { + count: err.length, + message: err[0].message, + }) } + this.map.ui.alert({ content: message, level: 'error', duration: 10000 }) + console.log(err) + } + if (result && result.features.length) { + callback(result) + } } - return this; - }, - - fetchData: function () { - if (!this.umap_id) return; - this.map.get(this._dataUrl(), { - callback: function (geojson, response) { - this._etag = response.getResponseHeader('ETag'); - this.fromUmapGeoJSON(geojson); - this.backupOptions(); - this.fire('loaded'); - }, - context: this - }); - }, - - fromGeoJSON: function (geojson) { - this.addData(geojson); - this._geojson = geojson; - this.fire('dataloaded'); - this.fire('datachanged'); - }, - - fromUmapGeoJSON: function (geojson) { - if (geojson._storage) geojson._umap_options = geojson._storage; // Retrocompat - if (geojson._umap_options) this.setOptions(geojson._umap_options); - if (this.isRemoteLayer()) this.fetchRemoteData(); - else this.fromGeoJSON(geojson); - this._loaded = true; - }, - - clear: function () { - this.layer.clearLayers(); - this._layers = {}; - this._index = Array(); - if (this._geojson) { - this.backupData(); - this._geojson = null; - } - }, - - backupData: function () { - this._geojson_bk = L.Util.CopyJSON(this._geojson); - }, - - reindex: function () { - var features = []; - this.eachFeature(function (feature) { - features.push(feature); - }); - L.Util.sortFeatures(features, this.map.getOption('sortKey')); - this._index = []; - for (var i = 0; i < features.length; i++) { - this._index.push(L.Util.stamp(features[i])); - } - }, - - fetchRemoteData: function () { - if (!this.isRemoteLayer()) return; - var from = parseInt(this.options.remoteData.from, 10), - to = parseInt(this.options.remoteData.to, 10); - if ((!isNaN(from) && this.map.getZoom() < from) || - (!isNaN(to) && this.map.getZoom() > to) ) { - this.clear(); - return; - } - if (!this.options.remoteData.dynamic && this.hasDataLoaded()) return; - if (!this.isVisible()) return; - var self = this, - url = this.map.localizeUrl(this.options.remoteData.url); - if (this.options.remoteData.proxy) url = this.map.proxyUrl(url, this.options.remoteData.ttl); - this.map.ajax({ - uri: url, - verb: 'GET', - callback: function (raw) { - self.clear(); - self.rawToGeoJSON(raw, self.options.remoteData.format, function (geojson) {self.fromGeoJSON(geojson);}); - } - }); - }, - - onceLoaded: function (callback, context) { - if (this.isLoaded()) callback.call(context || this, this); - else this.once('loaded', callback, context); - return this; - }, - - onceDataLoaded: function (callback, context) { - if (this.hasDataLoaded()) callback.call(context || this, this); - else this.once('dataloaded', callback, context); - return this; - }, - - isLoaded: function () { - return !this.umap_id || this._loaded; - }, - - hasDataLoaded: function () { - return !this.umap_id || this._geojson !== null; - }, - - setUmapId: function (id) { - // Datalayer is null when listening creation form - if (!this.umap_id && id) this.umap_id = id; - }, - - backupOptions: function () { - this._backupOptions = L.Util.CopyJSON(this.options); - }, - - resetOptions: function () { - this.options = L.Util.CopyJSON(this._backupOptions); - }, - - setOptions: function (options) { - this.options = L.Util.CopyJSON(L.U.DataLayer.prototype.options); // Start from fresh. - this.updateOptions(options); - }, - - updateOptions: function (options) { - L.Util.setOptions(this, options); - this.resetLayer(); - }, - - connectToMap: function () { - var id = L.stamp(this); - if (!this.map.datalayers[id]) { - this.map.datalayers[id] = this; - if (L.Util.indexOf(this.map.datalayers_index, this) === -1) this.map.datalayers_index.push(this); - } - this.map.updateDatalayersControl(); - }, - - _dataUrl: function() { - var template = this.map.options.urls.datalayer_view; - return L.Util.template(template, {'pk': this.umap_id, 'map_id': this.map.options.umap_id}); - }, - - isRemoteLayer: function () { - return !!(this.options.remoteData && this.options.remoteData.url && this.options.remoteData.format); - }, - - isClustered: function () { - return this.options.type === 'Cluster'; - }, - - addLayer: function (feature) { - var id = L.stamp(feature); - feature.connectToDataLayer(this); - this._index.push(id); - this._layers[id] = feature; - this.layer.addLayer(feature); - this.indexProperties(feature); - if (this.hasDataLoaded()) this.fire('datachanged'); - this.map.features_index[feature.getSlug()] = feature; - }, - - removeLayer: function (feature) { - var id = L.stamp(feature); - feature.disconnectFromDataLayer(this); - this._index.splice(this._index.indexOf(id), 1); - delete this._layers[id]; - this.layer.removeLayer(feature); - delete this.map.features_index[feature.getSlug()]; - if (this.hasDataLoaded()) this.fire('datachanged'); - }, - - indexProperties: function (feature) { - for (var i in feature.properties) if (typeof feature.properties[i] !== 'object') this.indexProperty(i); - }, - - indexProperty: function (name) { - if (!name) return; - if (name.indexOf('_') === 0) return; - if (L.Util.indexOf(this._propertiesIndex, name) !== -1) return; - this._propertiesIndex.push(name); - }, - - deindexProperty: function (name) { - var idx = this._propertiesIndex.indexOf(name); - if (idx !== -1) this._propertiesIndex.splice(idx, 1); - }, - - addData: function (geojson) { - try { - // Do not fail if remote data is somehow invalid, - // otherwise the layer becomes uneditable. - this.geojsonToFeatures(geojson); - } catch (err) { - console.log("Error with DataLayer", this.umap_id); - console.error(err); - } - }, - - addRawData: function (c, type) { - var self = this; - this.rawToGeoJSON(c, type, function (geojson) { - self.addData(geojson); - }); - }, - - rawToGeoJSON: function (c, type, callback) { - var self = this; - var toDom = function (x) { - return (new DOMParser()).parseFromString(x, 'text/xml'); - }; - - // TODO add a duck typing guessType - if (type === 'csv') { - csv2geojson.csv2geojson(c, { - delimiter: 'auto', - includeLatLon: false - }, function(err, result) { - if (err) { - var message; - if (err.type === 'Error') { - message = err.message; - } else { - message = L._('{count} errors during import: {message}', {count: err.length, message: err[0].message}); - } - self.map.ui.alert({content: message, level: 'error', duration: 10000}); - console.log(err); - } - if (result && result.features.length) { - callback(result); - } - }); - } else if (type === 'gpx') { - callback(toGeoJSON.gpx(toDom(c))); - } else if (type === 'georss') { - callback(GeoRSSToGeoJSON(toDom(c))); - } else if (type === 'kml') { - callback(toGeoJSON.kml(toDom(c))); - } else if (type === 'osm') { - var d; - try { - d = JSON.parse(c); - } catch (e) { - d = toDom(c); - } - callback(osmtogeojson(d, {flatProperties: true})); - } else if (type === 'geojson') { - try { - var gj = JSON.parse(c); - callback(gj); - } catch(err) { - self.map.ui.alert({content: 'Invalid JSON file: ' + err}); - return; - } - } - }, - - geojsonToFeatures: function (geojson) { - if (!geojson) return; - var features = geojson instanceof Array ? geojson : geojson.features, - i, len, latlng, latlngs; - - if (features) { - L.Util.sortFeatures(features, this.map.getOption('sortKey')); - for (i = 0, len = features.length; i < len; i++) { - this.geojsonToFeatures(features[i]); - } - return this; - } - - var geometry = geojson.type === 'Feature' ? geojson.geometry : geojson; - if (!geometry) return; // null geometry is valid geojson. - var coords = geometry.coordinates, - layer, tmp; - - switch (geometry.type) { - case 'Point': - try { - latlng = L.GeoJSON.coordsToLatLng(coords); - } catch (e) { - console.error('Invalid latlng object from', coords); - break; - } - layer = this._pointToLayer(geojson, latlng); - break; - - case 'MultiLineString': - case 'LineString': - latlngs = L.GeoJSON.coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1); - if (!latlngs.length) break; - layer = this._lineToLayer(geojson, latlngs); - break; - - case 'MultiPolygon': - case 'Polygon': - latlngs = L.GeoJSON.coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2); - layer = this._polygonToLayer(geojson, latlngs); - break; - case 'GeometryCollection': - return this.geojsonToFeatures(geometry.geometries); - - default: - this.map.ui.alert({content: L._('Skipping unknown geometry.type: {type}', {type: geometry.type || 'undefined'}), level: 'error'}); - } - if (layer) { - this.addLayer(layer); - return layer; - } - }, - - _pointToLayer: function(geojson, latlng) { - return new L.U.Marker( - this.map, - latlng, - {'geojson': geojson, 'datalayer': this} - ); - }, - - _lineToLayer: function(geojson, latlngs) { - return new L.U.Polyline( - this.map, - latlngs, - {'geojson': geojson, 'datalayer': this, color: null} - ); - }, - - _polygonToLayer: function(geojson, latlngs) { - // Ensure no empty hole - // for (var i = latlngs.length - 1; i > 0; i--) { - // if (!latlngs.slice()[i].length) latlngs.splice(i, 1); - // } - return new L.U.Polygon( - this.map, - latlngs, - {'geojson': geojson, 'datalayer': this} - ); - }, - - importRaw: function (raw, type) { - this.addRawData(raw, type); - this.isDirty = true; - this.zoomTo(); - }, - - importFromFiles: function (files, type) { - for (var i = 0, f; f = files[i]; i++) { - this.importFromFile(f, type); - } - }, - - importFromFile: function (f, type) { - var reader = new FileReader(), - self = this; - type = type || L.Util.detectFileType(f); - reader.readAsText(f); - reader.onload = function (e) { - self.importRaw(e.target.result, type); - }; - }, - - importFromUrl: function (url, type) { - url = this.map.localizeUrl(url); - var self = this; - this.map.xhr._ajax({verb: 'GET', uri: url, callback: function (data) { - self.importRaw(data, type); - }}); - }, - - getEditUrl: function() { - return L.Util.template(this.map.options.urls.datalayer_update, {'map_id': this.map.options.umap_id, 'pk': this.umap_id}); - }, - - getCreateUrl: function() { - return L.Util.template(this.map.options.urls.datalayer_create, {'map_id': this.map.options.umap_id}); - }, - - getSaveUrl: function () { - return (this.umap_id && this.getEditUrl()) || this.getCreateUrl(); - }, - - getColor: function () { - return this.options.color || this.map.getOption('color'); - }, - - getDeleteUrl: function () { - return L.Util.template(this.map.options.urls.datalayer_delete, {'pk': this.umap_id, 'map_id': this.map.options.umap_id}); - - }, - - getVersionsUrl: function () { - return L.Util.template(this.map.options.urls.datalayer_versions, {'pk': this.umap_id, 'map_id': this.map.options.umap_id}); - }, - - getVersionUrl: function (name) { - return L.Util.template(this.map.options.urls.datalayer_version, {'pk': this.umap_id, 'map_id': this.map.options.umap_id, name: name}); - }, - - _delete: function () { - this.isDeleted = true; - this.erase(); - }, - - empty: function () { - if (this.isRemoteLayer()) return; - this.clear(); - this.isDirty = true; - }, - - clone: function () { - var options = L.Util.CopyJSON(this.options); - options.name = L._('Clone of {name}', {name: this.options.name}); - delete options.id; - var geojson = L.Util.CopyJSON(this._geojson), - datalayer = this.map.createDataLayer(options); - datalayer.fromGeoJSON(geojson); - return datalayer; - }, - - erase: function () { - this.hide(); - delete this.map.datalayers[L.stamp(this)]; - this.map.datalayers_index.splice(this.getRank(), 1); - this.parentPane.removeChild(this.pane); - this.map.updateDatalayersControl(); - this.fire('erase'); - this._leaflet_events_bk = this._leaflet_events; - this.off(); - this.clear(); - delete this._loaded; - }, - - reset: function () { - if (!this.umap_id) this.erase(); - - this.resetOptions(); - this.parentPane.appendChild(this.pane); - if (this._leaflet_events_bk && !this._leaflet_events) { - this._leaflet_events = this._leaflet_events_bk; - } - this.clear(); - this.hide(); - if (this.isRemoteLayer()) this.fetchRemoteData(); - else if (this._geojson_bk) this.fromGeoJSON(this._geojson_bk); - this._loaded = true; - this.show(); - this.isDirty = false; - }, - - redraw: function () { - this.hide(); - this.show(); - }, - - edit: function () { - if(!this.map.editEnabled || !this.isLoaded()) {return;} - var container = L.DomUtil.create('div', 'umap-layer-properties-container'), - metadataFields = [ - 'options.name', - 'options.description', - ['options.type', {handler: 'LayerTypeChooser', label: L._('Type of layer')}], - ['options.displayOnLoad', {label: L._('Display on load'), handler: 'Switch'}], - ['options.browsable', {label: L._('Data is browsable'), handler: 'Switch', helpEntries: 'browsable'}] - ]; - var title = L.DomUtil.add('h3', '', container, L._('Layer properties')); - var builder = new L.U.FormBuilder(this, metadataFields, { - callback: function (e) { - this.map.updateDatalayersControl(); - if (e.helper.field === 'options.type') { - this.resetLayer(); - this.edit(); - } - } - }); - container.appendChild(builder.build()); - - var shapeOptions = [ - 'options.color', - 'options.iconClass', - 'options.iconUrl', - 'options.opacity', - 'options.stroke', - 'options.weight', - 'options.fill', - 'options.fillColor', - 'options.fillOpacity', - ]; - - shapeOptions = shapeOptions.concat(this.layer.getEditableOptions()); - - var redrawCallback = function (field) { - this.hide(); - this.layer.postUpdate(field); - this.show(); - }; - - builder = new L.U.FormBuilder(this, shapeOptions, { - id: 'datalayer-advanced-properties', - callback: redrawCallback - }); - var shapeProperties = L.DomUtil.createFieldset(container, L._('Shape properties')); - shapeProperties.appendChild(builder.build()); - - var optionsFields = [ - 'options.smoothFactor', - 'options.dashArray', - 'options.zoomTo', - 'options.labelKey' - ]; - - optionsFields = optionsFields.concat(this.layer.getEditableOptions()); - - builder = new L.U.FormBuilder(this, optionsFields, { - id: 'datalayer-advanced-properties', - callback: redrawCallback - }); - var advancedProperties = L.DomUtil.createFieldset(container, L._('Advanced properties')); - advancedProperties.appendChild(builder.build()); - - var popupFields = [ - 'options.popupShape', - 'options.popupTemplate', - 'options.popupContentTemplate', - 'options.showLabel', - 'options.labelDirection', - 'options.labelInteractive', - ]; - builder = new L.U.FormBuilder(this, popupFields, {callback: redrawCallback}); - var popupFieldset = L.DomUtil.createFieldset(container, L._('Interaction options')); - popupFieldset.appendChild(builder.build()); - - if (!L.Util.isObject(this.options.remoteData)) { - this.options.remoteData = {}; - } - var remoteDataFields = [ - ['options.remoteData.url', {handler: 'Url', label: L._('Url'), helpEntries: 'formatURL'}], - ['options.remoteData.format', {handler: 'DataFormat', label: L._('Format')}], - ['options.remoteData.from', {label: L._('From zoom'), helpText: L._('Optional.')}], - ['options.remoteData.to', {label: L._('To zoom'), helpText: L._('Optional.')}], - ['options.remoteData.dynamic', {handler: 'Switch', label: L._('Dynamic'), helpEntries: 'dynamicRemoteData'}], - ['options.remoteData.licence', {label: L._('Licence'), helpText: L._('Please be sure the licence is compliant with your use.')}] - ]; - if (this.map.options.urls.ajax_proxy) { - remoteDataFields.push(['options.remoteData.proxy', {handler: 'Switch', label: L._('Proxy request'), helpEntries: 'proxyRemoteData'}]); - remoteDataFields.push(['options.remoteData.ttl', {handler: 'ProxyTTLSelect', label: L._('Cache proxied request')}]); - } - - var remoteDataContainer = L.DomUtil.createFieldset(container, L._('Remote data')); - builder = new L.U.FormBuilder(this, remoteDataFields); - remoteDataContainer.appendChild(builder.build()); - - if (this.map.options.urls.datalayer_versions) this.buildVersionsFieldset(container); - - var advancedActions = L.DomUtil.createFieldset(container, L._('Advanced actions')); - var advancedButtons = L.DomUtil.create('div', 'button-bar half', advancedActions); - var deleteLink = L.DomUtil.create('a', 'button delete_datalayer_button umap-delete', advancedButtons); - deleteLink.textContent = L._('Delete'); - deleteLink.href = '#'; - L.DomEvent.on(deleteLink, 'click', L.DomEvent.stop) - .on(deleteLink, 'click', function () { - this._delete(); - this.map.ui.closePanel(); - }, this); - if (!this.isRemoteLayer()) { - var emptyLink = L.DomUtil.create('a', 'button umap-empty', advancedButtons); - emptyLink.textContent = L._('Empty'); - emptyLink.href = '#'; - L.DomEvent.on(emptyLink, 'click', L.DomEvent.stop) - .on(emptyLink, 'click', this.empty, this); - } - var cloneLink = L.DomUtil.create('a', 'button umap-clone', advancedButtons); - cloneLink.textContent = L._('Clone'); - cloneLink.href = '#'; - L.DomEvent.on(cloneLink, 'click', L.DomEvent.stop) - .on(cloneLink, 'click', function () { - var datalayer = this.clone(); - datalayer.edit(); - }, this); - if (this.umap_id) { - var download = L.DomUtil.create('a', 'button umap-download', advancedButtons); - download.textContent = L._('Download'); - download.href = this._dataUrl(); - download.target = '_blank'; - } - this.map.ui.openPanel({data: {html: container}, className: 'dark'}); - - }, - - getOption: function (option) { - if (L.Util.usableOption(this.options, option)) return this.options[option]; - else return this.map.getOption(option); - }, - - buildVersionsFieldset: function (container) { - - var appendVersion = function (data) { - var date = new Date(parseInt(data.at, 10)); - var content = date.toLocaleDateString(L.locale) + ' (' + parseInt(data.size) / 1000 + 'Kb)'; - var el = L.DomUtil.create('div', 'umap-datalayer-version', versionsContainer); - var a = L.DomUtil.create('a', '', el); - L.DomUtil.add('span', '', el, content); - a.href = '#'; - a.title = L._('Restore this version'); - L.DomEvent.on(a, 'click', L.DomEvent.stop) - .on(a, 'click', function () { - this.restore(data.name); - }, this); - }; - - var versionsContainer = L.DomUtil.createFieldset(container, L._('Versions'), {callback: function () { - this.map.xhr.get(this.getVersionsUrl(), { - callback: function (data) { - for (var i = 0; i < data.versions.length; i++) { - appendVersion.call(this, data.versions[i]); - }; - }, - context: this - }); - }, context: this}); - }, - - restore: function (version) { - if (!this.map.editEnabled) return; - if (!confirm(L._('Are you sure you want to restore this version?'))) return; - this.map.xhr.get(this.getVersionUrl(version), { - callback: function (geojson) { - if (geojson._storage) geojson._umap_options = geojson._storage; // Retrocompat. - if (geojson._umap_options) this.setOptions(geojson._umap_options); - this.empty(); - if (this.isRemoteLayer()) this.fetchRemoteData(); - else this.addData(geojson); - this.isDirty = true; - }, - context: this - }) - }, - - featuresToGeoJSON: function () { - var features = []; - this.eachLayer(function (layer) { - features.push(layer.toGeoJSON()); - }); - return features; - }, - - show: function () { - if(!this.isLoaded()) this.fetchData(); - this.map.addLayer(this.layer); - this.fire('show'); - }, - - hide: function () { - this.map.removeLayer(this.layer); - this.fire('hide'); - }, - - toggle: function () { - if (!this.isVisible()) this.show(); - else this.hide(); - }, - - zoomTo: function () { - if (!this.isVisible()) return; - var bounds = this.layer.getBounds(); - if (bounds.isValid()) this.map.fitBounds(bounds); - }, - - allowBrowse: function () { - return !!this.options.browsable && this.canBrowse() && this.isVisible(); - }, - - hasData: function () { - return !!this._index.length; - }, - - isVisible: function () { - return this.map.hasLayer(this.layer); - }, - - canBrowse: function () { - return this.layer && this.layer.canBrowse; - }, - - getFeatureByIndex: function (index) { - if (index === -1) index = this._index.length - 1; - var id = this._index[index]; - return this._layers[id]; - }, - - getNextFeature: function (feature) { - var id = this._index.indexOf(L.stamp(feature)), - nextId = this._index[id + 1]; - return nextId? this._layers[nextId]: this.getNextBrowsable().getFeatureByIndex(0); - }, - - getPreviousFeature: function (feature) { - if (this._index <= 1) { return null; } - var id = this._index.indexOf(L.stamp(feature)), - previousId = this._index[id - 1]; - return previousId? this._layers[previousId]: this.getPreviousBrowsable().getFeatureByIndex(-1); - }, - - getPreviousBrowsable: function () { - var id = this.getRank(), next, index = this.map.datalayers_index; - while(id = index[++id] ? id : 0, next = index[id]) { - if (next === this || (next.allowBrowse() && next.hasData())) break; - } - return next; - }, - - getNextBrowsable: function () { - var id = this.getRank(), prev, index = this.map.datalayers_index; - while(id = index[--id] ? id : index.length - 1, prev = index[id]) { - if (prev === this || (prev.allowBrowse() && prev.hasData())) break; - } - return prev; - }, - - umapGeoJSON: function () { - return { - type: 'FeatureCollection', - features: this.isRemoteLayer() ? [] : this.featuresToGeoJSON(), - _umap_options: this.options - }; - }, - - metadata: function () { - return { - id: this.umap_id, - name: this.options.name, - displayOnLoad: this.options.displayOnLoad - } - }, - - getRank: function () { - return this.map.datalayers_index.indexOf(this); - }, - - save: function () { - if (this.isDeleted) return this.saveDelete(); - if (!this.isLoaded()) {return;} - var geojson = this.umapGeoJSON(); - var formData = new FormData(); - formData.append('name', this.options.name); - formData.append('display_on_load', !!this.options.displayOnLoad); - formData.append('rank', this.getRank()); - // Filename support is shaky, don't do it for now. - var blob = new Blob([JSON.stringify(geojson)], {type: 'application/json'}); - formData.append('geojson', blob); - this.map.post(this.getSaveUrl(), { - data: formData, - callback: function (data, response) { - this._geojson = geojson; - this._etag = response.getResponseHeader('ETag'); - this.setUmapId(data.id); - this.updateOptions(data); - this.backupOptions(); - this.connectToMap(); - this._loaded = true; - this.redraw(); // Needed for reordering features - this.isDirty = false; - this.map.continueSaving(); - }, - context: this, - headers: {'If-Match': this._etag || ''} - }); - }, - - saveDelete: function () { - var callback = function () { - this.isDirty = false; - this.map.continueSaving(); - } - if (!this.umap_id) return callback.call(this); - this.map.xhr.post(this.getDeleteUrl(), { - callback: callback, - context: this - }); - }, - - getMap: function () { - return this.map; - }, - - getName: function () { - return this.options.name || L._('Untitled layer'); - }, - - tableEdit: function () { - if (this.isRemoteLayer() || !this.isVisible()) return; - var editor = new L.U.TableEditor(this); - editor.edit(); + ) + } else if (type === 'gpx') { + callback(toGeoJSON.gpx(toDom(c))) + } else if (type === 'georss') { + callback(GeoRSSToGeoJSON(toDom(c))) + } else if (type === 'kml') { + callback(toGeoJSON.kml(toDom(c))) + } else if (type === 'osm') { + let d + try { + d = JSON.parse(c) + } catch (e) { + d = toDom(c) + } + callback(osmtogeojson(d, { flatProperties: true })) + } else if (type === 'geojson') { + try { + const gj = JSON.parse(c) + callback(gj) + } catch (err) { + this.map.ui.alert({ content: `Invalid JSON file: ${err}` }) + return + } + } + }, + + geojsonToFeatures: function (geojson) { + if (!geojson) return + const features = geojson instanceof Array ? geojson : geojson.features + let i + let len + let latlng + let latlngs + + if (features) { + L.Util.sortFeatures(features, this.map.getOption('sortKey')) + for (i = 0, len = features.length; i < len; i++) { + this.geojsonToFeatures(features[i]) + } + return this } -}); + const geometry = geojson.type === 'Feature' ? geojson.geometry : geojson + if (!geometry) return // null geometry is valid geojson. + const coords = geometry.coordinates + let layer + let tmp + + switch (geometry.type) { + case 'Point': + try { + latlng = L.GeoJSON.coordsToLatLng(coords) + } catch (e) { + console.error('Invalid latlng object from', coords) + break + } + layer = this._pointToLayer(geojson, latlng) + break + + case 'MultiLineString': + case 'LineString': + latlngs = L.GeoJSON.coordsToLatLngs( + coords, + geometry.type === 'LineString' ? 0 : 1 + ) + if (!latlngs.length) break + layer = this._lineToLayer(geojson, latlngs) + break + + case 'MultiPolygon': + case 'Polygon': + latlngs = L.GeoJSON.coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2) + layer = this._polygonToLayer(geojson, latlngs) + break + case 'GeometryCollection': + return this.geojsonToFeatures(geometry.geometries) + + default: + this.map.ui.alert({ + content: L._('Skipping unknown geometry.type: {type}', { + type: geometry.type || 'undefined', + }), + level: 'error', + }) + } + if (layer) { + this.addLayer(layer) + return layer + } + }, + + _pointToLayer: function (geojson, latlng) { + return new L.U.Marker(this.map, latlng, { geojson: geojson, datalayer: this }) + }, + + _lineToLayer: function (geojson, latlngs) { + return new L.U.Polyline(this.map, latlngs, { + geojson: geojson, + datalayer: this, + color: null, + }) + }, + + _polygonToLayer: function (geojson, latlngs) { + // Ensure no empty hole + // for (let i = latlngs.length - 1; i > 0; i--) { + // if (!latlngs.slice()[i].length) latlngs.splice(i, 1); + // } + return new L.U.Polygon(this.map, latlngs, { geojson: geojson, datalayer: this }) + }, + + importRaw: function (raw, type) { + this.addRawData(raw, type) + this.isDirty = true + this.zoomTo() + }, + + importFromFiles: function (files, type) { + for (let i = 0, f; (f = files[i]); i++) { + this.importFromFile(f, type) + } + }, + + importFromFile: function (f, type) { + const reader = new FileReader() + type = type || L.Util.detectFileType(f) + reader.readAsText(f) + reader.onload = (e) => this.importRaw(e.target.result, type) + }, + + importFromUrl: function (url, type) { + url = this.map.localizeUrl(url) + this.map.xhr._ajax({ + verb: 'GET', + uri: url, + callback: (data) => this.importRaw(data, type), + }) + }, + + getEditUrl: function () { + return L.Util.template(this.map.options.urls.datalayer_update, { + map_id: this.map.options.umap_id, + pk: this.umap_id, + }) + }, + + getCreateUrl: function () { + return L.Util.template(this.map.options.urls.datalayer_create, { + map_id: this.map.options.umap_id, + }) + }, + + getSaveUrl: function () { + return (this.umap_id && this.getEditUrl()) || this.getCreateUrl() + }, + + getColor: function () { + return this.options.color || this.map.getOption('color') + }, + + getDeleteUrl: function () { + return L.Util.template(this.map.options.urls.datalayer_delete, { + pk: this.umap_id, + map_id: this.map.options.umap_id, + }) + }, + + getVersionsUrl: function () { + return L.Util.template(this.map.options.urls.datalayer_versions, { + pk: this.umap_id, + map_id: this.map.options.umap_id, + }) + }, + + getVersionUrl: function (name) { + return L.Util.template(this.map.options.urls.datalayer_version, { + pk: this.umap_id, + map_id: this.map.options.umap_id, + name: name, + }) + }, + + _delete: function () { + this.isDeleted = true + this.erase() + }, + + empty: function () { + if (this.isRemoteLayer()) return + this.clear() + this.isDirty = true + }, + + clone: function () { + const options = L.Util.CopyJSON(this.options) + options.name = L._('Clone of {name}', { name: this.options.name }) + delete options.id + const geojson = L.Util.CopyJSON(this._geojson), + datalayer = this.map.createDataLayer(options) + datalayer.fromGeoJSON(geojson) + return datalayer + }, + + erase: function () { + this.hide() + delete this.map.datalayers[L.stamp(this)] + this.map.datalayers_index.splice(this.getRank(), 1) + this.parentPane.removeChild(this.pane) + this.map.updateDatalayersControl() + this.fire('erase') + this._leaflet_events_bk = this._leaflet_events + this.off() + this.clear() + delete this._loaded + }, + + reset: function () { + if (!this.umap_id) this.erase() + + this.resetOptions() + this.parentPane.appendChild(this.pane) + if (this._leaflet_events_bk && !this._leaflet_events) { + this._leaflet_events = this._leaflet_events_bk + } + this.clear() + this.hide() + if (this.isRemoteLayer()) this.fetchRemoteData() + else if (this._geojson_bk) this.fromGeoJSON(this._geojson_bk) + this._loaded = true + this.show() + this.isDirty = false + }, + + redraw: function () { + this.hide() + this.show() + }, + + edit: function () { + if (!this.map.editEnabled || !this.isLoaded()) { + return + } + const container = L.DomUtil.create('div', 'umap-layer-properties-container'), + metadataFields = [ + 'options.name', + 'options.description', + ['options.type', { handler: 'LayerTypeChooser', label: L._('Type of layer') }], + ['options.displayOnLoad', { label: L._('Display on load'), handler: 'Switch' }], + [ + 'options.browsable', + { + label: L._('Data is browsable'), + handler: 'Switch', + helpEntries: 'browsable', + }, + ], + ] + const title = L.DomUtil.add('h3', '', container, L._('Layer properties')) + let builder = new L.U.FormBuilder(this, metadataFields, { + callback: function (e) { + this.map.updateDatalayersControl() + if (e.helper.field === 'options.type') { + this.resetLayer() + this.edit() + } + }, + }) + container.appendChild(builder.build()) + + let shapeOptions = [ + 'options.color', + 'options.iconClass', + 'options.iconUrl', + 'options.opacity', + 'options.stroke', + 'options.weight', + 'options.fill', + 'options.fillColor', + 'options.fillOpacity', + ] + + shapeOptions = shapeOptions.concat(this.layer.getEditableOptions()) + + const redrawCallback = function (field) { + this.hide() + this.layer.postUpdate(field) + this.show() + } + + builder = new L.U.FormBuilder(this, shapeOptions, { + id: 'datalayer-advanced-properties', + callback: redrawCallback, + }) + const shapeProperties = L.DomUtil.createFieldset(container, L._('Shape properties')) + shapeProperties.appendChild(builder.build()) + + let optionsFields = [ + 'options.smoothFactor', + 'options.dashArray', + 'options.zoomTo', + 'options.labelKey', + ] + + optionsFields = optionsFields.concat(this.layer.getEditableOptions()) + + builder = new L.U.FormBuilder(this, optionsFields, { + id: 'datalayer-advanced-properties', + callback: redrawCallback, + }) + const advancedProperties = L.DomUtil.createFieldset( + container, + L._('Advanced properties') + ) + advancedProperties.appendChild(builder.build()) + + const popupFields = [ + 'options.popupShape', + 'options.popupTemplate', + 'options.popupContentTemplate', + 'options.showLabel', + 'options.labelDirection', + 'options.labelInteractive', + ] + builder = new L.U.FormBuilder(this, popupFields, { callback: redrawCallback }) + const popupFieldset = L.DomUtil.createFieldset( + container, + L._('Interaction options') + ) + popupFieldset.appendChild(builder.build()) + + if (!L.Util.isObject(this.options.remoteData)) { + this.options.remoteData = {} + } + const remoteDataFields = [ + [ + 'options.remoteData.url', + { handler: 'Url', label: L._('Url'), helpEntries: 'formatURL' }, + ], + ['options.remoteData.format', { handler: 'DataFormat', label: L._('Format') }], + [ + 'options.remoteData.from', + { label: L._('From zoom'), helpText: L._('Optional.') }, + ], + ['options.remoteData.to', { label: L._('To zoom'), helpText: L._('Optional.') }], + [ + 'options.remoteData.dynamic', + { handler: 'Switch', label: L._('Dynamic'), helpEntries: 'dynamicRemoteData' }, + ], + [ + 'options.remoteData.licence', + { + label: L._('Licence'), + helpText: L._('Please be sure the licence is compliant with your use.'), + }, + ], + ] + if (this.map.options.urls.ajax_proxy) { + remoteDataFields.push([ + 'options.remoteData.proxy', + { + handler: 'Switch', + label: L._('Proxy request'), + helpEntries: 'proxyRemoteData', + }, + ]) + remoteDataFields.push([ + 'options.remoteData.ttl', + { handler: 'ProxyTTLSelect', label: L._('Cache proxied request') }, + ]) + } + + const remoteDataContainer = L.DomUtil.createFieldset(container, L._('Remote data')) + builder = new L.U.FormBuilder(this, remoteDataFields) + remoteDataContainer.appendChild(builder.build()) + + if (this.map.options.urls.datalayer_versions) this.buildVersionsFieldset(container) + + const advancedActions = L.DomUtil.createFieldset(container, L._('Advanced actions')) + const advancedButtons = L.DomUtil.create('div', 'button-bar half', advancedActions) + const deleteLink = L.DomUtil.create( + 'a', + 'button delete_datalayer_button umap-delete', + advancedButtons + ) + deleteLink.textContent = L._('Delete') + deleteLink.href = '#' + L.DomEvent.on(deleteLink, 'click', L.DomEvent.stop).on( + deleteLink, + 'click', + function () { + this._delete() + this.map.ui.closePanel() + }, + this + ) + if (!this.isRemoteLayer()) { + const emptyLink = L.DomUtil.create('a', 'button umap-empty', advancedButtons) + emptyLink.textContent = L._('Empty') + emptyLink.href = '#' + L.DomEvent.on(emptyLink, 'click', L.DomEvent.stop).on( + emptyLink, + 'click', + this.empty, + this + ) + } + const cloneLink = L.DomUtil.create('a', 'button umap-clone', advancedButtons) + cloneLink.textContent = L._('Clone') + cloneLink.href = '#' + L.DomEvent.on(cloneLink, 'click', L.DomEvent.stop).on( + cloneLink, + 'click', + function () { + const datalayer = this.clone() + datalayer.edit() + }, + this + ) + if (this.umap_id) { + const download = L.DomUtil.create('a', 'button umap-download', advancedButtons) + download.textContent = L._('Download') + download.href = this._dataUrl() + download.target = '_blank' + } + this.map.ui.openPanel({ data: { html: container }, className: 'dark' }) + }, + + getOption: function (option) { + if (L.Util.usableOption(this.options, option)) return this.options[option] + else return this.map.getOption(option) + }, + + buildVersionsFieldset: function (container) { + const appendVersion = function (data) { + const date = new Date(parseInt(data.at, 10)) + const content = `${date.toLocaleDateString(L.locale)} (${ + parseInt(data.size) / 1000 + }Kb)` + const el = L.DomUtil.create('div', 'umap-datalayer-version', versionsContainer) + const a = L.DomUtil.create('a', '', el) + L.DomUtil.add('span', '', el, content) + a.href = '#' + a.title = L._('Restore this version') + L.DomEvent.on(a, 'click', L.DomEvent.stop).on( + a, + 'click', + () => this.restore(data.name), + this + ) + } + + const versionsContainer = L.DomUtil.createFieldset(container, L._('Versions'), { + callback: function () { + this.map.xhr.get(this.getVersionsUrl(), { + callback: function (data) { + for (let i = 0; i < data.versions.length; i++) { + appendVersion.call(this, data.versions[i]) + } + }, + context: this, + }) + }, + context: this, + }) + }, + + restore: function (version) { + if (!this.map.editEnabled) return + if (!confirm(L._('Are you sure you want to restore this version?'))) return + this.map.xhr.get(this.getVersionUrl(version), { + callback: function (geojson) { + if (geojson._storage) geojson._umap_options = geojson._storage // Retrocompat. + if (geojson._umap_options) this.setOptions(geojson._umap_options) + this.empty() + if (this.isRemoteLayer()) this.fetchRemoteData() + else this.addData(geojson) + this.isDirty = true + }, + context: this, + }) + }, + + featuresToGeoJSON: function () { + const features = [] + this.eachLayer((layer) => features.push(layer.toGeoJSON())) + return features + }, + + show: function () { + if (!this.isLoaded()) this.fetchData() + this.map.addLayer(this.layer) + this.fire('show') + }, + + hide: function () { + this.map.removeLayer(this.layer) + this.fire('hide') + }, + + toggle: function () { + if (!this.isVisible()) this.show() + else this.hide() + }, + + zoomTo: function () { + if (!this.isVisible()) return + const bounds = this.layer.getBounds() + if (bounds.isValid()) this.map.fitBounds(bounds) + }, + + allowBrowse: function () { + return !!this.options.browsable && this.canBrowse() && this.isVisible() + }, + + hasData: function () { + return !!this._index.length + }, + + isVisible: function () { + return this.map.hasLayer(this.layer) + }, + + canBrowse: function () { + return this.layer && this.layer.canBrowse + }, + + getFeatureByIndex: function (index) { + if (index === -1) index = this._index.length - 1 + const id = this._index[index] + return this._layers[id] + }, + + getNextFeature: function (feature) { + const id = this._index.indexOf(L.stamp(feature)) + const nextId = this._index[id + 1] + return nextId ? this._layers[nextId] : this.getNextBrowsable().getFeatureByIndex(0) + }, + + getPreviousFeature: function (feature) { + if (this._index <= 1) { + return null + } + const id = this._index.indexOf(L.stamp(feature)) + const previousId = this._index[id - 1] + return previousId + ? this._layers[previousId] + : this.getPreviousBrowsable().getFeatureByIndex(-1) + }, + + getPreviousBrowsable: function () { + let id = this.getRank() + let next + const index = this.map.datalayers_index + while (((id = index[++id] ? id : 0), (next = index[id]))) { + if (next === this || (next.allowBrowse() && next.hasData())) break + } + return next + }, + + getNextBrowsable: function () { + let id = this.getRank() + let prev + const index = this.map.datalayers_index + while (((id = index[--id] ? id : index.length - 1), (prev = index[id]))) { + if (prev === this || (prev.allowBrowse() && prev.hasData())) break + } + return prev + }, + + umapGeoJSON: function () { + return { + type: 'FeatureCollection', + features: this.isRemoteLayer() ? [] : this.featuresToGeoJSON(), + _umap_options: this.options, + } + }, + + metadata: function () { + return { + id: this.umap_id, + name: this.options.name, + displayOnLoad: this.options.displayOnLoad, + } + }, + + getRank: function () { + return this.map.datalayers_index.indexOf(this) + }, + + save: function () { + if (this.isDeleted) return this.saveDelete() + if (!this.isLoaded()) { + return + } + const geojson = this.umapGeoJSON() + const formData = new FormData() + formData.append('name', this.options.name) + formData.append('display_on_load', !!this.options.displayOnLoad) + formData.append('rank', this.getRank()) + // Filename support is shaky, don't do it for now. + const blob = new Blob([JSON.stringify(geojson)], { type: 'application/json' }) + formData.append('geojson', blob) + this.map.post(this.getSaveUrl(), { + data: formData, + callback: function (data, response) { + this._geojson = geojson + this._last_modified = response.getResponseHeader('Last-Modified') + this.setUmapId(data.id) + this.updateOptions(data) + this.backupOptions() + this.connectToMap() + this._loaded = true + this.redraw() // Needed for reordering features + this.isDirty = false + this.map.continueSaving() + }, + context: this, + headers: this._last_modified + ? { 'If-Unmodified-Since': this._last_modified } + : {}, + }) + }, + + saveDelete: function () { + const callback = function () { + this.isDirty = false + this.map.continueSaving() + } + if (!this.umap_id) return callback.call(this) + this.map.xhr.post(this.getDeleteUrl(), { + callback: callback, + context: this, + }) + }, + + getMap: function () { + return this.map + }, + + getName: function () { + return this.options.name || L._('Untitled layer') + }, + + tableEdit: function () { + if (this.isRemoteLayer() || !this.isVisible()) return + const editor = new L.U.TableEditor(this) + editor.edit() + }, +}) L.TileLayer.include({ - - toJSON: function () { - return { - minZoom: this.options.minZoom, - maxZoom: this.options.maxZoom, - attribution: this.options.attribution, - url_template: this._url, - name: this.options.name, - tms: this.options.tms - }; - }, - - getAttribution: function () { - return L.Util.toHTML(this.options.attribution); + toJSON: function () { + return { + minZoom: this.options.minZoom, + maxZoom: this.options.maxZoom, + attribution: this.options.attribution, + url_template: this._url, + name: this.options.name, + tms: this.options.tms, } + }, -}); + getAttribution: function () { + return L.Util.toHTML(this.options.attribution) + }, +}) diff --git a/umap/static/umap/js/umap.permissions.js b/umap/static/umap/js/umap.permissions.js index 6d6cc977..0da21b78 100644 --- a/umap/static/umap/js/umap.permissions.js +++ b/umap/static/umap/js/umap.permissions.js @@ -1,143 +1,197 @@ // Dedicated object so we can deal with a separate dirty status, and thus // call the endpoint only when needed, saving one call at each save. L.U.MapPermissions = L.Class.extend({ + options: { + owner: null, + editors: [], + share_status: null, + edit_status: null, + }, - options: { - owner: null, - editors: [], - share_status: null, - edit_status: null - }, - - initialize: function (map) { - this.setOptions(map.options.permissions); - this.map = map; - var isDirty = false, - self = this; - try { - Object.defineProperty(this, 'isDirty', { - get: function () { - return isDirty; - }, - set: function (status) { - isDirty = status; - if (status) self.map.isDirty = status; - } - }); - } - catch (e) { - // Certainly IE8, which has a limited version of defineProperty - } - - }, - - setOptions: function (options) { - this.options = L.Util.setOptions(this, options); - }, - - isOwner: function () { - return this.map.options.user && this.map.options.permissions.owner && this.map.options.user.id == this.map.options.permissions.owner.id; - }, - - isAnonymousMap: function () { - return !this.map.options.permissions.owner; - }, - - getMap: function () { - return this.map; - }, - - edit: function () { - if (!this.map.options.umap_id) return this.map.ui.alert({content: L._('Please save the map first'), level: 'info'}); - var container = L.DomUtil.create('div', 'permissions-panel'), - fields = [], - title = L.DomUtil.create('h4', '', container); - if (this.isAnonymousMap()) { - if (this.options.anonymous_edit_url) { - var helpText = L._('Secret edit link is:
    {link}', {link: this.options.anonymous_edit_url}); - fields.push(['options.edit_status', {handler: 'IntSelect', label: L._('Who can edit'), selectOptions: this.map.options.anonymous_edit_statuses, helpText: helpText}]); - } - } else { - if (this.isOwner()) { - fields.push(['options.edit_status', {handler: 'IntSelect', label: L._('Who can edit'), selectOptions: this.map.options.edit_statuses}]); - fields.push(['options.share_status', {handler: 'IntSelect', label: L._('Who can view'), selectOptions: this.map.options.share_statuses}]); - fields.push(['options.owner', {handler: 'ManageOwner', label: L._("Map's owner")}]); - } - fields.push(['options.editors', {handler: 'ManageEditors', label: L._("Map's editors")}]); - } - title.textContent = L._('Update permissions'); - var builder = new L.U.FormBuilder(this, fields); - var form = builder.build(); - container.appendChild(form); - if (this.isAnonymousMap() && this.map.options.user) { - // We have a user, and this user has come through here, so they can edit the map, so let's allow to own the map. - // Note: real check is made on the back office anyway. - var advancedActions = L.DomUtil.createFieldset(container, L._('Advanced actions')); - var advancedButtons = L.DomUtil.create('div', 'button-bar', advancedActions); - var download = L.DomUtil.create('a', 'button', advancedButtons); - download.href = '#'; - download.textContent = L._('Attach the map to my account'); - L.DomEvent - .on(download, 'click', L.DomEvent.stop) - .on(download, 'click', this.attach, this); - } - this.map.ui.openPanel({data: {html: container}, className: 'dark'}); - }, - - attach: function () { - this.map.post(this.getAttachUrl(), { - callback: function () { - this.options.owner = this.map.options.user; - this.map.ui.alert({content: L._("Map has been attached to your account"), level: 'info'}); - this.map.ui.closePanel(); - }, - context: this - }) - }, - - save: function () { - if (!this.isDirty) return this.map.continueSaving(); - var formData = new FormData(); - if (!this.isAnonymousMap() && this.options.editors) { - var editors = this.options.editors.map(function (u) {return u.id}); - for (var i = 0; i < this.options.editors.length; i++) formData.append('editors', this.options.editors[i].id); - } - if (this.isOwner() || this.isAnonymousMap()) formData.append('edit_status', this.options.edit_status); - if (this.isOwner()) { - formData.append('owner', this.options.owner && this.options.owner.id); - formData.append('share_status', this.options.share_status); - } - this.map.post(this.getUrl(), { - data: formData, - context: this, - callback: function (data) { - this.commit(); - this.isDirty = false; - this.map.continueSaving(); - } - }); - }, - - getUrl: function () { - return L.Util.template(this.map.options.urls.map_update_permissions, {'map_id': this.map.options.umap_id}); - }, - - getAttachUrl: function () { - return L.Util.template(this.map.options.urls.map_attach_owner, {'map_id': this.map.options.umap_id}); - }, - - addOwnerLink: function (element, container) { - if (this.options.owner && this.options.owner.name && this.options.owner.url) { - var ownerContainer = L.DomUtil.add(element, 'umap-map-owner', container, ' ' + L._('by') + ' '), - owner = L.DomUtil.create('a'); - owner.href = this.options.owner.url; - owner.textContent = this.options.owner.name; - ownerContainer.appendChild(owner); - } - }, - - commit: function () { - L.Util.extend(this.map.options.permissions, this.options); + initialize: function (map) { + this.setOptions(map.options.permissions) + this.map = map + let isDirty = false + const self = this + try { + Object.defineProperty(this, 'isDirty', { + get: function () { + return isDirty + }, + set: function (status) { + isDirty = status + if (status) self.map.isDirty = status + }, + }) + } catch (e) { + // Certainly IE8, which has a limited version of defineProperty } + }, -}); + setOptions: function (options) { + this.options = L.Util.setOptions(this, options) + }, + + isOwner: function () { + return ( + this.map.options.user && + this.map.options.permissions.owner && + this.map.options.user.id == this.map.options.permissions.owner.id + ) + }, + + isAnonymousMap: function () { + return !this.map.options.permissions.owner + }, + + getMap: function () { + return this.map + }, + + edit: function () { + if (!this.map.options.umap_id) + return this.map.ui.alert({ + content: L._('Please save the map first'), + level: 'info', + }) + const container = L.DomUtil.create('div', 'permissions-panel'), + fields = [], + title = L.DomUtil.create('h4', '', container) + if (this.isAnonymousMap()) { + if (this.options.anonymous_edit_url) { + const helpText = L._('Secret edit link is:
    {link}', { + link: this.options.anonymous_edit_url, + }) + fields.push([ + 'options.edit_status', + { + handler: 'IntSelect', + label: L._('Who can edit'), + selectOptions: this.map.options.anonymous_edit_statuses, + helpText: helpText, + }, + ]) + } + } else { + if (this.isOwner()) { + fields.push([ + 'options.edit_status', + { + handler: 'IntSelect', + label: L._('Who can edit'), + selectOptions: this.map.options.edit_statuses, + }, + ]) + fields.push([ + 'options.share_status', + { + handler: 'IntSelect', + label: L._('Who can view'), + selectOptions: this.map.options.share_statuses, + }, + ]) + fields.push([ + 'options.owner', + { handler: 'ManageOwner', label: L._("Map's owner") }, + ]) + } + fields.push([ + 'options.editors', + { handler: 'ManageEditors', label: L._("Map's editors") }, + ]) + } + title.textContent = L._('Update permissions') + const builder = new L.U.FormBuilder(this, fields) + const form = builder.build() + container.appendChild(form) + if (this.isAnonymousMap() && this.map.options.user) { + // We have a user, and this user has come through here, so they can edit the map, so let's allow to own the map. + // Note: real check is made on the back office anyway. + const advancedActions = L.DomUtil.createFieldset( + container, + L._('Advanced actions') + ) + const advancedButtons = L.DomUtil.create('div', 'button-bar', advancedActions) + const download = L.DomUtil.create('a', 'button', advancedButtons) + download.href = '#' + download.textContent = L._('Attach the map to my account') + L.DomEvent.on(download, 'click', L.DomEvent.stop).on( + download, + 'click', + this.attach, + this + ) + } + this.map.ui.openPanel({ data: { html: container }, className: 'dark' }) + }, + + attach: function () { + this.map.post(this.getAttachUrl(), { + callback: function () { + this.options.owner = this.map.options.user + this.map.ui.alert({ + content: L._('Map has been attached to your account'), + level: 'info', + }) + this.map.ui.closePanel() + }, + context: this, + }) + }, + + save: function () { + if (!this.isDirty) return this.map.continueSaving() + const formData = new FormData() + if (!this.isAnonymousMap() && this.options.editors) { + const editors = this.options.editors.map((u) => u.id) + for (let i = 0; i < this.options.editors.length; i++) + formData.append('editors', this.options.editors[i].id) + } + if (this.isOwner() || this.isAnonymousMap()) + formData.append('edit_status', this.options.edit_status) + if (this.isOwner()) { + formData.append('owner', this.options.owner && this.options.owner.id) + formData.append('share_status', this.options.share_status) + } + this.map.post(this.getUrl(), { + data: formData, + context: this, + callback: function (data) { + this.commit() + this.isDirty = false + this.map.continueSaving() + }, + }) + }, + + getUrl: function () { + return L.Util.template(this.map.options.urls.map_update_permissions, { + map_id: this.map.options.umap_id, + }) + }, + + getAttachUrl: function () { + return L.Util.template(this.map.options.urls.map_attach_owner, { + map_id: this.map.options.umap_id, + }) + }, + + addOwnerLink: function (element, container) { + if (this.options.owner && this.options.owner.name && this.options.owner.url) { + const ownerContainer = L.DomUtil.add( + element, + 'umap-map-owner', + container, + ` ${L._('by')} ` + ), + owner = L.DomUtil.create('a') + owner.href = this.options.owner.url + owner.textContent = this.options.owner.name + ownerContainer.appendChild(owner) + } + }, + + commit: function () { + L.Util.extend(this.map.options.permissions, this.options) + }, +}) diff --git a/umap/static/umap/js/umap.popup.js b/umap/static/umap/js/umap.popup.js index 40bfe6e8..b6eb317f 100644 --- a/umap/static/umap/js/umap.popup.js +++ b/umap/static/umap/js/umap.popup.js @@ -1,224 +1,239 @@ /* Shapes */ L.U.Popup = L.Popup.extend({ + options: { + parseTemplate: true, + }, - options: { - parseTemplate: true - }, + initialize: function (feature) { + this.feature = feature + this.container = L.DomUtil.create('div', 'umap-popup') + this.format() + L.Popup.prototype.initialize.call(this, {}, feature) + this.setContent(this.container) + }, - initialize: function (feature) { - this.feature = feature; - this.container = L.DomUtil.create('div', 'umap-popup'); - this.format(); - L.Popup.prototype.initialize.call(this, {}, feature); - this.setContent(this.container); - }, - - format: function () { - var mode = this.feature.getOption('popupTemplate') || 'Default', - klass = L.U.PopupTemplate[mode] || L.U.PopupTemplate.Default; - this.content = new klass(this.feature, this.container); - this.content.render(); - var els = this.container.querySelectorAll('img,iframe'); - for (var i = 0; i < els.length; i++) { - this.onElementLoaded(els[i]); - } - if (!els.length && this.container.textContent.replace('\n', '') === '') { - this.container.innerHTML = ''; - L.DomUtil.add('h3', '', this.container, this.feature.getDisplayName()); - } - }, - - onElementLoaded: function (el) { - L.DomEvent.on(el, 'load', function () { - this._updateLayout(); - this._updatePosition(); - this._adjustPan(); - }, this); + format: function () { + const mode = this.feature.getOption('popupTemplate') || 'Default', + klass = L.U.PopupTemplate[mode] || L.U.PopupTemplate.Default + this.content = new klass(this.feature, this.container) + this.content.render() + const els = this.container.querySelectorAll('img,iframe') + for (let i = 0; i < els.length; i++) { + this.onElementLoaded(els[i]) } + if (!els.length && this.container.textContent.replace('\n', '') === '') { + this.container.innerHTML = '' + L.DomUtil.add('h3', '', this.container, this.feature.getDisplayName()) + } + }, -}); + onElementLoaded: function (el) { + L.DomEvent.on( + el, + 'load', + function () { + this._updateLayout() + this._updatePosition() + this._adjustPan() + }, + this + ) + }, +}) L.U.Popup.Large = L.U.Popup.extend({ - options: { - maxWidth: 500, - className: 'umap-popup-large' - } -}); - + options: { + maxWidth: 500, + className: 'umap-popup-large', + }, +}) L.U.Popup.Panel = L.U.Popup.extend({ + options: { + zoomAnimation: false, + }, - options: { - zoomAnimation: false - }, + allButton: function () { + const button = L.DomUtil.create('li', '') + L.DomUtil.create('i', 'umap-icon-16 umap-list', button) + const label = L.DomUtil.create('span', '', button) + label.textContent = label.title = L._('See all') + L.DomEvent.on(button, 'click', this.feature.map.openBrowser, this.feature.map) + return button + }, - allButton: function () { - var button = L.DomUtil.create('li', ''); - L.DomUtil.create('i', 'umap-icon-16 umap-list', button); - var label = L.DomUtil.create('span', '', button); - label.textContent = label.title = L._('See all'); - L.DomEvent.on(button, 'click', this.feature.map.openBrowser, this.feature.map); - return button; - }, + update: function () { + this.feature.map.ui.openPanel({ + data: { html: this._content }, + actions: [this.allButton()], + }) + }, - update: function () { - this.feature.map.ui.openPanel({data: {html: this._content}, actions: [this.allButton()]}); - }, + onRemove: function (map) { + map.ui.closePanel() + L.U.Popup.prototype.onRemove.call(this, map) + }, - onRemove: function (map) { - map.ui.closePanel(); - L.U.Popup.prototype.onRemove.call(this, map); - }, - - _initLayout: function () {this._container = L.DomUtil.create('span');}, - _updateLayout: function () {}, - _updatePosition: function () {}, - _adjustPan: function () {} - -}); -L.U.Popup.SimplePanel = L.U.Popup.Panel; // Retrocompat. + _initLayout: function () { + this._container = L.DomUtil.create('span') + }, + _updateLayout: function () {}, + _updatePosition: function () {}, + _adjustPan: function () {}, +}) +L.U.Popup.SimplePanel = L.U.Popup.Panel // Retrocompat. /* Content templates */ -L.U.PopupTemplate = {}; +L.U.PopupTemplate = {} L.U.PopupTemplate.Default = L.Class.extend({ + initialize: function (feature, container) { + this.feature = feature + this.container = container + }, - initialize: function (feature, container) { - this.feature = feature; - this.container = container; - }, + renderTitle: function () {}, - renderTitle: function () {}, + renderBody: function () { + const template = this.feature.getOption('popupContentTemplate') + const container = L.DomUtil.create('div', 'umap-popup-container') + let content = '' + let properties + let center + properties = this.feature.extendedProperties() + // Resolve properties inside description + properties.description = L.Util.greedyTemplate( + this.feature.properties.description || '', + properties + ) + content = L.Util.greedyTemplate(template, properties) + content = L.Util.toHTML(content) + container.innerHTML = content + return container + }, - renderBody: function () { - var template = this.feature.getOption('popupContentTemplate'), - container = L.DomUtil.create('div', 'umap-popup-container'), - content = '', properties, center; - properties = this.feature.extendedProperties(); - // Resolve properties inside description - properties.description = L.Util.greedyTemplate(this.feature.properties.description || '', properties); - content = L.Util.greedyTemplate(template, properties); - content = L.Util.toHTML(content); - container.innerHTML = content; - return container; - }, - - renderFooter: function () { - if (this.feature.hasPopupFooter()) { - var footerContainer = L.DomUtil.create('div', 'umap-footer-container', this.container), - footer = L.DomUtil.create('ul', 'umap-popup-footer', footerContainer), - previousLi = L.DomUtil.create('li', 'previous', footer), - zoomLi = L.DomUtil.create('li', 'zoom', footer), - nextLi = L.DomUtil.create('li', 'next', footer), - next = this.feature.getNext(), - prev = this.feature.getPrevious(); - if (next) nextLi.title = L._('Go to «{feature}»', {feature: next.properties.name || L._('next')}); - if (prev) previousLi.title = L._('Go to «{feature}»', {feature: prev.properties.name || L._('previous')}); - zoomLi.title = L._('Zoom to this feature'); - L.DomEvent.on(nextLi, 'click', function () { - if (next) next.bringToCenter({zoomTo: next.getOption('zoomTo'), callback: next.view}); - }); - L.DomEvent.on(previousLi, 'click', function () { - if (prev) prev.bringToCenter({zoomTo: prev.getOption('zoomTo'), callback: prev.view}); - }); - L.DomEvent.on(zoomLi, 'click', function () { - this.bringToCenter({zoomTo: this.getOption('zoomTo')}); - }, this.feature); - } - }, - - render: function () { - var title = this.renderTitle(); - if (title) this.container.appendChild(title); - var body = this.renderBody(); - if (body) L.DomUtil.add('div', 'umap-popup-content', this.container, body); - this.renderFooter(); + renderFooter: function () { + if (this.feature.hasPopupFooter()) { + const footerContainer = L.DomUtil.create( + 'div', + 'umap-footer-container', + this.container + ), + footer = L.DomUtil.create('ul', 'umap-popup-footer', footerContainer), + previousLi = L.DomUtil.create('li', 'previous', footer), + zoomLi = L.DomUtil.create('li', 'zoom', footer), + nextLi = L.DomUtil.create('li', 'next', footer), + next = this.feature.getNext(), + prev = this.feature.getPrevious() + if (next) + nextLi.title = L._('Go to «{feature}»', { + feature: next.properties.name || L._('next'), + }) + if (prev) + previousLi.title = L._('Go to «{feature}»', { + feature: prev.properties.name || L._('previous'), + }) + zoomLi.title = L._('Zoom to this feature') + L.DomEvent.on(nextLi, 'click', () => { + if (next) next.zoomTo({ callback: next.view }) + }) + L.DomEvent.on(previousLi, 'click', () => { + if (prev) prev.zoomTo({ callback: prev.view }) + }) + L.DomEvent.on( + zoomLi, + 'click', + function () { + this.zoomTo() + }, + this.feature + ) } + }, -}); + render: function () { + const title = this.renderTitle() + if (title) this.container.appendChild(title) + const body = this.renderBody() + if (body) L.DomUtil.add('div', 'umap-popup-content', this.container, body) + this.renderFooter() + }, +}) L.U.PopupTemplate.BaseWithTitle = L.U.PopupTemplate.Default.extend({ - - renderTitle: function () { - var title; - if (this.feature.getDisplayName()) { - title = L.DomUtil.create('h3', 'popup-title'); - title.textContent = this.feature.getDisplayName(); - } - return title; + renderTitle: function () { + let title + if (this.feature.getDisplayName()) { + title = L.DomUtil.create('h3', 'popup-title') + title.textContent = this.feature.getDisplayName() } - -}); - + return title + }, +}) L.U.PopupTemplate.Table = L.U.PopupTemplate.BaseWithTitle.extend({ - - formatRow: function (key, value) { - if (value.indexOf('http') === 0) { - value = '' + value + ''; - } - return value; - }, - - addRow: function (container, key, value) { - var tr = L.DomUtil.create('tr', '', container); - L.DomUtil.add('th', '', tr, key); - L.DomUtil.add('td', '', tr, this.formatRow(key, value)); - }, - - renderBody: function () { - var table = L.DomUtil.create('table'); - - for (var key in this.feature.properties) { - if (typeof this.feature.properties[key] === 'object' || key === 'name') continue; - // TODO, manage links (url, mailto, wikipedia...) - this.addRow(table, key, L.Util.escapeHTML(this.feature.properties[key]).trim()); - } - return table; + formatRow: function (key, value) { + if (value.indexOf('http') === 0) { + value = `${value}` } + return value + }, -}); + addRow: function (container, key, value) { + const tr = L.DomUtil.create('tr', '', container) + L.DomUtil.add('th', '', tr, key) + L.DomUtil.add('td', '', tr, this.formatRow(key, value)) + }, + + renderBody: function () { + const table = L.DomUtil.create('table') + + for (const key in this.feature.properties) { + if (typeof this.feature.properties[key] === 'object' || key === 'name') continue + // TODO, manage links (url, mailto, wikipedia...) + this.addRow(table, key, L.Util.escapeHTML(this.feature.properties[key]).trim()) + } + return table + }, +}) L.U.PopupTemplate.GeoRSSImage = L.U.PopupTemplate.BaseWithTitle.extend({ + options: { + minWidth: 300, + maxWidth: 500, + className: 'umap-popup-large umap-georss-image', + }, - options: { - minWidth: 300, - maxWidth: 500, - className: 'umap-popup-large umap-georss-image' - }, - - renderBody: function () { - var container = L.DomUtil.create('a'); - container.href = this.feature.properties.link; - container.target = '_blank'; - if (this.feature.properties.img) { - var img = L.DomUtil.create('img', '', container); - img.src = this.feature.properties.img; - // Sadly, we are unable to override this from JS the clean way - // See https://github.com/Leaflet/Leaflet/commit/61d746818b99d362108545c151a27f09d60960ee#commitcomment-6061847 - img.style.maxWidth = this.options.maxWidth + 'px'; - img.style.maxHeight = this.options.maxWidth + 'px'; - this.onElementLoaded(img); - } - return container; + renderBody: function () { + const container = L.DomUtil.create('a') + container.href = this.feature.properties.link + container.target = '_blank' + if (this.feature.properties.img) { + const img = L.DomUtil.create('img', '', container) + img.src = this.feature.properties.img + // Sadly, we are unable to override this from JS the clean way + // See https://github.com/Leaflet/Leaflet/commit/61d746818b99d362108545c151a27f09d60960ee#commitcomment-6061847 + img.style.maxWidth = `${this.options.maxWidth}px` + img.style.maxHeight = `${this.options.maxWidth}px` + this.onElementLoaded(img) } - -}); + return container + }, +}) L.U.PopupTemplate.GeoRSSLink = L.U.PopupTemplate.Default.extend({ + options: { + className: 'umap-georss-link', + }, - options: { - className: 'umap-georss-link' - }, - - renderBody: function () { - var title = this.renderTitle(this), - a = L.DomUtil.add('a'); - a.href = this.feature.properties.link; - a.target = '_blank'; - a.appendChild(title); - return a; - } -}); + renderBody: function () { + const title = this.renderTitle(this), + a = L.DomUtil.add('a') + a.href = this.feature.properties.link + a.target = '_blank' + a.appendChild(title) + return a + }, +}) diff --git a/umap/static/umap/js/umap.slideshow.js b/umap/static/umap/js/umap.slideshow.js index e9d42cd4..d385ab87 100644 --- a/umap/static/umap/js/umap.slideshow.js +++ b/umap/static/umap/js/umap.slideshow.js @@ -1,164 +1,165 @@ L.U.Slideshow = L.Class.extend({ + statics: { + CLASSNAME: 'umap-slideshow-active', + }, - statics: { - CLASSNAME: 'umap-slideshow-active' - }, + options: { + delay: 5000, + autoplay: false, + }, - options: { - delay: 5000, - autoplay: false - }, + initialize: function (map, options) { + this.setOptions(options) + this.map = map + this._id = null - initialize: function (map, options) { - this.setOptions(options); - this.map = map; - this._id = null; - var current = null, // current feature - self = this; - try { - Object.defineProperty(this, 'current', { - get: function () { - if (!current) { - var datalayer = this.defaultDatalayer(); - if (datalayer) current = datalayer.getFeatureByIndex(0); - } - return current; - }, - set: function (feature) { - current = feature; - } - }); - } - catch (e) { - // Certainly IE8, which has a limited version of defineProperty - } - try { - Object.defineProperty(this, 'next', { - get: function () { - if (!current) { - return self.current; - } - return current.getNext(); - } - }); - } - catch (e) { - // Certainly IE8, which has a limited version of defineProperty - } - if (this.options.autoplay) { - this.map.onceDataLoaded(function () { - this.play(); - }, this); - } - this.map.on('edit:enabled', function () { - this.stop(); - }, this); - }, + // current feature + let current = null - setOptions: function (options) { - L.setOptions(this, options); - this.timeSpinner(); - }, - - defaultDatalayer: function () { - return this.map.findDataLayer(function (d) { return d.allowBrowse() && d.hasData(); }); - }, - - timeSpinner: function () { - var time = parseInt(this.options.delay, 10); - if (!time) return; - var css = 'rotation ' + time / 1000 + 's infinite linear', - spinners = document.querySelectorAll('.umap-slideshow-toolbox .play .spinner'); - for (var i = 0; i < spinners.length; i++) { - spinners[i].style.animation = css; - spinners[i].style['-webkit-animation'] = css; - spinners[i].style['-moz-animation'] = css; - spinners[i].style['-o-animation'] = css; - } - }, - - resetSpinners: function () { - // Make that animnation is coordinated with user actions - var spinners = document.querySelectorAll('.umap-slideshow-toolbox .play .spinner'), - el, newOne; - for (var i = 0; i < spinners.length; i++) { - el = spinners[i]; - newOne = el.cloneNode(true); - el.parentNode.replaceChild(newOne, el); - } - }, - - play: function () { - if (this._id) return; - if (this.map.editEnabled || !this.map.options.slideshow.active) return; - L.DomUtil.addClass(document.body, L.U.Slideshow.CLASSNAME); - this._id = window.setInterval(L.bind(this.loop, this), this.options.delay); - this.resetSpinners(); - this.loop(); - }, - - loop: function () { - this.current = this.next; - this.step(); - }, - - pause: function () { - if (this._id) { - L.DomUtil.removeClass(document.body, L.U.Slideshow.CLASSNAME); - window.clearInterval(this._id); - this._id = null; - } - }, - - stop: function () { - this.pause(); - this.current = null; - }, - - forward: function () { - this.pause(); - this.current = this.next; - this.step(); - }, - - backward: function () { - this.pause(); - if (this.current) this.current = this.current.getPrevious(); - this.step(); - }, - - step: function () { - if(!this.current) return this.stop(); - this.current.zoomTo({easing: this.options.easing}); - this.current.view(); - }, - - renderToolbox: function (container) { - var box = L.DomUtil.create('ul', 'umap-slideshow-toolbox'), - play = L.DomUtil.create('li', 'play', box), - stop = L.DomUtil.create('li', 'stop', box), - prev = L.DomUtil.create('li', 'prev', box), - next = L.DomUtil.create('li', 'next', box); - L.DomUtil.create('div', 'spinner', play); - play.title = L._('Start slideshow'); - stop.title = L._('Stop slideshow'); - next.title = L._('Zoom to the next'); - prev.title = L._('Zoom to the previous'); - var toggle = function () { - if (this._id) this.pause(); - else this.play(); - }; - L.DomEvent.on(play, 'click', L.DomEvent.stop) - .on(play, 'click', toggle, this); - L.DomEvent.on(stop, 'click', L.DomEvent.stop) - .on(stop, 'click', this.stop, this); - L.DomEvent.on(prev, 'click', L.DomEvent.stop) - .on(prev, 'click', this.backward, this); - L.DomEvent.on(next, 'click', L.DomEvent.stop) - .on(next, 'click', this.forward, this); - container.appendChild(box); - this.timeSpinner(); - return box; + const self = this + try { + Object.defineProperty(this, 'current', { + get: function () { + if (!current) { + const datalayer = this.defaultDatalayer() + if (datalayer) current = datalayer.getFeatureByIndex(0) + } + return current + }, + set: function (feature) { + current = feature + }, + }) + } catch (e) { + // Certainly IE8, which has a limited version of defineProperty } + try { + Object.defineProperty(this, 'next', { + get: function () { + if (!current) { + return self.current + } + return current.getNext() + }, + }) + } catch (e) { + // Certainly IE8, which has a limited version of defineProperty + } + if (this.options.autoplay) { + this.map.onceDataLoaded(function () { + this.play() + }, this) + } + this.map.on( + 'edit:enabled', + function () { + this.stop() + }, + this + ) + }, -}); + setOptions: function (options) { + L.setOptions(this, options) + this.timeSpinner() + }, + + defaultDatalayer: function () { + return this.map.findDataLayer((d) => d.allowBrowse() && d.hasData()) + }, + + timeSpinner: function () { + const time = parseInt(this.options.delay, 10) + if (!time) return + const css = `rotation ${time / 1000}s infinite linear`, + spinners = document.querySelectorAll('.umap-slideshow-toolbox .play .spinner') + for (let i = 0; i < spinners.length; i++) { + spinners[i].style.animation = css + spinners[i].style['-webkit-animation'] = css + spinners[i].style['-moz-animation'] = css + spinners[i].style['-o-animation'] = css + } + }, + + resetSpinners: function () { + // Make that animnation is coordinated with user actions + const spinners = document.querySelectorAll('.umap-slideshow-toolbox .play .spinner') + + let el + let newOne + for (let i = 0; i < spinners.length; i++) { + el = spinners[i] + newOne = el.cloneNode(true) + el.parentNode.replaceChild(newOne, el) + } + }, + + play: function () { + if (this._id) return + if (this.map.editEnabled || !this.map.options.slideshow.active) return + L.DomUtil.addClass(document.body, L.U.Slideshow.CLASSNAME) + this._id = window.setInterval(L.bind(this.loop, this), this.options.delay) + this.resetSpinners() + this.loop() + }, + + loop: function () { + this.current = this.next + this.step() + }, + + pause: function () { + if (this._id) { + L.DomUtil.removeClass(document.body, L.U.Slideshow.CLASSNAME) + window.clearInterval(this._id) + this._id = null + } + }, + + stop: function () { + this.pause() + this.current = null + }, + + forward: function () { + this.pause() + this.current = this.next + this.step() + }, + + backward: function () { + this.pause() + if (this.current) this.current = this.current.getPrevious() + this.step() + }, + + step: function () { + if (!this.current) return this.stop() + this.current.zoomTo({ easing: this.options.easing }) + this.current.view() + }, + + renderToolbox: function (container) { + const box = L.DomUtil.create('ul', 'umap-slideshow-toolbox'), + play = L.DomUtil.create('li', 'play', box), + stop = L.DomUtil.create('li', 'stop', box), + prev = L.DomUtil.create('li', 'prev', box), + next = L.DomUtil.create('li', 'next', box) + L.DomUtil.create('div', 'spinner', play) + play.title = L._('Start slideshow') + stop.title = L._('Stop slideshow') + next.title = L._('Zoom to the next') + prev.title = L._('Zoom to the previous') + const toggle = function () { + if (this._id) this.pause() + else this.play() + } + L.DomEvent.on(play, 'click', L.DomEvent.stop).on(play, 'click', toggle, this) + L.DomEvent.on(stop, 'click', L.DomEvent.stop).on(stop, 'click', this.stop, this) + L.DomEvent.on(prev, 'click', L.DomEvent.stop).on(prev, 'click', this.backward, this) + L.DomEvent.on(next, 'click', L.DomEvent.stop).on(next, 'click', this.forward, this) + container.appendChild(box) + this.timeSpinner() + return box + }, +}) diff --git a/umap/static/umap/js/umap.tableeditor.js b/umap/static/umap/js/umap.tableeditor.js index 66aca2a5..abb0f9cc 100644 --- a/umap/static/umap/js/umap.tableeditor.js +++ b/umap/static/umap/js/umap.tableeditor.js @@ -1,107 +1,124 @@ L.U.TableEditor = L.Class.extend({ + initialize: function (datalayer) { + this.datalayer = datalayer + this.table = L.DomUtil.create('div', 'table') + this.header = L.DomUtil.create('div', 'thead', this.table) + this.body = L.DomUtil.create('div', 'tbody', this.table) + this.resetProperties() + }, - initialize: function (datalayer) { - this.datalayer = datalayer; - this.table = L.DomUtil.create('div', 'table'); - this.header = L.DomUtil.create('div', 'thead', this.table); - this.body = L.DomUtil.create('div', 'tbody', this.table); - this.resetProperties(); - }, - - renderHeaders: function () { - this.header.innerHTML = ''; - for (var i = 0; i < this.properties.length; i++) { - this.renderHeader(this.properties[i]); - } - }, - - renderHeader: function (property) { - var container = L.DomUtil.create('div', 'tcell', this.header), - title = L.DomUtil.add('span', '', container, property), - del = L.DomUtil.create('i', 'umap-delete', container), - rename = L.DomUtil.create('i', 'umap-edit', container); - del.title = L._('Delete this property on all the features'); - rename.title = L._('Rename this property on all the features'); - var doDelete = function () { - if (confirm(L._('Are you sure you want to delete this property on all the features?'))) { - this.datalayer.eachLayer(function (feature) { - feature.deleteProperty(property); - }); - this.datalayer.deindexProperty(property); - this.resetProperties(); - this.edit(); - } - }; - var doRename = function () { - var newName = prompt(L._('Please enter the new name of this property'), property); - if (!newName || !this.validateName(newName)) return; - this.datalayer.eachLayer(function (feature) { - feature.renameProperty(property, newName); - }); - this.datalayer.deindexProperty(property); - this.datalayer.indexProperty(newName); - this.resetProperties(); - this.edit(); - }; - L.DomEvent.on(del, 'click', doDelete, this); - L.DomEvent.on(rename, 'click', doRename, this); - }, - - renderRow: function (feature) { - var builder = new L.U.FormBuilder(feature, this.field_properties, - { - id: 'umap-feature-properties_' + L.stamp(feature), - className: 'trow', - callback: feature.resetTooltip - } - ); - this.body.appendChild(builder.build()); - }, - - compileProperties: function () { - if (this.properties.length === 0) this.properties = ['name']; - // description is a forced textarea, don't edit it in a text input, or you lose cariage returns - if (this.properties.indexOf('description') !== -1) this.properties.splice(this.properties.indexOf('description'), 1); - this.properties.sort(); - this.field_properties = []; - for (var i = 0; i < this.properties.length; i++) { - this.field_properties.push(['properties.' + this.properties[i], {wrapper: 'div', wrapperClass: 'tcell'}]); - } - }, - - resetProperties: function () { - this.properties = this.datalayer._propertiesIndex; - }, - - validateName: function (name) { - if (name.indexOf(".") !== -1) { - this.datalayer.map.ui.alert({content: L._('Invalide property name: {name}', {name: name}), level: 'error'}); - return false; - } - return true; - }, - - edit: function () { - var id = 'tableeditor:edit'; - this.datalayer.map.fire('dataloading', {id: id}); - this.compileProperties(); - this.renderHeaders(); - this.body.innerHTML = ''; - this.datalayer.eachLayer(this.renderRow, this); - var addButton = L.DomUtil.create('li', 'add-property'); - L.DomUtil.create('i', 'umap-icon-16 umap-add', addButton); - var label = L.DomUtil.create('span', '', addButton); - label.textContent = label.title = L._('Add a new property'); - var addProperty = function () { - var newName = prompt(L._('Please enter the name of the property')); - if (!newName || !this.validateName(newName)) return; - this.datalayer.indexProperty(newName); - this.edit(); - }; - L.DomEvent.on(addButton, 'click', addProperty, this); - var className = (this.properties.length > 2) ? 'umap-table-editor fullwidth dark' : 'umap-table-editor dark'; - this.datalayer.map.ui.openPanel({data: {html: this.table}, className: className, actions: [addButton]}); - this.datalayer.map.fire('dataload', {id: id}); + renderHeaders: function () { + this.header.innerHTML = '' + for (let i = 0; i < this.properties.length; i++) { + this.renderHeader(this.properties[i]) } + }, -}); + renderHeader: function (property) { + const container = L.DomUtil.create('div', 'tcell', this.header), + title = L.DomUtil.add('span', '', container, property), + del = L.DomUtil.create('i', 'umap-delete', container), + rename = L.DomUtil.create('i', 'umap-edit', container) + del.title = L._('Delete this property on all the features') + rename.title = L._('Rename this property on all the features') + const doDelete = function () { + if ( + confirm( + L._('Are you sure you want to delete this property on all the features?') + ) + ) { + this.datalayer.eachLayer((feature) => { + feature.deleteProperty(property) + }) + this.datalayer.deindexProperty(property) + this.resetProperties() + this.edit() + } + } + const doRename = function () { + const newName = prompt( + L._('Please enter the new name of this property'), + property + ) + if (!newName || !this.validateName(newName)) return + this.datalayer.eachLayer((feature) => { + feature.renameProperty(property, newName) + }) + this.datalayer.deindexProperty(property) + this.datalayer.indexProperty(newName) + this.resetProperties() + this.edit() + } + L.DomEvent.on(del, 'click', doDelete, this) + L.DomEvent.on(rename, 'click', doRename, this) + }, + + renderRow: function (feature) { + const builder = new L.U.FormBuilder(feature, this.field_properties, { + id: `umap-feature-properties_${L.stamp(feature)}`, + className: 'trow', + callback: feature.resetTooltip, + }) + this.body.appendChild(builder.build()) + }, + + compileProperties: function () { + if (this.properties.length === 0) this.properties = ['name'] + // description is a forced textarea, don't edit it in a text input, or you lose cariage returns + if (this.properties.indexOf('description') !== -1) + this.properties.splice(this.properties.indexOf('description'), 1) + this.properties.sort() + this.field_properties = [] + for (let i = 0; i < this.properties.length; i++) { + this.field_properties.push([ + `properties.${this.properties[i]}`, + { wrapper: 'div', wrapperClass: 'tcell' }, + ]) + } + }, + + resetProperties: function () { + this.properties = this.datalayer._propertiesIndex + }, + + validateName: function (name) { + if (name.indexOf('.') !== -1) { + this.datalayer.map.ui.alert({ + content: L._('Invalide property name: {name}', { name: name }), + level: 'error', + }) + return false + } + return true + }, + + edit: function () { + const id = 'tableeditor:edit' + this.datalayer.map.fire('dataloading', { id: id }) + this.compileProperties() + this.renderHeaders() + this.body.innerHTML = '' + this.datalayer.eachLayer(this.renderRow, this) + const addButton = L.DomUtil.create('li', 'add-property') + L.DomUtil.create('i', 'umap-icon-16 umap-add', addButton) + const label = L.DomUtil.create('span', '', addButton) + label.textContent = label.title = L._('Add a new property') + const addProperty = function () { + const newName = prompt(L._('Please enter the name of the property')) + if (!newName || !this.validateName(newName)) return + this.datalayer.indexProperty(newName) + this.edit() + } + L.DomEvent.on(addButton, 'click', addProperty, this) + const className = + this.properties.length > 2 + ? 'umap-table-editor fullwidth dark' + : 'umap-table-editor dark' + this.datalayer.map.ui.openPanel({ + data: { html: this.table }, + className: className, + actions: [addButton], + }) + this.datalayer.map.fire('dataload', { id: id }) + }, +}) diff --git a/umap/static/umap/js/umap.ui.js b/umap/static/umap/js/umap.ui.js index cb78ca36..acdb0817 100644 --- a/umap/static/umap/js/umap.ui.js +++ b/umap/static/umap/js/umap.ui.js @@ -1,176 +1,209 @@ /* -* Modals -*/ + * Modals + */ L.U.UI = L.Evented.extend({ + ALERTS: Array(), + ALERT_ID: null, + TOOLTIP_ID: null, - ALERTS: Array(), - ALERT_ID: null, - TOOLTIP_ID: null, + initialize: function (parent) { + this.parent = parent + this.container = L.DomUtil.create('div', 'leaflet-ui-container', this.parent) + L.DomEvent.disableClickPropagation(this.container) + L.DomEvent.on(this.container, 'contextmenu', L.DomEvent.stopPropagation) // Do not activate our custom context menu. + L.DomEvent.on(this.container, 'mousewheel', L.DomEvent.stopPropagation) + L.DomEvent.on(this.container, 'MozMousePixelScroll', L.DomEvent.stopPropagation) + this._panel = L.DomUtil.create('div', '', this.container) + this._panel.id = 'umap-ui-container' + this._alert = L.DomUtil.create('div', 'with-transition', this.container) + this._alert.id = 'umap-alert-container' + this._tooltip = L.DomUtil.create('div', '', this.container) + this._tooltip.id = 'umap-tooltip-container' + }, - initialize: function (parent) { - this.parent = parent; - this.container = L.DomUtil.create('div', 'leaflet-ui-container', this.parent); - L.DomEvent.disableClickPropagation(this.container); - L.DomEvent.on(this.container, 'contextmenu', L.DomEvent.stopPropagation); // Do not activate our custom context menu. - L.DomEvent.on(this.container, 'mousewheel', L.DomEvent.stopPropagation); - L.DomEvent.on(this.container, 'MozMousePixelScroll', L.DomEvent.stopPropagation); - this._panel = L.DomUtil.create('div', '', this.container); - this._panel.id = 'umap-ui-container'; - this._alert = L.DomUtil.create('div', 'with-transition', this.container); - this._alert.id = 'umap-alert-container'; - this._tooltip = L.DomUtil.create('div', '', this.container); - this._tooltip.id = 'umap-tooltip-container'; - }, + resetPanelClassName: function () { + this._panel.className = 'with-transition' + }, - resetPanelClassName: function () { - this._panel.className = 'with-transition'; - }, + openPanel: function (e) { + this.fire('panel:open') + // We reset all because we can't know which class has been added + // by previous ui processes... + this.resetPanelClassName() + this._panel.innerHTML = '' + const actionsContainer = L.DomUtil.create('ul', 'toolbox', this._panel) + const body = L.DomUtil.create('div', 'body', this._panel) + if (e.data.html.nodeType && e.data.html.nodeType === 1) + body.appendChild(e.data.html) + else body.innerHTML = e.data.html + const closeLink = L.DomUtil.create('li', 'umap-close-link', actionsContainer) + L.DomUtil.add('i', 'umap-close-icon', closeLink) + const label = L.DomUtil.create('span', '', closeLink) + label.title = label.textContent = L._('Close') + if (e.actions) { + for (let i = 0; i < e.actions.length; i++) { + actionsContainer.appendChild(e.actions[i]) + } + } + if (e.className) L.DomUtil.addClass(this._panel, e.className) + if (L.DomUtil.hasClass(this.parent, 'umap-ui')) { + // Already open. + this.fire('panel:ready') + } else { + L.DomEvent.once( + this._panel, + 'transitionend', + function (e) { + this.fire('panel:ready') + }, + this + ) + L.DomUtil.addClass(this.parent, 'umap-ui') + } + L.DomEvent.on(closeLink, 'click', this.closePanel, this) + }, - openPanel: function (e) { - this.fire('panel:open'); - // We reset all because we can't know which class has been added - // by previous ui processes... - this.resetPanelClassName(); - this._panel.innerHTML = ''; - var actionsContainer = L.DomUtil.create('ul', 'toolbox', this._panel); - var body = L.DomUtil.create('div', 'body', this._panel); - if (e.data.html.nodeType && e.data.html.nodeType === 1) body.appendChild(e.data.html); - else body.innerHTML = e.data.html; - var closeLink = L.DomUtil.create('li', 'umap-close-link', actionsContainer); - L.DomUtil.add('i', 'umap-close-icon', closeLink); - var label = L.DomUtil.create('span', '', closeLink); - label.title = label.textContent = L._('Close'); - if (e.actions) { - for (var i = 0; i < e.actions.length; i++) { - actionsContainer.appendChild(e.actions[i]); - } - } - if (e.className) L.DomUtil.addClass(this._panel, e.className); - if (L.DomUtil.hasClass(this.parent, 'umap-ui')) { - // Already open. - this.fire('panel:ready'); - } else { - L.DomEvent.once(this._panel, 'transitionend', function (e) { - this.fire('panel:ready'); - }, this); - L.DomUtil.addClass(this.parent, 'umap-ui'); - } - L.DomEvent.on(closeLink, 'click', this.closePanel, this); - }, + closePanel: function () { + this.resetPanelClassName() + L.DomUtil.removeClass(this.parent, 'umap-ui') + this.fire('panel:closed') + }, - closePanel: function () { - this.resetPanelClassName(); - L.DomUtil.removeClass(this.parent, 'umap-ui'); - this.fire('panel:closed'); - }, + alert: function (e) { + if (L.DomUtil.hasClass(this.parent, 'umap-alert')) this.ALERTS.push(e) + else this.popAlert(e) + }, - alert: function (e) { - if (L.DomUtil.hasClass(this.parent, 'umap-alert')) this.ALERTS.push(e); - else this.popAlert(e); - }, + popAlert: function (e) { + const self = this + if (!e) { + if (this.ALERTS.length) e = this.ALERTS.pop() + else return + } + let timeoutID + const level_class = e.level && e.level == 'info' ? 'info' : 'error' + this._alert.innerHTML = '' + L.DomUtil.addClass(this.parent, 'umap-alert') + L.DomUtil.addClass(this._alert, level_class) + function close() { + if (timeoutID !== this.ALERT_ID) { + return + } // Another alert has been forced + this._alert.innerHTML = '' + L.DomUtil.removeClass(this.parent, 'umap-alert') + L.DomUtil.removeClass(this._alert, level_class) + if (timeoutID) window.clearTimeout(timeoutID) + this.popAlert() + } + const closeLink = L.DomUtil.create('a', 'umap-close-link', this._alert) + closeLink.href = '#' + L.DomUtil.add('i', 'umap-close-icon', closeLink) + const label = L.DomUtil.create('span', '', closeLink) + label.title = label.textContent = L._('Close') + L.DomEvent.on(closeLink, 'click', L.DomEvent.stop).on( + closeLink, + 'click', + close, + this + ) + L.DomUtil.add('div', '', this._alert, e.content) + if (e.actions) { + let action, el + for (let i = 0; i < e.actions.length; i++) { + action = e.actions[i] + el = L.DomUtil.element('a', { className: 'umap-action' }, this._alert) + el.href = '#' + el.textContent = action.label + L.DomEvent.on(el, 'click', L.DomEvent.stop).on(el, 'click', close, this) + if (action.callback) + L.DomEvent.on( + el, + 'click', + action.callback, + action.callbackContext || this.map + ) + } + } + self.ALERT_ID = timeoutID = window.setTimeout( + L.bind(close, this), + e.duration || 3000 + ) + }, - popAlert: function (e) { - var self = this; - if(!e) { - if (this.ALERTS.length) e = this.ALERTS.pop(); - else return; - } - var timeoutID, - level_class = e.level && e.level == 'info'? 'info': 'error'; - this._alert.innerHTML = ''; - L.DomUtil.addClass(this.parent, 'umap-alert'); - L.DomUtil.addClass(this._alert, level_class); - var close = function () { - if (timeoutID !== this.ALERT_ID) { return;} // Another alert has been forced - this._alert.innerHTML = ''; - L.DomUtil.removeClass(this.parent, 'umap-alert'); - L.DomUtil.removeClass(this._alert, level_class); - if (timeoutID) window.clearTimeout(timeoutID); - this.popAlert(); - }; - var closeLink = L.DomUtil.create('a', 'umap-close-link', this._alert); - closeLink.href = '#'; - L.DomUtil.add('i', 'umap-close-icon', closeLink); - var label = L.DomUtil.create('span', '', closeLink); - label.title = label.textContent = L._('Close'); - L.DomEvent.on(closeLink, 'click', L.DomEvent.stop) - .on(closeLink, 'click', close, this); - L.DomUtil.add('div', '', this._alert, e.content); - if (e.actions) { - var action, el; - for (var i = 0; i < e.actions.length; i++) { - action = e.actions[i]; - el = L.DomUtil.element('a', {'className': 'umap-action'}, this._alert); - el.href = '#'; - el.textContent = action.label; - L.DomEvent.on(el, 'click', L.DomEvent.stop) - .on(el, 'click', close, this); - if (action.callback) L.DomEvent.on(el, 'click', action.callback, action.callbackContext || this.map); - } - } - self.ALERT_ID = timeoutID = window.setTimeout(L.bind(close, this), e.duration || 3000); - }, + tooltip: function (e) { + this.TOOLTIP_ID = Math.random() + const id = this.TOOLTIP_ID + L.DomUtil.addClass(this.parent, 'umap-tooltip') + if (e.anchor && e.position === 'top') this.anchorTooltipTop(e.anchor) + else if (e.anchor && e.position === 'left') this.anchorTooltipLeft(e.anchor) + else this.anchorTooltipAbsolute() + this._tooltip.innerHTML = e.content + function closeIt() { + this.closeTooltip(id) + } + if (e.anchor) L.DomEvent.once(e.anchor, 'mouseout', closeIt, this) + if (e.duration !== Infinity) + window.setTimeout(L.bind(closeIt, this), e.duration || 3000) + }, - tooltip: function (e) { - this.TOOLTIP_ID = Math.random(); - var id = this.TOOLTIP_ID; - L.DomUtil.addClass(this.parent, 'umap-tooltip'); - if (e.anchor && e.position === 'top') this.anchorTooltipTop(e.anchor); - else if (e.anchor && e.position === 'left') this.anchorTooltipLeft(e.anchor); - else this.anchorTooltipAbsolute(); - this._tooltip.innerHTML = e.content; - function closeIt () { this.closeTooltip(id); } - if (e.anchor) L.DomEvent.once(e.anchor, 'mouseout', closeIt, this); - if (e.duration !== Infinity) window.setTimeout(L.bind(closeIt, this), e.duration || 3000); - }, + anchorTooltipAbsolute: function () { + this._tooltip.className = '' + const left = + this.parent.offsetLeft + + this.parent.clientWidth / 2 - + this._tooltip.clientWidth / 2, + top = this.parent.offsetTop + 75 + this.setTooltipPosition({ top: top, left: left }) + }, - anchorTooltipAbsolute: function () { - this._tooltip.className = ''; - var left = this.parent.offsetLeft + (this.parent.clientWidth / 2) - (this._tooltip.clientWidth / 2), - top = this.parent.offsetTop + 75; - this.setTooltipPosition({top: top, left: left}); - }, + anchorTooltipTop: function (el) { + this._tooltip.className = 'tooltip-top' + const coords = this.getPosition(el) + this.setTooltipPosition({ + left: coords.left - 10, + bottom: this.getDocHeight() - coords.top + 11, + }) + }, - anchorTooltipTop: function (el) { - this._tooltip.className = 'tooltip-top'; - var coords = this.getPosition(el); - this.setTooltipPosition({left: coords.left - 10, bottom: this.getDocHeight() - coords.top + 11}); - }, + anchorTooltipLeft: function (el) { + this._tooltip.className = 'tooltip-left' + const coords = this.getPosition(el) + this.setTooltipPosition({ + top: coords.top, + right: document.documentElement.offsetWidth - coords.left + 11, + }) + }, - anchorTooltipLeft: function (el) { - this._tooltip.className = 'tooltip-left'; - var coords = this.getPosition(el); - this.setTooltipPosition({top: coords.top, right: document.documentElement.offsetWidth - coords.left + 11}); - }, + closeTooltip: function (id) { + if (id && id !== this.TOOLTIP_ID) return + this._tooltip.innerHTML = '' + L.DomUtil.removeClass(this.parent, 'umap-tooltip') + }, - closeTooltip: function (id) { - if (id && id !== this.TOOLTIP_ID) return; - this._tooltip.innerHTML = ''; - L.DomUtil.removeClass(this.parent, 'umap-tooltip'); - }, + getPosition: function (el) { + return el.getBoundingClientRect() + }, - getPosition: function (el) { - return el.getBoundingClientRect(); - }, + setTooltipPosition: function (coords) { + if (coords.left) this._tooltip.style.left = `${coords.left}px` + else this._tooltip.style.left = 'initial' + if (coords.right) this._tooltip.style.right = `${coords.right}px` + else this._tooltip.style.right = 'initial' + if (coords.top) this._tooltip.style.top = `${coords.top}px` + else this._tooltip.style.top = 'initial' + if (coords.bottom) this._tooltip.style.bottom = `${coords.bottom}px` + else this._tooltip.style.bottom = 'initial' + }, - setTooltipPosition: function (coords) { - if (coords.left) this._tooltip.style.left = coords.left + 'px'; - else this._tooltip.style.left = 'initial'; - if (coords.right) this._tooltip.style.right = coords.right + 'px'; - else this._tooltip.style.right = 'initial'; - if (coords.top) this._tooltip.style.top = coords.top + 'px'; - else this._tooltip.style.top = 'initial'; - if (coords.bottom) this._tooltip.style.bottom = coords.bottom + 'px'; - else this._tooltip.style.bottom = 'initial'; - }, - - getDocHeight: function () { - var D = document; - return Math.max( - D.body.scrollHeight, D.documentElement.scrollHeight, - D.body.offsetHeight, D.documentElement.offsetHeight, - D.body.clientHeight, D.documentElement.clientHeight - ); - }, - -}); + getDocHeight: function () { + const D = document + return Math.max( + D.body.scrollHeight, + D.documentElement.scrollHeight, + D.body.offsetHeight, + D.documentElement.offsetHeight, + D.body.clientHeight, + D.documentElement.clientHeight + ) + }, +}) diff --git a/umap/static/umap/js/umap.xhr.js b/umap/static/umap/js/umap.xhr.js index 126f61a9..8b9dd29f 100644 --- a/umap/static/umap/js/umap.xhr.js +++ b/umap/static/umap/js/umap.xhr.js @@ -1,285 +1,296 @@ L.U.Xhr = L.Evented.extend({ + initialize: function (ui) { + this.ui = ui + }, - initialize: function (ui) { - this.ui = ui; - }, - - _wrapper: function () { - var wrapper; - if (window.XMLHttpRequest === undefined) { - wrapper = function() { - try { - return new window.ActiveXObject('Microsoft.XMLHTTP.6.0'); - } - catch (e1) { - try { - return new window.ActiveXObject('Microsoft.XMLHTTP.3.0'); - } - catch (e2) { - throw new Error('XMLHttpRequest is not supported'); - } - } - }; - } - else { - wrapper = window.XMLHttpRequest; - } - return new wrapper(); - }, - - _ajax: function (settings) { - var xhr = this._wrapper(), id = Math.random(), self = this; - this.fire('dataloading', {id: id}); - var loaded = function () {self.fire('dataload', {id: id});}; - + _wrapper: function () { + let wrapper + if (window.XMLHttpRequest === undefined) { + wrapper = () => { try { - xhr.open(settings.verb, settings.uri, true); - } catch (err) { - // Unknown protocol? - this.ui.alert({content: L._('Error while fetching {url}', {url: settings.uri}), level: 'error'}); - loaded(); - return + return new window.ActiveXObject('Microsoft.XMLHTTP.6.0') + } catch (e1) { + try { + return new window.ActiveXObject('Microsoft.XMLHTTP.3.0') + } catch (e2) { + throw new Error('XMLHttpRequest is not supported') + } } + } + } else { + wrapper = window.XMLHttpRequest + } + return new wrapper() + }, - if (settings.uri.indexOf('http') !== 0 || settings.uri.indexOf(window.location.origin) === 0) { - // "X-" mode headers cause the request to be in preflight mode, - // we don"t want that by default for CORS requests - xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); - } - if (settings.headers) { - for (var name in settings.headers) { - xhr.setRequestHeader(name, settings.headers[name]); - } - } - - - xhr.onreadystatechange = function() { - if (xhr.readyState === 4) { - if (xhr.status == 200) { - settings.callback.call(settings.context || xhr, xhr.responseText, xhr); - } - else if (xhr.status === 403) { - self.ui.alert({content: xhr.responseText || L._('Action not allowed :('), level: 'error'}); - } - else if (xhr.status === 412) { - var msg = L._('Woops! Someone else seems to have edited the data. You can save anyway, but this will erase the changes made by others.'); - var actions = [ - { - label: L._('Save anyway'), - callback: function () { - delete settings.headers['If-Match']; - self._ajax(settings); - }, - callbackContext: self - }, - { - label: L._('Cancel') - } - ]; - self.ui.alert({content: msg, level: 'error', duration: 100000, actions: actions}); - } - else { - if (xhr.status !== 0) { // 0 === request cut by user - self.ui.alert({'content': L._('Problem in the response'), 'level': 'error'}); - } - } - loaded(); - } - }; - - try { - xhr.send(settings.data); - } catch (e) { - // Pass - loaded(); - console.error('Bad Request', e); - } - }, - - // supports only JSON as response data type - _json: function (verb, uri, options) { - var args = arguments, - self = this; - var default_options = { - 'async': true, - 'callback': null, - 'responseType': 'text', - 'data': null, - 'listen_form': null // optional form to listen in default callback - }; - var settings = L.Util.extend({}, default_options, options); - - if (verb === 'POST') { - // find a way not to make this django specific - var token = document.cookie.replace(/(?:(?:^|.*;\s*)csrftoken\s*\=\s*([^;]*).*$)|^.*$/, '$1'); - if (token) { - settings.headers = settings.headers || {}; - settings.headers['X-CSRFToken'] = token; - } - } - - var callback = function(responseText, response) { - var data; - try { - data = JSON.parse(responseText); - } - catch (err) { - console.log(err); - self.ui.alert({content: L._('Problem in the response format'), level: 'error'}); - return; - } - if (data.errors) { - console.log(data.errors); - self.ui.alert({content: L._('An error occured'), level: 'error'}); - } else if (data.login_required) { - // login_required should be an URL for the login form - if (settings.login_callback) settings.login_callback(data); - else self.login(data, args); - } - else { - if (settings.callback) L.bind(settings.callback, settings.context || this)(data, response); - else self.default_callback(data, settings, response); - } - }; - - this._ajax({ - verb: verb, - uri: uri, - data: settings.data, - callback: callback, - headers: settings.headers, - listener: settings.listener - }); - }, - - get: function(uri, options) { - this._json('GET', uri, options); - }, - - post: function(uri, options) { - this._json('POST', uri, options); - }, - - submit_form: function(form_id, options) { - if(typeof options === 'undefined') options = {}; - var form = L.DomUtil.get(form_id); - var formData = new FormData(form); - if(options.extraFormData) formData.append(options.extraFormData); - options.data = formData; - this.post(form.action, options); - return false; - }, - - listen_form: function (form_id, options) { - var form = L.DomUtil.get(form_id), self = this; - if (!form) return; - L.DomEvent - .on(form, 'submit', L.DomEvent.stopPropagation) - .on(form, 'submit', L.DomEvent.preventDefault) - .on(form, 'submit', function () { - self.submit_form(form_id, options); - }); - }, - - listen_link: function (link_id, options) { - var link = L.DomUtil.get(link_id), self = this; - if (link) { - L.DomEvent - .on(link, 'click', L.DomEvent.stop) - .on(link, 'click', function () { - if (options.confirm && !confirm(options.confirm)) { return;} - self.get(link.href, options); - }); - } - }, - - default_callback: function (data, options) { - // default callback, to avoid boilerplate - if (data.redirect) { - var newPath = data.redirect; - if (window.location.pathname == newPath) window.location.reload(); // Keep the hash, so the current view - else window.location = newPath; - } - else if (data.info) { - this.ui.alert({content: data.info, level: 'info'}); - this.ui.closePanel(); - } - else if (data.error) { - this.ui.alert({content: data.error, level: 'error'}); - } - else if (data.html) { - var ui_options = {'data': data}, - listen_options; - if (options.className) ui_options.className = options.className; - this.ui.openPanel(ui_options); - // To low boilerplate, if there is a form, listen it - if (options.listen_form) { - // Listen form again - listen_options = L.Util.extend({}, options, options.listen_form.options); - this.listen_form(options.listen_form.id, listen_options); - } - if (options.listen_link) { - for (var i=0, l=options.listen_link.length; i { + self.fire('dataload', { id: id }) } -}); + try { + xhr.open(settings.verb, settings.uri, true) + } catch (err) { + // Unknown protocol? + this.ui.alert({ + content: L._('Error while fetching {url}', { url: settings.uri }), + level: 'error', + }) + loaded() + return + } + + if ( + settings.uri.indexOf('http') !== 0 || + settings.uri.indexOf(window.location.origin) === 0 + ) { + // "X-" mode headers cause the request to be in preflight mode, + // we don"t want that by default for CORS requests + xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest') + } + if (settings.headers) { + for (const name in settings.headers) { + xhr.setRequestHeader(name, settings.headers[name]) + } + } + + xhr.onreadystatechange = () => { + if (xhr.readyState === 4) { + if (xhr.status == 200) { + settings.callback.call(settings.context || xhr, xhr.responseText, xhr) + } else if (xhr.status === 403) { + self.ui.alert({ + content: xhr.responseText || L._('Action not allowed :('), + level: 'error', + }) + } else if (xhr.status === 412) { + const msg = L._( + 'Woops! Someone else seems to have edited the data. You can save anyway, but this will erase the changes made by others.' + ) + const actions = [ + { + label: L._('Save anyway'), + callback: function () { + delete settings.headers['If-Match'] + self._ajax(settings) + }, + callbackContext: self, + }, + { + label: L._('Cancel'), + }, + ] + self.ui.alert({ + content: msg, + level: 'error', + duration: 100000, + actions: actions, + }) + } else { + if (xhr.status !== 0) { + // 0 === request cut by user + self.ui.alert({ content: L._('Problem in the response'), level: 'error' }) + } + } + loaded() + } + } + + try { + xhr.send(settings.data) + } catch (e) { + // Pass + loaded() + console.error('Bad Request', e) + } + }, + + // supports only JSON as response data type + _json: function (verb, uri, options) { + const args = arguments, + self = this + const default_options = { + async: true, + callback: null, + responseType: 'text', + data: null, + listen_form: null, // optional form to listen in default callback + } + const settings = L.Util.extend({}, default_options, options) + + if (verb === 'POST') { + // find a way not to make this django specific + const token = document.cookie.replace( + /(?:(?:^|.*;\s*)csrftoken\s*\=\s*([^;]*).*$)|^.*$/, + '$1' + ) + if (token) { + settings.headers = settings.headers || {} + settings.headers['X-CSRFToken'] = token + } + } + + const callback = function (responseText, response) { + let data + try { + data = JSON.parse(responseText) + } catch (err) { + console.log(err) + self.ui.alert({ + content: L._('Problem in the response format'), + level: 'error', + }) + return + } + if (data.errors) { + console.log(data.errors) + self.ui.alert({ content: L._('An error occured'), level: 'error' }) + } else if (data.login_required) { + // login_required should be an URL for the login form + if (settings.login_callback) settings.login_callback(data) + else self.login(data, args) + } else { + if (settings.callback) + L.bind(settings.callback, settings.context || this)(data, response) + else self.default_callback(data, settings, response) + } + } + + this._ajax({ + verb: verb, + uri: uri, + data: settings.data, + callback: callback, + headers: settings.headers, + listener: settings.listener, + }) + }, + + get: function (uri, options) { + this._json('GET', uri, options) + }, + + post: function (uri, options) { + this._json('POST', uri, options) + }, + + submit_form: function (form_id, options) { + if (typeof options === 'undefined') options = {} + const form = L.DomUtil.get(form_id) + const formData = new FormData(form) + if (options.extraFormData) formData.append(options.extraFormData) + options.data = formData + this.post(form.action, options) + return false + }, + + listen_form: function (form_id, options) { + const form = L.DomUtil.get(form_id), + self = this + if (!form) return + L.DomEvent.on(form, 'submit', L.DomEvent.stopPropagation) + .on(form, 'submit', L.DomEvent.preventDefault) + .on(form, 'submit', () => { + self.submit_form(form_id, options) + }) + }, + + listen_link: function (link_id, options) { + const link = L.DomUtil.get(link_id), + self = this + if (link) { + L.DomEvent.on(link, 'click', L.DomEvent.stop).on(link, 'click', () => { + if (options.confirm && !confirm(options.confirm)) { + return + } + self.get(link.href, options) + }) + } + }, + + default_callback: function (data, options) { + // default callback, to avoid boilerplate + if (data.redirect) { + const newPath = data.redirect + if (window.location.pathname == newPath) + window.location.reload() // Keep the hash, so the current view + else window.location = newPath + } else if (data.info) { + this.ui.alert({ content: data.info, level: 'info' }) + this.ui.closePanel() + } else if (data.error) { + this.ui.alert({ content: data.error, level: 'error' }) + } else if (data.html) { + const ui_options = { data: data } + let listen_options + if (options.className) ui_options.className = options.className + this.ui.openPanel(ui_options) + // To low boilerplate, if there is a form, listen it + if (options.listen_form) { + // Listen form again + listen_options = L.Util.extend({}, options, options.listen_form.options) + this.listen_form(options.listen_form.id, listen_options) + } + if (options.listen_link) { + for (let i = 0, l = options.listen_link.length; i < l; i++) { + // Listen link again + listen_options = L.Util.extend({}, options, options.listen_link[i].options) + this.listen_link(options.listen_link[i].id, listen_options) + } + } + } else if (options.success) { + // Success is called only if data contain no msg and no html + options.success(data) + } + }, + + login: function (data, args) { + // data.html: login form + // args: args of the first _json call, to call again at process end + const self = this + const proceed = () => { + self.ui.closePanel() + if (typeof args !== 'undefined') self._json.apply(self, args) + else self.default_callback(data, {}) + } + const ask_for_login = (data) => { + self.ui.openPanel({ data: data, className: 'login-panel' }) + self.listen_form('login_form', { + callback: function (data) { + if (data.html) ask_for_login(data) // Problem in the login - ask again + else proceed() + }, + }) + // Auth links + const links = document.getElementsByClassName('umap-login-popup') + Object.keys(links).forEach((el) => { + const link = links[el] + L.DomEvent.on(link, 'click', L.DomEvent.stop).on(link, 'click', () => { + self.ui.closePanel() + const win = window.open(link.href) + window.umap_proceed = () => { + proceed() + win.close() + } + }) + }) + } + if (data.login_required) { + this.get(data.login_required, { + callback: function (data) { + ask_for_login(data) + }, + }) + } else { + ask_for_login(data) + } + }, + + logout: function (url) { + this.get(url) + }, +}) diff --git a/umap/static/umap/locale/am_ET.js b/umap/static/umap/locale/am_ET.js index 559e67a5..f2410feb 100644 --- a/umap/static/umap/locale/am_ET.js +++ b/umap/static/umap/locale/am_ET.js @@ -1,7 +1,7 @@ -var locale = { +const locale = { "Add symbol": "ምልክት ጨምር", "Allow scroll wheel zoom?": "በማውሱ መሀከለኛ ተሽከርካሪ ማጉላት ይፈቀድ?", - "Automatic": "Automatic", + "Automatic": ".", "Ball": "ኳስ", "Cancel": "አቁም/ሰርዝ", "Caption": "ካፕሽን", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "ላሁኑ ብዝሀ ፖሊጎን ጨምር", "Advanced actions": "ተጨማሪ ተግባራት", "Advanced properties": "ተጨማሪ ባህርያት", - "Advanced transition": "Advanced transition", "All properties are imported.": "ሁሉም ባህርያት መጥተዋል", "Allow interactions": "Allow interactions", "An error occured": "ስህተት ተፈጥሯል", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "በእያንዳንዱ የዙም መጠን ፖሊላይኑን ምን ያህል ያቃልል (ብዙ = ጥሩ አገልግሎት እና ጥሩ መልክ፣ ትንሽ = ይበልጥ ትክክለኛ)", "If false, the polygon will act as a part of the underlying map.": "ስህተት ከሆነ ፖሊጎኑ ከስር እንደተነጠፈ ካርታ ያገለግላል", - "Iframe export options": "የፍሬም ኤክስፖርት ምርጫዎች", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "|ፍሬሙ ከተሻሻለ ቁመት ጋር (በፒክሰል)፡ {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "|ፍሬም፡ {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "ሌየሩን አሳይ/ደብቅ", "Simple link: [[http://example.com]]": "ቀላል መገኛ: [[http://example.com]]", "Slideshow": "ስላይድሾው", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "መስመሩን ክፈል", "Start a hole here": "እዚህ ጋር ቀዳዳ ጀምር", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "ስላይድሾውን አስቁም", "Supported scheme": "የሚደገፉ ስኪሞች", "Supported variables that will be dynamically replaced": "ዳይናሚካሊ የሚቀየሩ የሚደገፉ ቫርያብሎች", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "ቲ.ኤም.ኤስ. ፎርማት", "Text color for the cluster label": "የክላስተሩን ሌብ ፅሑፍ ከለር", "Text formatting": "ፅሁፍ ማስተካከያ", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "ዙሙ እና መሀከሉ ተወስነዋል", "To use if remote server doesn't allow cross domain (slower)": "ሪሞት ሰርቨሩ የዶሜይን ልውውጥን የማይፈቅድ ከሆነ ይህን ለመጠቀም (አዝጋሚ)", "To zoom": "ለማጉላት", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("am_ET", locale); -L.setLocale("am_ET"); \ No newline at end of file +L.registerLocale("am_ET", locale) +L.setLocale("am_ET") diff --git a/umap/static/umap/locale/am_ET.json b/umap/static/umap/locale/am_ET.json index 285e8519..4f616c54 100644 --- a/umap/static/umap/locale/am_ET.json +++ b/umap/static/umap/locale/am_ET.json @@ -1,7 +1,7 @@ { "Add symbol": "ምልክት ጨምር", "Allow scroll wheel zoom?": "በማውሱ መሀከለኛ ተሽከርካሪ ማጉላት ይፈቀድ?", - "Automatic": "Automatic", + "Automatic": ".", "Ball": "ኳስ", "Cancel": "አቁም/ሰርዝ", "Caption": "ካፕሽን", @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "ላሁኑ ብዝሀ ፖሊጎን ጨምር", "Advanced actions": "ተጨማሪ ተግባራት", "Advanced properties": "ተጨማሪ ባህርያት", - "Advanced transition": "Advanced transition", "All properties are imported.": "ሁሉም ባህርያት መጥተዋል", "Allow interactions": "Allow interactions", "An error occured": "ስህተት ተፈጥሯል", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "በእያንዳንዱ የዙም መጠን ፖሊላይኑን ምን ያህል ያቃልል (ብዙ = ጥሩ አገልግሎት እና ጥሩ መልክ፣ ትንሽ = ይበልጥ ትክክለኛ)", "If false, the polygon will act as a part of the underlying map.": "ስህተት ከሆነ ፖሊጎኑ ከስር እንደተነጠፈ ካርታ ያገለግላል", - "Iframe export options": "የፍሬም ኤክስፖርት ምርጫዎች", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "|ፍሬሙ ከተሻሻለ ቁመት ጋር (በፒክሰል)፡ {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "|ፍሬም፡ {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "ሌየሩን አሳይ/ደብቅ", "Simple link: [[http://example.com]]": "ቀላል መገኛ: [[http://example.com]]", "Slideshow": "ስላይድሾው", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "መስመሩን ክፈል", "Start a hole here": "እዚህ ጋር ቀዳዳ ጀምር", @@ -279,12 +276,10 @@ "Stop slideshow": "ስላይድሾውን አስቁም", "Supported scheme": "የሚደገፉ ስኪሞች", "Supported variables that will be dynamically replaced": "ዳይናሚካሊ የሚቀየሩ የሚደገፉ ቫርያብሎች", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "ቲ.ኤም.ኤስ. ፎርማት", "Text color for the cluster label": "የክላስተሩን ሌብ ፅሑፍ ከለር", "Text formatting": "ፅሁፍ ማስተካከያ", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "ዙሙ እና መሀከሉ ተወስነዋል", "To use if remote server doesn't allow cross domain (slower)": "ሪሞት ሰርቨሩ የዶሜይን ልውውጥን የማይፈቅድ ከሆነ ይህን ለመጠቀም (አዝጋሚ)", "To zoom": "ለማጉላት", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/ar.js b/umap/static/umap/locale/ar.js index c8f14764..22a9004c 100644 --- a/umap/static/umap/locale/ar.js +++ b/umap/static/umap/locale/ar.js @@ -1,19 +1,19 @@ -var locale = { - "Add symbol": "أضف رمز", - "Allow scroll wheel zoom?": "Allow scroll wheel zoom?", - "Automatic": "Automatic", - "Ball": "Ball", - "Cancel": "Cancel", - "Caption": "Caption", - "Change symbol": "غيّر رمز", - "Choose the data format": "إختر شكل البيانات", - "Choose the layer of the feature": "Choose the layer of the feature", +const locale = { + "Add symbol": "أضف رمزًا", + "Allow scroll wheel zoom?": "السماح بالتكبير بتمرير عجلة الفأرة؟", + "Automatic": "تلقائي", + "Ball": "كرة", + "Cancel": "إلغاء", + "Caption": "شرح", + "Change symbol": "غيّر الرمز", + "Choose the data format": "اختر تنسيق البيانات", + "Choose the layer of the feature": "اختر طبقة الشكل", "Circle": "دائرة", - "Clustered": "Clustered", - "Data browser": "Data browser", - "Default": "Default", - "Default zoom level": "Default zoom level", - "Default: name": "Default: name", + "Clustered": "متجمع", + "Data browser": "متصفح البيانات", + "Default": "افتراضي", + "Default zoom level": "مستوى التكبير الافتراضي", + "Default: name": "اسم: افتراضي", "Display label": "Display label", "Display the control to open OpenStreetMap editor": "Display the control to open OpenStreetMap editor", "Display the data layers control": "Display the data layers control", @@ -92,13 +92,12 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "يسمح بالتفاعل", "An error occured": "حصل خطأ", - "Are you sure you want to cancel your changes?": "هل تريد فعلاً إلغاء تغييراتك ؟ ", + "Are you sure you want to cancel your changes?": "هل تريد فعلاً إلغاء تغييراتك ؟", "Are you sure you want to clone this map and all its datalayers?": "Are you sure you want to clone this map and all its datalayers?", - "Are you sure you want to delete the feature?": "هل تريد فعلاً حذف الخاصية ؟ ", + "Are you sure you want to delete the feature?": "هل تريد فعلاً حذف الخاصية ؟", "Are you sure you want to delete this layer?": "هل تريد فعلاً حذف هذه الطبقة ؟", "Are you sure you want to delete this map?": "هل تريد فعلاً حذف هذه الخريطة ؟", "Are you sure you want to delete this property on all the features?": "Are you sure you want to delete this property on all the features?", @@ -190,7 +189,6 @@ var locale = { "Home": "الصفحة الرئيسية", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "ساعة", "5 min": "5 دقائق", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("ar", locale); -L.setLocale("ar"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("ar", locale) +L.setLocale("ar") diff --git a/umap/static/umap/locale/ar.json b/umap/static/umap/locale/ar.json index 191799fb..ad7f599b 100644 --- a/umap/static/umap/locale/ar.json +++ b/umap/static/umap/locale/ar.json @@ -1,19 +1,19 @@ { - "Add symbol": "أضف رمز", - "Allow scroll wheel zoom?": "Allow scroll wheel zoom?", - "Automatic": "Automatic", - "Ball": "Ball", - "Cancel": "Cancel", - "Caption": "Caption", - "Change symbol": "غيّر رمز", - "Choose the data format": "إختر شكل البيانات", - "Choose the layer of the feature": "Choose the layer of the feature", + "Add symbol": "أضف رمزًا", + "Allow scroll wheel zoom?": "السماح بالتكبير بتمرير عجلة الفأرة؟", + "Automatic": "تلقائي", + "Ball": "كرة", + "Cancel": "إلغاء", + "Caption": "شرح", + "Change symbol": "غيّر الرمز", + "Choose the data format": "اختر تنسيق البيانات", + "Choose the layer of the feature": "اختر طبقة الشكل", "Circle": "دائرة", - "Clustered": "Clustered", - "Data browser": "Data browser", - "Default": "Default", - "Default zoom level": "Default zoom level", - "Default: name": "Default: name", + "Clustered": "متجمع", + "Data browser": "متصفح البيانات", + "Default": "افتراضي", + "Default zoom level": "مستوى التكبير الافتراضي", + "Default: name": "اسم: افتراضي", "Display label": "Display label", "Display the control to open OpenStreetMap editor": "Display the control to open OpenStreetMap editor", "Display the data layers control": "Display the data layers control", @@ -92,13 +92,12 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "يسمح بالتفاعل", "An error occured": "حصل خطأ", - "Are you sure you want to cancel your changes?": "هل تريد فعلاً إلغاء تغييراتك ؟ ", + "Are you sure you want to cancel your changes?": "هل تريد فعلاً إلغاء تغييراتك ؟", "Are you sure you want to clone this map and all its datalayers?": "Are you sure you want to clone this map and all its datalayers?", - "Are you sure you want to delete the feature?": "هل تريد فعلاً حذف الخاصية ؟ ", + "Are you sure you want to delete the feature?": "هل تريد فعلاً حذف الخاصية ؟", "Are you sure you want to delete this layer?": "هل تريد فعلاً حذف هذه الطبقة ؟", "Are you sure you want to delete this map?": "هل تريد فعلاً حذف هذه الخريطة ؟", "Are you sure you want to delete this property on all the features?": "Are you sure you want to delete this property on all the features?", @@ -190,7 +189,6 @@ "Home": "الصفحة الرئيسية", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "ساعة", "5 min": "5 دقائق", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/ast.js b/umap/static/umap/locale/ast.js index 88991ad9..5159ca63 100644 --- a/umap/static/umap/locale/ast.js +++ b/umap/static/umap/locale/ast.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Add symbol", "Allow scroll wheel zoom?": "Allow scroll wheel zoom?", "Automatic": "Automatic", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("ast", locale); -L.setLocale("ast"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("ast", locale) +L.setLocale("ast") diff --git a/umap/static/umap/locale/ast.json b/umap/static/umap/locale/ast.json index f111f462..f88450e3 100644 --- a/umap/static/umap/locale/ast.json +++ b/umap/static/umap/locale/ast.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/bg.js b/umap/static/umap/locale/bg.js index dbd9ce4e..69ed2e77 100644 --- a/umap/static/umap/locale/bg.js +++ b/umap/static/umap/locale/bg.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Добави символ", "Allow scroll wheel zoom?": "Мащабиране с колелцето на мишката?", "Automatic": "Автоматично", @@ -47,9 +47,9 @@ var locale = { "On the top": "Отгоре", "Popup content template": "Popup content template", "Set symbol": "Set symbol", - "Side panel": "Side panel", + "Side panel": "Страничен панел", "Simplify": "Опрости", - "Symbol or url": "Symbol or url", + "Symbol or url": "Символ или URL", "Table": "Table", "always": "винаги", "clear": "изчисти", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Разширено действия", "Advanced properties": "Разширени свойства", - "Advanced transition": "Advanced transition", "All properties are imported.": "Всички свойства са внесени.", "Allow interactions": "Allow interactions", "An error occured": "Възникна грешка", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Колко да опрости полилинията на всяко ниво увеличение (повече = по-добра производителност и по-гладко на вид, по-малко = по-точно)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "вградена рамка,възможности за износ", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Покажи / скрий слой", "Simple link: [[http://example.com]]": "проста връзка:[[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Поддържана схема", "Supported variables that will be dynamically replaced": "Поддържаните променливи, които ще бъдат динамично заменени", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS формат", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "форматиране на текст", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been setted.": "The zoom and center have been setted.", "To use if remote server doesn't allow cross domain (slower)": "За да се използва, ако отдалечен сървър не позволява кръстосан домейн (по-бавно)", "To zoom": "За да увеличите", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("bg", locale); -L.setLocale("bg"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("bg", locale) +L.setLocale("bg") diff --git a/umap/static/umap/locale/bg.json b/umap/static/umap/locale/bg.json index 238abc08..794eaafe 100644 --- a/umap/static/umap/locale/bg.json +++ b/umap/static/umap/locale/bg.json @@ -47,9 +47,9 @@ "On the top": "Отгоре", "Popup content template": "Popup content template", "Set symbol": "Set symbol", - "Side panel": "Side panel", + "Side panel": "Страничен панел", "Simplify": "Опрости", - "Symbol or url": "Symbol or url", + "Symbol or url": "Символ или URL", "Table": "Table", "always": "винаги", "clear": "изчисти", @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Разширено действия", "Advanced properties": "Разширени свойства", - "Advanced transition": "Advanced transition", "All properties are imported.": "Всички свойства са внесени.", "Allow interactions": "Allow interactions", "An error occured": "Възникна грешка", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Колко да опрости полилинията на всяко ниво увеличение (повече = по-добра производителност и по-гладко на вид, по-малко = по-точно)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "вградена рамка,възможности за износ", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Покажи / скрий слой", "Simple link: [[http://example.com]]": "проста връзка:[[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Поддържана схема", "Supported variables that will be dynamically replaced": "Поддържаните променливи, които ще бъдат динамично заменени", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS формат", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "форматиране на текст", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been setted.": "The zoom and center have been setted.", "To use if remote server doesn't allow cross domain (slower)": "За да се използва, ако отдалечен сървър не позволява кръстосан домейн (по-бавно)", "To zoom": "За да увеличите", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/ca.js b/umap/static/umap/locale/ca.js index 3d67a5c0..d3389087 100644 --- a/umap/static/umap/locale/ca.js +++ b/umap/static/umap/locale/ca.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Afegeix un símbol", "Allow scroll wheel zoom?": "Voleu permetre el zoom amb la roda de desplaçament?", "Automatic": "Automatic", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Opcions avançades", "Advanced properties": "Propietats avançades", - "Advanced transition": "Advanced transition", "All properties are imported.": "S'han importat totes les propietats", "Allow interactions": "Allow interactions", "An error occured": "S'ha produït un error", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Opcions de l'exportació iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Mostra/amaga la capa", "Simple link: [[http://example.com]]": "Enllaç simple: [[http://exemple.com]]", "Slideshow": "Presentació", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Atura la presentació", "Supported scheme": "Esquema suportat", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "El símbol pot ser qualsevol caràcter Unicode o un URL. Podeu usar propietats de característiques com a variables. P. ex: amb \"http://myserver.org/images/{name}.png\", la variable {name} se substituirà amb el valor de \"name\" de cada marcador.", "TMS format": "Format TMS", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Format del text", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "S'han establert l'escala i el centre.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "A l'escala", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "milles", "nautical miles": "miles nàutiques", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} milles", - "{distance} yd": "{distance} yd", "1 day": "1 dia", "1 hour": "1 hora", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Opcional.", "Paste your data here": "Enganxeu les dades aquí", "Please save the map first": "Abans deseu el mapa", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("ca", locale); -L.setLocale("ca"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("ca", locale) +L.setLocale("ca") diff --git a/umap/static/umap/locale/ca.json b/umap/static/umap/locale/ca.json index ead773df..07ec3e65 100644 --- a/umap/static/umap/locale/ca.json +++ b/umap/static/umap/locale/ca.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Opcions avançades", "Advanced properties": "Propietats avançades", - "Advanced transition": "Advanced transition", "All properties are imported.": "S'han importat totes les propietats", "Allow interactions": "Allow interactions", "An error occured": "S'ha produït un error", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Opcions de l'exportació iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Mostra/amaga la capa", "Simple link: [[http://example.com]]": "Enllaç simple: [[http://exemple.com]]", "Slideshow": "Presentació", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Atura la presentació", "Supported scheme": "Esquema suportat", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "El símbol pot ser qualsevol caràcter Unicode o un URL. Podeu usar propietats de característiques com a variables. P. ex: amb \"http://myserver.org/images/{name}.png\", la variable {name} se substituirà amb el valor de \"name\" de cada marcador.", "TMS format": "Format TMS", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Format del text", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "S'han establert l'escala i el centre.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "A l'escala", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "milles", "nautical miles": "miles nàutiques", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} milles", - "{distance} yd": "{distance} yd", "1 day": "1 dia", "1 hour": "1 hora", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Opcional.", "Paste your data here": "Enganxeu les dades aquí", "Please save the map first": "Abans deseu el mapa", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/cs_CZ.js b/umap/static/umap/locale/cs_CZ.js index 8ec31ad6..cfa9563f 100644 --- a/umap/static/umap/locale/cs_CZ.js +++ b/umap/static/umap/locale/cs_CZ.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Přidat symbol", "Allow scroll wheel zoom?": "Povolit přibližování kolečkem myši?", "Automatic": "Automatic", @@ -48,7 +48,7 @@ var locale = { "Popup content template": "Šablona obsahu bubliny", "Set symbol": "Nastavit symbol", "Side panel": "Boční panel", - "Simplify": "Simplify", + "Simplify": "Zjednodušit", "Symbol or url": "Symbol nebo adresa URL", "Table": "Tabulka", "always": "vždy", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Přidat polygon k současnému multi", "Advanced actions": "Pokročilé akce", "Advanced properties": "Pokročilé vlastnosti", - "Advanced transition": "Pokročilá translace", "All properties are imported.": "Všechny vlastnosti jsou importovány.", "Allow interactions": "Povolit interakce", "An error occured": "Došlo k chybě", @@ -168,7 +167,7 @@ var locale = { "Edit properties in a table": "Upravit vlastnosti v tabulce", "Edit this feature": "Upravit tento objekt", "Editing": "Upravujete", - "Embed and share this map": "Sílet mapu nebo ji vložit do jiného webu", + "Embed and share this map": "Sdílet mapu nebo ji vložit do jiného webu", "Embed the map": "Vložit mapu do jiného webu", "Empty": "Vyprázdnit", "Enable editing": "Povolit úpravy", @@ -190,7 +189,6 @@ var locale = { "Home": "Domů", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Jak moc zahlazovat a zjednodušovat při oddálení (větší = rychlejší odezva a plynulejší vzhled, menší = přesnější)", "If false, the polygon will act as a part of the underlying map.": "Pokud je vypnuto, polygon se bude chovat jako součást mapového podkladu.", - "Iframe export options": "Možnosti exportu pro iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe s vlastní výškou (v px): {{{http://iframe.url.com|výška}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe s vlastní výškou a šířkou (in px): {{{http://iframe.url.com|výška*šířka}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Skrytí/zobrazení vrstvy", "Simple link: [[http://example.com]]": "Jednoduchý odkaz: [[http://priklad.cz]]", "Slideshow": "Prezentace", - "Smart transitions": "Chytré přechody", "Sort key": "Řadící klávesa", "Split line": "Rozdělit čáru", "Start a hole here": "Začít tady díru", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Zastavit prezentaci", "Supported scheme": "Podporované schéma", "Supported variables that will be dynamically replaced": "Podporované proměnné, které budou automaticky nahrazeny", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol může mít buď znak unicode nebo URL. Vlastnosti můžete použít jako proměnné: např. Pomocí \"http://myserver.org/images/{name}.png\" bude proměnná {name} nahrazena hodnotou \"name\" každé značky.", "TMS format": "formát TMS", "Text color for the cluster label": "Barva textu popisku shluku", "Text formatting": "Formátování textu", "The name of the property to use as feature label (ex.: \"nom\")": "Název vlastnosti pro použití v popisku objektu (ex.: \"nom\")", - "The zoom and center have been set.": "Přiblížení a střed mapy byly nastaveny", "To use if remote server doesn't allow cross domain (slower)": "Pro případ že vzdálený server neumožňuje cross domain (pomalejší)", "To zoom": "Maximální přiblížení", "Toggle edit mode (Shift+Click)": "Přepnout do editovacího módu (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "míle", "nautical miles": "námořní míle", - "{area} acres": "{area} akry", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} míle", - "{distance} yd": "{distance} yd", "1 day": "1 den", "1 hour": "1 hodina", "5 min": "5 minut", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Volitelné.", "Paste your data here": "Zde vložte svá data", "Please save the map first": "Prosím, nejprve uložte mapu", - "Unable to locate you.": "Unable to locate you.", - "Feature identifier key": "Feature identifier key", - "Open current feature on load": "Open current feature on load", - "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "Feature identifier key": "Identifikační klíč funkce", + "Open current feature on load": "Otevřít současnou funkci při zatížení", + "Permalink": "Trvalý odkaz", + "The name of the property to use as feature unique identifier.": "Název vlastnosti pro použití v popisku jedinečného identifikátoru objektu.", + "Advanced filter keys": "Pokročilé filtry klíčů", + "Comma separated list of properties to use for checkbox filtering": "Čárkami oddělený seznam vlastností pro filtrování zaškrtávacích políček.", + "Data filters": "Filtry dat", + "Do you want to display caption menus?": "Chcete zobrazit nabídky s popiskem?", + "Example: key1,key2,key3": "Příklad: key1,key2,key3", + "Invalid latitude or longitude": "Neplatná zeměpisná šířka nebo délka", + "Invalide property name: {name}": "Neplatný název vlastnosti: {name}", + "No results for these filters": "Žádné výsledky pro tyto filtry", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("cs_CZ", locale); -L.setLocale("cs_CZ"); \ No newline at end of file +L.registerLocale("cs_CZ", locale) +L.setLocale("cs_CZ") diff --git a/umap/static/umap/locale/cs_CZ.json b/umap/static/umap/locale/cs_CZ.json index fdd643d5..6dfea9bc 100644 --- a/umap/static/umap/locale/cs_CZ.json +++ b/umap/static/umap/locale/cs_CZ.json @@ -48,7 +48,7 @@ "Popup content template": "Šablona obsahu bubliny", "Set symbol": "Nastavit symbol", "Side panel": "Boční panel", - "Simplify": "Simplify", + "Simplify": "Zjednodušit", "Symbol or url": "Symbol nebo adresa URL", "Table": "Tabulka", "always": "vždy", @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Přidat polygon k současnému multi", "Advanced actions": "Pokročilé akce", "Advanced properties": "Pokročilé vlastnosti", - "Advanced transition": "Pokročilá translace", "All properties are imported.": "Všechny vlastnosti jsou importovány.", "Allow interactions": "Povolit interakce", "An error occured": "Došlo k chybě", @@ -168,7 +167,7 @@ "Edit properties in a table": "Upravit vlastnosti v tabulce", "Edit this feature": "Upravit tento objekt", "Editing": "Upravujete", - "Embed and share this map": "Sílet mapu nebo ji vložit do jiného webu", + "Embed and share this map": "Sdílet mapu nebo ji vložit do jiného webu", "Embed the map": "Vložit mapu do jiného webu", "Empty": "Vyprázdnit", "Enable editing": "Povolit úpravy", @@ -190,7 +189,6 @@ "Home": "Domů", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Jak moc zahlazovat a zjednodušovat při oddálení (větší = rychlejší odezva a plynulejší vzhled, menší = přesnější)", "If false, the polygon will act as a part of the underlying map.": "Pokud je vypnuto, polygon se bude chovat jako součást mapového podkladu.", - "Iframe export options": "Možnosti exportu pro iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe s vlastní výškou (v px): {{{http://iframe.url.com|výška}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe s vlastní výškou a šířkou (in px): {{{http://iframe.url.com|výška*šířka}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Skrytí/zobrazení vrstvy", "Simple link: [[http://example.com]]": "Jednoduchý odkaz: [[http://priklad.cz]]", "Slideshow": "Prezentace", - "Smart transitions": "Chytré přechody", "Sort key": "Řadící klávesa", "Split line": "Rozdělit čáru", "Start a hole here": "Začít tady díru", @@ -279,12 +276,10 @@ "Stop slideshow": "Zastavit prezentaci", "Supported scheme": "Podporované schéma", "Supported variables that will be dynamically replaced": "Podporované proměnné, které budou automaticky nahrazeny", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol může mít buď znak unicode nebo URL. Vlastnosti můžete použít jako proměnné: např. Pomocí \"http://myserver.org/images/{name}.png\" bude proměnná {name} nahrazena hodnotou \"name\" každé značky.", "TMS format": "formát TMS", "Text color for the cluster label": "Barva textu popisku shluku", "Text formatting": "Formátování textu", "The name of the property to use as feature label (ex.: \"nom\")": "Název vlastnosti pro použití v popisku objektu (ex.: \"nom\")", - "The zoom and center have been set.": "Přiblížení a střed mapy byly nastaveny", "To use if remote server doesn't allow cross domain (slower)": "Pro případ že vzdálený server neumožňuje cross domain (pomalejší)", "To zoom": "Maximální přiblížení", "Toggle edit mode (Shift+Click)": "Přepnout do editovacího módu (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "míle", "nautical miles": "námořní míle", - "{area} acres": "{area} akry", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} míle", - "{distance} yd": "{distance} yd", "1 day": "1 den", "1 hour": "1 hodina", "5 min": "5 minut", @@ -366,9 +351,45 @@ "Optional.": "Volitelné.", "Paste your data here": "Zde vložte svá data", "Please save the map first": "Prosím, nejprve uložte mapu", - "Unable to locate you.": "Unable to locate you.", - "Feature identifier key": "Feature identifier key", - "Open current feature on load": "Open current feature on load", - "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "Feature identifier key": "Identifikační klíč funkce", + "Open current feature on load": "Otevřít současnou funkci při zatížení", + "Permalink": "Trvalý odkaz", + "The name of the property to use as feature unique identifier.": "Název vlastnosti pro použití v popisku jedinečného identifikátoru objektu.", + "Advanced filter keys": "Pokročilé filtry klíčů", + "Comma separated list of properties to use for checkbox filtering": "Čárkami oddělený seznam vlastností pro filtrování zaškrtávacích políček.", + "Data filters": "Filtry dat", + "Do you want to display caption menus?": "Chcete zobrazit nabídky s popiskem?", + "Example: key1,key2,key3": "Příklad: key1,key2,key3", + "Invalid latitude or longitude": "Neplatná zeměpisná šířka nebo délka", + "Invalide property name: {name}": "Neplatný název vlastnosti: {name}", + "No results for these filters": "Žádné výsledky pro tyto filtry", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/da.js b/umap/static/umap/locale/da.js index 626a1c42..54fea291 100644 --- a/umap/static/umap/locale/da.js +++ b/umap/static/umap/locale/da.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Tilføj symbol", "Allow scroll wheel zoom?": "Tillad zoom med scrollhjul?", "Automatic": "Automatisk", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Tilføj en polygon til nuværende multi", "Advanced actions": "Avancerede handlinger", "Advanced properties": "Avancerede egenskaber", - "Advanced transition": "Avanceret overgang", "All properties are imported.": "Alle egenskaber er importeret.", "Allow interactions": "Tillad interaktioner", "An error occured": "Der opstod en fejl", @@ -190,7 +189,6 @@ var locale = { "Home": "Hjem", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Hvor meget polylinjen skal forenkles på hvert zoomniveau (mere = bedre ydeevne og jævnere udseende, mindre = mere præcist)", "If false, the polygon will act as a part of the underlying map.": "Hvis falsk så vil polygonen opfører sig som en del af det underliggende kort.", - "Iframe export options": "Iframes eksportindstillinger", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe med brugerdefineret højde (i px): {{{http://iframe.url.com|højde}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe med tilpasset højde og bredde (i px): {{{http://iframe.url.com|højde*bredde}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Vis/skjul lag", "Simple link: [[http://example.com]]": "Simpelt link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smarte transitioner", "Sort key": "Sorteringsnøgle", "Split line": "Opsplit linje", "Start a hole here": "Start et hul her", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Understøttet skema", "Supported variables that will be dynamically replaced": "Understøttede variabler som vil blive dynamisk erstattet", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol kan enten være et unicodetegn eller en URL. Du kan anvende objektegenskaber som variabler: fx: med \"http://myserver.org/images/{navn}.png\", vil variablen {navn} blive erstattet af hver markørs \"navn\"-værdi.", "TMS format": "TMS-format", "Text color for the cluster label": "Tekstfarve for klyngelabel", "Text formatting": "Tekstformatering", "The name of the property to use as feature label (ex.: \"nom\")": "Navnet på den egenskab, der skal anvendes som objektlabel (fx: \"nom\")", - "The zoom and center have been set.": "Zoom og center er blevet justeret.", "To use if remote server doesn't allow cross domain (slower)": "Anvendes hvis fjernserver ikke tillader krydsdomæne (langsommere)", "To zoom": "For at zoome", "Toggle edit mode (Shift+Click)": "Skift redigeringstilstand (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "sømil", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 dag", "1 hour": "1 time", "5 min": "5 min", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Valgfrit.", "Paste your data here": "Indsæt dine data her", "Please save the map first": "Gem først kortet", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("da", locale); -L.setLocale("da"); \ No newline at end of file +L.registerLocale("da", locale) +L.setLocale("da") diff --git a/umap/static/umap/locale/da.json b/umap/static/umap/locale/da.json index c2086b4f..d02a29ce 100644 --- a/umap/static/umap/locale/da.json +++ b/umap/static/umap/locale/da.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Tilføj en polygon til nuværende multi", "Advanced actions": "Avancerede handlinger", "Advanced properties": "Avancerede egenskaber", - "Advanced transition": "Avanceret overgang", "All properties are imported.": "Alle egenskaber er importeret.", "Allow interactions": "Tillad interaktioner", "An error occured": "Der opstod en fejl", @@ -190,7 +189,6 @@ "Home": "Hjem", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Hvor meget polylinjen skal forenkles på hvert zoomniveau (mere = bedre ydeevne og jævnere udseende, mindre = mere præcist)", "If false, the polygon will act as a part of the underlying map.": "Hvis falsk så vil polygonen opfører sig som en del af det underliggende kort.", - "Iframe export options": "Iframes eksportindstillinger", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe med brugerdefineret højde (i px): {{{http://iframe.url.com|højde}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe med tilpasset højde og bredde (i px): {{{http://iframe.url.com|højde*bredde}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Vis/skjul lag", "Simple link: [[http://example.com]]": "Simpelt link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smarte transitioner", "Sort key": "Sorteringsnøgle", "Split line": "Opsplit linje", "Start a hole here": "Start et hul her", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Understøttet skema", "Supported variables that will be dynamically replaced": "Understøttede variabler som vil blive dynamisk erstattet", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol kan enten være et unicodetegn eller en URL. Du kan anvende objektegenskaber som variabler: fx: med \"http://myserver.org/images/{navn}.png\", vil variablen {navn} blive erstattet af hver markørs \"navn\"-værdi.", "TMS format": "TMS-format", "Text color for the cluster label": "Tekstfarve for klyngelabel", "Text formatting": "Tekstformatering", "The name of the property to use as feature label (ex.: \"nom\")": "Navnet på den egenskab, der skal anvendes som objektlabel (fx: \"nom\")", - "The zoom and center have been set.": "Zoom og center er blevet justeret.", "To use if remote server doesn't allow cross domain (slower)": "Anvendes hvis fjernserver ikke tillader krydsdomæne (langsommere)", "To zoom": "For at zoome", "Toggle edit mode (Shift+Click)": "Skift redigeringstilstand (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "sømil", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 dag", "1 hour": "1 time", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Valgfrit.", "Paste your data here": "Indsæt dine data her", "Please save the map first": "Gem først kortet", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/de.js b/umap/static/umap/locale/de.js index b17b0dd6..cc1d61dd 100644 --- a/umap/static/umap/locale/de.js +++ b/umap/static/umap/locale/de.js @@ -1,6 +1,6 @@ -var locale = { +const locale = { "Add symbol": "Symbol hinzufügen", - "Allow scroll wheel zoom?": "Möchtest du Zoomen mit dem Mausrad erlauben?", + "Allow scroll wheel zoom?": "Zoomen mit dem Mausrad erlauben?", "Automatic": "Automatisch", "Ball": "Stecknadel", "Cancel": "Abbrechen", @@ -15,7 +15,7 @@ var locale = { "Default zoom level": "Standard-Zoomstufe", "Default: name": "Standard: Name", "Display label": "Beschriftung anzeigen", - "Display the control to open OpenStreetMap editor": "Den Button zum OpenStreetMap editor anzeigen", + "Display the control to open OpenStreetMap editor": "Den Button zum OpenStreetMap-Editor anzeigen", "Display the data layers control": "Datenebenensteuerung anzeigen", "Display the embed control": "Eingebettete Steuerung anzeigen", "Display the fullscreen control": "Vollbildsteuerung anzeigen", @@ -24,7 +24,7 @@ var locale = { "Display the search control": "Suchsteuerung anzeigen", "Display the tile layers control": "Kachelebenensteuerung anzeigen", "Display the zoom control": "Zoomsteuerung anzeigen", - "Do you want to display a caption bar?": "Mächtest du eine Überschrift (Fußzeile) anzeigen?", + "Do you want to display a caption bar?": "Möchtest du eine Überschrift (Fußzeile) anzeigen?", "Do you want to display a minimap?": "Möchtest du eine Übersichtskarte anzeigen?", "Do you want to display a panel on load?": "Möchtest du beim Seitenaufruf eine Seitenleiste anzeigen?", "Do you want to display popup footer?": "Möchtest du eine Fußzeile im Popup anzeigen?", @@ -82,7 +82,7 @@ var locale = { "**double star for bold**": "**Zwei Sterne für Fett**", "*simple star for italic*": "*Ein Stern für Kursiv*", "--- for an horizontal rule": "--- Für eine horizontale Linie", - "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".": "Eine kommagetrente Zahlenfolge, die die Linienart (Strichmuster) der Kontur definiert, z.B.: \"5, 10, 15\".", + "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".": "Eine kommagetrente Zahlenfolge, die die Linienart (Strichmuster) der Kontur definiert, z. B.: \"5, 10, 15\".", "About": "Über", "Action not allowed :(": "Aktion nicht erlaubt :(", "Activate slideshow mode": "Diashowmodus aktivieren", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Fläche zur vorhandene Gruppe hinzufügen", "Advanced actions": "Erweiterte Aktionen", "Advanced properties": "Erweiterte Eigenschaften", - "Advanced transition": "Erweiterter Übergang", "All properties are imported.": "Alle Merkmale wurden importiert.", "Allow interactions": "Interaktionen erlauben", "An error occured": "Es ist ein Fehler aufgetreten.", @@ -111,11 +110,11 @@ var locale = { "Cancel edits": "Bearbeitungen abbrechen", "Center map on your location": "Die Karte auf deinen Standort ausrichten", "Change map background": "Hintergrundkarte ändern", - "Change tilelayers": "Hintergrundkarte ändern", + "Change tilelayers": "Kachelebenen ändern", "Choose a preset": "Wähle eine Vorlage", "Choose the format of the data to import": "Wähle das Datenformat für den Import", "Choose the layer to import in": "Wähle die Ebene, in die importiert werden soll", - "Click last point to finish shape": "Kllicke den letzten Punkt an, um die Form abzuschließen", + "Click last point to finish shape": "Klicke den letzten Punkt an, um die Form abzuschließen", "Click to add a marker": "Klicke, um einen Marker hinzuzufügen", "Click to continue drawing": "Klicke, um weiter zu zeichnen", "Click to edit": "Zum Bearbeiten klicken", @@ -128,7 +127,7 @@ var locale = { "Close": "Schließen", "Clustering radius": "Gruppierungsradius", "Comma separated list of properties to use when filtering features": "Kommagetrennte Liste der Merkmale, welche beim Filtern von Elementen verwendet werden sollen", - "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Komma-, tabulator-, oder semikolongetrennte Werte. SRS WGS84 ist impliziert. Nur Punktgeometrien werden importiert. Beim Import wird nach Spaltenüberschriften mit jeder Nennung von „lat“ und „lon“ am Anfang der Überschrift gesucht (ohne Beachtung von Groß-/Kleinschreibung). Alle anderen Spalten werden als Merkmale importiert.", + "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Komma-, Tabulator-, oder Semikolongetrennte Werte. SRS WGS84 ist impliziert. Nur Punktgeometrien werden importiert. Beim Import wird nach Spaltenüberschriften mit jeder Nennung von „lat“ und „lon“ am Anfang der Überschrift gesucht (ohne Beachtung von Groß-/Kleinschreibung). Alle anderen Spalten werden als Merkmale importiert.", "Continue line": "Linie fortführen", "Continue line (Ctrl+Click)": "Linie weiterzeichnen (Strg+Klick)", "Coordinates": "Koordinaten", @@ -190,7 +189,6 @@ var locale = { "Home": "Startseite", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Wie stark Linien mit jeder Zoomstufe vereinfacht werden (mehr = bessere Performance und glatteres Aussehen, weniger = präziser)", "If false, the polygon will act as a part of the underlying map.": "Wenn auf Nein gesetzt, dann verhält sich die Fläche als Teil der hinterlegten Karte.", - "Iframe export options": "Iframe Exportoptionen", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe mit benutzerdefinierter Höhe (in Pixel): {{{http://iframe.url.com|Höhe}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe mit benutzerdefinierter Höhe und Breite (in Pixel): {{{http://iframe.url.com|Höhe*Breite}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -266,10 +264,9 @@ var locale = { "Shape properties": "Formeigenschaften", "Short URL": "Kurze URL", "Short credits": "Kurze Credits", - "Show/hide layer": "Ebene Einblenden/Ausblenden", + "Show/hide layer": "Ebene einblenden/ausblenden", "Simple link: [[http://example.com]]": "Einfacher Link: [[http://beispiel.com]]", "Slideshow": "Diashow", - "Smart transitions": "Weiche Übergänge", "Sort key": "Sortierschlüssel", "Split line": "Linie teilen", "Start a hole here": "Hier ein Loch beginnen", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Diashow beenden", "Supported scheme": "Unterstütztes Schema", "Supported variables that will be dynamically replaced": "Unterstützte Variablen, die dynamisch ersetzt werden", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol kann entweder ein Unicodezeichen oder eine URL sein. Du kannst Elementmerkmale als Variablen nutzen: z.B.: bei \"http://myserver.org/images/{name}.png\" wird die {name}-Variable durch den Wert von \"name\" jeden Markers ersetzt.", "TMS format": "TMS-Format", "Text color for the cluster label": "Textfarbe für die Gruppierungsbezeichnung", "Text formatting": "Textformatierung", - "The name of the property to use as feature label (ex.: \"nom\")": "Den Namen des Merkmals als Elementbezeichnung verwenden (z.B.: \"Name\")", - "The zoom and center have been set.": "Zoomstufe und Mittelpunkt wurden gespeichert.", + "The name of the property to use as feature label (ex.: \"nom\")": "Den Namen des Merkmals als Elementbezeichnung verwenden (z. B.: \"Name\")", "To use if remote server doesn't allow cross domain (slower)": "Anzuwenden, wenn der Zielserver kein Cross Origin Resource Sharing (CORS) erlaubt (langsamer).", "To zoom": "Bis Zoomstufe", "Toggle edit mode (Shift+Click)": "Bearbeitungsmodus umschalten (Umschalt+Klick)", @@ -293,7 +288,7 @@ var locale = { "Transform to polygon": "In Fläche umwandeln", "Type of layer": "Ebenentyp", "Unable to detect format of file {filename}": "Format der Datei {filename} kann nicht erkannt werden", - "Untitled layer": "unbenannte Ebene", + "Untitled layer": "Unbenannte Ebene", "Untitled map": "Unbenannte Karte", "Update permissions": "Berechtigungen aktualisieren", "Update permissions and editors": "Berechtigungen und Bearbeiter ändern", @@ -316,7 +311,7 @@ var locale = { "Zoom in": "Hineinzoomen", "Zoom level for automatic zooms": "Zommstufe für automatischen Zoom", "Zoom out": "Herauszoomen", - "Zoom to layer extent": "Auf Ebenenausdehnung zommen", + "Zoom to layer extent": "Auf Ebenenausdehnung zoomen", "Zoom to the next": "Zum nächsten zoomen", "Zoom to the previous": "Zum vorherigen zoomen", "Zoom to this feature": "Auf dieses Element zoomen", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "Meilen", "nautical miles": "Nautische Meilen", - "{area} acres": "{area} ac", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 Tag", "1 hour": "1 Stunde", "5 min": "5 min", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Füge deine Daten hier ein", "Please save the map first": "Bitte zuerst die Karte speichern", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Erweiterte Filterschlüssel", + "Comma separated list of properties to use for checkbox filtering": "Kommaseparierte Eigenschaftsliste zur Checkbox-Filterung", + "Data filters": "Datenfilter", + "Do you want to display caption menus?": "Möchtest du Beschriftungsmenüs anzeigen?", + "Example: key1,key2,key3": "Beispiel: key1,key2,key3", + "Invalid latitude or longitude": "Ungültiger Längen- oder Breitengrad", + "Invalide property name: {name}": "Ungültiger Eigenschaftsname: {name}", + "No results for these filters": "Keine Ergebnisse für diese Filter", + "Permanent credits": "Dauerhafte Danksagung", + "Permanent credits background": "Dauerhafte Danksagung im Hintergrund", + "Select data": "Wähle Daten aus", + "Will be permanently visible in the bottom left corner of the map": "Wird in der unteren linken Ecke der Karte permanent sichtbar sein", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("de", locale); -L.setLocale("de"); \ No newline at end of file +L.registerLocale("de", locale) +L.setLocale("de") diff --git a/umap/static/umap/locale/de.json b/umap/static/umap/locale/de.json index d49147d9..1600bc2a 100644 --- a/umap/static/umap/locale/de.json +++ b/umap/static/umap/locale/de.json @@ -1,6 +1,6 @@ { "Add symbol": "Symbol hinzufügen", - "Allow scroll wheel zoom?": "Möchtest du Zoomen mit dem Mausrad erlauben?", + "Allow scroll wheel zoom?": "Zoomen mit dem Mausrad erlauben?", "Automatic": "Automatisch", "Ball": "Stecknadel", "Cancel": "Abbrechen", @@ -15,7 +15,7 @@ "Default zoom level": "Standard-Zoomstufe", "Default: name": "Standard: Name", "Display label": "Beschriftung anzeigen", - "Display the control to open OpenStreetMap editor": "Den Button zum OpenStreetMap editor anzeigen", + "Display the control to open OpenStreetMap editor": "Den Button zum OpenStreetMap-Editor anzeigen", "Display the data layers control": "Datenebenensteuerung anzeigen", "Display the embed control": "Eingebettete Steuerung anzeigen", "Display the fullscreen control": "Vollbildsteuerung anzeigen", @@ -24,7 +24,7 @@ "Display the search control": "Suchsteuerung anzeigen", "Display the tile layers control": "Kachelebenensteuerung anzeigen", "Display the zoom control": "Zoomsteuerung anzeigen", - "Do you want to display a caption bar?": "Mächtest du eine Überschrift (Fußzeile) anzeigen?", + "Do you want to display a caption bar?": "Möchtest du eine Überschrift (Fußzeile) anzeigen?", "Do you want to display a minimap?": "Möchtest du eine Übersichtskarte anzeigen?", "Do you want to display a panel on load?": "Möchtest du beim Seitenaufruf eine Seitenleiste anzeigen?", "Do you want to display popup footer?": "Möchtest du eine Fußzeile im Popup anzeigen?", @@ -82,7 +82,7 @@ "**double star for bold**": "**Zwei Sterne für Fett**", "*simple star for italic*": "*Ein Stern für Kursiv*", "--- for an horizontal rule": "--- Für eine horizontale Linie", - "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".": "Eine kommagetrente Zahlenfolge, die die Linienart (Strichmuster) der Kontur definiert, z.B.: \"5, 10, 15\".", + "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".": "Eine kommagetrente Zahlenfolge, die die Linienart (Strichmuster) der Kontur definiert, z. B.: \"5, 10, 15\".", "About": "Über", "Action not allowed :(": "Aktion nicht erlaubt :(", "Activate slideshow mode": "Diashowmodus aktivieren", @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Fläche zur vorhandene Gruppe hinzufügen", "Advanced actions": "Erweiterte Aktionen", "Advanced properties": "Erweiterte Eigenschaften", - "Advanced transition": "Erweiterter Übergang", "All properties are imported.": "Alle Merkmale wurden importiert.", "Allow interactions": "Interaktionen erlauben", "An error occured": "Es ist ein Fehler aufgetreten.", @@ -111,11 +110,11 @@ "Cancel edits": "Bearbeitungen abbrechen", "Center map on your location": "Die Karte auf deinen Standort ausrichten", "Change map background": "Hintergrundkarte ändern", - "Change tilelayers": "Hintergrundkarte ändern", + "Change tilelayers": "Kachelebenen ändern", "Choose a preset": "Wähle eine Vorlage", "Choose the format of the data to import": "Wähle das Datenformat für den Import", "Choose the layer to import in": "Wähle die Ebene, in die importiert werden soll", - "Click last point to finish shape": "Kllicke den letzten Punkt an, um die Form abzuschließen", + "Click last point to finish shape": "Klicke den letzten Punkt an, um die Form abzuschließen", "Click to add a marker": "Klicke, um einen Marker hinzuzufügen", "Click to continue drawing": "Klicke, um weiter zu zeichnen", "Click to edit": "Zum Bearbeiten klicken", @@ -128,7 +127,7 @@ "Close": "Schließen", "Clustering radius": "Gruppierungsradius", "Comma separated list of properties to use when filtering features": "Kommagetrennte Liste der Merkmale, welche beim Filtern von Elementen verwendet werden sollen", - "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Komma-, tabulator-, oder semikolongetrennte Werte. SRS WGS84 ist impliziert. Nur Punktgeometrien werden importiert. Beim Import wird nach Spaltenüberschriften mit jeder Nennung von „lat“ und „lon“ am Anfang der Überschrift gesucht (ohne Beachtung von Groß-/Kleinschreibung). Alle anderen Spalten werden als Merkmale importiert.", + "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Komma-, Tabulator-, oder Semikolongetrennte Werte. SRS WGS84 ist impliziert. Nur Punktgeometrien werden importiert. Beim Import wird nach Spaltenüberschriften mit jeder Nennung von „lat“ und „lon“ am Anfang der Überschrift gesucht (ohne Beachtung von Groß-/Kleinschreibung). Alle anderen Spalten werden als Merkmale importiert.", "Continue line": "Linie fortführen", "Continue line (Ctrl+Click)": "Linie weiterzeichnen (Strg+Klick)", "Coordinates": "Koordinaten", @@ -190,7 +189,6 @@ "Home": "Startseite", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Wie stark Linien mit jeder Zoomstufe vereinfacht werden (mehr = bessere Performance und glatteres Aussehen, weniger = präziser)", "If false, the polygon will act as a part of the underlying map.": "Wenn auf Nein gesetzt, dann verhält sich die Fläche als Teil der hinterlegten Karte.", - "Iframe export options": "Iframe Exportoptionen", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe mit benutzerdefinierter Höhe (in Pixel): {{{http://iframe.url.com|Höhe}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe mit benutzerdefinierter Höhe und Breite (in Pixel): {{{http://iframe.url.com|Höhe*Breite}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -266,10 +264,9 @@ "Shape properties": "Formeigenschaften", "Short URL": "Kurze URL", "Short credits": "Kurze Credits", - "Show/hide layer": "Ebene Einblenden/Ausblenden", + "Show/hide layer": "Ebene einblenden/ausblenden", "Simple link: [[http://example.com]]": "Einfacher Link: [[http://beispiel.com]]", "Slideshow": "Diashow", - "Smart transitions": "Weiche Übergänge", "Sort key": "Sortierschlüssel", "Split line": "Linie teilen", "Start a hole here": "Hier ein Loch beginnen", @@ -279,12 +276,10 @@ "Stop slideshow": "Diashow beenden", "Supported scheme": "Unterstütztes Schema", "Supported variables that will be dynamically replaced": "Unterstützte Variablen, die dynamisch ersetzt werden", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol kann entweder ein Unicodezeichen oder eine URL sein. Du kannst Elementmerkmale als Variablen nutzen: z.B.: bei \"http://myserver.org/images/{name}.png\" wird die {name}-Variable durch den Wert von \"name\" jeden Markers ersetzt.", "TMS format": "TMS-Format", "Text color for the cluster label": "Textfarbe für die Gruppierungsbezeichnung", "Text formatting": "Textformatierung", - "The name of the property to use as feature label (ex.: \"nom\")": "Den Namen des Merkmals als Elementbezeichnung verwenden (z.B.: \"Name\")", - "The zoom and center have been set.": "Zoomstufe und Mittelpunkt wurden gespeichert.", + "The name of the property to use as feature label (ex.: \"nom\")": "Den Namen des Merkmals als Elementbezeichnung verwenden (z. B.: \"Name\")", "To use if remote server doesn't allow cross domain (slower)": "Anzuwenden, wenn der Zielserver kein Cross Origin Resource Sharing (CORS) erlaubt (langsamer).", "To zoom": "Bis Zoomstufe", "Toggle edit mode (Shift+Click)": "Bearbeitungsmodus umschalten (Umschalt+Klick)", @@ -293,7 +288,7 @@ "Transform to polygon": "In Fläche umwandeln", "Type of layer": "Ebenentyp", "Unable to detect format of file {filename}": "Format der Datei {filename} kann nicht erkannt werden", - "Untitled layer": "unbenannte Ebene", + "Untitled layer": "Unbenannte Ebene", "Untitled map": "Unbenannte Karte", "Update permissions": "Berechtigungen aktualisieren", "Update permissions and editors": "Berechtigungen und Bearbeiter ändern", @@ -316,7 +311,7 @@ "Zoom in": "Hineinzoomen", "Zoom level for automatic zooms": "Zommstufe für automatischen Zoom", "Zoom out": "Herauszoomen", - "Zoom to layer extent": "Auf Ebenenausdehnung zommen", + "Zoom to layer extent": "Auf Ebenenausdehnung zoomen", "Zoom to the next": "Zum nächsten zoomen", "Zoom to the previous": "Zum vorherigen zoomen", "Zoom to this feature": "Auf dieses Element zoomen", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "Meilen", "nautical miles": "Nautische Meilen", - "{area} acres": "{area} ac", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 Tag", "1 hour": "1 Stunde", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Füge deine Daten hier ein", "Please save the map first": "Bitte zuerst die Karte speichern", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Erweiterte Filterschlüssel", + "Comma separated list of properties to use for checkbox filtering": "Kommaseparierte Eigenschaftsliste zur Checkbox-Filterung", + "Data filters": "Datenfilter", + "Do you want to display caption menus?": "Möchtest du Beschriftungsmenüs anzeigen?", + "Example: key1,key2,key3": "Beispiel: key1,key2,key3", + "Invalid latitude or longitude": "Ungültiger Längen- oder Breitengrad", + "Invalide property name: {name}": "Ungültiger Eigenschaftsname: {name}", + "No results for these filters": "Keine Ergebnisse für diese Filter", + "Permanent credits": "Dauerhafte Danksagung", + "Permanent credits background": "Dauerhafte Danksagung im Hintergrund", + "Select data": "Wähle Daten aus", + "Will be permanently visible in the bottom left corner of the map": "Wird in der unteren linken Ecke der Karte permanent sichtbar sein", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/el.js b/umap/static/umap/locale/el.js index d776f1ba..e741f081 100644 --- a/umap/static/umap/locale/el.js +++ b/umap/static/umap/locale/el.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Προσθήκη συμβόλου", "Allow scroll wheel zoom?": "Επιτρέπεται κύλιση εστίασης", "Automatic": "Αυτόματα", @@ -33,7 +33,7 @@ var locale = { "Drop": "Σταγόνα", "GeoRSS (only link)": "GeoRSS (μόνο σύνδεσμος)", "GeoRSS (title + image)": "GeoRSS (τίτλος + εικόνα)", - "Heatmap": "Χάρτης εγγύτητας", + "Heatmap": "Χάρτης θερμότητας", "Icon shape": "Μορφή εικονιδίου", "Icon symbol": "Σύμβολο εικονιδίου", "Inherit": "Κληρονομημένο", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Προσθήκη πολυγώνου στο παρόν πολυδεδομένο", "Advanced actions": "Εξειδικευμένες ενέργειες", "Advanced properties": "Εξειδικευμένες ιδιότητες", - "Advanced transition": "Εξειδικευμένη μετάβαση", "All properties are imported.": "Όλες οι ιδιότητες έχουν εισαχθεί", "Allow interactions": "Επιτρέπονται αλληλεπιδράσεις", "An error occured": "Παρουσιάστηκε σφάλμα", @@ -128,14 +127,14 @@ var locale = { "Close": "Κλείσιμο", "Clustering radius": "Ακτίνα συμπλέγματος", "Comma separated list of properties to use when filtering features": "Λίστα ιδιοτήτων διαχωρισμένων με κόμμα για χρήση κατά το φιλτράρισμα των στοιχείων", - "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Τιμές διαχωρισμένες με κόμμα, tab ή άνω τελεία. Εννοείται και η μορφή SRS WGS84. Εισάγονται μόνο γεωμετρίες σημείων. Η διαδικασία εισαγωγής ελέγχει τις επικεφαλίδες των στηλών για τις ενδείξεις «lat» και «lon» στην αρχή της επικεφαλίδας και κάνει διάκριση πεζών - κεφαλαίων γραμμάτων. Όλες οι άλλες στήλες εισάγονται ως ιδιότητες. ", + "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Τιμές διαχωρισμένες με κόμμα, tab ή άνω τελεία. Εννοείται και η μορφή SRS WGS84. Εισάγονται μόνο γεωμετρίες σημείων. Η διαδικασία εισαγωγής ελέγχει τις επικεφαλίδες των στηλών για τις ενδείξεις «lat» και «lon» στην αρχή της επικεφαλίδας και κάνει διάκριση πεζών - κεφαλαίων γραμμάτων. Όλες οι άλλες στήλες εισάγονται ως ιδιότητες.", "Continue line": "Συνέχεια γραμμής", "Continue line (Ctrl+Click)": "Συνέχεια γραμμής (Ctrl+Click)", "Coordinates": "Συντεταγμένες", "Credits": "Εύσημα", "Current view instead of default map view?": "Τρέχουσα προβολή χάρτη αντί της προεπιλεγμένης", "Custom background": "Προσαρμοσμένο υπόβαθρο", - "Data is browsable": "Τα δεδομένα είναι περιήγησιμα", + "Data is browsable": "Τα δεδομένα είναι περιηγήσιμα", "Default interaction options": "Προεπιλεγμένες επιλογές αλληλεπίδρασης", "Default properties": "Προεπιλεγμένες ιδιότητες", "Default shape properties": "Προεπιλεγμένες ιδιότητες σχημάτων", @@ -178,11 +177,11 @@ var locale = { "Extract shape to separate feature": "Εξαγωγή σχήματος σε ξεχωριστό στοιχείο", "Fetch data each time map view changes.": "Ανάκτηση δεδομένων κάθε φορά που αλλάζει η προβολή του χάρτη", "Filter keys": "Βασικά φίλτρα", - "Filter…": "Φίλτρα", + "Filter…": "Φίλτρα...", "Format": "Μορφοποίηση", "From zoom": "Από εστίαση", "Full map data": "Ολοκληρωμένα δεδομένα χάρτη", - "Go to «{feature}»": "Μετάβαση στο «{feature}»", + "Go to «{feature}»": "Μετάβαση στο «{feature}»", "Heatmap intensity property": "Ένταση του χάρτη εγγύτητας", "Heatmap radius": "Ακτίνα του χάρτη εγγύτητας", "Help": "Βοήθεια", @@ -190,7 +189,6 @@ var locale = { "Home": "Αρχική", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Πόσο απλοποιείται η συνθέτη γραμμή σε κάθε επίπεδο εστίασης (περισσότερο = καλύτερη απόδοση και ομαλότερη εμφάνιση, λιγότερο = περισσότερη ακρίβεια)", "If false, the polygon will act as a part of the underlying map.": "Αν είναι απενεργοποιημένο, το πολύγωνο θα συμπεριφέρεται ως μέρος του υποκείμενου χάρτη.", - "Iframe export options": "Παράμετροι εξαγωγής iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe με προσαρμοσμένο ύψος (σε px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe με προσαρμοσμένο ύψος και πλάτος (σε px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -210,7 +208,7 @@ var locale = { "Layer properties": "Ιδιότητες επιπέδου", "Licence": "Άδεια", "Limit bounds": "Περιορισμός ορίων", - "Link to…": "Σύνδεση με ...", + "Link to…": "Σύνδεση με...", "Link with text: [[http://example.com|text of the link]]": "Σύνδεση με κείμενο: [[http://example.com|text του συνδέσμου]]", "Long credits": "Αναλυτικές πιστώσεις", "Longitude": "Γεωγραφικό μήκος", @@ -224,12 +222,12 @@ var locale = { "Map's owner": "Ιδιοκτήτης του χάρτη", "Merge lines": "Συγχώνευση γραμμών", "More controls": "Περισσότερα εργαλεία ελέγχου", - "Must be a valid CSS value (eg.: DarkBlue or #123456)": "Πρέπει να είναι έγκυρη τιμή CSS (π.χ.: DarkBlue ή # 123456)", + "Must be a valid CSS value (eg.: DarkBlue or #123456)": "Πρέπει να είναι έγκυρη τιμή CSS (π.χ.: DarkBlue ή #123456)", "No licence has been set": "Δεν έχει οριστεί άδεια χρήσης", "No results": "Δεν υπάρχουν αποτελέσματα", "Only visible features will be downloaded.": "Θα γίνει λήψη μόνο των ορατών στοιχείων", "Open download panel": "Ανοίξτε το πλαίσιο λήψης", - "Open link in…": "Άνοιγμα συνδέσμου σε ...", + "Open link in…": "Άνοιγμα συνδέσμου σε...", "Open this map extent in a map editor to provide more accurate data to OpenStreetMap": "Ανοίξτε τον χάρτη σε έναν επεξεργαστή χαρτών για να παρέχετε πιο ακριβή δεδομένα στο OpenStreetMap", "Optional intensity property for heatmap": "Προαιρετική ιδιότητα έντασης για τον χάρτη εγγύτητας", "Optional. Same as color if not set.": "Προαιρετικό. Ίδιο με το χρώμα αν δεν οριστεί.", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Εμφάνιση/απόκρυψη επιπέδου", "Simple link: [[http://example.com]]": "Απλός σύνδεσμος: [[http://example.com]]", "Slideshow": "Παρουσίαση", - "Smart transitions": "Έξυπνες μεταβάσεις", "Sort key": "Κλειδί ταξινόμησης", "Split line": "Διαίρεση γραμμής", "Start a hole here": "Δημιουργία κενής περιοχής εδώ", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Τερματισμός παρουσίασης", "Supported scheme": "Υποστηριζόμενο σχέδιο", "Supported variables that will be dynamically replaced": "Υποστηριζόμενες μεταβλητές που θα αντικατασταθούν δυναμικά", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Το σύμβολο μπορεί να είναι χαρακτήρας unicode ή μια διεύθυνση URL. Μπορείτε να χρησιμοποιήσετε τις ιδιότητες στοιχείων ως μεταβλητές: π.χ. με \"http://myserver.org/images/{name}.png\", η μεταβλητή {name} θα αντικατασταθεί από την τιμή \"όνομα\" κάθε δείκτη.", "TMS format": "Μορφοποίηση TMS", "Text color for the cluster label": "Χρώμα κειμένου για την ετικέτα συμπλέγματος", "Text formatting": "Μορφοποίηση κειμένου", "The name of the property to use as feature label (ex.: \"nom\")": "Το όνομα της ιδιότητας που θα χρησιμοποιηθεί ως ετικέτα στοιχείου (π.χ..: \"nom\")", - "The zoom and center have been setted.": "Το επίπεδο εστίασης και το κέντρο του χάρτη έχουν ρυθμιστεί.", "To use if remote server doesn't allow cross domain (slower)": "Για χρήση εάν ο απομακρυσμένος διακομιστής δεν επιτρέπει cross domain (πιο αργή)", "To zoom": "Για εστίαση", "Toggle edit mode (Shift+Click)": "Εναλλαγή λειτουργίας επεξεργασίας (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "μλ.", "miles": "Μίλια", "nautical miles": "Ναυτικά μίλια", - "{area} acres": "{area} άκρα", - "{area} ha": "{area} εκτάρια", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} χλμ.", - "{distance} m": "{distance} μ.", - "{distance} miles": "{distance} μίλια", - "{distance} yd": "{distance} γιάρδες", "1 day": "1 μέρα", "1 hour": "1 ώρα", "5 min": "5 λεπτά", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Προαιρετικό", "Paste your data here": "Επικόλληση των δεδομένων σας εδώ", "Please save the map first": "Παρακαλώ αποθηκεύστε τον χάρτη πρώτα", - "Unable to locate you.": "Αδυναμία εντοπισμού της τοποθεσίας σας.", "Feature identifier key": "Κλειδί αναγνώρισης στοιχείου", "Open current feature on load": "Άνοιγμα τρέχοντος στοιχείου κατά τη φόρτωση", "Permalink": "Μόνιμος σύνδεσμος", - "The name of the property to use as feature unique identifier.": "Το όνομα της ιδιότητας που θα χρησιμοποιείται ως μοναδικό αναγνωριστικό." -}; -L.registerLocale("el", locale); -L.setLocale("el"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "Το όνομα της ιδιότητας που θα χρησιμοποιείται ως μοναδικό αναγνωριστικό.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("el", locale) +L.setLocale("el") diff --git a/umap/static/umap/locale/el.json b/umap/static/umap/locale/el.json index 0df7f1ef..c08f88d3 100644 --- a/umap/static/umap/locale/el.json +++ b/umap/static/umap/locale/el.json @@ -33,7 +33,7 @@ "Drop": "Σταγόνα", "GeoRSS (only link)": "GeoRSS (μόνο σύνδεσμος)", "GeoRSS (title + image)": "GeoRSS (τίτλος + εικόνα)", - "Heatmap": "Χάρτης εγγύτητας", + "Heatmap": "Χάρτης θερμότητας", "Icon shape": "Μορφή εικονιδίου", "Icon symbol": "Σύμβολο εικονιδίου", "Inherit": "Κληρονομημένο", @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Προσθήκη πολυγώνου στο παρόν πολυδεδομένο", "Advanced actions": "Εξειδικευμένες ενέργειες", "Advanced properties": "Εξειδικευμένες ιδιότητες", - "Advanced transition": "Εξειδικευμένη μετάβαση", "All properties are imported.": "Όλες οι ιδιότητες έχουν εισαχθεί", "Allow interactions": "Επιτρέπονται αλληλεπιδράσεις", "An error occured": "Παρουσιάστηκε σφάλμα", @@ -128,14 +127,14 @@ "Close": "Κλείσιμο", "Clustering radius": "Ακτίνα συμπλέγματος", "Comma separated list of properties to use when filtering features": "Λίστα ιδιοτήτων διαχωρισμένων με κόμμα για χρήση κατά το φιλτράρισμα των στοιχείων", - "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Τιμές διαχωρισμένες με κόμμα, tab ή άνω τελεία. Εννοείται και η μορφή SRS WGS84. Εισάγονται μόνο γεωμετρίες σημείων. Η διαδικασία εισαγωγής ελέγχει τις επικεφαλίδες των στηλών για τις ενδείξεις «lat» και «lon» στην αρχή της επικεφαλίδας και κάνει διάκριση πεζών - κεφαλαίων γραμμάτων. Όλες οι άλλες στήλες εισάγονται ως ιδιότητες. ", + "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Τιμές διαχωρισμένες με κόμμα, tab ή άνω τελεία. Εννοείται και η μορφή SRS WGS84. Εισάγονται μόνο γεωμετρίες σημείων. Η διαδικασία εισαγωγής ελέγχει τις επικεφαλίδες των στηλών για τις ενδείξεις «lat» και «lon» στην αρχή της επικεφαλίδας και κάνει διάκριση πεζών - κεφαλαίων γραμμάτων. Όλες οι άλλες στήλες εισάγονται ως ιδιότητες.", "Continue line": "Συνέχεια γραμμής", "Continue line (Ctrl+Click)": "Συνέχεια γραμμής (Ctrl+Click)", "Coordinates": "Συντεταγμένες", "Credits": "Εύσημα", "Current view instead of default map view?": "Τρέχουσα προβολή χάρτη αντί της προεπιλεγμένης", "Custom background": "Προσαρμοσμένο υπόβαθρο", - "Data is browsable": "Τα δεδομένα είναι περιήγησιμα", + "Data is browsable": "Τα δεδομένα είναι περιηγήσιμα", "Default interaction options": "Προεπιλεγμένες επιλογές αλληλεπίδρασης", "Default properties": "Προεπιλεγμένες ιδιότητες", "Default shape properties": "Προεπιλεγμένες ιδιότητες σχημάτων", @@ -178,11 +177,11 @@ "Extract shape to separate feature": "Εξαγωγή σχήματος σε ξεχωριστό στοιχείο", "Fetch data each time map view changes.": "Ανάκτηση δεδομένων κάθε φορά που αλλάζει η προβολή του χάρτη", "Filter keys": "Βασικά φίλτρα", - "Filter…": "Φίλτρα", + "Filter…": "Φίλτρα...", "Format": "Μορφοποίηση", "From zoom": "Από εστίαση", "Full map data": "Ολοκληρωμένα δεδομένα χάρτη", - "Go to «{feature}»": "Μετάβαση στο «{feature}»", + "Go to «{feature}»": "Μετάβαση στο «{feature}»", "Heatmap intensity property": "Ένταση του χάρτη εγγύτητας", "Heatmap radius": "Ακτίνα του χάρτη εγγύτητας", "Help": "Βοήθεια", @@ -190,7 +189,6 @@ "Home": "Αρχική", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Πόσο απλοποιείται η συνθέτη γραμμή σε κάθε επίπεδο εστίασης (περισσότερο = καλύτερη απόδοση και ομαλότερη εμφάνιση, λιγότερο = περισσότερη ακρίβεια)", "If false, the polygon will act as a part of the underlying map.": "Αν είναι απενεργοποιημένο, το πολύγωνο θα συμπεριφέρεται ως μέρος του υποκείμενου χάρτη.", - "Iframe export options": "Παράμετροι εξαγωγής iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe με προσαρμοσμένο ύψος (σε px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe με προσαρμοσμένο ύψος και πλάτος (σε px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -210,7 +208,7 @@ "Layer properties": "Ιδιότητες επιπέδου", "Licence": "Άδεια", "Limit bounds": "Περιορισμός ορίων", - "Link to…": "Σύνδεση με ...", + "Link to…": "Σύνδεση με...", "Link with text: [[http://example.com|text of the link]]": "Σύνδεση με κείμενο: [[http://example.com|text του συνδέσμου]]", "Long credits": "Αναλυτικές πιστώσεις", "Longitude": "Γεωγραφικό μήκος", @@ -224,12 +222,12 @@ "Map's owner": "Ιδιοκτήτης του χάρτη", "Merge lines": "Συγχώνευση γραμμών", "More controls": "Περισσότερα εργαλεία ελέγχου", - "Must be a valid CSS value (eg.: DarkBlue or #123456)": "Πρέπει να είναι έγκυρη τιμή CSS (π.χ.: DarkBlue ή # 123456)", + "Must be a valid CSS value (eg.: DarkBlue or #123456)": "Πρέπει να είναι έγκυρη τιμή CSS (π.χ.: DarkBlue ή #123456)", "No licence has been set": "Δεν έχει οριστεί άδεια χρήσης", "No results": "Δεν υπάρχουν αποτελέσματα", "Only visible features will be downloaded.": "Θα γίνει λήψη μόνο των ορατών στοιχείων", "Open download panel": "Ανοίξτε το πλαίσιο λήψης", - "Open link in…": "Άνοιγμα συνδέσμου σε ...", + "Open link in…": "Άνοιγμα συνδέσμου σε...", "Open this map extent in a map editor to provide more accurate data to OpenStreetMap": "Ανοίξτε τον χάρτη σε έναν επεξεργαστή χαρτών για να παρέχετε πιο ακριβή δεδομένα στο OpenStreetMap", "Optional intensity property for heatmap": "Προαιρετική ιδιότητα έντασης για τον χάρτη εγγύτητας", "Optional. Same as color if not set.": "Προαιρετικό. Ίδιο με το χρώμα αν δεν οριστεί.", @@ -269,7 +267,6 @@ "Show/hide layer": "Εμφάνιση/απόκρυψη επιπέδου", "Simple link: [[http://example.com]]": "Απλός σύνδεσμος: [[http://example.com]]", "Slideshow": "Παρουσίαση", - "Smart transitions": "Έξυπνες μεταβάσεις", "Sort key": "Κλειδί ταξινόμησης", "Split line": "Διαίρεση γραμμής", "Start a hole here": "Δημιουργία κενής περιοχής εδώ", @@ -279,12 +276,10 @@ "Stop slideshow": "Τερματισμός παρουσίασης", "Supported scheme": "Υποστηριζόμενο σχέδιο", "Supported variables that will be dynamically replaced": "Υποστηριζόμενες μεταβλητές που θα αντικατασταθούν δυναμικά", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Το σύμβολο μπορεί να είναι χαρακτήρας unicode ή μια διεύθυνση URL. Μπορείτε να χρησιμοποιήσετε τις ιδιότητες στοιχείων ως μεταβλητές: π.χ. με \"http://myserver.org/images/{name}.png\", η μεταβλητή {name} θα αντικατασταθεί από την τιμή \"όνομα\" κάθε δείκτη.", "TMS format": "Μορφοποίηση TMS", "Text color for the cluster label": "Χρώμα κειμένου για την ετικέτα συμπλέγματος", "Text formatting": "Μορφοποίηση κειμένου", "The name of the property to use as feature label (ex.: \"nom\")": "Το όνομα της ιδιότητας που θα χρησιμοποιηθεί ως ετικέτα στοιχείου (π.χ..: \"nom\")", - "The zoom and center have been setted.": "Το επίπεδο εστίασης και το κέντρο του χάρτη έχουν ρυθμιστεί.", "To use if remote server doesn't allow cross domain (slower)": "Για χρήση εάν ο απομακρυσμένος διακομιστής δεν επιτρέπει cross domain (πιο αργή)", "To zoom": "Για εστίαση", "Toggle edit mode (Shift+Click)": "Εναλλαγή λειτουργίας επεξεργασίας (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "μλ.", "miles": "Μίλια", "nautical miles": "Ναυτικά μίλια", - "{area} acres": "{area} άκρα", - "{area} ha": "{area} εκτάρια", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} χλμ.", - "{distance} m": "{distance} μ.", - "{distance} miles": "{distance} μίλια", - "{distance} yd": "{distance} γιάρδες", "1 day": "1 μέρα", "1 hour": "1 ώρα", "5 min": "5 λεπτά", @@ -366,9 +351,45 @@ "Optional.": "Προαιρετικό", "Paste your data here": "Επικόλληση των δεδομένων σας εδώ", "Please save the map first": "Παρακαλώ αποθηκεύστε τον χάρτη πρώτα", - "Unable to locate you.": "Αδυναμία εντοπισμού της τοποθεσίας σας.", "Feature identifier key": "Κλειδί αναγνώρισης στοιχείου", "Open current feature on load": "Άνοιγμα τρέχοντος στοιχείου κατά τη φόρτωση", "Permalink": "Μόνιμος σύνδεσμος", - "The name of the property to use as feature unique identifier.": "Το όνομα της ιδιότητας που θα χρησιμοποιείται ως μοναδικό αναγνωριστικό." + "The name of the property to use as feature unique identifier.": "Το όνομα της ιδιότητας που θα χρησιμοποιείται ως μοναδικό αναγνωριστικό.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/en.js b/umap/static/umap/locale/en.js index 48cb4979..2d10ac14 100644 --- a/umap/static/umap/locale/en.js +++ b/umap/static/umap/locale/en.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Add symbol", "Allow scroll wheel zoom?": "Allow scroll wheel zoom?", "Automatic": "Automatic", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("en", locale); -L.setLocale("en"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": " (area: {measure})", + " (length: {measure})": " (length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("en", locale) +L.setLocale("en") diff --git a/umap/static/umap/locale/en.json b/umap/static/umap/locale/en.json index f111f462..e733a2fb 100644 --- a/umap/static/umap/locale/en.json +++ b/umap/static/umap/locale/en.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": " (area: {measure})", + " (length: {measure})": " (length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/en_US.json b/umap/static/umap/locale/en_US.json index 3ce4a67d..1d38421a 100644 --- a/umap/static/umap/locale/en_US.json +++ b/umap/static/umap/locale/en_US.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Actions", "Advanced properties": "Appearance", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occurred", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "Zoom and center saved.", "To use if remote server doesn't allow cross domain (slower)": "Use if the remote server doesn't support CORS (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/es.js b/umap/static/umap/locale/es.js index 511f09e4..7d6c2dbd 100644 --- a/umap/static/umap/locale/es.js +++ b/umap/static/umap/locale/es.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Añadir un símbolo", "Allow scroll wheel zoom?": "¿Permitir acercar con la rueda central del ratón?", "Automatic": "Automático", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Añadir un polígono al multi elemento actual", "Advanced actions": "Acciones avanzadas", "Advanced properties": "Propiedades avanzadas", - "Advanced transition": "Transición avanzada", "All properties are imported.": "Todas las propiedades están importadas.", "Allow interactions": "Permitir interacciones", "An error occured": "Ocurrió un error", @@ -190,7 +189,6 @@ var locale = { "Home": "Inicio", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Cuánto simplificar la polilínea en cada nivel de acercamiento (más = mejor rendimiento y aspecto más suave, menos = más preciso)", "If false, the polygon will act as a part of the underlying map.": "Si falso, el polígono actuará como una parte del mapa subyacente.", - "Iframe export options": "Opciones de exportación del iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe con altura personalizada (en píxeles): {{{http://iframe.url.com|altura}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe con alto y ancho (en px) personalizado: {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Mostrar/ocultar capa", "Simple link: [[http://example.com]]": "Enlace simple: [[http://ejemplo.com]]", "Slideshow": "Presentación de diapositivas", - "Smart transitions": "Transiciones inteligentes", "Sort key": "Orden de la clave", "Split line": "Linea de división", "Start a hole here": "Iniciar un agujero aquí", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Parar presentación de diapositivas", "Supported scheme": "Esquema soportado", "Supported variables that will be dynamically replaced": "Las variables soportadas que serán reemplazadas dinámicamente", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "El símbolo puede ser un carácter unicode o una URL. Se pueden usar propiedades del elemento como variables: por ejemplo: con \"http://myserver.org/images/{name}.png\", la variable {name} será reemplazada por el valor \"name\" de cada marcador.", "TMS format": "formato TMS", "Text color for the cluster label": "Color del texto para la etiqueta clúster", "Text formatting": "Formato de texto", "The name of the property to use as feature label (ex.: \"nom\")": "El nombre de la propiedad a usar como etiqueta del elemento (ejemplo: «nom»)", - "The zoom and center have been set.": "El acercamiento y el centrado han sido establecidos.", "To use if remote server doesn't allow cross domain (slower)": "Para utilizar si el servidor remoto no permite dominios cruzados (más lento)", "To zoom": "Para acercar/alejar", "Toggle edit mode (Shift+Click)": "Conmuta el modo edición (Shift+Clic)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "millas", "nautical miles": "millas náuticas", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} millas", - "{distance} yd": "{distance} yd", "1 day": "1 día", "1 hour": "1 hora", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Opcional.", "Paste your data here": "Pega tus datos aquí", "Please save the map first": "Guarde primero el mapa", - "Unable to locate you.": "No se pudo ubicar.", "Feature identifier key": "Clave de identificación del elemento", "Open current feature on load": "Abrir el elemento actual al cargar", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "El nombre de la propiedad a utilizar como identificador único del elemento." -}; -L.registerLocale("es", locale); -L.setLocale("es"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "El nombre de la propiedad a utilizar como identificador único del elemento.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("es", locale) +L.setLocale("es") diff --git a/umap/static/umap/locale/es.json b/umap/static/umap/locale/es.json index 55d68af9..1d329e34 100644 --- a/umap/static/umap/locale/es.json +++ b/umap/static/umap/locale/es.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Añadir un polígono al multi elemento actual", "Advanced actions": "Acciones avanzadas", "Advanced properties": "Propiedades avanzadas", - "Advanced transition": "Transición avanzada", "All properties are imported.": "Todas las propiedades están importadas.", "Allow interactions": "Permitir interacciones", "An error occured": "Ocurrió un error", @@ -190,7 +189,6 @@ "Home": "Inicio", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Cuánto simplificar la polilínea en cada nivel de acercamiento (más = mejor rendimiento y aspecto más suave, menos = más preciso)", "If false, the polygon will act as a part of the underlying map.": "Si falso, el polígono actuará como una parte del mapa subyacente.", - "Iframe export options": "Opciones de exportación del iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe con altura personalizada (en píxeles): {{{http://iframe.url.com|altura}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe con alto y ancho (en px) personalizado: {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Mostrar/ocultar capa", "Simple link: [[http://example.com]]": "Enlace simple: [[http://ejemplo.com]]", "Slideshow": "Presentación de diapositivas", - "Smart transitions": "Transiciones inteligentes", "Sort key": "Orden de la clave", "Split line": "Linea de división", "Start a hole here": "Iniciar un agujero aquí", @@ -279,12 +276,10 @@ "Stop slideshow": "Parar presentación de diapositivas", "Supported scheme": "Esquema soportado", "Supported variables that will be dynamically replaced": "Las variables soportadas que serán reemplazadas dinámicamente", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "El símbolo puede ser un carácter unicode o una URL. Se pueden usar propiedades del elemento como variables: por ejemplo: con \"http://myserver.org/images/{name}.png\", la variable {name} será reemplazada por el valor \"name\" de cada marcador.", "TMS format": "formato TMS", "Text color for the cluster label": "Color del texto para la etiqueta clúster", "Text formatting": "Formato de texto", "The name of the property to use as feature label (ex.: \"nom\")": "El nombre de la propiedad a usar como etiqueta del elemento (ejemplo: «nom»)", - "The zoom and center have been set.": "El acercamiento y el centrado han sido establecidos.", "To use if remote server doesn't allow cross domain (slower)": "Para utilizar si el servidor remoto no permite dominios cruzados (más lento)", "To zoom": "Para acercar/alejar", "Toggle edit mode (Shift+Click)": "Conmuta el modo edición (Shift+Clic)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "millas", "nautical miles": "millas náuticas", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} millas", - "{distance} yd": "{distance} yd", "1 day": "1 día", "1 hour": "1 hora", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Opcional.", "Paste your data here": "Pega tus datos aquí", "Please save the map first": "Guarde primero el mapa", - "Unable to locate you.": "No se pudo ubicar.", "Feature identifier key": "Clave de identificación del elemento", "Open current feature on load": "Abrir el elemento actual al cargar", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "El nombre de la propiedad a utilizar como identificador único del elemento." + "The name of the property to use as feature unique identifier.": "El nombre de la propiedad a utilizar como identificador único del elemento.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/et.js b/umap/static/umap/locale/et.js index a4d35d0e..f37460ea 100644 --- a/umap/static/umap/locale/et.js +++ b/umap/static/umap/locale/et.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Lisa sümbol", "Allow scroll wheel zoom?": "Luba hiirerullikuga suurendamine?", "Automatic": "Automaatne", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Täiendavad tegevused", "Advanced properties": "Täiendavad omadused", - "Advanced transition": "Advanced transition", "All properties are imported.": "Kõik omadused imporditi.", "Allow interactions": "Luba interaktsioonid", "An error occured": "Ilmnes viga", @@ -190,7 +189,6 @@ var locale = { "Home": "Avaleht", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe'i eksportimise suvandid", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe kohandatud kõrgusega (pikslites): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe kohandatud kõrguse ja laiusega (pikslites): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Näita/peida kiht", "Simple link: [[http://example.com]]": "Link: [[http://example.com]]", "Slideshow": "Slaidiprogramm", - "Smart transitions": "Nutikad üleminekud", "Sort key": "Sorteerimise võti", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Lõpeta slaidiprogramm", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS vorming", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Tekstivorming", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "Suurendus ja keskpunkt salvestati", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "Suurendusastmeni", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miilid", "nautical miles": "meremiilid", - "{area} acres": "{area} hektarit", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miili", - "{distance} yd": "{distance} yd", "1 day": "1 päev", "1 hour": "1 tund", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Valikuline.", "Paste your data here": "Kleebi oma andmed siia", "Please save the map first": "Salvesta palun enne kaart", - "Unable to locate you.": "Sinu asukohta ei suudetud määrata.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Püsilink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("et", locale); -L.setLocale("et"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("et", locale) +L.setLocale("et") diff --git a/umap/static/umap/locale/et.json b/umap/static/umap/locale/et.json index f3d4d895..8e7ba1e7 100644 --- a/umap/static/umap/locale/et.json +++ b/umap/static/umap/locale/et.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Täiendavad tegevused", "Advanced properties": "Täiendavad omadused", - "Advanced transition": "Advanced transition", "All properties are imported.": "Kõik omadused imporditi.", "Allow interactions": "Luba interaktsioonid", "An error occured": "Ilmnes viga", @@ -190,7 +189,6 @@ "Home": "Avaleht", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe'i eksportimise suvandid", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe kohandatud kõrgusega (pikslites): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe kohandatud kõrguse ja laiusega (pikslites): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Näita/peida kiht", "Simple link: [[http://example.com]]": "Link: [[http://example.com]]", "Slideshow": "Slaidiprogramm", - "Smart transitions": "Nutikad üleminekud", "Sort key": "Sorteerimise võti", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Lõpeta slaidiprogramm", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS vorming", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Tekstivorming", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "Suurendus ja keskpunkt salvestati", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "Suurendusastmeni", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miilid", "nautical miles": "meremiilid", - "{area} acres": "{area} hektarit", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miili", - "{distance} yd": "{distance} yd", "1 day": "1 päev", "1 hour": "1 tund", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Valikuline.", "Paste your data here": "Kleebi oma andmed siia", "Please save the map first": "Salvesta palun enne kaart", - "Unable to locate you.": "Sinu asukohta ei suudetud määrata.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Püsilink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/fa_IR.js b/umap/static/umap/locale/fa_IR.js new file mode 100644 index 00000000..c32d9b3b --- /dev/null +++ b/umap/static/umap/locale/fa_IR.js @@ -0,0 +1,397 @@ +const locale = { + "Add symbol": "اضافه کردن نماد", + "Allow scroll wheel zoom?": "آیا به زوم چرخ اسکرول اجازه داده شود؟", + "Automatic": "خودکار", + "Ball": "توپ", + "Cancel": "انصراف", + "Caption": "زیرنویس", + "Change symbol": "تغییر نماد", + "Choose the data format": "قالب داده را انتخاب کنید", + "Choose the layer of the feature": "لایه ویژگی را انتخاب کنید", + "Circle": "دایره", + "Clustered": "خوشه ای", + "Data browser": "مرورگر داده", + "Default": "پیش فرض", + "Default zoom level": "سطح بزرگنمایی پیش فرض", + "Default: name": "پیش فرض: نام", + "Display label": "برچسب نمایش", + "Display the control to open OpenStreetMap editor": "کنترل را برای باز کردن ویرایشگر اوپن‌استریت‌مپ نمایش دهید", + "Display the data layers control": "نمایش کنترل لایه های داده", + "Display the embed control": "نمایش کنترل جاسازی", + "Display the fullscreen control": "نمایش کنترل تمام صفحه", + "Display the locate control": "کنترل مکان یابی را نمایش دهید", + "Display the measure control": "نمایش کنترل اندازه گیری", + "Display the search control": "نمایش کنترل جستجو", + "Display the tile layers control": "نمایش لایه های کنترل کاشی", + "Display the zoom control": "نمایش کنترل زوم", + "Do you want to display a caption bar?": "آیا می خواهید نوار زیرنویس نشان داده شود؟", + "Do you want to display a minimap?": "آیا می خواهید حداقل نقشه را نمایش دهید؟", + "Do you want to display a panel on load?": "آیا می خواهید یک صفحه را در حالت بارگذاری نمایش دهید؟", + "Do you want to display popup footer?": "آیا می خواهید پاورقی نمایش داده شود؟", + "Do you want to display the scale control?": "آیا می خواهید کنترل مقیاس را نمایش دهید؟", + "Do you want to display the «more» control?": "آیا می خواهید کنترل «بیشتر» را نمایش دهید؟", + "Drop": "رها کردن", + "GeoRSS (only link)": "GeoRSS (فقط لینک)", + "GeoRSS (title + image)": "GeoRSS (عنوان + تصویر)", + "Heatmap": "نقشه حرارت و گرما", + "Icon shape": "شکل نماد", + "Icon symbol": "آیکون نماد", + "Inherit": "ارث بری", + "Label direction": "جهت برچسب", + "Label key": "کلید برچسب", + "Labels are clickable": "برچسب ها قابل کلیک هستند", + "None": "هیچکدام", + "On the bottom": "در انتها", + "On the left": "در سمت چپ", + "On the right": "در سمت راست", + "On the top": "در بالا", + "Popup content template": "قالب محتوای بازشو", + "Set symbol": "تنظیم نماد", + "Side panel": "پنل کناری", + "Simplify": "ساده کنید", + "Symbol or url": "نماد یا آدرس اینترنتی", + "Table": "جدول", + "always": "همیشه", + "clear": "روشن/شفاف", + "collapsed": "فرو ریخت", + "color": "رنگ", + "dash array": "آرایه خط تیره", + "define": "تعريف كردن", + "description": "شرح", + "expanded": "منبسط", + "fill": "پر کردن", + "fill color": "پر کردن رنگ", + "fill opacity": "تاری/کِدِری را پر کنید", + "hidden": "پنهان", + "iframe": "iframe", + "inherit": "به ارث می برند", + "name": "نام", + "never": "هرگز", + "new window": "پنجره جدید", + "no": "نه", + "on hover": "روی شناور", + "opacity": "تاری/کِدِری", + "parent window": "پنجره والدین", + "stroke": "سکته", + "weight": "وزن/سنگینی", + "yes": "بله", + "{delay} seconds": "{تاخیر} ثانیه", + "# one hash for main heading": "# یک هشتگ برای عنوان اصلی", + "## two hashes for second heading": "## دو هشتگ برای عنوان دوم", + "### three hashes for third heading": "### سه هشتگ برای عنوان سوم", + "**double star for bold**": "** دو ستاره برای پررنگ **", + "*simple star for italic*": "*ستاره ساده برای حروف کج*", + "--- for an horizontal rule": "--- برای یک قاعده افقی", + "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".": "لیستی از اعداد جدا شده با کاما که الگوی خط تیره را مشخص می کند. مثال: \"5 ، 10 ، 15\".", + "About": "درباره", + "Action not allowed :(": "اقدام مجاز نیست :(", + "Activate slideshow mode": "حالت نمایش اسلاید را فعال کنید", + "Add a layer": "یک لایه اضافه کنید", + "Add a line to the current multi": "یک خط به مولتی فعلی اضافه کنید", + "Add a new property": "یک ویژگی جدید اضافه کنید", + "Add a polygon to the current multi": "چند ضلعی را به مولتی فعلی اضافه کنید", + "Advanced actions": "اقدامات پیشرفته", + "Advanced properties": "خواص پیشرفته", + "All properties are imported.": "همه املاک وارد شده است", + "Allow interactions": "اجازه تعامل دهید", + "An error occured": "خطایی رخ داد", + "Are you sure you want to cancel your changes?": "آیا مطمئن هستید که می خواهید تغییرات خود را لغو کنید؟", + "Are you sure you want to clone this map and all its datalayers?": "آیا مطمئن هستید که می خواهید این نقشه و همه فهرست داده های آن را شبیه سازی کنید؟", + "Are you sure you want to delete the feature?": "آیا مطمئن هستید که می خواهید ویژگی را حذف کنید؟", + "Are you sure you want to delete this layer?": "آیا مطمئن هستید که می خواهید این لایه را حذف کنید؟", + "Are you sure you want to delete this map?": "آیا مطمئن هستید که می خواهید این نقشه را حذف کنید؟", + "Are you sure you want to delete this property on all the features?": "آیا مطمئن هستید که می خواهید این ویژگی را در همه ویژگی ها حذف کنید؟", + "Are you sure you want to restore this version?": "آیا مطمئن هستید که می خواهید این نسخه را بازیابی کنید؟", + "Attach the map to my account": "نقشه را به حساب من وصل کنید", + "Auto": "خودکار", + "Autostart when map is loaded": "هنگام بارگیری، نقشه خودکار را راه اندازی کنید", + "Bring feature to center": "ویژگی را به مرکز بیاورید", + "Browse data": "مرور داده ها", + "Cancel edits": "لغو ویرایش ها", + "Center map on your location": "نقشه مرکز بر روی موقعیت مکانی شما", + "Change map background": "تغییر پس زمینه نقشه", + "Change tilelayers": "کاشی های کاری را تغییر دهید", + "Choose a preset": "از پیش تعیین شده را انتخاب کنید", + "Choose the format of the data to import": "قالب داده را برای وارد کردن انتخاب کنید", + "Choose the layer to import in": "لایه ای را برای وارد کردن انتخاب کنید", + "Click last point to finish shape": "برای پایان دادن به شکل روی آخرین نقطه کلیک کنید", + "Click to add a marker": "برای افزودن نشانگر کلیک کنید", + "Click to continue drawing": "برای ادامه ترسیم کلیک کنید", + "Click to edit": "برای ویرایش کلیک کنید", + "Click to start drawing a line": "برای شروع رسم خط کلیک کنید", + "Click to start drawing a polygon": "برای شروع ترسیم چند ضلعی کلیک کنید", + "Clone": "شبیه سازی / کلون", + "Clone of {name}": "شبیه سازی {name}", + "Clone this feature": "این ویژگی را شبیه سازی کنید", + "Clone this map": "شبیه سازی این نقشه", + "Close": "بستن", + "Clustering radius": "شعاع خوشه بندی", + "Comma separated list of properties to use when filtering features": "لیستی از خواص جدا شده با کاما برای فیلتر کردن ویژگی ها", + "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "مقادیر جدا شده با کاما، برگه یا نیمه کولون. SRS WGS84 ضمنی است. فقط هندسه نقطه وارد می شود. واردات به سربرگهای ستون برای ذکر هرگونه عبارت «lat» و «lon» در ابتدای سرصفحه، بدون حساس به حروف، نگاه می کند. همه ستون های دیگر به عنوان ویژگی وارد می شوند.", + "Continue line": "ادامه خط", + "Continue line (Ctrl+Click)": "ادامه خط (Ctrl+Click)", + "Coordinates": "مختصات", + "Credits": "اعتبار", + "Current view instead of default map view?": "نمای فعلی به جای نمای نقشه پیش فرض؟", + "Custom background": "پس زمینه سفارشی", + "Data is browsable": "داده ها قابل مرور هستند", + "Default interaction options": "گزینه های پیش فرض تعامل", + "Default properties": "خواص پیش فرض", + "Default shape properties": "ویژگی های شکل پیش فرض", + "Define link to open in a new window on polygon click.": "پیوندی را باز کنید که در یک پنجره جدید با کلیک چند ضلعی باز می شود.", + "Delay between two transitions when in play mode": "تأخیر بین دو انتقال در حالت پخش", + "Delete": "حذف", + "Delete all layers": "حذف همه لایه ها", + "Delete layer": "حذف لایه", + "Delete this feature": "این ویژگی را حذف کنید", + "Delete this property on all the features": "این ویژگی را در همه ویژگی ها حذف کنید", + "Delete this shape": "این شکل را حذف کنید", + "Delete this vertex (Alt+Click)": "حذف این راس (Alt+Click)", + "Directions from here": "مسیرها از اینجا", + "Disable editing": "ویرایش را غیرفعال کنید", + "Display measure": "اندازه نمایش", + "Display on load": "نمایش روی بارگذاری", + "Download": "دانلود", + "Download data": "دانلود داده", + "Drag to reorder": "برای مرتب سازی دیگر بکشید", + "Draw a line": "یک خط بکش", + "Draw a marker": "یک نشانگر بکشید", + "Draw a polygon": "چند ضلعی بکشید", + "Draw a polyline": "چند خطی بکشید", + "Dynamic": "پویا", + "Dynamic properties": "خواص پویا", + "Edit": "ویرایش", + "Edit feature's layer": "لایه ویژگی را ویرایش کنید", + "Edit map properties": "ویرایش ویژگی های نقشه", + "Edit map settings": "ویرایش تنظیمات نقشه", + "Edit properties in a table": "ویژگی ها را در یک جدول ویرایش کنید", + "Edit this feature": "این ویژگی را ویرایش کنید", + "Editing": "ویرایش", + "Embed and share this map": "این نقشه را جاسازی کرده و به اشتراک بگذارید", + "Embed the map": "نقشه را جاسازی کنید", + "Empty": "خالی", + "Enable editing": "ویرایش را فعال کنید", + "Error in the tilelayer URL": "خطا در آدرس اینترنتی لایه کاشی", + "Error while fetching {url}": "خطا هنگام واکشی {آدرس اینترنتی}", + "Exit Fullscreen": "خروج از تمام صفحه", + "Extract shape to separate feature": "استخراج شکل به ویژگی جدا", + "Fetch data each time map view changes.": "هر بار که نمای نقشه تغییر می کند، داده ها را واکشی کنید.", + "Filter keys": "کلیدهای فیلتر", + "Filter…": "فیلتر…", + "Format": "قالب", + "From zoom": "از زوم", + "Full map data": "داده های نقشه کامل", + "Go to «{feature}»": "به «{ویژگی}» بروید", + "Heatmap intensity property": "ویژگی شدت حرارت", + "Heatmap radius": "شعاع نقشه حرارتی", + "Help": "راهنما", + "Hide controls": "مخفی کردن کنترل ها", + "Home": "خانه", + "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "چقدر می توان چند خطی را در هر سطح بزرگنمایی ساده کرد (بیشتر = عملکرد بهتر و ظاهر صاف، کمتر = دقیق تر)", + "If false, the polygon will act as a part of the underlying map.": "اگر نادرست باشد، چند ضلعی به عنوان بخشی از نقشه زیرین عمل می کند.", + "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe با ارتفاع سفارشی (بر حسب px):{{{http://iframe.url.com|height}}}", + "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "iframe با ارتفاع و عرض سفارشی (بر حسب px):{{{http://iframe.url.com|height*width}}}", + "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", + "Image with custom width (in px): {{http://image.url.com|width}}": "تصویر با عرض سفارشی (بر حسب px): {{http://image.url.com|width}}", + "Image: {{http://image.url.com}}": "تصویر: {{http://image.url.com}}", + "Import": "وارد كردن", + "Import data": "وارد كردن داده", + "Import in a new layer": "وارد کردن در یک لایه جدید", + "Imports all umap data, including layers and settings.": "همه داده های umap ، از جمله لایه ها و تنظیمات را وارد می کند.", + "Include full screen link?": "پیوند تمام صفحه را شامل می شود؟", + "Interaction options": "گزینه های تعامل", + "Invalid umap data": "داده های umap نامعتبر است", + "Invalid umap data in {filename}": "داده های umap نامعتبر در {نام فایل}", + "Keep current visible layers": "لایه های قابل مشاهده فعلی را حفظ کنید", + "Latitude": "عرض جغرافیایی", + "Layer": "لایه", + "Layer properties": "خواص لایه", + "Licence": "مجوز", + "Limit bounds": "محدودیت ها را محدود کنید", + "Link to…": "پیوند به…", + "Link with text: [[http://example.com|text of the link]]": "پیوند با متن: [[http://example.com|text of the link]]", + "Long credits": "اعتبارات طولانی", + "Longitude": "عرض جغرافیایی", + "Make main shape": "شکل اصلی را ایجاد کنید", + "Manage layers": "لایه ها را مدیریت کنید", + "Map background credits": "اعتبار پس زمینه نقشه", + "Map has been attached to your account": "نقشه به حساب شما پیوست شده است", + "Map has been saved!": "نقشه ذخیره شد!", + "Map user content has been published under licence": "محتوای کاربر نقشه، تحت مجوز منتشر شده است", + "Map's editors": "ویرایشگران نقشه", + "Map's owner": "مالک نقشه", + "Merge lines": "ادغام خطوط", + "More controls": "کنترل های بیشتر", + "Must be a valid CSS value (eg.: DarkBlue or #123456)": "باید یک مقدار CSS معتبر باشد (به عنوان مثال: DarkBlue یا #123456)", + "No licence has been set": "هیچ مجوزی تنظیم نشده است", + "No results": "بدون نتیجه", + "Only visible features will be downloaded.": "فقط ویژگی های قابل مشاهده بارگیری می شوند.", + "Open download panel": "باز کردن پنل بارگیری", + "Open link in…": "باز کردن پیوند در…", + "Open this map extent in a map editor to provide more accurate data to OpenStreetMap": "این محدوده نقشه را در ویرایشگر نقشه باز کنید تا داده های دقیق تری در اوپن‌استریت‌مپ ارائه شود", + "Optional intensity property for heatmap": "ویژگی های اختیاری شدت برای نقشه حرارتی", + "Optional. Same as color if not set.": "اختیاری. اگر تنظیم نشده باشد همان رنگ است.", + "Override clustering radius (default 80)": "نادیده گرفتن شعاع خوشه بندی (پیش فرض 80)", + "Override heatmap radius (default 25)": "لغو شعاع نقشه حرارتی (پیش فرض 25)", + "Please be sure the licence is compliant with your use.": "لطفاً مطمئن شوید مجوز با استفاده شما مطابقت دارد.", + "Please choose a format": "لطفاً یک قالب را انتخاب کنید", + "Please enter the name of the property": "لطفاً نام ملک را وارد کنید", + "Please enter the new name of this property": "لطفا نام جدید این ملک را وارد کنید", + "Powered by Leaflet and Django, glued by uMap project.": "طراحی شده توسط Leaflet و Django، چسبیده به پروژه uMap.", + "Problem in the response": "مشکل در پاسخگویی", + "Problem in the response format": "مشکل در قالب پاسخگویی", + "Properties imported:": "خواص وارد شده:", + "Property to use for sorting features": "ویژگی مورد استفاده برای مرتب سازی ویژگی ها", + "Provide an URL here": "در اینجا آدرس اینترنتی ارائه دهید", + "Proxy request": "درخواست پروکسی", + "Remote data": "داده های از راه دور", + "Remove shape from the multi": "حذف شکل از مولتی", + "Rename this property on all the features": "نام این ویژگی را در همه ویژگی ها تغییر دهید", + "Replace layer content": "جایگزینی محتوای لایه", + "Restore this version": "این نسخه را بازیابی کنید", + "Save": "ذخیره", + "Save anyway": "به هر حال ذخیره کنید", + "Save current edits": "ویرایش های فعلی را ذخیره کنید", + "Save this center and zoom": "این مرکز را ذخیره کرده و بزرگنمایی کنید", + "Save this location as new feature": "این مکان را به عنوان ویژگی جدید ذخیره کنید", + "Search a place name": "نام مکان را جستجو کنید", + "Search location": "مکان را جستجو کنید", + "Secret edit link is:
    {link}": "پیوند ویرایش مخفی این است:
    {لینک}", + "See all": "همه را ببین", + "See data layers": "لایه های داده را مشاهده کنید", + "See full screen": "تمام صفحه را مشاهده کنید", + "Set it to false to hide this layer from the slideshow, the data browser, the popup navigation…": "آن را روی غلط/false تنظیم کنید تا این لایه از نمایش اسلاید، مرورگر داده، ناوبری بازشو پنهان شود…", + "Shape properties": "ویژگی های شکل", + "Short URL": "آدرس اینترنتی کوتاه", + "Short credits": "اعتبار کوتاه مدت", + "Show/hide layer": "نمایش/مخفی کردن لایه", + "Simple link: [[http://example.com]]": "پیوند ساده: [[http://example.com]]", + "Slideshow": "نمایش اسلاید", + "Sort key": "کلید مرتب سازی", + "Split line": "خط تقسیم", + "Start a hole here": "از اینجا یک حفره شروع کنید", + "Start editing": "ویرایش را شروع کنید", + "Start slideshow": "شروع نمایش اسلاید", + "Stop editing": "ویرایش را متوقف کنید", + "Stop slideshow": "نمایش اسلاید را متوقف کنید", + "Supported scheme": "طرح پشتیبانی شده", + "Supported variables that will be dynamically replaced": "متغیرهای پشتیبانی شده که به صورت پویا جایگزین می شوند", + "TMS format": "قالب TMS", + "Text color for the cluster label": "رنگ متن برای برچسب خوشه", + "Text formatting": "قالب بندی متن", + "The name of the property to use as feature label (ex.: \"nom\")": "نام ویژگی مورد استفاده برای برچسب ویژگی (به عنوان مثال: \"nom\")", + "To use if remote server doesn't allow cross domain (slower)": "برای استفاده در صورت عدم دسترسی سرور از راه دور به دامنه (کندتر)", + "To zoom": "زوم", + "Toggle edit mode (Shift+Click)": "تغییر حالت ویرایش (Shift+Click)", + "Transfer shape to edited feature": "انتقال شکل به ویژگی ویرایش شده", + "Transform to lines": "تبدیل به خطوط", + "Transform to polygon": "تبدیل به چند ضلعی", + "Type of layer": "نوع لایه", + "Unable to detect format of file {filename}": "تشخیص قالب فایل {نام فایل} امکان پذیر نیست", + "Untitled layer": "لایه بدون عنوان", + "Untitled map": "نقشه بدون عنوان", + "Update permissions": "مجوزها را به روز کنید", + "Update permissions and editors": "مجوزها و ویرایشگران را به روز کنید", + "Url": "آدرس اینترنتی", + "Use current bounds": "از مرزهای فعلی استفاده کنید", + "Use placeholders with feature properties between brackets, eg. {name}, they will be dynamically replaced by the corresponding values.": "از متغیرهایی با ویژگی های ویژگی بین براکت ها استفاده کنید ، به عنوان مثال. {name}، آنها به طور پویا با مقادیر مربوطه جایگزین می شوند.", + "User content credits": "اعتبار محتوای کاربر", + "User interface options": "گزینه های رابط کاربر", + "Versions": "نسخه ها", + "View Fullscreen": "مشاهده تمام صفحه", + "Where do we go from here?": "از اینجا به کجا می رویم؟", + "Whether to display or not polygons paths.": "اینکه آیا مسیرهای چند ضلعی نمایش داده شود یا خیر.", + "Whether to fill polygons with color.": "این که چند ضلعی ها را با رنگ پر کنیم یا خیر.", + "Who can edit": "چه کسی می تواند ویرایش کند", + "Who can view": "چه کسی می تواند مشاهده کند", + "Will be displayed in the bottom right corner of the map": "در گوشه سمت راست پایین نقشه نمایش داده می شود", + "Will be visible in the caption of the map": "در زیرنویس نقشه قابل مشاهده خواهد بود", + "Woops! Someone else seems to have edited the data. You can save anyway, but this will erase the changes made by others.": "وای! به نظر می رسد شخص دیگری داده ها را ویرایش کرده است. در هر صورت می توانید ذخیره کنید، اما با این کار تغییرات ایجاد شده توسط دیگران پاک می شود.", + "You have unsaved changes.": "تغییرات ذخیره نشده ای دارید.", + "Zoom in": "بزرگنمایی", + "Zoom level for automatic zooms": "سطح زوم برای بزرگنمایی خودکار", + "Zoom out": "کوچک نمایی", + "Zoom to layer extent": "تا اندازه لایه بزرگنمایی کنید", + "Zoom to the next": "روی بعدی زوم کنید", + "Zoom to the previous": "روی قبلی بزرگنمایی کنید", + "Zoom to this feature": "روی این ویژگی بزرگنمایی کنید", + "Zoom to this place": "روی این مکان بزرگنمایی کنید", + "attribution": "انتساب", + "by": "بوسیله", + "display name": "نام نمایشی", + "height": "ارتفاع", + "licence": "مجوز", + "max East": "حداکثر شرقی", + "max North": "حداکثر شمالی", + "max South": "حداکثر جنوبی", + "max West": "حداکثر غربی", + "max zoom": "حداکثر بزرگنمایی", + "min zoom": "حداقل بزرگنمایی", + "next": "بعد", + "previous": "قبل", + "width": "عرض", + "{count} errors during import: {message}": "{شمردن} خطاها هنگام وارد کردن: {پیام}", + "Measure distances": "فاصله ها را اندازه گیری کنید", + "NM": "NM", + "kilometers": "کیلومتر", + "km": "کیلومتر", + "mi": "مایل", + "miles": "مایل ها", + "nautical miles": "مایل دریایی", + "1 day": "1 روز", + "1 hour": "1 ساعت", + "5 min": "5 دقیقه", + "Cache proxied request": "درخواست پراکسی حافظه پنهان", + "No cache": "بدون حافظه پنهان", + "Popup": "پنجره بازشو", + "Popup (large)": "پنجره بازشو (بزرگ)", + "Popup content style": "سبک محتوای بازشو", + "Popup shape": "شکل پنجره بازشو", + "Skipping unknown geometry.type: {type}": "رد شدن از geometry.type ناشناخته: {نوع}", + "Optional.": "اختیاری.", + "Paste your data here": "اطلاعات و داده های خود را اینجا بچسبانید", + "Please save the map first": "لطفاً ابتدا نقشه را ذخیره کنید", + "Feature identifier key": "کلید شناسایی ویژگی", + "Open current feature on load": "باز کردن ویژگی فعلی هنگام بارگیری", + "Permalink": "پیوند ثابت", + "The name of the property to use as feature unique identifier.": "نام ویژگی برای استفاده به عنوان شناسه منحصر به فرد ویژگی.", + "Advanced filter keys": "کلیدهای فیلتر پیشرفته", + "Comma separated list of properties to use for checkbox filtering": "فهرستی از ویژگی‌های جدا شده با کاما برای استفاده برای فیلتر کردن کادر تأیید", + "Data filters": "فیلتر داده‌ها", + "Do you want to display caption menus?": "آیا می‌خواهید منوهای زیرنویس نشان داده شود؟", + "Example: key1,key2,key3": "به عنوان مثال: کلید 1، کلید 2، کلید 3", + "Invalid latitude or longitude": "طول یا عرض جغرافیایی نامعتبر است", + "Invalide property name: {name}": "نام دارایی معتبر نیست: {name}", + "No results for these filters": "برای این فیلترها هیچ نتیجه‌ای وجود ندارد", + "Permanent credits": "اعتبارات دائمی", + "Permanent credits background": "پیشینه اعتبارات دائمی", + "Select data": "داده‌ها را انتخاب کنید", + "Will be permanently visible in the bottom left corner of the map": "برای همیشه در گوشه سمت چپ پایین نقشه قابل مشاهده خواهد بود", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("fa_IR", locale) +L.setLocale("fa_IR") diff --git a/umap/static/umap/locale/fa_IR.json b/umap/static/umap/locale/fa_IR.json index 61dcaac8..7901c48c 100644 --- a/umap/static/umap/locale/fa_IR.json +++ b/umap/static/umap/locale/fa_IR.json @@ -1,374 +1,395 @@ { - "Add symbol": "Add symbol", - "Allow scroll wheel zoom?": "Allow scroll wheel zoom?", + "Add symbol": "اضافه کردن نماد", + "Allow scroll wheel zoom?": "آیا به زوم چرخ اسکرول اجازه داده شود؟", "Automatic": "خودکار", "Ball": "توپ", "Cancel": "انصراف", - "Caption": "Caption", - "Change symbol": "Change symbol", - "Choose the data format": "Choose the data format", - "Choose the layer of the feature": "Choose the layer of the feature", - "Circle": "Circle", - "Clustered": "Clustered", - "Data browser": "Data browser", - "Default": "Default", - "Default zoom level": "Default zoom level", - "Default: name": "Default: name", - "Display label": "Display label", - "Display the control to open OpenStreetMap editor": "Display the control to open OpenStreetMap editor", - "Display the data layers control": "Display the data layers control", - "Display the embed control": "Display the embed control", - "Display the fullscreen control": "Display the fullscreen control", - "Display the locate control": "Display the locate control", - "Display the measure control": "Display the measure control", - "Display the search control": "Display the search control", - "Display the tile layers control": "Display the tile layers control", - "Display the zoom control": "Display the zoom control", - "Do you want to display a caption bar?": "Do you want to display a caption bar?", - "Do you want to display a minimap?": "Do you want to display a minimap?", - "Do you want to display a panel on load?": "Do you want to display a panel on load?", - "Do you want to display popup footer?": "Do you want to display popup footer?", - "Do you want to display the scale control?": "Do you want to display the scale control?", - "Do you want to display the «more» control?": "Do you want to display the «more» control?", - "Drop": "Drop", - "GeoRSS (only link)": "GeoRSS (only link)", - "GeoRSS (title + image)": "GeoRSS (title + image)", - "Heatmap": "Heatmap", - "Icon shape": "Icon shape", - "Icon symbol": "Icon symbol", - "Inherit": "Inherit", - "Label direction": "Label direction", - "Label key": "Label key", - "Labels are clickable": "Labels are clickable", - "None": "None", - "On the bottom": "On the bottom", - "On the left": "On the left", - "On the right": "On the right", - "On the top": "On the top", - "Popup content template": "Popup content template", - "Set symbol": "Set symbol", - "Side panel": "Side panel", - "Simplify": "Simplify", - "Symbol or url": "Symbol or url", - "Table": "Table", - "always": "always", - "clear": "clear", - "collapsed": "collapsed", - "color": "color", - "dash array": "dash array", - "define": "define", - "description": "description", - "expanded": "expanded", - "fill": "fill", - "fill color": "fill color", - "fill opacity": "fill opacity", - "hidden": "hidden", + "Caption": "زیرنویس", + "Change symbol": "تغییر نماد", + "Choose the data format": "قالب داده را انتخاب کنید", + "Choose the layer of the feature": "لایه ویژگی را انتخاب کنید", + "Circle": "دایره", + "Clustered": "خوشه ای", + "Data browser": "مرورگر داده", + "Default": "پیش فرض", + "Default zoom level": "سطح بزرگنمایی پیش فرض", + "Default: name": "پیش فرض: نام", + "Display label": "برچسب نمایش", + "Display the control to open OpenStreetMap editor": "کنترل را برای باز کردن ویرایشگر اوپن‌استریت‌مپ نمایش دهید", + "Display the data layers control": "نمایش کنترل لایه های داده", + "Display the embed control": "نمایش کنترل جاسازی", + "Display the fullscreen control": "نمایش کنترل تمام صفحه", + "Display the locate control": "کنترل مکان یابی را نمایش دهید", + "Display the measure control": "نمایش کنترل اندازه گیری", + "Display the search control": "نمایش کنترل جستجو", + "Display the tile layers control": "نمایش لایه های کنترل کاشی", + "Display the zoom control": "نمایش کنترل زوم", + "Do you want to display a caption bar?": "آیا می خواهید نوار زیرنویس نشان داده شود؟", + "Do you want to display a minimap?": "آیا می خواهید حداقل نقشه را نمایش دهید؟", + "Do you want to display a panel on load?": "آیا می خواهید یک صفحه را در حالت بارگذاری نمایش دهید؟", + "Do you want to display popup footer?": "آیا می خواهید پاورقی نمایش داده شود؟", + "Do you want to display the scale control?": "آیا می خواهید کنترل مقیاس را نمایش دهید؟", + "Do you want to display the «more» control?": "آیا می خواهید کنترل «بیشتر» را نمایش دهید؟", + "Drop": "رها کردن", + "GeoRSS (only link)": "GeoRSS (فقط لینک)", + "GeoRSS (title + image)": "GeoRSS (عنوان + تصویر)", + "Heatmap": "نقشه حرارت و گرما", + "Icon shape": "شکل نماد", + "Icon symbol": "آیکون نماد", + "Inherit": "ارث بری", + "Label direction": "جهت برچسب", + "Label key": "کلید برچسب", + "Labels are clickable": "برچسب ها قابل کلیک هستند", + "None": "هیچکدام", + "On the bottom": "در انتها", + "On the left": "در سمت چپ", + "On the right": "در سمت راست", + "On the top": "در بالا", + "Popup content template": "قالب محتوای بازشو", + "Set symbol": "تنظیم نماد", + "Side panel": "پنل کناری", + "Simplify": "ساده کنید", + "Symbol or url": "نماد یا آدرس اینترنتی", + "Table": "جدول", + "always": "همیشه", + "clear": "روشن/شفاف", + "collapsed": "فرو ریخت", + "color": "رنگ", + "dash array": "آرایه خط تیره", + "define": "تعريف كردن", + "description": "شرح", + "expanded": "منبسط", + "fill": "پر کردن", + "fill color": "پر کردن رنگ", + "fill opacity": "تاری/کِدِری را پر کنید", + "hidden": "پنهان", "iframe": "iframe", - "inherit": "inherit", - "name": "name", - "never": "never", - "new window": "new window", - "no": "no", - "on hover": "on hover", - "opacity": "opacity", - "parent window": "parent window", - "stroke": "stroke", - "weight": "weight", - "yes": "yes", - "{delay} seconds": "{delay} seconds", - "# one hash for main heading": "# one hash for main heading", - "## two hashes for second heading": "## two hashes for second heading", - "### three hashes for third heading": "### three hashes for third heading", - "**double star for bold**": "**double star for bold**", - "*simple star for italic*": "*simple star for italic*", - "--- for an horizontal rule": "--- for an horizontal rule", - "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".": "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".", - "About": "About", - "Action not allowed :(": "Action not allowed :(", - "Activate slideshow mode": "Activate slideshow mode", - "Add a layer": "Add a layer", - "Add a line to the current multi": "Add a line to the current multi", - "Add a new property": "Add a new property", - "Add a polygon to the current multi": "Add a polygon to the current multi", - "Advanced actions": "Advanced actions", - "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", - "All properties are imported.": "All properties are imported.", - "Allow interactions": "Allow interactions", - "An error occured": "An error occured", - "Are you sure you want to cancel your changes?": "Are you sure you want to cancel your changes?", - "Are you sure you want to clone this map and all its datalayers?": "Are you sure you want to clone this map and all its datalayers?", - "Are you sure you want to delete the feature?": "Are you sure you want to delete the feature?", - "Are you sure you want to delete this layer?": "Are you sure you want to delete this layer?", - "Are you sure you want to delete this map?": "Are you sure you want to delete this map?", - "Are you sure you want to delete this property on all the features?": "Are you sure you want to delete this property on all the features?", - "Are you sure you want to restore this version?": "Are you sure you want to restore this version?", - "Attach the map to my account": "Attach the map to my account", - "Auto": "Auto", - "Autostart when map is loaded": "Autostart when map is loaded", - "Bring feature to center": "Bring feature to center", - "Browse data": "Browse data", - "Cancel edits": "Cancel edits", - "Center map on your location": "Center map on your location", - "Change map background": "Change map background", - "Change tilelayers": "Change tilelayers", - "Choose a preset": "Choose a preset", - "Choose the format of the data to import": "Choose the format of the data to import", - "Choose the layer to import in": "Choose the layer to import in", - "Click last point to finish shape": "Click last point to finish shape", - "Click to add a marker": "Click to add a marker", - "Click to continue drawing": "Click to continue drawing", - "Click to edit": "Click to edit", - "Click to start drawing a line": "Click to start drawing a line", - "Click to start drawing a polygon": "Click to start drawing a polygon", - "Clone": "Clone", - "Clone of {name}": "Clone of {name}", - "Clone this feature": "Clone this feature", - "Clone this map": "Clone this map", - "Close": "Close", - "Clustering radius": "Clustering radius", - "Comma separated list of properties to use when filtering features": "Comma separated list of properties to use when filtering features", - "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.", - "Continue line": "Continue line", - "Continue line (Ctrl+Click)": "Continue line (Ctrl+Click)", - "Coordinates": "Coordinates", - "Credits": "Credits", - "Current view instead of default map view?": "Current view instead of default map view?", - "Custom background": "Custom background", - "Data is browsable": "Data is browsable", - "Default interaction options": "Default interaction options", - "Default properties": "Default properties", - "Default shape properties": "Default shape properties", - "Define link to open in a new window on polygon click.": "Define link to open in a new window on polygon click.", - "Delay between two transitions when in play mode": "Delay between two transitions when in play mode", - "Delete": "Delete", - "Delete all layers": "Delete all layers", - "Delete layer": "Delete layer", - "Delete this feature": "Delete this feature", - "Delete this property on all the features": "Delete this property on all the features", - "Delete this shape": "Delete this shape", - "Delete this vertex (Alt+Click)": "Delete this vertex (Alt+Click)", - "Directions from here": "Directions from here", - "Disable editing": "Disable editing", - "Display measure": "Display measure", - "Display on load": "Display on load", - "Download": "Download", - "Download data": "Download data", - "Drag to reorder": "Drag to reorder", - "Draw a line": "Draw a line", - "Draw a marker": "Draw a marker", - "Draw a polygon": "Draw a polygon", - "Draw a polyline": "Draw a polyline", - "Dynamic": "Dynamic", - "Dynamic properties": "Dynamic properties", - "Edit": "Edit", - "Edit feature's layer": "Edit feature's layer", - "Edit map properties": "Edit map properties", - "Edit map settings": "Edit map settings", - "Edit properties in a table": "Edit properties in a table", - "Edit this feature": "Edit this feature", - "Editing": "Editing", - "Embed and share this map": "Embed and share this map", - "Embed the map": "Embed the map", - "Empty": "Empty", - "Enable editing": "Enable editing", - "Error in the tilelayer URL": "Error in the tilelayer URL", - "Error while fetching {url}": "Error while fetching {url}", - "Exit Fullscreen": "Exit Fullscreen", - "Extract shape to separate feature": "Extract shape to separate feature", - "Fetch data each time map view changes.": "Fetch data each time map view changes.", - "Filter keys": "Filter keys", - "Filter…": "Filter…", - "Format": "Format", - "From zoom": "From zoom", - "Full map data": "Full map data", - "Go to «{feature}»": "Go to «{feature}»", - "Heatmap intensity property": "Heatmap intensity property", - "Heatmap radius": "Heatmap radius", - "Help": "Help", - "Hide controls": "Hide controls", - "Home": "Home", - "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", - "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", - "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", - "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", + "inherit": "به ارث می برند", + "name": "نام", + "never": "هرگز", + "new window": "پنجره جدید", + "no": "نه", + "on hover": "روی شناور", + "opacity": "تاری/کِدِری", + "parent window": "پنجره والدین", + "stroke": "سکته", + "weight": "وزن/سنگینی", + "yes": "بله", + "{delay} seconds": "{تاخیر} ثانیه", + "# one hash for main heading": "# یک هشتگ برای عنوان اصلی", + "## two hashes for second heading": "## دو هشتگ برای عنوان دوم", + "### three hashes for third heading": "### سه هشتگ برای عنوان سوم", + "**double star for bold**": "** دو ستاره برای پررنگ **", + "*simple star for italic*": "*ستاره ساده برای حروف کج*", + "--- for an horizontal rule": "--- برای یک قاعده افقی", + "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".": "لیستی از اعداد جدا شده با کاما که الگوی خط تیره را مشخص می کند. مثال: \"5 ، 10 ، 15\".", + "About": "درباره", + "Action not allowed :(": "اقدام مجاز نیست :(", + "Activate slideshow mode": "حالت نمایش اسلاید را فعال کنید", + "Add a layer": "یک لایه اضافه کنید", + "Add a line to the current multi": "یک خط به مولتی فعلی اضافه کنید", + "Add a new property": "یک ویژگی جدید اضافه کنید", + "Add a polygon to the current multi": "چند ضلعی را به مولتی فعلی اضافه کنید", + "Advanced actions": "اقدامات پیشرفته", + "Advanced properties": "خواص پیشرفته", + "All properties are imported.": "همه املاک وارد شده است", + "Allow interactions": "اجازه تعامل دهید", + "An error occured": "خطایی رخ داد", + "Are you sure you want to cancel your changes?": "آیا مطمئن هستید که می خواهید تغییرات خود را لغو کنید؟", + "Are you sure you want to clone this map and all its datalayers?": "آیا مطمئن هستید که می خواهید این نقشه و همه فهرست داده های آن را شبیه سازی کنید؟", + "Are you sure you want to delete the feature?": "آیا مطمئن هستید که می خواهید ویژگی را حذف کنید؟", + "Are you sure you want to delete this layer?": "آیا مطمئن هستید که می خواهید این لایه را حذف کنید؟", + "Are you sure you want to delete this map?": "آیا مطمئن هستید که می خواهید این نقشه را حذف کنید؟", + "Are you sure you want to delete this property on all the features?": "آیا مطمئن هستید که می خواهید این ویژگی را در همه ویژگی ها حذف کنید؟", + "Are you sure you want to restore this version?": "آیا مطمئن هستید که می خواهید این نسخه را بازیابی کنید؟", + "Attach the map to my account": "نقشه را به حساب من وصل کنید", + "Auto": "خودکار", + "Autostart when map is loaded": "هنگام بارگیری، نقشه خودکار را راه اندازی کنید", + "Bring feature to center": "ویژگی را به مرکز بیاورید", + "Browse data": "مرور داده ها", + "Cancel edits": "لغو ویرایش ها", + "Center map on your location": "نقشه مرکز بر روی موقعیت مکانی شما", + "Change map background": "تغییر پس زمینه نقشه", + "Change tilelayers": "کاشی های کاری را تغییر دهید", + "Choose a preset": "از پیش تعیین شده را انتخاب کنید", + "Choose the format of the data to import": "قالب داده را برای وارد کردن انتخاب کنید", + "Choose the layer to import in": "لایه ای را برای وارد کردن انتخاب کنید", + "Click last point to finish shape": "برای پایان دادن به شکل روی آخرین نقطه کلیک کنید", + "Click to add a marker": "برای افزودن نشانگر کلیک کنید", + "Click to continue drawing": "برای ادامه ترسیم کلیک کنید", + "Click to edit": "برای ویرایش کلیک کنید", + "Click to start drawing a line": "برای شروع رسم خط کلیک کنید", + "Click to start drawing a polygon": "برای شروع ترسیم چند ضلعی کلیک کنید", + "Clone": "شبیه سازی / کلون", + "Clone of {name}": "شبیه سازی {name}", + "Clone this feature": "این ویژگی را شبیه سازی کنید", + "Clone this map": "شبیه سازی این نقشه", + "Close": "بستن", + "Clustering radius": "شعاع خوشه بندی", + "Comma separated list of properties to use when filtering features": "لیستی از خواص جدا شده با کاما برای فیلتر کردن ویژگی ها", + "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "مقادیر جدا شده با کاما، برگه یا نیمه کولون. SRS WGS84 ضمنی است. فقط هندسه نقطه وارد می شود. واردات به سربرگهای ستون برای ذکر هرگونه عبارت «lat» و «lon» در ابتدای سرصفحه، بدون حساس به حروف، نگاه می کند. همه ستون های دیگر به عنوان ویژگی وارد می شوند.", + "Continue line": "ادامه خط", + "Continue line (Ctrl+Click)": "ادامه خط (Ctrl+Click)", + "Coordinates": "مختصات", + "Credits": "اعتبار", + "Current view instead of default map view?": "نمای فعلی به جای نمای نقشه پیش فرض؟", + "Custom background": "پس زمینه سفارشی", + "Data is browsable": "داده ها قابل مرور هستند", + "Default interaction options": "گزینه های پیش فرض تعامل", + "Default properties": "خواص پیش فرض", + "Default shape properties": "ویژگی های شکل پیش فرض", + "Define link to open in a new window on polygon click.": "پیوندی را باز کنید که در یک پنجره جدید با کلیک چند ضلعی باز می شود.", + "Delay between two transitions when in play mode": "تأخیر بین دو انتقال در حالت پخش", + "Delete": "حذف", + "Delete all layers": "حذف همه لایه ها", + "Delete layer": "حذف لایه", + "Delete this feature": "این ویژگی را حذف کنید", + "Delete this property on all the features": "این ویژگی را در همه ویژگی ها حذف کنید", + "Delete this shape": "این شکل را حذف کنید", + "Delete this vertex (Alt+Click)": "حذف این راس (Alt+Click)", + "Directions from here": "مسیرها از اینجا", + "Disable editing": "ویرایش را غیرفعال کنید", + "Display measure": "اندازه نمایش", + "Display on load": "نمایش روی بارگذاری", + "Download": "دانلود", + "Download data": "دانلود داده", + "Drag to reorder": "برای مرتب سازی دیگر بکشید", + "Draw a line": "یک خط بکش", + "Draw a marker": "یک نشانگر بکشید", + "Draw a polygon": "چند ضلعی بکشید", + "Draw a polyline": "چند خطی بکشید", + "Dynamic": "پویا", + "Dynamic properties": "خواص پویا", + "Edit": "ویرایش", + "Edit feature's layer": "لایه ویژگی را ویرایش کنید", + "Edit map properties": "ویرایش ویژگی های نقشه", + "Edit map settings": "ویرایش تنظیمات نقشه", + "Edit properties in a table": "ویژگی ها را در یک جدول ویرایش کنید", + "Edit this feature": "این ویژگی را ویرایش کنید", + "Editing": "ویرایش", + "Embed and share this map": "این نقشه را جاسازی کرده و به اشتراک بگذارید", + "Embed the map": "نقشه را جاسازی کنید", + "Empty": "خالی", + "Enable editing": "ویرایش را فعال کنید", + "Error in the tilelayer URL": "خطا در آدرس اینترنتی لایه کاشی", + "Error while fetching {url}": "خطا هنگام واکشی {آدرس اینترنتی}", + "Exit Fullscreen": "خروج از تمام صفحه", + "Extract shape to separate feature": "استخراج شکل به ویژگی جدا", + "Fetch data each time map view changes.": "هر بار که نمای نقشه تغییر می کند، داده ها را واکشی کنید.", + "Filter keys": "کلیدهای فیلتر", + "Filter…": "فیلتر…", + "Format": "قالب", + "From zoom": "از زوم", + "Full map data": "داده های نقشه کامل", + "Go to «{feature}»": "به «{ویژگی}» بروید", + "Heatmap intensity property": "ویژگی شدت حرارت", + "Heatmap radius": "شعاع نقشه حرارتی", + "Help": "راهنما", + "Hide controls": "مخفی کردن کنترل ها", + "Home": "خانه", + "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "چقدر می توان چند خطی را در هر سطح بزرگنمایی ساده کرد (بیشتر = عملکرد بهتر و ظاهر صاف، کمتر = دقیق تر)", + "If false, the polygon will act as a part of the underlying map.": "اگر نادرست باشد، چند ضلعی به عنوان بخشی از نقشه زیرین عمل می کند.", + "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe با ارتفاع سفارشی (بر حسب px):{{{http://iframe.url.com|height}}}", + "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "iframe با ارتفاع و عرض سفارشی (بر حسب px):{{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", - "Image with custom width (in px): {{http://image.url.com|width}}": "Image with custom width (in px): {{http://image.url.com|width}}", - "Image: {{http://image.url.com}}": "Image: {{http://image.url.com}}", - "Import": "Import", - "Import data": "Import data", - "Import in a new layer": "Import in a new layer", - "Imports all umap data, including layers and settings.": "Imports all umap data, including layers and settings.", - "Include full screen link?": "Include full screen link?", - "Interaction options": "Interaction options", - "Invalid umap data": "Invalid umap data", - "Invalid umap data in {filename}": "Invalid umap data in {filename}", - "Keep current visible layers": "Keep current visible layers", - "Latitude": "Latitude", - "Layer": "Layer", - "Layer properties": "Layer properties", - "Licence": "Licence", - "Limit bounds": "Limit bounds", - "Link to…": "Link to…", - "Link with text: [[http://example.com|text of the link]]": "Link with text: [[http://example.com|text of the link]]", - "Long credits": "Long credits", - "Longitude": "Longitude", - "Make main shape": "Make main shape", - "Manage layers": "Manage layers", - "Map background credits": "Map background credits", - "Map has been attached to your account": "Map has been attached to your account", - "Map has been saved!": "Map has been saved!", - "Map user content has been published under licence": "Map user content has been published under licence", - "Map's editors": "Map's editors", - "Map's owner": "Map's owner", - "Merge lines": "Merge lines", - "More controls": "More controls", - "Must be a valid CSS value (eg.: DarkBlue or #123456)": "Must be a valid CSS value (eg.: DarkBlue or #123456)", - "No licence has been set": "No licence has been set", - "No results": "No results", - "Only visible features will be downloaded.": "Only visible features will be downloaded.", - "Open download panel": "Open download panel", - "Open link in…": "Open link in…", - "Open this map extent in a map editor to provide more accurate data to OpenStreetMap": "Open this map extent in a map editor to provide more accurate data to OpenStreetMap", - "Optional intensity property for heatmap": "Optional intensity property for heatmap", - "Optional. Same as color if not set.": "Optional. Same as color if not set.", - "Override clustering radius (default 80)": "Override clustering radius (default 80)", - "Override heatmap radius (default 25)": "Override heatmap radius (default 25)", - "Please be sure the licence is compliant with your use.": "Please be sure the licence is compliant with your use.", - "Please choose a format": "Please choose a format", - "Please enter the name of the property": "Please enter the name of the property", - "Please enter the new name of this property": "Please enter the new name of this property", - "Powered by Leaflet and Django, glued by uMap project.": "Powered by Leaflet and Django, glued by uMap project.", - "Problem in the response": "Problem in the response", - "Problem in the response format": "Problem in the response format", - "Properties imported:": "Properties imported:", - "Property to use for sorting features": "Property to use for sorting features", - "Provide an URL here": "Provide an URL here", - "Proxy request": "Proxy request", - "Remote data": "Remote data", - "Remove shape from the multi": "Remove shape from the multi", - "Rename this property on all the features": "Rename this property on all the features", - "Replace layer content": "Replace layer content", - "Restore this version": "Restore this version", - "Save": "Save", - "Save anyway": "Save anyway", - "Save current edits": "Save current edits", - "Save this center and zoom": "Save this center and zoom", - "Save this location as new feature": "Save this location as new feature", - "Search a place name": "Search a place name", - "Search location": "Search location", - "Secret edit link is:
    {link}": "Secret edit link is:
    {link}", - "See all": "See all", - "See data layers": "See data layers", - "See full screen": "See full screen", - "Set it to false to hide this layer from the slideshow, the data browser, the popup navigation…": "Set it to false to hide this layer from the slideshow, the data browser, the popup navigation…", - "Shape properties": "Shape properties", - "Short URL": "Short URL", - "Short credits": "Short credits", - "Show/hide layer": "Show/hide layer", - "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", - "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", - "Sort key": "Sort key", - "Split line": "Split line", - "Start a hole here": "Start a hole here", - "Start editing": "Start editing", - "Start slideshow": "Start slideshow", - "Stop editing": "Stop editing", - "Stop slideshow": "Stop slideshow", - "Supported scheme": "Supported scheme", - "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", - "TMS format": "TMS format", - "Text color for the cluster label": "Text color for the cluster label", - "Text formatting": "Text formatting", - "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", - "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", - "To zoom": "To zoom", - "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", - "Transfer shape to edited feature": "Transfer shape to edited feature", - "Transform to lines": "Transform to lines", - "Transform to polygon": "Transform to polygon", - "Type of layer": "Type of layer", - "Unable to detect format of file {filename}": "Unable to detect format of file {filename}", - "Untitled layer": "Untitled layer", - "Untitled map": "Untitled map", - "Update permissions": "Update permissions", - "Update permissions and editors": "Update permissions and editors", - "Url": "Url", - "Use current bounds": "Use current bounds", - "Use placeholders with feature properties between brackets, eg. {name}, they will be dynamically replaced by the corresponding values.": "Use placeholders with feature properties between brackets, eg. {name}, they will be dynamically replaced by the corresponding values.", - "User content credits": "User content credits", - "User interface options": "User interface options", - "Versions": "Versions", - "View Fullscreen": "View Fullscreen", - "Where do we go from here?": "Where do we go from here?", - "Whether to display or not polygons paths.": "Whether to display or not polygons paths.", - "Whether to fill polygons with color.": "Whether to fill polygons with color.", - "Who can edit": "Who can edit", - "Who can view": "Who can view", - "Will be displayed in the bottom right corner of the map": "Will be displayed in the bottom right corner of the map", - "Will be visible in the caption of the map": "Will be visible in the caption of the map", - "Woops! Someone else seems to have edited the data. You can save anyway, but this will erase the changes made by others.": "Woops! Someone else seems to have edited the data. You can save anyway, but this will erase the changes made by others.", - "You have unsaved changes.": "You have unsaved changes.", - "Zoom in": "Zoom in", - "Zoom level for automatic zooms": "Zoom level for automatic zooms", - "Zoom out": "Zoom out", - "Zoom to layer extent": "Zoom to layer extent", - "Zoom to the next": "Zoom to the next", - "Zoom to the previous": "Zoom to the previous", - "Zoom to this feature": "Zoom to this feature", - "Zoom to this place": "Zoom to this place", - "attribution": "attribution", - "by": "by", - "display name": "display name", - "height": "height", - "licence": "licence", - "max East": "max East", - "max North": "max North", - "max South": "max South", - "max West": "max West", - "max zoom": "max zoom", - "min zoom": "min zoom", - "next": "next", - "previous": "previous", - "width": "width", - "{count} errors during import: {message}": "{count} errors during import: {message}", - "Measure distances": "Measure distances", + "Image with custom width (in px): {{http://image.url.com|width}}": "تصویر با عرض سفارشی (بر حسب px): {{http://image.url.com|width}}", + "Image: {{http://image.url.com}}": "تصویر: {{http://image.url.com}}", + "Import": "وارد كردن", + "Import data": "وارد كردن داده", + "Import in a new layer": "وارد کردن در یک لایه جدید", + "Imports all umap data, including layers and settings.": "همه داده های umap ، از جمله لایه ها و تنظیمات را وارد می کند.", + "Include full screen link?": "پیوند تمام صفحه را شامل می شود؟", + "Interaction options": "گزینه های تعامل", + "Invalid umap data": "داده های umap نامعتبر است", + "Invalid umap data in {filename}": "داده های umap نامعتبر در {نام فایل}", + "Keep current visible layers": "لایه های قابل مشاهده فعلی را حفظ کنید", + "Latitude": "عرض جغرافیایی", + "Layer": "لایه", + "Layer properties": "خواص لایه", + "Licence": "مجوز", + "Limit bounds": "محدودیت ها را محدود کنید", + "Link to…": "پیوند به…", + "Link with text: [[http://example.com|text of the link]]": "پیوند با متن: [[http://example.com|text of the link]]", + "Long credits": "اعتبارات طولانی", + "Longitude": "عرض جغرافیایی", + "Make main shape": "شکل اصلی را ایجاد کنید", + "Manage layers": "لایه ها را مدیریت کنید", + "Map background credits": "اعتبار پس زمینه نقشه", + "Map has been attached to your account": "نقشه به حساب شما پیوست شده است", + "Map has been saved!": "نقشه ذخیره شد!", + "Map user content has been published under licence": "محتوای کاربر نقشه، تحت مجوز منتشر شده است", + "Map's editors": "ویرایشگران نقشه", + "Map's owner": "مالک نقشه", + "Merge lines": "ادغام خطوط", + "More controls": "کنترل های بیشتر", + "Must be a valid CSS value (eg.: DarkBlue or #123456)": "باید یک مقدار CSS معتبر باشد (به عنوان مثال: DarkBlue یا #123456)", + "No licence has been set": "هیچ مجوزی تنظیم نشده است", + "No results": "بدون نتیجه", + "Only visible features will be downloaded.": "فقط ویژگی های قابل مشاهده بارگیری می شوند.", + "Open download panel": "باز کردن پنل بارگیری", + "Open link in…": "باز کردن پیوند در…", + "Open this map extent in a map editor to provide more accurate data to OpenStreetMap": "این محدوده نقشه را در ویرایشگر نقشه باز کنید تا داده های دقیق تری در اوپن‌استریت‌مپ ارائه شود", + "Optional intensity property for heatmap": "ویژگی های اختیاری شدت برای نقشه حرارتی", + "Optional. Same as color if not set.": "اختیاری. اگر تنظیم نشده باشد همان رنگ است.", + "Override clustering radius (default 80)": "نادیده گرفتن شعاع خوشه بندی (پیش فرض 80)", + "Override heatmap radius (default 25)": "لغو شعاع نقشه حرارتی (پیش فرض 25)", + "Please be sure the licence is compliant with your use.": "لطفاً مطمئن شوید مجوز با استفاده شما مطابقت دارد.", + "Please choose a format": "لطفاً یک قالب را انتخاب کنید", + "Please enter the name of the property": "لطفاً نام ملک را وارد کنید", + "Please enter the new name of this property": "لطفا نام جدید این ملک را وارد کنید", + "Powered by Leaflet and Django, glued by uMap project.": "طراحی شده توسط Leaflet و Django، چسبیده به پروژه uMap.", + "Problem in the response": "مشکل در پاسخگویی", + "Problem in the response format": "مشکل در قالب پاسخگویی", + "Properties imported:": "خواص وارد شده:", + "Property to use for sorting features": "ویژگی مورد استفاده برای مرتب سازی ویژگی ها", + "Provide an URL here": "در اینجا آدرس اینترنتی ارائه دهید", + "Proxy request": "درخواست پروکسی", + "Remote data": "داده های از راه دور", + "Remove shape from the multi": "حذف شکل از مولتی", + "Rename this property on all the features": "نام این ویژگی را در همه ویژگی ها تغییر دهید", + "Replace layer content": "جایگزینی محتوای لایه", + "Restore this version": "این نسخه را بازیابی کنید", + "Save": "ذخیره", + "Save anyway": "به هر حال ذخیره کنید", + "Save current edits": "ویرایش های فعلی را ذخیره کنید", + "Save this center and zoom": "این مرکز را ذخیره کرده و بزرگنمایی کنید", + "Save this location as new feature": "این مکان را به عنوان ویژگی جدید ذخیره کنید", + "Search a place name": "نام مکان را جستجو کنید", + "Search location": "مکان را جستجو کنید", + "Secret edit link is:
    {link}": "پیوند ویرایش مخفی این است:
    {لینک}", + "See all": "همه را ببین", + "See data layers": "لایه های داده را مشاهده کنید", + "See full screen": "تمام صفحه را مشاهده کنید", + "Set it to false to hide this layer from the slideshow, the data browser, the popup navigation…": "آن را روی غلط/false تنظیم کنید تا این لایه از نمایش اسلاید، مرورگر داده، ناوبری بازشو پنهان شود…", + "Shape properties": "ویژگی های شکل", + "Short URL": "آدرس اینترنتی کوتاه", + "Short credits": "اعتبار کوتاه مدت", + "Show/hide layer": "نمایش/مخفی کردن لایه", + "Simple link: [[http://example.com]]": "پیوند ساده: [[http://example.com]]", + "Slideshow": "نمایش اسلاید", + "Sort key": "کلید مرتب سازی", + "Split line": "خط تقسیم", + "Start a hole here": "از اینجا یک حفره شروع کنید", + "Start editing": "ویرایش را شروع کنید", + "Start slideshow": "شروع نمایش اسلاید", + "Stop editing": "ویرایش را متوقف کنید", + "Stop slideshow": "نمایش اسلاید را متوقف کنید", + "Supported scheme": "طرح پشتیبانی شده", + "Supported variables that will be dynamically replaced": "متغیرهای پشتیبانی شده که به صورت پویا جایگزین می شوند", + "TMS format": "قالب TMS", + "Text color for the cluster label": "رنگ متن برای برچسب خوشه", + "Text formatting": "قالب بندی متن", + "The name of the property to use as feature label (ex.: \"nom\")": "نام ویژگی مورد استفاده برای برچسب ویژگی (به عنوان مثال: \"nom\")", + "To use if remote server doesn't allow cross domain (slower)": "برای استفاده در صورت عدم دسترسی سرور از راه دور به دامنه (کندتر)", + "To zoom": "زوم", + "Toggle edit mode (Shift+Click)": "تغییر حالت ویرایش (Shift+Click)", + "Transfer shape to edited feature": "انتقال شکل به ویژگی ویرایش شده", + "Transform to lines": "تبدیل به خطوط", + "Transform to polygon": "تبدیل به چند ضلعی", + "Type of layer": "نوع لایه", + "Unable to detect format of file {filename}": "تشخیص قالب فایل {نام فایل} امکان پذیر نیست", + "Untitled layer": "لایه بدون عنوان", + "Untitled map": "نقشه بدون عنوان", + "Update permissions": "مجوزها را به روز کنید", + "Update permissions and editors": "مجوزها و ویرایشگران را به روز کنید", + "Url": "آدرس اینترنتی", + "Use current bounds": "از مرزهای فعلی استفاده کنید", + "Use placeholders with feature properties between brackets, eg. {name}, they will be dynamically replaced by the corresponding values.": "از متغیرهایی با ویژگی های ویژگی بین براکت ها استفاده کنید ، به عنوان مثال. {name}، آنها به طور پویا با مقادیر مربوطه جایگزین می شوند.", + "User content credits": "اعتبار محتوای کاربر", + "User interface options": "گزینه های رابط کاربر", + "Versions": "نسخه ها", + "View Fullscreen": "مشاهده تمام صفحه", + "Where do we go from here?": "از اینجا به کجا می رویم؟", + "Whether to display or not polygons paths.": "اینکه آیا مسیرهای چند ضلعی نمایش داده شود یا خیر.", + "Whether to fill polygons with color.": "این که چند ضلعی ها را با رنگ پر کنیم یا خیر.", + "Who can edit": "چه کسی می تواند ویرایش کند", + "Who can view": "چه کسی می تواند مشاهده کند", + "Will be displayed in the bottom right corner of the map": "در گوشه سمت راست پایین نقشه نمایش داده می شود", + "Will be visible in the caption of the map": "در زیرنویس نقشه قابل مشاهده خواهد بود", + "Woops! Someone else seems to have edited the data. You can save anyway, but this will erase the changes made by others.": "وای! به نظر می رسد شخص دیگری داده ها را ویرایش کرده است. در هر صورت می توانید ذخیره کنید، اما با این کار تغییرات ایجاد شده توسط دیگران پاک می شود.", + "You have unsaved changes.": "تغییرات ذخیره نشده ای دارید.", + "Zoom in": "بزرگنمایی", + "Zoom level for automatic zooms": "سطح زوم برای بزرگنمایی خودکار", + "Zoom out": "کوچک نمایی", + "Zoom to layer extent": "تا اندازه لایه بزرگنمایی کنید", + "Zoom to the next": "روی بعدی زوم کنید", + "Zoom to the previous": "روی قبلی بزرگنمایی کنید", + "Zoom to this feature": "روی این ویژگی بزرگنمایی کنید", + "Zoom to this place": "روی این مکان بزرگنمایی کنید", + "attribution": "انتساب", + "by": "بوسیله", + "display name": "نام نمایشی", + "height": "ارتفاع", + "licence": "مجوز", + "max East": "حداکثر شرقی", + "max North": "حداکثر شمالی", + "max South": "حداکثر جنوبی", + "max West": "حداکثر غربی", + "max zoom": "حداکثر بزرگنمایی", + "min zoom": "حداقل بزرگنمایی", + "next": "بعد", + "previous": "قبل", + "width": "عرض", + "{count} errors during import: {message}": "{شمردن} خطاها هنگام وارد کردن: {پیام}", + "Measure distances": "فاصله ها را اندازه گیری کنید", "NM": "NM", - "kilometers": "kilometers", - "km": "km", - "mi": "mi", - "miles": "miles", - "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", - "1 day": "1 day", - "1 hour": "1 hour", - "5 min": "5 min", - "Cache proxied request": "Cache proxied request", - "No cache": "No cache", - "Popup": "Popup", - "Popup (large)": "Popup (large)", - "Popup content style": "Popup content style", - "Popup shape": "Popup shape", - "Skipping unknown geometry.type: {type}": "Skipping unknown geometry.type: {type}", - "Optional.": "Optional.", - "Paste your data here": "Paste your data here", - "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", - "Feature identifier key": "Feature identifier key", - "Open current feature on load": "Open current feature on load", - "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "kilometers": "کیلومتر", + "km": "کیلومتر", + "mi": "مایل", + "miles": "مایل ها", + "nautical miles": "مایل دریایی", + "1 day": "1 روز", + "1 hour": "1 ساعت", + "5 min": "5 دقیقه", + "Cache proxied request": "درخواست پراکسی حافظه پنهان", + "No cache": "بدون حافظه پنهان", + "Popup": "پنجره بازشو", + "Popup (large)": "پنجره بازشو (بزرگ)", + "Popup content style": "سبک محتوای بازشو", + "Popup shape": "شکل پنجره بازشو", + "Skipping unknown geometry.type: {type}": "رد شدن از geometry.type ناشناخته: {نوع}", + "Optional.": "اختیاری.", + "Paste your data here": "اطلاعات و داده های خود را اینجا بچسبانید", + "Please save the map first": "لطفاً ابتدا نقشه را ذخیره کنید", + "Feature identifier key": "کلید شناسایی ویژگی", + "Open current feature on load": "باز کردن ویژگی فعلی هنگام بارگیری", + "Permalink": "پیوند ثابت", + "The name of the property to use as feature unique identifier.": "نام ویژگی برای استفاده به عنوان شناسه منحصر به فرد ویژگی.", + "Advanced filter keys": "کلیدهای فیلتر پیشرفته", + "Comma separated list of properties to use for checkbox filtering": "فهرستی از ویژگی‌های جدا شده با کاما برای استفاده برای فیلتر کردن کادر تأیید", + "Data filters": "فیلتر داده‌ها", + "Do you want to display caption menus?": "آیا می‌خواهید منوهای زیرنویس نشان داده شود؟", + "Example: key1,key2,key3": "به عنوان مثال: کلید 1، کلید 2، کلید 3", + "Invalid latitude or longitude": "طول یا عرض جغرافیایی نامعتبر است", + "Invalide property name: {name}": "نام دارایی معتبر نیست: {name}", + "No results for these filters": "برای این فیلترها هیچ نتیجه‌ای وجود ندارد", + "Permanent credits": "اعتبارات دائمی", + "Permanent credits background": "پیشینه اعتبارات دائمی", + "Select data": "داده‌ها را انتخاب کنید", + "Will be permanently visible in the bottom left corner of the map": "برای همیشه در گوشه سمت چپ پایین نقشه قابل مشاهده خواهد بود", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/fi.js b/umap/static/umap/locale/fi.js index 0287146d..270ca466 100644 --- a/umap/static/umap/locale/fi.js +++ b/umap/static/umap/locale/fi.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Lisää symboli", "Allow scroll wheel zoom?": "Salli zoomaus hiiren rullalla?", "Automatic": "Automaattinen", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Lisätoiminnot", "Advanced properties": "Lisäominaisuudet", - "Advanced transition": "Advanced transition", "All properties are imported.": "Kaikki omainaisuudet tuodaan.", "Allow interactions": "Allow interactions", "An error occured": "Hups! Virhe on tapahtunut...", @@ -190,7 +189,6 @@ var locale = { "Home": "Alku", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Kuinka paljon viivaa yleistetäänkullakin zoomaustasolla (enemmän = parempi suorituskyky, vähemmän = suurempi tarkkuus)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe-vientiasetukset", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe määrätyn korkuisena (pikseleinä): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Näytä/piilota kerros", "Simple link: [[http://example.com]]": "Yksinkertainen linkki: [[http://esimerkki.fi]]", "Slideshow": "Kuvaesitys", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Pilko/katkaise viiva", "Start a hole here": "Aloita reikä tässä", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Lopeta kuvaesitys", "Supported scheme": "Tuettu muoto", "Supported variables that will be dynamically replaced": "Tuetut muuttujat, jotka korvataan dynaamisesti", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS-formaatti", "Text color for the cluster label": "Tekstin väri klusterietiketissä", "Text formatting": "Tekstin muotoilu", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "Kartan keskitys ja zoomaustaso on asetettu.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "Zoomaukseen", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("fi", locale); -L.setLocale("fi"); \ No newline at end of file +L.registerLocale("fi", locale) +L.setLocale("fi") diff --git a/umap/static/umap/locale/fi.json b/umap/static/umap/locale/fi.json index 541e4abc..9ac8f9a9 100644 --- a/umap/static/umap/locale/fi.json +++ b/umap/static/umap/locale/fi.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Lisätoiminnot", "Advanced properties": "Lisäominaisuudet", - "Advanced transition": "Advanced transition", "All properties are imported.": "Kaikki omainaisuudet tuodaan.", "Allow interactions": "Allow interactions", "An error occured": "Hups! Virhe on tapahtunut...", @@ -190,7 +189,6 @@ "Home": "Alku", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Kuinka paljon viivaa yleistetäänkullakin zoomaustasolla (enemmän = parempi suorituskyky, vähemmän = suurempi tarkkuus)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe-vientiasetukset", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe määrätyn korkuisena (pikseleinä): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Näytä/piilota kerros", "Simple link: [[http://example.com]]": "Yksinkertainen linkki: [[http://esimerkki.fi]]", "Slideshow": "Kuvaesitys", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Pilko/katkaise viiva", "Start a hole here": "Aloita reikä tässä", @@ -279,12 +276,10 @@ "Stop slideshow": "Lopeta kuvaesitys", "Supported scheme": "Tuettu muoto", "Supported variables that will be dynamically replaced": "Tuetut muuttujat, jotka korvataan dynaamisesti", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS-formaatti", "Text color for the cluster label": "Tekstin väri klusterietiketissä", "Text formatting": "Tekstin muotoilu", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "Kartan keskitys ja zoomaustaso on asetettu.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "Zoomaukseen", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/fr.js b/umap/static/umap/locale/fr.js index 08d54ad8..70cd13b7 100644 --- a/umap/static/umap/locale/fr.js +++ b/umap/static/umap/locale/fr.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Ajouter un symbole", "Allow scroll wheel zoom?": "Autoriser le zoom avec la molette ?", "Automatic": "Automatique", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Ajouter un polygon au groupe courant", "Advanced actions": "Actions avancées", "Advanced properties": "Propriétés avancées", - "Advanced transition": "Transition avancée", "All properties are imported.": "Toutes les propriétés sont importées.", "Allow interactions": "Autoriser les interactions", "An error occured": "Une erreur est survenue", @@ -190,7 +189,6 @@ var locale = { "Home": "Accueil", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Valeur de simplification des lignes pour chaque niveau de zoom (grand nombre = meilleure performance, petit nombre = plus précis)", "If false, the polygon will act as a part of the underlying map.": "Choisir « non » pour que le polygone se comporte comme faisant partie du fond de carte.", - "Iframe export options": "Options d'export de l'iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe avec hauteur (en pixels): {{{http://iframe.url.com|hauteur}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe avec hauteur et largeur (en px) : {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe : {{{http://iframe.url.com}}}", @@ -207,7 +205,7 @@ var locale = { "Keep current visible layers": "Garder les calques visibles actuellement", "Latitude": "Latitude", "Layer": "Calque", - "Layer properties": "Propriétés du claque", + "Layer properties": "Propriétés du calque", "Licence": "Licence", "Limit bounds": "Limites géographiques", "Link to…": "Lien vers…", @@ -220,7 +218,7 @@ var locale = { "Map has been attached to your account": "La carte est maintenant liée à votre compte", "Map has been saved!": "La carte a été sauvegardée !", "Map user content has been published under licence": "Les contenus sur la carte ont été publiés avec la licence", - "Map's editors": "Éditeurs", + "Map's editors": "Éditeurs de la carte", "Map's owner": "Propriétaire de la carte", "Merge lines": "Fusionner les lignes", "More controls": "Plus d'outils", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Montrer/masquer un calque", "Simple link: [[http://example.com]]": "Lien simple : [[https://exemple.fr]]", "Slideshow": "Diaporama", - "Smart transitions": "Transitions animées", "Sort key": "Clé de tri", "Split line": "Scinder la ligne", "Start a hole here": "Ajouter un tracé intérieur", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Arrêter", "Supported scheme": "Schéma supporté", "Supported variables that will be dynamically replaced": "Variables qui seront automatiquement remplacées", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Utilisez soit un caractère unique soit une URL. Vous pouvez utiliser des propriétés des marqueurs comme variables : par exemple avec \"http://myserver.org/images/{name}.png\", la variable {name} sera remplacée par la valeur du \"name\" de chacun des marqueurs.", "TMS format": "format de type TMS", "Text color for the cluster label": "Couleur du texte du cluster", "Text formatting": "Mise en forme du texte", "The name of the property to use as feature label (ex.: \"nom\")": "Le nom de la propriété à utiliser comme libellé des éléments (ex. : \"nom\")", - "The zoom and center have been set.": "Le zoom et le centre ont été enregistrés.", "To use if remote server doesn't allow cross domain (slower)": "Cocher si le serveur distant n'autorise pas le cross domain (plus lent)", "To zoom": "Jusqu'au zoom", "Toggle edit mode (Shift+Click)": "Alterner le mode édition (Shift+Clic)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "miles nautiques", - "{area} acres": "{area} hectares", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 jour", "1 hour": "1 heure", "5 min": "5 min", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Facultatif", "Paste your data here": "Collez vos données ici", "Please save the map first": "Vous devez d'abord enregistrer la carte", - "Unable to locate you.": "Impossible de vous localiser.", "Feature identifier key": "Clé unique d'un élément", "Open current feature on load": "Ouvrir l'élément courant au chargement", "Permalink": "Permalien", - "The name of the property to use as feature unique identifier.": "Nom de la propriété utilisée pour identifier un élément de façon unique" + "The name of the property to use as feature unique identifier.": "Nom de la propriété utilisée pour identifier un élément de façon unique", + "Advanced filter keys": "Clés de filtre avancé", + "Comma separated list of properties to use for checkbox filtering": "Liste de propriétés à utiliser pour les filtres par catégories (séparées par des virgules)", + "Data filters": "Filtrer les données", + "Do you want to display caption menus?": "Afficher les menus dans la légende ?", + "Example: key1,key2,key3": "Exemple: clé1,clé2,clé3", + "Invalid latitude or longitude": "Latitude ou longitude invalide", + "Invalide property name: {name}": "Nom de propriété invalide: {name}", + "No results for these filters": "Aucun résultat avec ces filtres", + "Permanent credits": "Crédits permanents", + "Permanent credits background": "Afficher un fond pour le crédit permanent", + "Select data": "Sélectionner les données", + "Will be permanently visible in the bottom left corner of the map": "Afficher en permanence au coin en bas à gauche de la carte", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} MN", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(surface: {measure})", + " (length: {measure})": "(longueur: {measure})", + "Animated transitions": "Transitions animées", + "Background overlay url": "URL de fond transparent", + "Custom overlay": "Fond transparent", + "Display the star map button": "Afficher le bouton pour mettre une carte en favori", + "Error in the overlay URL": "URL du fond de carte invalide", + "Map has been starred": "La carte a été ajoutée aux favoris", + "Map has been unstarred": "La carte a été supprimée des favoris", + "Opacity": "Transparence", + "Star this map": "Mettre la carte en favori", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Utilisez soit un caractère unique soit une URL. Vous pouvez utiliser des propriétés des marqueurs comme variables : par exemple avec \"http://myserver.org/images/{name}.png\", la variable {name} sera remplacée par la valeur de \"name\" de chacun des marqueurs.", + "Direct link": "Lien", + "Export options": "Options d'export", + "The zoom and center have been modified.": "Le niveau de zoom et le centre ont été modifiés." } -; -L.registerLocale("fr", locale); -L.setLocale("fr"); \ No newline at end of file +L.registerLocale("fr", locale) +L.setLocale("fr") diff --git a/umap/static/umap/locale/fr.json b/umap/static/umap/locale/fr.json index 176e8027..43df27ee 100644 --- a/umap/static/umap/locale/fr.json +++ b/umap/static/umap/locale/fr.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Ajouter un polygon au groupe courant", "Advanced actions": "Actions avancées", "Advanced properties": "Propriétés avancées", - "Advanced transition": "Transition avancée", "All properties are imported.": "Toutes les propriétés sont importées.", "Allow interactions": "Autoriser les interactions", "An error occured": "Une erreur est survenue", @@ -190,7 +189,6 @@ "Home": "Accueil", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Valeur de simplification des lignes pour chaque niveau de zoom (grand nombre = meilleure performance, petit nombre = plus précis)", "If false, the polygon will act as a part of the underlying map.": "Choisir « non » pour que le polygone se comporte comme faisant partie du fond de carte.", - "Iframe export options": "Options d'export de l'iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe avec hauteur (en pixels): {{{http://iframe.url.com|hauteur}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe avec hauteur et largeur (en px) : {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe : {{{http://iframe.url.com}}}", @@ -207,7 +205,7 @@ "Keep current visible layers": "Garder les calques visibles actuellement", "Latitude": "Latitude", "Layer": "Calque", - "Layer properties": "Propriétés du claque", + "Layer properties": "Propriétés du calque", "Licence": "Licence", "Limit bounds": "Limites géographiques", "Link to…": "Lien vers…", @@ -220,7 +218,7 @@ "Map has been attached to your account": "La carte est maintenant liée à votre compte", "Map has been saved!": "La carte a été sauvegardée !", "Map user content has been published under licence": "Les contenus sur la carte ont été publiés avec la licence", - "Map's editors": "Éditeurs", + "Map's editors": "Éditeurs de la carte", "Map's owner": "Propriétaire de la carte", "Merge lines": "Fusionner les lignes", "More controls": "Plus d'outils", @@ -269,7 +267,6 @@ "Show/hide layer": "Montrer/masquer un calque", "Simple link: [[http://example.com]]": "Lien simple : [[https://exemple.fr]]", "Slideshow": "Diaporama", - "Smart transitions": "Transitions animées", "Sort key": "Clé de tri", "Split line": "Scinder la ligne", "Start a hole here": "Ajouter un tracé intérieur", @@ -279,12 +276,10 @@ "Stop slideshow": "Arrêter", "Supported scheme": "Schéma supporté", "Supported variables that will be dynamically replaced": "Variables qui seront automatiquement remplacées", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Utilisez soit un caractère unique soit une URL. Vous pouvez utiliser des propriétés des marqueurs comme variables : par exemple avec \"http://myserver.org/images/{name}.png\", la variable {name} sera remplacée par la valeur du \"name\" de chacun des marqueurs.", "TMS format": "format de type TMS", "Text color for the cluster label": "Couleur du texte du cluster", "Text formatting": "Mise en forme du texte", "The name of the property to use as feature label (ex.: \"nom\")": "Le nom de la propriété à utiliser comme libellé des éléments (ex. : \"nom\")", - "The zoom and center have been set.": "Le zoom et le centre ont été enregistrés.", "To use if remote server doesn't allow cross domain (slower)": "Cocher si le serveur distant n'autorise pas le cross domain (plus lent)", "To zoom": "Jusqu'au zoom", "Toggle edit mode (Shift+Click)": "Alterner le mode édition (Shift+Clic)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "miles nautiques", - "{area} acres": "{area} hectares", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 jour", "1 hour": "1 heure", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Facultatif", "Paste your data here": "Collez vos données ici", "Please save the map first": "Vous devez d'abord enregistrer la carte", - "Unable to locate you.": "Impossible de vous localiser.", "Feature identifier key": "Clé unique d'un élément", "Open current feature on load": "Ouvrir l'élément courant au chargement", "Permalink": "Permalien", - "The name of the property to use as feature unique identifier.": "Nom de la propriété utilisée pour identifier un élément de façon unique" -} + "The name of the property to use as feature unique identifier.": "Nom de la propriété utilisée pour identifier un élément de façon unique", + "Advanced filter keys": "Clés de filtre avancé", + "Comma separated list of properties to use for checkbox filtering": "Liste de propriétés à utiliser pour les filtres par catégories (séparées par des virgules)", + "Data filters": "Filtrer les données", + "Do you want to display caption menus?": "Afficher les menus dans la légende ?", + "Example: key1,key2,key3": "Exemple: clé1,clé2,clé3", + "Invalid latitude or longitude": "Latitude ou longitude invalide", + "Invalide property name: {name}": "Nom de propriété invalide: {name}", + "No results for these filters": "Aucun résultat avec ces filtres", + "Permanent credits": "Crédits permanents", + "Permanent credits background": "Afficher un fond pour le crédit permanent", + "Select data": "Sélectionner les données", + "Will be permanently visible in the bottom left corner of the map": "Afficher en permanence au coin en bas à gauche de la carte", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} MN", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(surface: {measure})", + " (length: {measure})": "(longueur: {measure})", + "Animated transitions": "Transitions animées", + "Background overlay url": "URL de fond transparent", + "Custom overlay": "Fond transparent", + "Display the star map button": "Afficher le bouton pour mettre une carte en favori", + "Error in the overlay URL": "URL du fond de carte invalide", + "Map has been starred": "La carte a été ajoutée aux favoris", + "Map has been unstarred": "La carte a été supprimée des favoris", + "Opacity": "Transparence", + "Star this map": "Mettre la carte en favori", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Utilisez soit un caractère unique soit une URL. Vous pouvez utiliser des propriétés des marqueurs comme variables : par exemple avec \"http://myserver.org/images/{name}.png\", la variable {name} sera remplacée par la valeur de \"name\" de chacun des marqueurs.", + "Direct link": "Lien", + "Export options": "Options d'export", + "The zoom and center have been modified.": "Le niveau de zoom et le centre ont été modifiés." +} \ No newline at end of file diff --git a/umap/static/umap/locale/gl.js b/umap/static/umap/locale/gl.js index 922510a7..4deb8187 100644 --- a/umap/static/umap/locale/gl.js +++ b/umap/static/umap/locale/gl.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Engade unha icona", "Allow scroll wheel zoom?": "Permitir o achegamento ca roda do rato?", "Automatic": "Automático", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Enhadir un polígono para o multi actual", "Advanced actions": "Accións avanzadas", "Advanced properties": "Propiedades avanzadas", - "Advanced transition": "Transición avanzada", "All properties are imported.": "Tódalas propiedades son importadas.", "Allow interactions": "Permitir interaccións", "An error occured": "Ocorreu un erro", @@ -190,7 +189,6 @@ var locale = { "Home": "Inicio", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Canto se simplificará a polilínea en cada nivel de achegamento (máis = mellor comportamento e aparencia máis feble, menos = máis preciso)", "If false, the polygon will act as a part of the underlying map.": "Se é falso, o polígono actuará coma un anaco do mapa subxacente.", - "Iframe export options": "Opcións de exportación do 'iframe'", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe con altura persoalizada (en píxeles): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe con alto e ancho (en px) persoalizado: {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Amosar/agochar capa", "Simple link: [[http://example.com]]": "Ligazón sinxela: [[http://example.com]]", "Slideshow": "Presentación", - "Smart transitions": "Transicións intelixentes", "Sort key": "Orde da clave", "Split line": "Liña de división", "Start a hole here": "Comezar un burato aquí", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Deter a presentación", "Supported scheme": "Esquema suportado", "Supported variables that will be dynamically replaced": "Variábeis suportadas que serán substituídas de xeito dinámico", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "O símbolo pode ser un carácter 'unicode' ou unha URL. Pode empregar as propiedades do elemento coma variábeis: ex.: \"http://myserver.org/images/{name}.png\", a variábel {name} será substituída polo valor \"name\" de cada marcaxe.", "TMS format": "formato TMS", "Text color for the cluster label": "Cor do texto para a etiqueta clúster", "Text formatting": "Formato do texto", "The name of the property to use as feature label (ex.: \"nom\")": "O nome da propiedade a empregar coma etiqueta do elemento (ex.: «nom»)", - "The zoom and center have been set.": "O achegamento e o centrado foron estabelecidos.", "To use if remote server doesn't allow cross domain (slower)": "Para empregar se o servidor remoto non permite dominios cruzados (máis amodo)", "To zoom": "Para o achegamento", "Toggle edit mode (Shift+Click)": "Alterna o modo edición (Shift+Clic)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "millas", "nautical miles": "millas náuticas", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} id²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} millas", - "{distance} yd": "{distance} id", "1 day": "1 día", "1 hour": "1 hora", "5 min": "5 min", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Opcional.", "Paste your data here": "Pega os teus datos aquí", "Please save the map first": "Por favor garda o mapa primeiro", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("gl", locale); -L.setLocale("gl"); \ No newline at end of file +L.registerLocale("gl", locale) +L.setLocale("gl") diff --git a/umap/static/umap/locale/gl.json b/umap/static/umap/locale/gl.json index a7764bd8..1fd4d9e2 100644 --- a/umap/static/umap/locale/gl.json +++ b/umap/static/umap/locale/gl.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Enhadir un polígono para o multi actual", "Advanced actions": "Accións avanzadas", "Advanced properties": "Propiedades avanzadas", - "Advanced transition": "Transición avanzada", "All properties are imported.": "Tódalas propiedades son importadas.", "Allow interactions": "Permitir interaccións", "An error occured": "Ocorreu un erro", @@ -190,7 +189,6 @@ "Home": "Inicio", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Canto se simplificará a polilínea en cada nivel de achegamento (máis = mellor comportamento e aparencia máis feble, menos = máis preciso)", "If false, the polygon will act as a part of the underlying map.": "Se é falso, o polígono actuará coma un anaco do mapa subxacente.", - "Iframe export options": "Opcións de exportación do 'iframe'", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe con altura persoalizada (en píxeles): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe con alto e ancho (en px) persoalizado: {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Amosar/agochar capa", "Simple link: [[http://example.com]]": "Ligazón sinxela: [[http://example.com]]", "Slideshow": "Presentación", - "Smart transitions": "Transicións intelixentes", "Sort key": "Orde da clave", "Split line": "Liña de división", "Start a hole here": "Comezar un burato aquí", @@ -279,12 +276,10 @@ "Stop slideshow": "Deter a presentación", "Supported scheme": "Esquema suportado", "Supported variables that will be dynamically replaced": "Variábeis suportadas que serán substituídas de xeito dinámico", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "O símbolo pode ser un carácter 'unicode' ou unha URL. Pode empregar as propiedades do elemento coma variábeis: ex.: \"http://myserver.org/images/{name}.png\", a variábel {name} será substituída polo valor \"name\" de cada marcaxe.", "TMS format": "formato TMS", "Text color for the cluster label": "Cor do texto para a etiqueta clúster", "Text formatting": "Formato do texto", "The name of the property to use as feature label (ex.: \"nom\")": "O nome da propiedade a empregar coma etiqueta do elemento (ex.: «nom»)", - "The zoom and center have been set.": "O achegamento e o centrado foron estabelecidos.", "To use if remote server doesn't allow cross domain (slower)": "Para empregar se o servidor remoto non permite dominios cruzados (máis amodo)", "To zoom": "Para o achegamento", "Toggle edit mode (Shift+Click)": "Alterna o modo edición (Shift+Clic)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "millas", "nautical miles": "millas náuticas", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} id²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} millas", - "{distance} yd": "{distance} id", "1 day": "1 día", "1 hour": "1 hora", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Opcional.", "Paste your data here": "Pega os teus datos aquí", "Please save the map first": "Por favor garda o mapa primeiro", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/he.js b/umap/static/umap/locale/he.js index ca40bc46..10a8001d 100644 --- a/umap/static/umap/locale/he.js +++ b/umap/static/umap/locale/he.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "הוספת סימן", "Allow scroll wheel zoom?": "לאפשר תקריב עם גלגלת העכבר?", "Automatic": "אוטומטי", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "הוספת מצולע לרב המצולעים הנוכחי", "Advanced actions": "פעולות מתקדמות", "Advanced properties": "מאפיינים מתקדמים", - "Advanced transition": "התמרה מתקדמת", "All properties are imported.": "כל המאפיינים ייובאו.", "Allow interactions": "לאפשר אינטראקציות", "An error occured": "אירעה שגיאה", @@ -190,7 +189,6 @@ var locale = { "Home": "בית", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "כמה לפשט את הקו השבור בכל רמת תקריב (יותר = ביצועים משופרים ומראה חלק יותר, פחות = דיוק גבוה יותר)", "If false, the polygon will act as a part of the underlying map.": "אם שקר, המצולע יתנהג כחלק מהמפה שמתחת.", - "Iframe export options": "אפשרויות ייצוא מסגרת פנימית", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "מסגרת פנימית עם גובה מותאם (בפיקסלים): {{{http://iframe.url.com|גובה}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "מסגרת פנימית עם גובה ורוחב מותאמים (בפיקסלים): {{{http://iframe.url.com|גובה*רוחב}}}", "Iframe: {{{http://iframe.url.com}}}": "מסגרת פנימית: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "הצגת/הסתרת שכבה", "Simple link: [[http://example.com]]": "קישור פשוט: [[http://example.com]]", "Slideshow": "מצגת", - "Smart transitions": "מעברונים חכמים", "Sort key": "מפתח סידור", "Split line": "פיצול קו", "Start a hole here": "להתחיל חור מכאן", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "הפסקת מצגת", "Supported scheme": "סכמה נתמכת", "Supported variables that will be dynamically replaced": "משתנים נתמכים שיוחלפו באופן דינמי", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "סמן יכול להיות תו יוניקוד או כתובת. ניתן להשתמש בתכונות מאפיינים כמשתנים, למשל: עם „‎http://myserver.org/images/{name}.png‎” המשתנה {name} יוחלף בערך של „name” בכל אחד מהסמנים.", "TMS format": "מבנה TMS", "Text color for the cluster label": "צבע טקסט לתווית הקבוצה", "Text formatting": "עיצוב טקסט", "The name of the property to use as feature label (ex.: \"nom\")": "שם המאפיין לשימוש כתווית תכונה (למשל: „nom”)", - "The zoom and center have been set.": "התקריב והמרכז הוגדרו.", "To use if remote server doesn't allow cross domain (slower)": "יש להשתמש אם השרת המרוחק לא מאפשר קישור בין שמות תחומים (Cross Origin - אטי יותר)", "To zoom": "לתקריב", "Toggle edit mode (Shift+Click)": "החלפת מצב עריכה ‪(Shift+לחיצה)", @@ -343,16 +338,6 @@ var locale = { "mi": "מייל", "miles": "מיילים", "nautical miles": "מיילים ימיים", - "{area} acres": "{area} אקרים", - "{area} ha": "{area} הקטאר", - "{area} m²": "{area} מ׳²", - "{area} mi²": "{area} מיילים²", - "{area} yd²": "{area} יארדים²", - "{distance} NM": "{distance} מיילים ימיים", - "{distance} km": "{distance} ק״מ", - "{distance} m": "{distance} מ׳", - "{distance} miles": "{distance} מיילים", - "{distance} yd": "{distance} יארד", "1 day": "יום", "1 hour": "שעה", "5 min": "5 דקות", @@ -366,12 +351,47 @@ var locale = { "Optional.": "רשות.", "Paste your data here": "נא להדביק את הנתונים שלך כאן", "Please save the map first": "נא לשמור את המפה קודם", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("he", locale); -L.setLocale("he"); \ No newline at end of file +L.registerLocale("he", locale) +L.setLocale("he") diff --git a/umap/static/umap/locale/he.json b/umap/static/umap/locale/he.json index 045ca794..c38145f1 100644 --- a/umap/static/umap/locale/he.json +++ b/umap/static/umap/locale/he.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "הוספת מצולע לרב המצולעים הנוכחי", "Advanced actions": "פעולות מתקדמות", "Advanced properties": "מאפיינים מתקדמים", - "Advanced transition": "התמרה מתקדמת", "All properties are imported.": "כל המאפיינים ייובאו.", "Allow interactions": "לאפשר אינטראקציות", "An error occured": "אירעה שגיאה", @@ -190,7 +189,6 @@ "Home": "בית", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "כמה לפשט את הקו השבור בכל רמת תקריב (יותר = ביצועים משופרים ומראה חלק יותר, פחות = דיוק גבוה יותר)", "If false, the polygon will act as a part of the underlying map.": "אם שקר, המצולע יתנהג כחלק מהמפה שמתחת.", - "Iframe export options": "אפשרויות ייצוא מסגרת פנימית", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "מסגרת פנימית עם גובה מותאם (בפיקסלים): {{{http://iframe.url.com|גובה}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "מסגרת פנימית עם גובה ורוחב מותאמים (בפיקסלים): {{{http://iframe.url.com|גובה*רוחב}}}", "Iframe: {{{http://iframe.url.com}}}": "מסגרת פנימית: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "הצגת/הסתרת שכבה", "Simple link: [[http://example.com]]": "קישור פשוט: [[http://example.com]]", "Slideshow": "מצגת", - "Smart transitions": "מעברונים חכמים", "Sort key": "מפתח סידור", "Split line": "פיצול קו", "Start a hole here": "להתחיל חור מכאן", @@ -279,12 +276,10 @@ "Stop slideshow": "הפסקת מצגת", "Supported scheme": "סכמה נתמכת", "Supported variables that will be dynamically replaced": "משתנים נתמכים שיוחלפו באופן דינמי", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "סמן יכול להיות תו יוניקוד או כתובת. ניתן להשתמש בתכונות מאפיינים כמשתנים, למשל: עם „‎http://myserver.org/images/{name}.png‎” המשתנה {name} יוחלף בערך של „name” בכל אחד מהסמנים.", "TMS format": "מבנה TMS", "Text color for the cluster label": "צבע טקסט לתווית הקבוצה", "Text formatting": "עיצוב טקסט", "The name of the property to use as feature label (ex.: \"nom\")": "שם המאפיין לשימוש כתווית תכונה (למשל: „nom”)", - "The zoom and center have been set.": "התקריב והמרכז הוגדרו.", "To use if remote server doesn't allow cross domain (slower)": "יש להשתמש אם השרת המרוחק לא מאפשר קישור בין שמות תחומים (Cross Origin - אטי יותר)", "To zoom": "לתקריב", "Toggle edit mode (Shift+Click)": "החלפת מצב עריכה ‪(Shift+לחיצה)", @@ -343,16 +338,6 @@ "mi": "מייל", "miles": "מיילים", "nautical miles": "מיילים ימיים", - "{area} acres": "{area} אקרים", - "{area} ha": "{area} הקטאר", - "{area} m²": "{area} מ׳²", - "{area} mi²": "{area} מיילים²", - "{area} yd²": "{area} יארדים²", - "{distance} NM": "{distance} מיילים ימיים", - "{distance} km": "{distance} ק״מ", - "{distance} m": "{distance} מ׳", - "{distance} miles": "{distance} מיילים", - "{distance} yd": "{distance} יארד", "1 day": "יום", "1 hour": "שעה", "5 min": "5 דקות", @@ -366,9 +351,45 @@ "Optional.": "רשות.", "Paste your data here": "נא להדביק את הנתונים שלך כאן", "Please save the map first": "נא לשמור את המפה קודם", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/hr.js b/umap/static/umap/locale/hr.js index 1e0cc723..6a7b69ea 100644 --- a/umap/static/umap/locale/hr.js +++ b/umap/static/umap/locale/hr.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Dodavanje simbola", "Allow scroll wheel zoom?": "Dopustiti uvećanje kotačićem miša?", "Automatic": "Automatsko", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Napredne akcije", "Advanced properties": "Napredne postavke", - "Advanced transition": "Advanced transition", "All properties are imported.": "Sve postavke su uvezene.", "Allow interactions": "Allow interactions", "An error occured": "Desila se greška", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Prikaži/sakrij sloj", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Formatiranje teksta", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "Do uvećanja", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("hr", locale); -L.setLocale("hr"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("hr", locale) +L.setLocale("hr") diff --git a/umap/static/umap/locale/hr.json b/umap/static/umap/locale/hr.json index f934709f..79777695 100644 --- a/umap/static/umap/locale/hr.json +++ b/umap/static/umap/locale/hr.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Napredne akcije", "Advanced properties": "Napredne postavke", - "Advanced transition": "Advanced transition", "All properties are imported.": "Sve postavke su uvezene.", "Allow interactions": "Allow interactions", "An error occured": "Desila se greška", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Prikaži/sakrij sloj", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Formatiranje teksta", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "Do uvećanja", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/hu.js b/umap/static/umap/locale/hu.js index 2009378e..2148ee7f 100644 --- a/umap/static/umap/locale/hu.js +++ b/umap/static/umap/locale/hu.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Szimbólum hozzáadása", "Allow scroll wheel zoom?": "Engedélyezi-e a görgetést nagyításkor?", "Automatic": "Automatikus", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Sokszög hozzáadása a jelenlegi alakzatcsoporthoz", "Advanced actions": "Speciális műveletek", "Advanced properties": "Speciális tulajdonságok", - "Advanced transition": "Speciális áttűnés", "All properties are imported.": "Minden tulajdonság importálva lett.", "Allow interactions": "Interakció engedélyezése", "An error occured": "Hiba történt", @@ -190,7 +189,6 @@ var locale = { "Home": "Kezdőlap", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Mennyire egyszerűsödjék egy töröttvonal az egyes nagyítási fokozatoknál (jobban = jobb teljesítmény és simább kinézet, kevésbé = nagyobb pontosság)", "If false, the polygon will act as a part of the underlying map.": "Ha hamis, akkor a sokszög az alapját jelentő térkép részeként fog viselkedni.", - "Iframe export options": "Iframe exportálási beállítások", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe egyedi magassággal (pixel): {{{http://iframe.url.com|magasság}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe egyedi magassággal és szélességgel (pixel): {{{http://iframe.url.com|magasság*szélesség}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Réteg megjelenítése/elrejtése", "Simple link: [[http://example.com]]": "Egyszerű link: [[http://pelda.hu]]", "Slideshow": "Diavetítés", - "Smart transitions": "Intelligens áttűnések", "Sort key": "Sorba rendezéshez használt kulcs", "Split line": "Vonal elvágása", "Start a hole here": "Lyuk rajzolása itt", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Diavetítés befejezése", "Supported scheme": "Támogatott séma", "Supported variables that will be dynamically replaced": "Támogatott változók, amelyek dinamikusan behelyettesítődnek", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "A szimbólum egy unicode karakter vagy egy URL lehet. Az objektum tulajdonságai változóként használhatók. Például „http://myserver.org/images/{name}.png” használatánál az egyes jelölők „name” értékei behelyettesítődnek {name} változó helyén.", "TMS format": "TMS-formátum", "Text color for the cluster label": "Csoportcímke szövegének színe", "Text formatting": "Szövegformázás", "The name of the property to use as feature label (ex.: \"nom\")": "Az objektum felirataként használandó tulajdonság neve (pl.: „név”)", - "The zoom and center have been set.": "Nagyítás és középpont beállítva.", "To use if remote server doesn't allow cross domain (slower)": "Akkor használja, ha a távoli kiszolgáló nem engedélyezi a tartományok közötti (cross-domain) átvitelt (lassabb)", "To zoom": "Eddig a nagyítási szintig", "Toggle edit mode (Shift+Click)": "Szerkesztési mód bekapcsolása (Shift+Klikk)", @@ -343,16 +338,6 @@ var locale = { "mi": "mérföld", "miles": "mérföld", "nautical miles": "tengeri mérföld", - "{area} acres": "{area} acre", - "{area} ha": "{area} hektár", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mérföld²", - "{area} yd²": "{area} yard²", - "{distance} NM": "{distance} tengeri mérföld", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} mérföld", - "{distance} yd": "{distance} yard", "1 day": "1 nap", "1 hour": "1 óra", "5 min": "5 perc", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Nem kötelező.", "Paste your data here": "Illessze be ide az adatokat", "Please save the map first": "Először mentse a térképet", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("hu", locale); -L.setLocale("hu"); \ No newline at end of file +L.registerLocale("hu", locale) +L.setLocale("hu") diff --git a/umap/static/umap/locale/hu.json b/umap/static/umap/locale/hu.json index 5b7d096f..756496f2 100644 --- a/umap/static/umap/locale/hu.json +++ b/umap/static/umap/locale/hu.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Sokszög hozzáadása a jelenlegi alakzatcsoporthoz", "Advanced actions": "Speciális műveletek", "Advanced properties": "Speciális tulajdonságok", - "Advanced transition": "Speciális áttűnés", "All properties are imported.": "Minden tulajdonság importálva lett.", "Allow interactions": "Interakció engedélyezése", "An error occured": "Hiba történt", @@ -190,7 +189,6 @@ "Home": "Kezdőlap", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Mennyire egyszerűsödjék egy töröttvonal az egyes nagyítási fokozatoknál (jobban = jobb teljesítmény és simább kinézet, kevésbé = nagyobb pontosság)", "If false, the polygon will act as a part of the underlying map.": "Ha hamis, akkor a sokszög az alapját jelentő térkép részeként fog viselkedni.", - "Iframe export options": "Iframe exportálási beállítások", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe egyedi magassággal (pixel): {{{http://iframe.url.com|magasság}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe egyedi magassággal és szélességgel (pixel): {{{http://iframe.url.com|magasság*szélesség}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Réteg megjelenítése/elrejtése", "Simple link: [[http://example.com]]": "Egyszerű link: [[http://pelda.hu]]", "Slideshow": "Diavetítés", - "Smart transitions": "Intelligens áttűnések", "Sort key": "Sorba rendezéshez használt kulcs", "Split line": "Vonal elvágása", "Start a hole here": "Lyuk rajzolása itt", @@ -279,12 +276,10 @@ "Stop slideshow": "Diavetítés befejezése", "Supported scheme": "Támogatott séma", "Supported variables that will be dynamically replaced": "Támogatott változók, amelyek dinamikusan behelyettesítődnek", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "A szimbólum egy unicode karakter vagy egy URL lehet. Az objektum tulajdonságai változóként használhatók. Például „http://myserver.org/images/{name}.png” használatánál az egyes jelölők „name” értékei behelyettesítődnek {name} változó helyén.", "TMS format": "TMS-formátum", "Text color for the cluster label": "Csoportcímke szövegének színe", "Text formatting": "Szövegformázás", "The name of the property to use as feature label (ex.: \"nom\")": "Az objektum felirataként használandó tulajdonság neve (pl.: „név”)", - "The zoom and center have been set.": "Nagyítás és középpont beállítva.", "To use if remote server doesn't allow cross domain (slower)": "Akkor használja, ha a távoli kiszolgáló nem engedélyezi a tartományok közötti (cross-domain) átvitelt (lassabb)", "To zoom": "Eddig a nagyítási szintig", "Toggle edit mode (Shift+Click)": "Szerkesztési mód bekapcsolása (Shift+Klikk)", @@ -343,16 +338,6 @@ "mi": "mérföld", "miles": "mérföld", "nautical miles": "tengeri mérföld", - "{area} acres": "{area} acre", - "{area} ha": "{area} hektár", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mérföld²", - "{area} yd²": "{area} yard²", - "{distance} NM": "{distance} tengeri mérföld", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} mérföld", - "{distance} yd": "{distance} yard", "1 day": "1 nap", "1 hour": "1 óra", "5 min": "5 perc", @@ -366,9 +351,45 @@ "Optional.": "Nem kötelező.", "Paste your data here": "Illessze be ide az adatokat", "Please save the map first": "Először mentse a térképet", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/id.js b/umap/static/umap/locale/id.js index 8e33a460..1a9ac5ef 100644 --- a/umap/static/umap/locale/id.js +++ b/umap/static/umap/locale/id.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Add symbol", "Allow scroll wheel zoom?": "Allow scroll wheel zoom?", "Automatic": "Automatic", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("id", locale); -L.setLocale("id"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("id", locale) +L.setLocale("id") diff --git a/umap/static/umap/locale/id.json b/umap/static/umap/locale/id.json index f111f462..f88450e3 100644 --- a/umap/static/umap/locale/id.json +++ b/umap/static/umap/locale/id.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/is.js b/umap/static/umap/locale/is.js index 70f4aae9..fd0525c0 100644 --- a/umap/static/umap/locale/is.js +++ b/umap/static/umap/locale/is.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Bæta við tákni", "Allow scroll wheel zoom?": "Leyfa aðdrátt með skrunhjóli?", "Automatic": "Sjálfvirkt", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Bæta marghyrningi við fyrirliggjandi hóp", "Advanced actions": "Ítarlegri aðgerðir", "Advanced properties": "Ítarlegir eiginleikar", - "Advanced transition": "Ítarleg millifærsla", "All properties are imported.": "Öll eigindi voru flutt inn.", "Allow interactions": "Leyfa gagnvirkni", "An error occured": "Villa kom upp", @@ -190,7 +189,6 @@ var locale = { "Home": "Heim", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Hve mikið eigi að einfalda fjölpunktalínu á hverju aðdráttarstigi (meira = betri afköst og mýkra útlit, minna = nákvæmara)", "If false, the polygon will act as a part of the underlying map.": "Ef þetta er ósatt, mun marghyrningurinn verða hluti af undirliggjandi korti.", - "Iframe export options": "Útflutningsvalkostir Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe með sérsniðinni hæð (í mynddílum/px): {{{http://iframe.url.com|hæð}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe með sérsniðinni hæð og breidd (í mynddílum/px): {{{http://iframe.url.com|hæð*breidd}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Birta/Fela lag", "Simple link: [[http://example.com]]": "Einfaldur tengill: [[http://example.com]]", "Slideshow": "Skyggnusýning", - "Smart transitions": "Snjallar millifærslur", "Sort key": "Röðunarlykill", "Split line": "Skipta línu", "Start a hole here": "Byrja holu hér", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stöðva skyggnusýningu", "Supported scheme": "Stutt skema", "Supported variables that will be dynamically replaced": "Studdar breytur sem verður skipt út eftir þörfum", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Tákn getur verið annað hvort unicode-stafur eða URL-slóð. Þú getur haft eigindi fitja sem breytur: t.d.: með \"http://mittlén.org/myndir/{nafn}.png\", verður breytunni {nafn} skipt út fyrir gildið \"nafn\" í eigindum hvers merkis.", "TMS format": "TMS-snið", "Text color for the cluster label": "Litur á texta fyrir skýringu á klasa", "Text formatting": "Snið á texta", "The name of the property to use as feature label (ex.: \"nom\")": "Heiti eigindisins sem á að nota sem skýringu á fitju (dæmi: \"nafn\")", - "The zoom and center have been set.": "Búið er að stilla aðdrátt og miðjun.", "To use if remote server doesn't allow cross domain (slower)": "Nota ef fjartengdur þjónn leyfir ekki millivísanir léna (hægvirkara)", "To zoom": "Í aðdrátt", "Toggle edit mode (Shift+Click)": "Víxla breytingaham af/á (Shift+Smella)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "mílur", "nautical miles": "sjómílur", - "{area} acres": "{area} ekrur", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} sjómílur", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} mílur", - "{distance} yd": "{distance} yd", "1 day": "1 dagur", "1 hour": "1 klukkustund", "5 min": "5 mín", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Valfrjálst.", "Paste your data here": "Límdu gögnin þín hér", "Please save the map first": "Vistaðu fyrst kortið", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("is", locale); -L.setLocale("is"); \ No newline at end of file +L.registerLocale("is", locale) +L.setLocale("is") diff --git a/umap/static/umap/locale/is.json b/umap/static/umap/locale/is.json index 72fa461c..e074691a 100644 --- a/umap/static/umap/locale/is.json +++ b/umap/static/umap/locale/is.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Bæta marghyrningi við fyrirliggjandi hóp", "Advanced actions": "Ítarlegri aðgerðir", "Advanced properties": "Ítarlegir eiginleikar", - "Advanced transition": "Ítarleg millifærsla", "All properties are imported.": "Öll eigindi voru flutt inn.", "Allow interactions": "Leyfa gagnvirkni", "An error occured": "Villa kom upp", @@ -190,7 +189,6 @@ "Home": "Heim", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Hve mikið eigi að einfalda fjölpunktalínu á hverju aðdráttarstigi (meira = betri afköst og mýkra útlit, minna = nákvæmara)", "If false, the polygon will act as a part of the underlying map.": "Ef þetta er ósatt, mun marghyrningurinn verða hluti af undirliggjandi korti.", - "Iframe export options": "Útflutningsvalkostir Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe með sérsniðinni hæð (í mynddílum/px): {{{http://iframe.url.com|hæð}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe með sérsniðinni hæð og breidd (í mynddílum/px): {{{http://iframe.url.com|hæð*breidd}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Birta/Fela lag", "Simple link: [[http://example.com]]": "Einfaldur tengill: [[http://example.com]]", "Slideshow": "Skyggnusýning", - "Smart transitions": "Snjallar millifærslur", "Sort key": "Röðunarlykill", "Split line": "Skipta línu", "Start a hole here": "Byrja holu hér", @@ -279,12 +276,10 @@ "Stop slideshow": "Stöðva skyggnusýningu", "Supported scheme": "Stutt skema", "Supported variables that will be dynamically replaced": "Studdar breytur sem verður skipt út eftir þörfum", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Tákn getur verið annað hvort unicode-stafur eða URL-slóð. Þú getur haft eigindi fitja sem breytur: t.d.: með \"http://mittlén.org/myndir/{nafn}.png\", verður breytunni {nafn} skipt út fyrir gildið \"nafn\" í eigindum hvers merkis.", "TMS format": "TMS-snið", "Text color for the cluster label": "Litur á texta fyrir skýringu á klasa", "Text formatting": "Snið á texta", "The name of the property to use as feature label (ex.: \"nom\")": "Heiti eigindisins sem á að nota sem skýringu á fitju (dæmi: \"nafn\")", - "The zoom and center have been set.": "Búið er að stilla aðdrátt og miðjun.", "To use if remote server doesn't allow cross domain (slower)": "Nota ef fjartengdur þjónn leyfir ekki millivísanir léna (hægvirkara)", "To zoom": "Í aðdrátt", "Toggle edit mode (Shift+Click)": "Víxla breytingaham af/á (Shift+Smella)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "mílur", "nautical miles": "sjómílur", - "{area} acres": "{area} ekrur", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} sjómílur", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} mílur", - "{distance} yd": "{distance} yd", "1 day": "1 dagur", "1 hour": "1 klukkustund", "5 min": "5 mín", @@ -366,9 +351,45 @@ "Optional.": "Valfrjálst.", "Paste your data here": "Límdu gögnin þín hér", "Please save the map first": "Vistaðu fyrst kortið", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/it.js b/umap/static/umap/locale/it.js index 197bdd98..487ab78b 100644 --- a/umap/static/umap/locale/it.js +++ b/umap/static/umap/locale/it.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Aggiungi un simbolo", "Allow scroll wheel zoom?": "Abilitare la rotellina del mouse per lo zoom?", "Automatic": "Automatico", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Aggiungi un poligono a quell correnti", "Advanced actions": "Azioni avanzate", "Advanced properties": "Proprietà avanzate", - "Advanced transition": "Transizione avanzata", "All properties are imported.": "Tutte le proprietà sono state importate.", "Allow interactions": "Permetti interazioni", "An error occured": "Si è verificato un errore", @@ -142,12 +141,12 @@ var locale = { "Define link to open in a new window on polygon click.": "Define link to open in a new window on polygon click.", "Delay between two transitions when in play mode": "Delay between two transitions when in play mode", "Delete": "Cancella", - "Delete all layers": "Delete all layers", - "Delete layer": "Delete layer", + "Delete all layers": "Elimina tutti i livelli", + "Delete layer": "Elimina livello", "Delete this feature": "Cancella questa geometria", "Delete this property on all the features": "Cancella questa proprietà in tutte le geometrie", "Delete this shape": "Cancella questa geometria", - "Delete this vertex (Alt+Click)": "Delete this vertex (Alt+Click)", + "Delete this vertex (Alt+Click)": "Elimina questo vertice (Alt+Click)", "Directions from here": "Indicazioni stradali da qui", "Disable editing": "Disabilita la modifica", "Display measure": "Mostra misura", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Quanto vuoi semplificare la polilinea per ogni zoom (più = maggiori perfromance a aspetto più semplificato, meno = maggior dettaglio)", "If false, the polygon will act as a part of the underlying map.": "Se falso, il poligono agirà come parte della mappa sottostante.", - "Iframe export options": "opzioni di esportazione iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe con altezza (in px) personalizzata: {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -210,7 +208,7 @@ var locale = { "Layer properties": "Proprietà del layer", "Licence": "Licenza", "Limit bounds": "Limiti di confine", - "Link to…": "Link to…", + "Link to…": "Link a…", "Link with text: [[http://example.com|text of the link]]": "Link con testo: [[http://example.com|testo del link]]", "Long credits": "Ringraziamenti estesi", "Longitude": "Longitudine", @@ -224,9 +222,9 @@ var locale = { "Map's owner": "Proprietario della mappa", "Merge lines": "Unisci linee", "More controls": "Maggiori controlli", - "Must be a valid CSS value (eg.: DarkBlue or #123456)": "Must be a valid CSS value (eg.: DarkBlue or #123456)", + "Must be a valid CSS value (eg.: DarkBlue or #123456)": "Deve avere un valore CSS valido (es.: DarkBlue o #123456)", "No licence has been set": "Non è ancora stata impostata una licenza", - "No results": "No results", + "No results": "Nessun risultato", "Only visible features will be downloaded.": "Saranno scaricate solo le geoemtrie visibili.", "Open download panel": "Apri il panel scaricato", "Open link in…": "Apri link in…", @@ -249,7 +247,7 @@ var locale = { "Remote data": "Dati remoti", "Remove shape from the multi": "Rimuovi geometria dalle altre", "Rename this property on all the features": "Rinomina questa proprietà in tutti gli oggetti", - "Replace layer content": "Replace layer content", + "Replace layer content": "Sostituisci il contenuto del livello", "Restore this version": "Ripristina questa versione", "Save": "Salva", "Save anyway": "Salva comunque", @@ -257,7 +255,7 @@ var locale = { "Save this center and zoom": "Salva il centro e lo zoom", "Save this location as new feature": "Save this location as new feature", "Search a place name": "Cerca il nome di un posto", - "Search location": "Search location", + "Search location": "Cerca luogo", "Secret edit link is:
    {link}": "Il link segreto per editare è: {link}", "See all": "Vedi tutto", "See data layers": "Vedi i livelli dati", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Mostra/nascondi layer", "Simple link: [[http://example.com]]": "Link semplice: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Dividi linea", "Start a hole here": "Comincia un buco qui", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Ferma slideshow", "Supported scheme": "Schema supportato", "Supported variables that will be dynamically replaced": "Variabili supportate che verranno cambiate dinamicamente", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Il simbolo può essere sia un carattere Unicode che un indirizzo URL. Puoi usare delle proprietà di elemento come variabili: ad esempio con “http://myserver.org/images/{name}.png”, la variabile {name} verrà rimpiazzata con il valore “nome” di ogni marcatore.", "TMS format": "formato TMS", "Text color for the cluster label": "Colore di testo per l'etichetta del raggruppamento", "Text formatting": "Formattazione testo", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been setted.": "Il livello di zoom e il centro sono stati impostati.", "To use if remote server doesn't allow cross domain (slower)": "Da utilizzare se il server remoto non permette l'accesso incrociato ai domini (lento)", "To zoom": "Allo zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -292,7 +287,7 @@ var locale = { "Transform to lines": "Trasforma in linee", "Transform to polygon": "Trasforma in poligono", "Type of layer": "Tipo di layer", - "Unable to detect format of file {filename}": "Unable to detect format of file {filename}", + "Unable to detect format of file {filename}": "Impossibile individuare il formato del file {filename}", "Untitled layer": "Layer senza nome", "Untitled map": "Mappa senza nome", "Update permissions": "Aggiorna autorizzazioni", @@ -343,16 +338,6 @@ var locale = { "mi": "miglia", "miles": "miglia", "nautical miles": "miglia nautiche", - "{area} acres": "{area} acri", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miglia", - "{distance} yd": "{distance} yd", "1 day": "1 giorno", "1 hour": "1 ora", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Opzionale.", "Paste your data here": "Incolla i tuoi dati qui", "Please save the map first": "Per favore prima salva la mappa", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("it", locale); -L.setLocale("it"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("it", locale) +L.setLocale("it") diff --git a/umap/static/umap/locale/it.json b/umap/static/umap/locale/it.json index 813e47d3..0d75f625 100644 --- a/umap/static/umap/locale/it.json +++ b/umap/static/umap/locale/it.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Aggiungi un poligono a quell correnti", "Advanced actions": "Azioni avanzate", "Advanced properties": "Proprietà avanzate", - "Advanced transition": "Transizione avanzata", "All properties are imported.": "Tutte le proprietà sono state importate.", "Allow interactions": "Permetti interazioni", "An error occured": "Si è verificato un errore", @@ -142,12 +141,12 @@ "Define link to open in a new window on polygon click.": "Define link to open in a new window on polygon click.", "Delay between two transitions when in play mode": "Delay between two transitions when in play mode", "Delete": "Cancella", - "Delete all layers": "Delete all layers", - "Delete layer": "Delete layer", + "Delete all layers": "Elimina tutti i livelli", + "Delete layer": "Elimina livello", "Delete this feature": "Cancella questa geometria", "Delete this property on all the features": "Cancella questa proprietà in tutte le geometrie", "Delete this shape": "Cancella questa geometria", - "Delete this vertex (Alt+Click)": "Delete this vertex (Alt+Click)", + "Delete this vertex (Alt+Click)": "Elimina questo vertice (Alt+Click)", "Directions from here": "Indicazioni stradali da qui", "Disable editing": "Disabilita la modifica", "Display measure": "Mostra misura", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Quanto vuoi semplificare la polilinea per ogni zoom (più = maggiori perfromance a aspetto più semplificato, meno = maggior dettaglio)", "If false, the polygon will act as a part of the underlying map.": "Se falso, il poligono agirà come parte della mappa sottostante.", - "Iframe export options": "opzioni di esportazione iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe con altezza (in px) personalizzata: {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -210,7 +208,7 @@ "Layer properties": "Proprietà del layer", "Licence": "Licenza", "Limit bounds": "Limiti di confine", - "Link to…": "Link to…", + "Link to…": "Link a…", "Link with text: [[http://example.com|text of the link]]": "Link con testo: [[http://example.com|testo del link]]", "Long credits": "Ringraziamenti estesi", "Longitude": "Longitudine", @@ -224,9 +222,9 @@ "Map's owner": "Proprietario della mappa", "Merge lines": "Unisci linee", "More controls": "Maggiori controlli", - "Must be a valid CSS value (eg.: DarkBlue or #123456)": "Must be a valid CSS value (eg.: DarkBlue or #123456)", + "Must be a valid CSS value (eg.: DarkBlue or #123456)": "Deve avere un valore CSS valido (es.: DarkBlue o #123456)", "No licence has been set": "Non è ancora stata impostata una licenza", - "No results": "No results", + "No results": "Nessun risultato", "Only visible features will be downloaded.": "Saranno scaricate solo le geoemtrie visibili.", "Open download panel": "Apri il panel scaricato", "Open link in…": "Apri link in…", @@ -249,7 +247,7 @@ "Remote data": "Dati remoti", "Remove shape from the multi": "Rimuovi geometria dalle altre", "Rename this property on all the features": "Rinomina questa proprietà in tutti gli oggetti", - "Replace layer content": "Replace layer content", + "Replace layer content": "Sostituisci il contenuto del livello", "Restore this version": "Ripristina questa versione", "Save": "Salva", "Save anyway": "Salva comunque", @@ -257,7 +255,7 @@ "Save this center and zoom": "Salva il centro e lo zoom", "Save this location as new feature": "Save this location as new feature", "Search a place name": "Cerca il nome di un posto", - "Search location": "Search location", + "Search location": "Cerca luogo", "Secret edit link is:
    {link}": "Il link segreto per editare è: {link}", "See all": "Vedi tutto", "See data layers": "Vedi i livelli dati", @@ -269,7 +267,6 @@ "Show/hide layer": "Mostra/nascondi layer", "Simple link: [[http://example.com]]": "Link semplice: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Dividi linea", "Start a hole here": "Comincia un buco qui", @@ -279,12 +276,10 @@ "Stop slideshow": "Ferma slideshow", "Supported scheme": "Schema supportato", "Supported variables that will be dynamically replaced": "Variabili supportate che verranno cambiate dinamicamente", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Il simbolo può essere sia un carattere Unicode che un indirizzo URL. Puoi usare delle proprietà di elemento come variabili: ad esempio con “http://myserver.org/images/{name}.png”, la variabile {name} verrà rimpiazzata con il valore “nome” di ogni marcatore.", "TMS format": "formato TMS", "Text color for the cluster label": "Colore di testo per l'etichetta del raggruppamento", "Text formatting": "Formattazione testo", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been setted.": "Il livello di zoom e il centro sono stati impostati.", "To use if remote server doesn't allow cross domain (slower)": "Da utilizzare se il server remoto non permette l'accesso incrociato ai domini (lento)", "To zoom": "Allo zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -292,7 +287,7 @@ "Transform to lines": "Trasforma in linee", "Transform to polygon": "Trasforma in poligono", "Type of layer": "Tipo di layer", - "Unable to detect format of file {filename}": "Unable to detect format of file {filename}", + "Unable to detect format of file {filename}": "Impossibile individuare il formato del file {filename}", "Untitled layer": "Layer senza nome", "Untitled map": "Mappa senza nome", "Update permissions": "Aggiorna autorizzazioni", @@ -343,16 +338,6 @@ "mi": "miglia", "miles": "miglia", "nautical miles": "miglia nautiche", - "{area} acres": "{area} acri", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miglia", - "{distance} yd": "{distance} yd", "1 day": "1 giorno", "1 hour": "1 ora", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Opzionale.", "Paste your data here": "Incolla i tuoi dati qui", "Please save the map first": "Per favore prima salva la mappa", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/ja.js b/umap/static/umap/locale/ja.js index c39d3538..4c3b12b0 100644 --- a/umap/static/umap/locale/ja.js +++ b/umap/static/umap/locale/ja.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "シンボルを追加", "Allow scroll wheel zoom?": "マウスホイールでのスクロールを許可?", "Automatic": "自動", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "現在のマルチにポリゴンを追加", "Advanced actions": "拡張アクション", "Advanced properties": "拡張プロパティ", - "Advanced transition": "拡張トランジション", "All properties are imported.": "すべてのプロパティがインポートされました。", "Allow interactions": "インタラクションを許可", "An error occured": "エラーが発生しました", @@ -190,7 +189,6 @@ var locale = { "Home": "ホーム", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "各ズームレベルでのポリゴン簡略化 (more = パフォーマンスと滑らかさ重視, less = 正確さ重視)", "If false, the polygon will act as a part of the underlying map.": "無効にした場合、ポリゴンは背景地図の一部として動作します。", - "Iframe export options": "Iframeエクスポートオプション", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframeの縦幅を指定(ピクセル): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframeの縦幅および横幅を指定(ピクセル): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "レイヤ表示/非表示", "Simple link: [[http://example.com]]": "シンプルリンク: [[http://example.com]]", "Slideshow": "スライドショー", - "Smart transitions": "Smart transitions", "Sort key": "並び替えに使うキー", "Split line": "ラインを分割", "Start a hole here": "この部分に穴を作成", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "スライドショーを停止", "Supported scheme": "対応スキーマ", "Supported variables that will be dynamically replaced": "対応する動的な変数", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "シンボルにはユニコード文字やURLを使えます。地物のプロパティを変数として使うこともできます。例: \"http://myserver.org/images/{name}.png\" であれば、{name}の部分はそれぞれのマーカーの\"name\"の値で置き換えられます。", "TMS format": "TMSフォーマット", "Text color for the cluster label": "クラスタラベルのテキスト色", "Text formatting": "テキスト形式", "The name of the property to use as feature label (ex.: \"nom\")": "地物のラベルとして用いるプロパティ名を入力する", - "The zoom and center have been set.": "ズームと地図中心点の設定完了", "To use if remote server doesn't allow cross domain (slower)": "外部サーバがクロスドメインを許可していない場合に使用します (処理速度低下)", "To zoom": "非表示にするズームレベル", "Toggle edit mode (Shift+Click)": "編集モードを切り替える(シフトキーを押しながらクリック)", @@ -343,16 +338,6 @@ var locale = { "mi": "マイル", "miles": "マイル", "nautical miles": "海里", - "{area} acres": "{area} エイカー", - "{area} ha": "{area} ヘクタール", - "{area} m²": "{area} m²", - "{area} mi²": "{area} 平方マイル", - "{area} yd²": "{area} 平方ヤード", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} マイル", - "{distance} yd": "{distance} ヤード", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("ja", locale); -L.setLocale("ja"); \ No newline at end of file +L.registerLocale("ja", locale) +L.setLocale("ja") diff --git a/umap/static/umap/locale/ja.json b/umap/static/umap/locale/ja.json index 60f047e6..5757bcc8 100644 --- a/umap/static/umap/locale/ja.json +++ b/umap/static/umap/locale/ja.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "現在のマルチにポリゴンを追加", "Advanced actions": "拡張アクション", "Advanced properties": "拡張プロパティ", - "Advanced transition": "拡張トランジション", "All properties are imported.": "すべてのプロパティがインポートされました。", "Allow interactions": "インタラクションを許可", "An error occured": "エラーが発生しました", @@ -190,7 +189,6 @@ "Home": "ホーム", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "各ズームレベルでのポリゴン簡略化 (more = パフォーマンスと滑らかさ重視, less = 正確さ重視)", "If false, the polygon will act as a part of the underlying map.": "無効にした場合、ポリゴンは背景地図の一部として動作します。", - "Iframe export options": "Iframeエクスポートオプション", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframeの縦幅を指定(ピクセル): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframeの縦幅および横幅を指定(ピクセル): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "レイヤ表示/非表示", "Simple link: [[http://example.com]]": "シンプルリンク: [[http://example.com]]", "Slideshow": "スライドショー", - "Smart transitions": "Smart transitions", "Sort key": "並び替えに使うキー", "Split line": "ラインを分割", "Start a hole here": "この部分に穴を作成", @@ -279,12 +276,10 @@ "Stop slideshow": "スライドショーを停止", "Supported scheme": "対応スキーマ", "Supported variables that will be dynamically replaced": "対応する動的な変数", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "シンボルにはユニコード文字やURLを使えます。地物のプロパティを変数として使うこともできます。例: \"http://myserver.org/images/{name}.png\" であれば、{name}の部分はそれぞれのマーカーの\"name\"の値で置き換えられます。", "TMS format": "TMSフォーマット", "Text color for the cluster label": "クラスタラベルのテキスト色", "Text formatting": "テキスト形式", "The name of the property to use as feature label (ex.: \"nom\")": "地物のラベルとして用いるプロパティ名を入力する", - "The zoom and center have been set.": "ズームと地図中心点の設定完了", "To use if remote server doesn't allow cross domain (slower)": "外部サーバがクロスドメインを許可していない場合に使用します (処理速度低下)", "To zoom": "非表示にするズームレベル", "Toggle edit mode (Shift+Click)": "編集モードを切り替える(シフトキーを押しながらクリック)", @@ -343,16 +338,6 @@ "mi": "マイル", "miles": "マイル", "nautical miles": "海里", - "{area} acres": "{area} エイカー", - "{area} ha": "{area} ヘクタール", - "{area} m²": "{area} m²", - "{area} mi²": "{area} 平方マイル", - "{area} yd²": "{area} 平方ヤード", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} マイル", - "{distance} yd": "{distance} ヤード", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/ko.js b/umap/static/umap/locale/ko.js index adbc0599..ae3345b5 100644 --- a/umap/static/umap/locale/ko.js +++ b/umap/static/umap/locale/ko.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "심볼 추가", "Allow scroll wheel zoom?": "마우스 휠로 확대/축소할 수 있도록 하시겠습니까?", "Automatic": "자동", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "현재 무늬에 도형 추가", "Advanced actions": "고급 동작", "Advanced properties": "고급 속성", - "Advanced transition": "고급 전환", "All properties are imported.": "모든 속성이 삽입되었습니다.", "Allow interactions": "상호 작용 허용", "An error occured": "오류가 발생했습니다", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("ko", locale); -L.setLocale("ko"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("ko", locale) +L.setLocale("ko") diff --git a/umap/static/umap/locale/ko.json b/umap/static/umap/locale/ko.json index 65ac72df..fa8990c6 100644 --- a/umap/static/umap/locale/ko.json +++ b/umap/static/umap/locale/ko.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "현재 무늬에 도형 추가", "Advanced actions": "고급 동작", "Advanced properties": "고급 속성", - "Advanced transition": "고급 전환", "All properties are imported.": "모든 속성이 삽입되었습니다.", "Allow interactions": "상호 작용 허용", "An error occured": "오류가 발생했습니다", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/lt.js b/umap/static/umap/locale/lt.js index 51aa9081..9cc34531 100644 --- a/umap/static/umap/locale/lt.js +++ b/umap/static/umap/locale/lt.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Pridėti simbolį", "Allow scroll wheel zoom?": "Leisti pelės ratuko veiksmus?", "Automatic": "Automatic", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Sudėtingesni veiksmai", "Advanced properties": "Sudėtingesni nustatymai", - "Advanced transition": "Advanced transition", "All properties are imported.": "Visi objektai importuoti.", "Allow interactions": "Allow interactions", "An error occured": "Įvyko klaida", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Kaip stipriai supaprastinti linijas kiekviename mastelyje (daugiau - diesnis greitis ir lygesnis vaizdas, mažiau - tikslesnis atvaizdavimas)", "If false, the polygon will act as a part of the underlying map.": "Jei false, poligonas bus pagrindinio žemėlapio dalis.", - "Iframe export options": "Iframe export nustatymai", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe su nurodytu aukščiu (pikseliais): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Rodyti/slėpti sluoksnį", "Simple link: [[http://example.com]]": "Paprasta nuoroda: [[http://example.com]]", "Slideshow": "Peržiūra", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Padalinti liniją", "Start a hole here": "Piešti skylę čia", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stabdyti peržiūrą", "Supported scheme": "Palaikoma struktūra", "Supported variables that will be dynamically replaced": "Palaikomi kintamieji bus automatiškai perrašyti", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS formatas", "Text color for the cluster label": "Teksto spalva klasterio pavadinimui", "Text formatting": "Teksto formatavimas", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "Šis mastelis ir centras išsaugoti.", "To use if remote server doesn't allow cross domain (slower)": "Naudoti jei serveris neleidžia cross domain užklausų (lėtesnis sprendimas)", "To zoom": "Padidinti", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("lt", locale); -L.setLocale("lt"); \ No newline at end of file +L.registerLocale("lt", locale) +L.setLocale("lt") diff --git a/umap/static/umap/locale/lt.json b/umap/static/umap/locale/lt.json index 1556a0bf..40e5b46c 100644 --- a/umap/static/umap/locale/lt.json +++ b/umap/static/umap/locale/lt.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Sudėtingesni veiksmai", "Advanced properties": "Sudėtingesni nustatymai", - "Advanced transition": "Advanced transition", "All properties are imported.": "Visi objektai importuoti.", "Allow interactions": "Allow interactions", "An error occured": "Įvyko klaida", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Kaip stipriai supaprastinti linijas kiekviename mastelyje (daugiau - diesnis greitis ir lygesnis vaizdas, mažiau - tikslesnis atvaizdavimas)", "If false, the polygon will act as a part of the underlying map.": "Jei false, poligonas bus pagrindinio žemėlapio dalis.", - "Iframe export options": "Iframe export nustatymai", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe su nurodytu aukščiu (pikseliais): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Rodyti/slėpti sluoksnį", "Simple link: [[http://example.com]]": "Paprasta nuoroda: [[http://example.com]]", "Slideshow": "Peržiūra", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Padalinti liniją", "Start a hole here": "Piešti skylę čia", @@ -279,12 +276,10 @@ "Stop slideshow": "Stabdyti peržiūrą", "Supported scheme": "Palaikoma struktūra", "Supported variables that will be dynamically replaced": "Palaikomi kintamieji bus automatiškai perrašyti", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS formatas", "Text color for the cluster label": "Teksto spalva klasterio pavadinimui", "Text formatting": "Teksto formatavimas", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "Šis mastelis ir centras išsaugoti.", "To use if remote server doesn't allow cross domain (slower)": "Naudoti jei serveris neleidžia cross domain užklausų (lėtesnis sprendimas)", "To zoom": "Padidinti", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/ms.js b/umap/static/umap/locale/ms.js new file mode 100644 index 00000000..9fe7c5ae --- /dev/null +++ b/umap/static/umap/locale/ms.js @@ -0,0 +1,397 @@ +const locale = { + "Add symbol": "Tambah simbol", + "Allow scroll wheel zoom?": "Benarkan zum dengan roda tatal?", + "Automatic": "Automatik", + "Ball": "Bola", + "Cancel": "Batal", + "Caption": "Keterangan", + "Change symbol": "Tukar simbol", + "Choose the data format": "Pilih format data", + "Choose the layer of the feature": "Pilih lapisan bagi sifat", + "Circle": "Bulatan", + "Clustered": "Berkelompok", + "Data browser": "Pelayar data", + "Default": "Lalai", + "Default zoom level": "Tahap zum lalai", + "Default: name": "Lalai: nama", + "Display label": "Label paparan", + "Display the control to open OpenStreetMap editor": "Paparkan kawalan untuk buka penyunting OpenStreetMap", + "Display the data layers control": "Paparkan kawalan lapisan data", + "Display the embed control": "Paparkan kawalan benaman", + "Display the fullscreen control": "Paparkan kawalan skrin penuh", + "Display the locate control": "Paparkan kawalan kesan kedudukan", + "Display the measure control": "Paparkan kawalan pengukuran", + "Display the search control": "Paparkan kawalan gelintar", + "Display the tile layers control": "Paparkan kawalan lapisan jubin", + "Display the zoom control": "Paparkan kawalan zum", + "Do you want to display a caption bar?": "Adakah anda ingin paparkan bar keterangan?", + "Do you want to display a minimap?": "Adakah anda ingin paparkan peta mini?", + "Do you want to display a panel on load?": "Adakah anda ingin paparkan panel ketika dimuatkan?", + "Do you want to display popup footer?": "Adakah anda ingin paparkan pengaki timbul?", + "Do you want to display the scale control?": "Adakah anda ingin paparkan kawalan skala?", + "Do you want to display the «more» control?": "Adakah anda ingin paparkan kawalan «lebih lagi»?", + "Drop": "Jatuhkan", + "GeoRSS (only link)": "GeoRSS (pautan sahaja)", + "GeoRSS (title + image)": "GeoRSS (tajuk + imej)", + "Heatmap": "Peta tompokan", + "Icon shape": "Bentuk ikon", + "Icon symbol": "Simbol ikon", + "Inherit": "Warisi", + "Label direction": "Arah label", + "Label key": "Kekunci label", + "Labels are clickable": "Label boleh diklik", + "None": "Tiada", + "On the bottom": "Di bawah", + "On the left": "Di kiri", + "On the right": "Di kanan", + "On the top": "Di atas", + "Popup content template": "Templat kandungan tetingkap timbul", + "Set symbol": "Simbol set", + "Side panel": "Panel sisi", + "Simplify": "Permudahkan", + "Symbol or url": "Simbol atau url", + "Table": "Meja", + "always": "sentiasa", + "clear": "kosongkan", + "collapsed": "dijatuhkan", + "color": "warna", + "dash array": "tatasusunan sengkang", + "define": "takrif", + "description": "keterangan", + "expanded": "dikembangkan", + "fill": "diisi", + "fill color": "warna isian", + "fill opacity": "kelegapan isian", + "hidden": "disembunyikan", + "iframe": "iframe", + "inherit": "warisi", + "name": "nama", + "never": "tidak pernah", + "new window": "tetingkap baharu", + "no": "tidak", + "on hover": "ketika dilalukan tetikus", + "opacity": "kelegapan", + "parent window": "tetingkap induk", + "stroke": "lejang", + "weight": "tebal", + "yes": "ya", + "{delay} seconds": "{delay} saat", + "# one hash for main heading": "# satu tanda pagar untuk tajuk utama", + "## two hashes for second heading": "## dua tanda pagar untuk tajuk kedua", + "### three hashes for third heading": "### tiga tanda pagar untuk tajuk ketiga", + "**double star for bold**": "**bintang berganda untuk tulisan tebal**", + "*simple star for italic*": "*bintang tunggal untuk tulisan condong*", + "--- for an horizontal rule": "--- untuk garis melintang", + "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".": "Senarai berpisahkan koma bagi nombor yang menentukan corak sengkang lejang. Cth.: \"5, 10, 15\".", + "About": "Perihalan", + "Action not allowed :(": "Tindakan tidak dibenarkan :(", + "Activate slideshow mode": "Aktifkan mod persembahan slaid", + "Add a layer": "Tambah lapisan", + "Add a line to the current multi": "Tambah garisan ke multi semasa", + "Add a new property": "Tambah ciri-ciri baharu", + "Add a polygon to the current multi": "Tambah poligon ke multi semasa", + "Advanced actions": "Tindakan lanjutan", + "Advanced properties": "Ciri-ciri lanjutan", + "All properties are imported.": "Semua ciri-ciri telah diimport.", + "Allow interactions": "Benarkan interaksi", + "An error occured": "Telah berlakunya ralat", + "Are you sure you want to cancel your changes?": "Adakah anda ingin membatalkan perubahan anda?", + "Are you sure you want to clone this map and all its datalayers?": "Adakah anda ingin klon peta ini serta semua lapisan datanya?", + "Are you sure you want to delete the feature?": "Adakah anda ingin memadamkan sifat-sifat dipilih?", + "Are you sure you want to delete this layer?": "Adakah anda ingin memadamkan lapisan ini?", + "Are you sure you want to delete this map?": "Adakah anda ingin memadamkan peta ini?", + "Are you sure you want to delete this property on all the features?": "Adakah anda ingin memadamkan ciri-ciri ini di kesemua sifat-sifat?", + "Are you sure you want to restore this version?": "Adakah anda ingin memulihkan versi ini?", + "Attach the map to my account": "Lampirkan peta ke akaun saya", + "Auto": "Auto", + "Autostart when map is loaded": "Automula apabila peta dimuatkan", + "Bring feature to center": "Bawa sifat ke tengah", + "Browse data": "Layari data", + "Cancel edits": "Batalkan suntingan", + "Center map on your location": "Ketengahkan peta ke kedudukan anda", + "Change map background": "Tukar latar belakang peta", + "Change tilelayers": "Tukar lapisan jubin", + "Choose a preset": "Pilih pratetapan", + "Choose the format of the data to import": "Pilih format data yang ingin diimport", + "Choose the layer to import in": "Pilih lapisan untuk diimport", + "Click last point to finish shape": "Klik titik akhir untuk lengkapkan bentuk", + "Click to add a marker": "Klik untuk tambahkan penanda", + "Click to continue drawing": "Klik untuk terus melukis", + "Click to edit": "Klik untuk menyunting", + "Click to start drawing a line": "Klik untuk mula melukis garisan", + "Click to start drawing a polygon": "Klik untuk mula melukis poligon", + "Clone": "Klon", + "Clone of {name}": "Klon {name}", + "Clone this feature": "Klon sifat ini", + "Clone this map": "Klon peta ini", + "Close": "Tutup", + "Clustering radius": "Jejari kelompok", + "Comma separated list of properties to use when filtering features": "Senarai berpisahkan koma bagi ciri-ciri untuk digunakan ketika menapis sifat", + "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Nilai dipisahkan dengan koma, tab atau koma bertitik. SRS WGS84 diimplikasikan. Hanya geometri Titik diimport. Import akan lihat pada kepala lajur untuk sebarang sebutan «lat» dan «lon» di bahagian permulaan pengepala, tak peka besar huruf. Kesemua lajur lain diimport sebagai ciri-ciri.", + "Continue line": "Garis sambung", + "Continue line (Ctrl+Click)": "Garis sambung (Ctrl+Klik)", + "Coordinates": "Koordinat", + "Credits": "Penghargaan", + "Current view instead of default map view?": "Pandangan semasa menggantikan pandangan peta lalai?", + "Custom background": "Latar belakang tersuai", + "Data is browsable": "Data boleh layar", + "Default interaction options": "Pilihan interaksi lalai", + "Default properties": "Ciri-ciri lalai", + "Default shape properties": "Ciri-ciri bentuk lalai", + "Define link to open in a new window on polygon click.": "Tetapkan pautan untuk buka dalam tetingkap baharu apabila poligon diklik", + "Delay between two transitions when in play mode": "Lengah di antara dua transisi apabila dalam mod main", + "Delete": "Padam", + "Delete all layers": "Padam semua lapisan", + "Delete layer": "Padam lapisan", + "Delete this feature": "Padam sifat ini", + "Delete this property on all the features": "Padam ciri-ciri ini di kesemua sifat-sifat", + "Delete this shape": "Padam bentuk ini", + "Delete this vertex (Alt+Click)": "Padam bucu ini (Alt+Klik)", + "Directions from here": "Arah dari sini", + "Disable editing": "Lumpuhkan suntingan", + "Display measure": "Paparkan ukuran", + "Display on load": "Paparkan semasa dimuatkan", + "Download": "Muat turun", + "Download data": "Muat turun data", + "Drag to reorder": "Seret untuk susun semula", + "Draw a line": "Lukis garisan", + "Draw a marker": "Lukis penanda", + "Draw a polygon": "Lukis poligon", + "Draw a polyline": "Lukis poligaris", + "Dynamic": "Dinamik", + "Dynamic properties": "Ciri-ciri dinamik", + "Edit": "Sunting", + "Edit feature's layer": "Sunting lapisan sifat", + "Edit map properties": "Sunting ciri-ciri peta", + "Edit map settings": "Sunting tetapan peta", + "Edit properties in a table": "Sunting ciri-ciri dalam jadual", + "Edit this feature": "Sunting sifat ini", + "Editing": "Suntingan", + "Embed and share this map": "Benam dan kongsi peta ini", + "Embed the map": "Benamkan peta", + "Empty": "Kosongkan", + "Enable editing": "Bolehkan suntingan", + "Error in the tilelayer URL": "Ralat dalam URL lapisan jubin", + "Error while fetching {url}": "Ralat ketika mengambil {url}", + "Exit Fullscreen": "Keluar Skrin Penuh", + "Extract shape to separate feature": "Sarikan bentuk untuk memisahkan sifat", + "Fetch data each time map view changes.": "Ambil data setiap kali pandangan peta berubah.", + "Filter keys": "Kekunci tapisan", + "Filter…": "Tapis…", + "Format": "Format", + "From zoom": "Dari zum", + "Full map data": "Data peta penuh", + "Go to «{feature}»": "Pergi ke «{feature}»", + "Heatmap intensity property": "Ciri-ciri keamatan peta tompokan", + "Heatmap radius": "Jejari peta tompokan", + "Help": "Bantuan", + "Hide controls": "Sembunyikan kawalan", + "Home": "Laman utama", + "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Berapa banyak untuk dipermudahkan bagi poligaris di setiap tahap zum (lebih banyak = lebih tinggi prestasi dan rupa lebih halus, lebih sedikit = lebih tepat)", + "If false, the polygon will act as a part of the underlying map.": "Jika salah, poligon akan bertindak sebagai sebahagian daripada peta di bawah.", + "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe dengan tinggi tersuai (dalam px): {{{http://iframe.url.com|height}}}", + "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe dengan tinggi dan lebar tersuai (dalam px): {{{http://iframe.url.com|height*width}}}", + "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", + "Image with custom width (in px): {{http://image.url.com|width}}": "Imej dengan lebar tersuai (dalam px): {{http://image.url.com|width}}", + "Image: {{http://image.url.com}}": "Imej: {{http://image.url.com}}", + "Import": "Import", + "Import data": "Import data", + "Import in a new layer": "Import ke lapisan baharu", + "Imports all umap data, including layers and settings.": "Import semua data umap, termasuk lapisan dan tetapan.", + "Include full screen link?": "Sertakan pautan skrin penuh?", + "Interaction options": "Pilihan interaksi", + "Invalid umap data": "Data umap tidak sah", + "Invalid umap data in {filename}": "Data umap tidak sah dalam {filename}", + "Keep current visible layers": "Kekalkan lapisan yang kelihatan sekarang", + "Latitude": "Latitud", + "Layer": "Lapisan", + "Layer properties": "Ciri-ciri lapisan", + "Licence": "Lesen", + "Limit bounds": "Had batas", + "Link to…": "Pautkan ke…", + "Link with text: [[http://example.com|text of the link]]": "Pautkan dengan tulisan: [[http://example.com|tulisan pautan]]", + "Long credits": "Penghargaan penuh", + "Longitude": "Longitud", + "Make main shape": "Buatkan bentuk utama", + "Manage layers": "Urus lapisan", + "Map background credits": "Penghargaan latar belakang peta", + "Map has been attached to your account": "Peta telah dilampirkan ke akaun anda", + "Map has been saved!": "Peta telah disimpan!", + "Map user content has been published under licence": "Kandungan pengguna peta telah diterbitkan di bawah lesen", + "Map's editors": "Penyunting peta", + "Map's owner": "Pemilik peta", + "Merge lines": "Gabungkan garisan", + "More controls": "Lebih banyak kawalan", + "Must be a valid CSS value (eg.: DarkBlue or #123456)": "Mestilah nilai CSS yang sah (cth.: DarkBlue atau #123456)", + "No licence has been set": "Tiada lesen ditetapkan", + "No results": "Tiada hasil", + "Only visible features will be downloaded.": "Hanya sifat kelihatan sahaja akan dimuat turun.", + "Open download panel": "Buka panel muat turun", + "Open link in…": "Buka pautan dalam…", + "Open this map extent in a map editor to provide more accurate data to OpenStreetMap": "Buka takat peta ini dalam penyunting peta untuk menyediakan data yang lebih tepat ke OpenStreetMap", + "Optional intensity property for heatmap": "Ciri-ciri keamatan pilihan untuk peta tompokan", + "Optional. Same as color if not set.": "Pilihan. Sama seperti warna jika tidak ditetapkan.", + "Override clustering radius (default 80)": "Menggantikan jejari kelompok (nilai lalai 80)", + "Override heatmap radius (default 25)": "Menggantikan jejari peta tompokan (nilai lalai 25)", + "Please be sure the licence is compliant with your use.": "Sila pastikan lesen menurut kegunaan anda.", + "Please choose a format": "Sila pilih format", + "Please enter the name of the property": "Sila masukkan nama ciri-ciri", + "Please enter the new name of this property": "Sila masukkan nama baharu bagi ciri-ciri ini", + "Powered by Leaflet and Django, glued by uMap project.": "Dikuasakan oleh Leaflet dan Django, dicantumkan oleh projek uMap.", + "Problem in the response": "Masalah dalam tindak balas", + "Problem in the response format": "Masalah dalam format tindak balas", + "Properties imported:": "Ciri-ciri diimport:", + "Property to use for sorting features": "Ciri-ciri untuk digunakan bagi mengisih sifat", + "Provide an URL here": "Sediakan URL di sini", + "Proxy request": "Permintaan proksi", + "Remote data": "Data jarak jauh", + "Remove shape from the multi": "Buang bentuk daripada multi", + "Rename this property on all the features": "Namakan semula ciri-ciri ini di kesemua sifat-sifat", + "Replace layer content": "Gantikan kandungan lapisan", + "Restore this version": "Pulihkan versi ini", + "Save": "Simpan", + "Save anyway": "Simpan juga apa pun", + "Save current edits": "Simpan suntingan semasa", + "Save this center and zoom": "Simpan kedudukan tengah dan zum ini", + "Save this location as new feature": "Simpan kedudukan ini sebagai sifat baharu", + "Search a place name": "Cari nama tempat", + "Search location": "Kedudukan carian", + "Secret edit link is:
    {link}": "Pautan suntingan rahsia ialah:
    {link}", + "See all": "Lihat semua", + "See data layers": "Lihat lapisan data", + "See full screen": "Lihat skrin penuh", + "Set it to false to hide this layer from the slideshow, the data browser, the popup navigation…": "Tetapkan ke salah untuk menyembunyikan lapisan ini daripada persembahan slaid, pelayar data, navigasi timbul…", + "Shape properties": "Ciri-ciri bentuk", + "Short URL": "URL pendek", + "Short credits": "Penghargaan pendek", + "Show/hide layer": "Tunjuk/sembunyi lapisan", + "Simple link: [[http://example.com]]": "Pautan ringkas: [[http://example.com]]", + "Slideshow": "Persembahan slaid", + "Sort key": "Kekunci isihan", + "Split line": "Garisan pemisah", + "Start a hole here": "Mulakan lubang di sini", + "Start editing": "Mula menyunting", + "Start slideshow": "Mulakan persembahan slaid", + "Stop editing": "Berhenti menyunting", + "Stop slideshow": "Berhenti persembahan slaid", + "Supported scheme": "Skema disokong", + "Supported variables that will be dynamically replaced": "Pemboleh ubah disokong yang akan digantikan secara dinamik", + "TMS format": "Format TMS", + "Text color for the cluster label": "Warna tulisan label kelompok", + "Text formatting": "Format tulisan", + "The name of the property to use as feature label (ex.: \"nom\")": "Nama ciri-ciri untuk digunakan sebagai label sifat (cth.: \"nom\")", + "To use if remote server doesn't allow cross domain (slower)": "Untuk digunakan jika pelayan jarak jauh tidak benarkan rentang domain (lebih perlahan)", + "To zoom": "Untuk zum", + "Toggle edit mode (Shift+Click)": "Togol mod suntingan (Shift+Klik)", + "Transfer shape to edited feature": "Pindah bentuk ke sifat yang disunting", + "Transform to lines": "Jelmakan menjadi garisan", + "Transform to polygon": "Jelmakan menjadi poligon", + "Type of layer": "Jenis lapisan", + "Unable to detect format of file {filename}": "Tidak mampu mengesan format fail {filename}", + "Untitled layer": "Lapisan tanpa tajuk", + "Untitled map": "Peta tanpa tajuk", + "Update permissions": "Kemas kini kebenaran", + "Update permissions and editors": "Kemas kini kebenaran dan penyunting", + "Url": "Url", + "Use current bounds": "Guna batas semasa", + "Use placeholders with feature properties between brackets, eg. {name}, they will be dynamically replaced by the corresponding values.": "Guna pemegang tempat dengan ciri-ciri sifat di antara tanda kurung, spt. {name}, mereka akan digantikan dengan nilai yang berkenaan secara dinamiknya.", + "User content credits": "Penghargaan kandungan pengguna", + "User interface options": "Pilihan antara muka pengguna", + "Versions": "Versi", + "View Fullscreen": "Lihat Skrin Penuh", + "Where do we go from here?": "Ke mana kita pergi dari sini?", + "Whether to display or not polygons paths.": "Sama ada ingin paparkan laluan poligon ataupun tidak.", + "Whether to fill polygons with color.": "Sama ada ingin isikan poligon dengan warna.", + "Who can edit": "Siapa boleh sunting", + "Who can view": "Siapa boleh lihat", + "Will be displayed in the bottom right corner of the map": "Akan dipaparkan di bucu kanan bawah peta", + "Will be visible in the caption of the map": "Akan kelihatan dalam keterangan peta", + "Woops! Someone else seems to have edited the data. You can save anyway, but this will erase the changes made by others.": "Alamak! Nampaknya orang lain telah menyunting data. Anda boleh simpan juga, tetapi ini akan memadam perubahan yang dibuat oleh orang lain.", + "You have unsaved changes.": "Anda ada perubahan yang belum disimpan.", + "Zoom in": "Zum masuk", + "Zoom level for automatic zooms": "Tahap zum bagi zum automatik", + "Zoom out": "Zum keluar", + "Zoom to layer extent": "Zum ke batas lapisan", + "Zoom to the next": "Zum ke seterusnya", + "Zoom to the previous": "Zum ke sebelumnya", + "Zoom to this feature": "Zum ke sifat ini", + "Zoom to this place": "Zum ke tempat ini", + "attribution": "atribusi", + "by": "oleh", + "display name": "nama paparan", + "height": "tinggi", + "licence": "lesen", + "max East": "Timur maksimum", + "max North": "Utara maksimum", + "max South": "Selatan maksimum", + "max West": "Barat maksimum", + "max zoom": "zum maksimum", + "min zoom": "zum minimum", + "next": "seterusnya", + "previous": "sebelumnya", + "width": "lebar", + "{count} errors during import: {message}": "{count} ralat ketika import: {message}", + "Measure distances": "Ukur jarak", + "NM": "NM", + "kilometers": "kilometer", + "km": "km", + "mi": "bt", + "miles": "batu", + "nautical miles": "batu nautika", + "1 day": "1 hari", + "1 hour": "1 jam", + "5 min": "5 minit", + "Cache proxied request": "Cache permintaan diproksi", + "No cache": "Tiada cache", + "Popup": "Tetingkap timbul", + "Popup (large)": "Tetingkap timbul (besar)", + "Popup content style": "Gaya kandungan tetingkap timbul", + "Popup shape": "Bentuk tetingkap timbul", + "Skipping unknown geometry.type: {type}": "Melangkau jenis geometri tidak diketahui: {type}", + "Optional.": "Pilihan.", + "Paste your data here": "Tampalkan data anda di sini", + "Please save the map first": "Sila simpan peta terlebih dahulu", + "Feature identifier key": "Kekunci pengenalpastian sifat", + "Open current feature on load": "Buka sifat semasa ketika dimuatkan", + "Permalink": "Pautan kekal", + "The name of the property to use as feature unique identifier.": "Nama ciri-ciri untuk digunakan sebagai pengenalpastian unik sifat.", + "Advanced filter keys": "Kekunci tapisan lanjutan", + "Comma separated list of properties to use for checkbox filtering": "Senarai berpisahkan koma bagi ciri-ciri untuk digunakan bagi penapisan kotak pilihan", + "Data filters": "Penapis data", + "Do you want to display caption menus?": "Adakah anda ingin paparkan menu keterangan?", + "Example: key1,key2,key3": "Contoh: kekunci1,kekunci2,kekunci3", + "Invalid latitude or longitude": "Latitud atau longitud tidak sah", + "Invalide property name: {name}": "Nama ciri tidak sah: {name}", + "No results for these filters": "Tiada hasil bagi tapisan ini", + "Permanent credits": "Penghargaan kekal", + "Permanent credits background": "Latar penghargaan kekal", + "Select data": "Pilih data", + "Will be permanently visible in the bottom left corner of the map": "Akan dipaparkan secara kekal di bucu kiri bawah peta", + "{area} acres": "{area} ekar", + "{area} ha": "{area} hektar", + "{area} m²": "{area} meter²", + "{area} mi²": "{area} batu²", + "{area} yd²": "{area} ela²", + "{distance} NM": "{distance} batu nautika", + "{distance} km": "{distance} kilometer", + "{distance} m": "{distance} meter", + "{distance} miles": "{distance} batu", + "{distance} yd": "{distance} ela", + " (area: {measure})": "(kawasan: {measure})", + " (length: {measure})": "(panjang: {measure})", + "Animated transitions": "Transisi beranimasi", + "Background overlay url": "URL tindihan atas latar belakang", + "Custom overlay": "Tindihan atas tersuai", + "Display the star map button": "Paparkan butang tanda bintang peta", + "Error in the overlay URL": "Ralat dalam URL tindihan atas", + "Map has been starred": "Peta telah ditandai bintang", + "Map has been unstarred": "Peta telah dinyahtandai bintang", + "Opacity": "Kelegapan", + "Star this map": "Tandai bintang peta ini", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Simbol boleh jadi aksara unicode atau URL. Anda boleh gunakan ciri-ciri sifat sebagai pemboleh ubah: cth.: dengan \"http://myserver.org/images/{name}.png\", pemboleh ubah {name} akan digantikan dengan nilai \"name\" bagi setiap penanda.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("ms", locale) +L.setLocale("ms") diff --git a/umap/static/umap/locale/ms.json b/umap/static/umap/locale/ms.json index a88b7de1..77cf9742 100644 --- a/umap/static/umap/locale/ms.json +++ b/umap/static/umap/locale/ms.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Tambah poligon ke multi semasa", "Advanced actions": "Tindakan lanjutan", "Advanced properties": "Ciri-ciri lanjutan", - "Advanced transition": "Peralihan lanjutan", "All properties are imported.": "Semua ciri-ciri telah diimport.", "Allow interactions": "Benarkan interaksi", "An error occured": "Telah berlakunya ralat", @@ -140,7 +139,7 @@ "Default properties": "Ciri-ciri lalai", "Default shape properties": "Ciri-ciri bentuk lalai", "Define link to open in a new window on polygon click.": "Tetapkan pautan untuk buka dalam tetingkap baharu apabila poligon diklik", - "Delay between two transitions when in play mode": "Lengah di antara dua peralihan apabila dalam mod main", + "Delay between two transitions when in play mode": "Lengah di antara dua transisi apabila dalam mod main", "Delete": "Padam", "Delete all layers": "Padam semua lapisan", "Delete layer": "Padam lapisan", @@ -190,7 +189,6 @@ "Home": "Laman utama", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Berapa banyak untuk dipermudahkan bagi poligaris di setiap tahap zum (lebih banyak = lebih tinggi prestasi dan rupa lebih halus, lebih sedikit = lebih tepat)", "If false, the polygon will act as a part of the underlying map.": "Jika salah, poligon akan bertindak sebagai sebahagian daripada peta di bawah.", - "Iframe export options": "Pilihan eksport iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe dengan tinggi tersuai (dalam px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe dengan tinggi dan lebar tersuai (dalam px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Tunjuk/sembunyi lapisan", "Simple link: [[http://example.com]]": "Pautan ringkas: [[http://example.com]]", "Slideshow": "Persembahan slaid", - "Smart transitions": "Peralihan pintar", "Sort key": "Kekunci isihan", "Split line": "Garisan pemisah", "Start a hole here": "Mulakan lubang di sini", @@ -279,12 +276,10 @@ "Stop slideshow": "Berhenti persembahan slaid", "Supported scheme": "Skema disokong", "Supported variables that will be dynamically replaced": "Pemboleh ubah disokong yang akan digantikan secara dinamik", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Simbol boleh jadi aksara unicode atau URL. Anda boleh gunakan ciri-ciri sifat sebagai pemboleh ubah: cth.: dengan \"http://myserver.org/images/{name}.png\", pemboleh ubah {name} akan digantikan dengan nilai \"name\" bagi setiap penanda.", "TMS format": "Format TMS", "Text color for the cluster label": "Warna tulisan label kelompok", "Text formatting": "Format tulisan", "The name of the property to use as feature label (ex.: \"nom\")": "Nama ciri-ciri untuk digunakan sebagai label sifat (cth.: \"nom\")", - "The zoom and center have been setted.": "Zum dan kedudukan tengah telah ditetapkan.", "To use if remote server doesn't allow cross domain (slower)": "Untuk digunakan jika pelayan jarak jauh tidak benarkan rentang domain (lebih perlahan)", "To zoom": "Untuk zum", "Toggle edit mode (Shift+Click)": "Togol mod suntingan (Shift+Klik)", @@ -343,16 +338,6 @@ "mi": "bt", "miles": "batu", "nautical miles": "batu nautika", - "{area} acres": "{area} ekar", - "{area} ha": "{area} hektar", - "{area} m²": "{area} meter²", - "{area} mi²": "{area} batu²", - "{area} yd²": "{area} ela²", - "{distance} NM": "{distance} batu nautika", - "{distance} km": "{distance} kilometer", - "{distance} m": "{distance} meter", - "{distance} miles": "{distance} batu", - "{distance} yd": "{distance} ela", "1 day": "1 hari", "1 hour": "1 jam", "5 min": "5 minit", @@ -366,9 +351,45 @@ "Optional.": "Pilihan.", "Paste your data here": "Tampalkan data anda di sini", "Please save the map first": "Sila simpan peta terlebih dahulu", - "Unable to locate you.": "Tidak mampu mengesan kedudukan anda.", "Feature identifier key": "Kekunci pengenalpastian sifat", "Open current feature on load": "Buka sifat semasa ketika dimuatkan", "Permalink": "Pautan kekal", - "The name of the property to use as feature unique identifier.": "Nama ciri-ciri untuk digunakan sebagai pengenalpastian unik sifat." + "The name of the property to use as feature unique identifier.": "Nama ciri-ciri untuk digunakan sebagai pengenalpastian unik sifat.", + "Advanced filter keys": "Kekunci tapisan lanjutan", + "Comma separated list of properties to use for checkbox filtering": "Senarai berpisahkan koma bagi ciri-ciri untuk digunakan bagi penapisan kotak pilihan", + "Data filters": "Penapis data", + "Do you want to display caption menus?": "Adakah anda ingin paparkan menu keterangan?", + "Example: key1,key2,key3": "Contoh: kekunci1,kekunci2,kekunci3", + "Invalid latitude or longitude": "Latitud atau longitud tidak sah", + "Invalide property name: {name}": "Nama ciri tidak sah: {name}", + "No results for these filters": "Tiada hasil bagi tapisan ini", + "Permanent credits": "Penghargaan kekal", + "Permanent credits background": "Latar penghargaan kekal", + "Select data": "Pilih data", + "Will be permanently visible in the bottom left corner of the map": "Akan dipaparkan secara kekal di bucu kiri bawah peta", + "{area} acres": "{area} ekar", + "{area} ha": "{area} hektar", + "{area} m²": "{area} meter²", + "{area} mi²": "{area} batu²", + "{area} yd²": "{area} ela²", + "{distance} NM": "{distance} batu nautika", + "{distance} km": "{distance} kilometer", + "{distance} m": "{distance} meter", + "{distance} miles": "{distance} batu", + "{distance} yd": "{distance} ela", + " (area: {measure})": "(kawasan: {measure})", + " (length: {measure})": "(panjang: {measure})", + "Animated transitions": "Transisi beranimasi", + "Background overlay url": "URL tindihan atas latar belakang", + "Custom overlay": "Tindihan atas tersuai", + "Display the star map button": "Paparkan butang tanda bintang peta", + "Error in the overlay URL": "Ralat dalam URL tindihan atas", + "Map has been starred": "Peta telah ditandai bintang", + "Map has been unstarred": "Peta telah dinyahtandai bintang", + "Opacity": "Kelegapan", + "Star this map": "Tandai bintang peta ini", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Simbol boleh jadi aksara unicode atau URL. Anda boleh gunakan ciri-ciri sifat sebagai pemboleh ubah: cth.: dengan \"http://myserver.org/images/{name}.png\", pemboleh ubah {name} akan digantikan dengan nilai \"name\" bagi setiap penanda.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/nl.js b/umap/static/umap/locale/nl.js index 691f4afb..35899e31 100644 --- a/umap/static/umap/locale/nl.js +++ b/umap/static/umap/locale/nl.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Symbool toevoegen", "Allow scroll wheel zoom?": "Zoomen met scrollwieltje toestaan?", "Automatic": "Automatisch", @@ -87,12 +87,11 @@ var locale = { "Action not allowed :(": "Handeling niet toegestaan :(", "Activate slideshow mode": "Activeer slidshow modus", "Add a layer": "Laag toevoegen", - "Add a line to the current multi": "Voeg een lijn to aan de huidige multilijn", + "Add a line to the current multi": "Voeg een lijn toe aan de huidige multilijn", "Add a new property": "Voeg een nieuwe eigenschap toe", "Add a polygon to the current multi": "Voeg een nieuwe polygoon toe aan de huidige multipolygoon", "Advanced actions": "Geavanceerde acties", "Advanced properties": "Geavanceerde eigenschappen", - "Advanced transition": "Geavanceerde overgang", "All properties are imported.": "Alle eigenschappen zijn geïmporteerd", "Allow interactions": "Sta interactie toe", "An error occured": "Er is een fout opgetreden", @@ -139,7 +138,7 @@ var locale = { "Default interaction options": "Standaard interactie-opties", "Default properties": "Standaardeigenschappen", "Default shape properties": "Standaard vorm eigenschappen", - "Define link to open in a new window on polygon click.": "Stel outputlink in om een nieuw venster te openen wanneer polygoon wordt aangeklikt ", + "Define link to open in a new window on polygon click.": "Stel outputlink in om een nieuw venster te openen wanneer polygoon wordt aangeklikt", "Delay between two transitions when in play mode": "Pauze tussen twee transities wanneer in afspeel-modus", "Delete": "Verwijderen", "Delete all layers": "Verwijder alle lagen", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Graad van vereenvoudiging van een veelhoek, per zoomniveau. (Hogere waarde = betere prestaties, lagere waarde = getrouwere precisie)", "If false, the polygon will act as a part of the underlying map.": "Indien onwaar ('false'), dan zal de polygoon deel uitmaken van de onderliggende kaart", - "Iframe export options": "Iframe exporteeropties", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe met gespecifieerde hoogte (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe met gespecifieerde hoogte en breedte (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Laag tonen/verbergen", "Simple link: [[http://example.com]]": "Eenvoudige link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Slimme overgangen", "Sort key": "Sleutel om op te sorteren", "Split line": "Splits de lijn", "Start a hole here": "Begin hier een gat", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Toegestaan datamodel", "Supported variables that will be dynamically replaced": "Toegestane variabele die dynamisch vervangen zullen worden", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbool kan zowel een unicodekarakter of een URL zijn. Je kan eigenschappen gebruiken als variabelen, bijv: met \"http://myserver.org/images/{name}.png\", hierbij zal de {name} variable vervangen worden door de \"name\"-waarde.", "TMS format": "TMS-formaat", "Text color for the cluster label": "Kleur van de text voor het label van de cluster", "Text formatting": "Opmaak van de tekst", "The name of the property to use as feature label (ex.: \"nom\")": "De naam van de eigenschap om het object te labelen (vb.: \"naam\")", - "The zoom and center have been set.": "Het zoomniveau en de positie op de kaarten zijn ingesteld", "To use if remote server doesn't allow cross domain (slower)": "Activeer indien de externe server geen cross domain toelaat (trager)", "To zoom": "Tot zoomniveau", "Toggle edit mode (Shift+Click)": "Schakelaar voor editeermodus (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "mijl", "nautical miles": "zeemijl", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} mijl", - "{distance} yd": "{distance} yd", "1 day": "1 dag", "1 hour": "1 uur", "5 min": "5 minuten", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optioneel.", "Paste your data here": "Plak je data hier", "Please save the map first": "Graag eerst de kaart opslaan", - "Unable to locate you.": "Niet gelukt om je te lokaliseren.", "Feature identifier key": "Unieke identificator van het object", "Open current feature on load": "Dit object openen bij laden", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "De naam van de eigenschap die als unieke identificator van objecten geldt" -}; -L.registerLocale("nl", locale); -L.setLocale("nl"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "De naam van de eigenschap die als unieke identificator van objecten geldt", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("nl", locale) +L.setLocale("nl") diff --git a/umap/static/umap/locale/nl.json b/umap/static/umap/locale/nl.json index d514cb0d..ea86abdd 100644 --- a/umap/static/umap/locale/nl.json +++ b/umap/static/umap/locale/nl.json @@ -87,12 +87,11 @@ "Action not allowed :(": "Handeling niet toegestaan :(", "Activate slideshow mode": "Activeer slidshow modus", "Add a layer": "Laag toevoegen", - "Add a line to the current multi": "Voeg een lijn to aan de huidige multilijn", + "Add a line to the current multi": "Voeg een lijn toe aan de huidige multilijn", "Add a new property": "Voeg een nieuwe eigenschap toe", "Add a polygon to the current multi": "Voeg een nieuwe polygoon toe aan de huidige multipolygoon", "Advanced actions": "Geavanceerde acties", "Advanced properties": "Geavanceerde eigenschappen", - "Advanced transition": "Geavanceerde overgang", "All properties are imported.": "Alle eigenschappen zijn geïmporteerd", "Allow interactions": "Sta interactie toe", "An error occured": "Er is een fout opgetreden", @@ -139,7 +138,7 @@ "Default interaction options": "Standaard interactie-opties", "Default properties": "Standaardeigenschappen", "Default shape properties": "Standaard vorm eigenschappen", - "Define link to open in a new window on polygon click.": "Stel outputlink in om een nieuw venster te openen wanneer polygoon wordt aangeklikt ", + "Define link to open in a new window on polygon click.": "Stel outputlink in om een nieuw venster te openen wanneer polygoon wordt aangeklikt", "Delay between two transitions when in play mode": "Pauze tussen twee transities wanneer in afspeel-modus", "Delete": "Verwijderen", "Delete all layers": "Verwijder alle lagen", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Graad van vereenvoudiging van een veelhoek, per zoomniveau. (Hogere waarde = betere prestaties, lagere waarde = getrouwere precisie)", "If false, the polygon will act as a part of the underlying map.": "Indien onwaar ('false'), dan zal de polygoon deel uitmaken van de onderliggende kaart", - "Iframe export options": "Iframe exporteeropties", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe met gespecifieerde hoogte (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe met gespecifieerde hoogte en breedte (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Laag tonen/verbergen", "Simple link: [[http://example.com]]": "Eenvoudige link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Slimme overgangen", "Sort key": "Sleutel om op te sorteren", "Split line": "Splits de lijn", "Start a hole here": "Begin hier een gat", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Toegestaan datamodel", "Supported variables that will be dynamically replaced": "Toegestane variabele die dynamisch vervangen zullen worden", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbool kan zowel een unicodekarakter of een URL zijn. Je kan eigenschappen gebruiken als variabelen, bijv: met \"http://myserver.org/images/{name}.png\", hierbij zal de {name} variable vervangen worden door de \"name\"-waarde.", "TMS format": "TMS-formaat", "Text color for the cluster label": "Kleur van de text voor het label van de cluster", "Text formatting": "Opmaak van de tekst", "The name of the property to use as feature label (ex.: \"nom\")": "De naam van de eigenschap om het object te labelen (vb.: \"naam\")", - "The zoom and center have been set.": "Het zoomniveau en de positie op de kaarten zijn ingesteld", "To use if remote server doesn't allow cross domain (slower)": "Activeer indien de externe server geen cross domain toelaat (trager)", "To zoom": "Tot zoomniveau", "Toggle edit mode (Shift+Click)": "Schakelaar voor editeermodus (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "mijl", "nautical miles": "zeemijl", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} mijl", - "{distance} yd": "{distance} yd", "1 day": "1 dag", "1 hour": "1 uur", "5 min": "5 minuten", @@ -366,9 +351,45 @@ "Optional.": "Optioneel.", "Paste your data here": "Plak je data hier", "Please save the map first": "Graag eerst de kaart opslaan", - "Unable to locate you.": "Niet gelukt om je te lokaliseren.", "Feature identifier key": "Unieke identificator van het object", "Open current feature on load": "Dit object openen bij laden", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "De naam van de eigenschap die als unieke identificator van objecten geldt" + "The name of the property to use as feature unique identifier.": "De naam van de eigenschap die als unieke identificator van objecten geldt", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/no.js b/umap/static/umap/locale/no.js index c574d69b..b9b5aba0 100644 --- a/umap/static/umap/locale/no.js +++ b/umap/static/umap/locale/no.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Legg til symbol", "Allow scroll wheel zoom?": "Tillat rulling med zoom-hjulet?", "Automatic": "Automatisk", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Legg et polygon til gjeldende multi", "Advanced actions": "Avanserte handlinger", "Advanced properties": "Avanserte egenskaper", - "Advanced transition": "Avansert overgang", "All properties are imported.": "Alle egenskaper er importert", "Allow interactions": "Tillat interaksjoner", "An error occured": "En feil oppsto", @@ -190,7 +189,6 @@ var locale = { "Home": "Hjem", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Hvor mye polylinjene skal simplifiseres på hvert zoom-nivå (mer = bedre ytelse og mer sømløst, mindre = mer nøyaktig)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("no", locale); -L.setLocale("no"); \ No newline at end of file +L.registerLocale("no", locale) +L.setLocale("no") diff --git a/umap/static/umap/locale/no.json b/umap/static/umap/locale/no.json index c53312db..c894a1a7 100644 --- a/umap/static/umap/locale/no.json +++ b/umap/static/umap/locale/no.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Legg et polygon til gjeldende multi", "Advanced actions": "Avanserte handlinger", "Advanced properties": "Avanserte egenskaper", - "Advanced transition": "Avansert overgang", "All properties are imported.": "Alle egenskaper er importert", "Allow interactions": "Tillat interaksjoner", "An error occured": "En feil oppsto", @@ -190,7 +189,6 @@ "Home": "Hjem", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Hvor mye polylinjene skal simplifiseres på hvert zoom-nivå (mer = bedre ytelse og mer sømløst, mindre = mer nøyaktig)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/pl.js b/umap/static/umap/locale/pl.js index 5cc49484..68891b53 100644 --- a/umap/static/umap/locale/pl.js +++ b/umap/static/umap/locale/pl.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Dodaj symbol", "Allow scroll wheel zoom?": "Pozwalać na przybliżanie kółkiem?", "Automatic": "Automatyczny", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Dodaj wielobok do wybranego obszaru", "Advanced actions": "Zaawansowane operacje", "Advanced properties": "Zaawansowane właściwości", - "Advanced transition": "Zaawansowane przejście", "All properties are imported.": "Importowane są wszystkie właściwości.", "Allow interactions": "Zezwalaj na interakcję", "An error occured": "Wystąpił błąd", @@ -190,7 +189,6 @@ var locale = { "Home": "Strona główna", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Jak bardzo uprościć obszar na każdym poziomie przybliżenia (więcej = większa wydajność i gładki wygląd, mniej = większa dokładność)", "If false, the polygon will act as a part of the underlying map.": "Jeżeli fałsz, wielokąt będzie zachowywał się jak część mapy zasadniczej.", - "Iframe export options": "Opcje eksportu Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Ramka z podaną wysokością (w pikselach) {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Ramka z podaną wysokością i szerokością (w pikselach): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Ramka: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Pokaż/ukryj warstwę", "Simple link: [[http://example.com]]": "Prosty link: [[http://example.com]]", "Slideshow": "Pokaz slajdów", - "Smart transitions": "Sprytne przejścia", "Sort key": "Klucz sortowania", "Split line": "Podziel linię", "Start a hole here": "Zacznij dziurę tutaj", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Zakończ pokaz", "Supported scheme": "Obsługiwany schemat", "Supported variables that will be dynamically replaced": "Obsługiwane zmienne zostaną dynamicznie zamienione", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol może być znakiem Unicode lub adresem URL. Możesz użyć także właściwości obiektów jako zmiennych np. w „http://myserver.org/images/{name}.png” zmienna {name} zostanie zastąpiona przez wartość „name” każdego znacznika.", "TMS format": "Format TMS", "Text color for the cluster label": "Kolor tekstu etykiety grupy", "Text formatting": "Formatowanie tekstu", "The name of the property to use as feature label (ex.: \"nom\")": "Nazwa właściwości, która ma być używana jako etykieta obiektu (np. „name”)", - "The zoom and center have been setted.": "Przybliżenie i środek zostały ustawione.", "To use if remote server doesn't allow cross domain (slower)": "Używaj, jeśli zdalny serwer nie zezwala na cross domain (wolne)", "To zoom": "Przybliżać", "Toggle edit mode (Shift+Click)": "Przełącz tryb edycji (Shift+Klik)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "mile", "nautical miles": "mile morskie", - "{area} acres": "{area} akrów", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} mi", - "{distance} yd": "{distance} yd", "1 day": "1 dzień", "1 hour": "1 godzina", "5 min": "5 minut", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Opcjonalnie.", "Paste your data here": "Wklej tutaj swoje dane", "Please save the map first": "Prosimy najpierw zapisać mapę", - "Unable to locate you.": "Nie udało się ustalić twojego położenia.", "Feature identifier key": "Klucz identyfikacyjny obiektu", "Open current feature on load": "Otwórz bieżący obiekt po załadowaniu", "Permalink": "Bezpośredni odnośnik.", - "The name of the property to use as feature unique identifier.": "Nazwa właściwości używana jako unikalny identyfikator obiektu." -}; -L.registerLocale("pl", locale); -L.setLocale("pl"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "Nazwa właściwości używana jako unikalny identyfikator obiektu.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("pl", locale) +L.setLocale("pl") diff --git a/umap/static/umap/locale/pl.json b/umap/static/umap/locale/pl.json index 2d9c953a..2bdca581 100644 --- a/umap/static/umap/locale/pl.json +++ b/umap/static/umap/locale/pl.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Dodaj wielobok do wybranego obszaru", "Advanced actions": "Zaawansowane operacje", "Advanced properties": "Zaawansowane właściwości", - "Advanced transition": "Zaawansowane przejście", "All properties are imported.": "Importowane są wszystkie właściwości.", "Allow interactions": "Zezwalaj na interakcję", "An error occured": "Wystąpił błąd", @@ -190,7 +189,6 @@ "Home": "Strona główna", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Jak bardzo uprościć obszar na każdym poziomie przybliżenia (więcej = większa wydajność i gładki wygląd, mniej = większa dokładność)", "If false, the polygon will act as a part of the underlying map.": "Jeżeli fałsz, wielokąt będzie zachowywał się jak część mapy zasadniczej.", - "Iframe export options": "Opcje eksportu Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Ramka z podaną wysokością (w pikselach) {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Ramka z podaną wysokością i szerokością (w pikselach): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Ramka: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Pokaż/ukryj warstwę", "Simple link: [[http://example.com]]": "Prosty link: [[http://example.com]]", "Slideshow": "Pokaz slajdów", - "Smart transitions": "Sprytne przejścia", "Sort key": "Klucz sortowania", "Split line": "Podziel linię", "Start a hole here": "Zacznij dziurę tutaj", @@ -279,12 +276,10 @@ "Stop slideshow": "Zakończ pokaz", "Supported scheme": "Obsługiwany schemat", "Supported variables that will be dynamically replaced": "Obsługiwane zmienne zostaną dynamicznie zamienione", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol może być znakiem Unicode lub adresem URL. Możesz użyć także właściwości obiektów jako zmiennych np. w „http://myserver.org/images/{name}.png” zmienna {name} zostanie zastąpiona przez wartość „name” każdego znacznika.", "TMS format": "Format TMS", "Text color for the cluster label": "Kolor tekstu etykiety grupy", "Text formatting": "Formatowanie tekstu", "The name of the property to use as feature label (ex.: \"nom\")": "Nazwa właściwości, która ma być używana jako etykieta obiektu (np. „name”)", - "The zoom and center have been setted.": "Przybliżenie i środek zostały ustawione.", "To use if remote server doesn't allow cross domain (slower)": "Używaj, jeśli zdalny serwer nie zezwala na cross domain (wolne)", "To zoom": "Przybliżać", "Toggle edit mode (Shift+Click)": "Przełącz tryb edycji (Shift+Klik)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "mile", "nautical miles": "mile morskie", - "{area} acres": "{area} akrów", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} mi", - "{distance} yd": "{distance} yd", "1 day": "1 dzień", "1 hour": "1 godzina", "5 min": "5 minut", @@ -366,9 +351,45 @@ "Optional.": "Opcjonalnie.", "Paste your data here": "Wklej tutaj swoje dane", "Please save the map first": "Prosimy najpierw zapisać mapę", - "Unable to locate you.": "Nie udało się ustalić twojego położenia.", "Feature identifier key": "Klucz identyfikacyjny obiektu", "Open current feature on load": "Otwórz bieżący obiekt po załadowaniu", "Permalink": "Bezpośredni odnośnik.", - "The name of the property to use as feature unique identifier.": "Nazwa właściwości używana jako unikalny identyfikator obiektu." + "The name of the property to use as feature unique identifier.": "Nazwa właściwości używana jako unikalny identyfikator obiektu.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/pl_PL.json b/umap/static/umap/locale/pl_PL.json index d444e628..f88450e3 100644 --- a/umap/static/umap/locale/pl_PL.json +++ b/umap/static/umap/locale/pl_PL.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -365,5 +350,46 @@ "Skipping unknown geometry.type: {type}": "Skipping unknown geometry.type: {type}", "Optional.": "Optional.", "Paste your data here": "Paste your data here", - "Please save the map first": "Please save the map first" + "Please save the map first": "Please save the map first", + "Feature identifier key": "Feature identifier key", + "Open current feature on load": "Open current feature on load", + "Permalink": "Permalink", + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/pt.js b/umap/static/umap/locale/pt.js index d693b227..1165dd91 100644 --- a/umap/static/umap/locale/pt.js +++ b/umap/static/umap/locale/pt.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Adicionar símbolo", "Allow scroll wheel zoom?": "Permitir zoom com roda do rato?", "Automatic": "Automático", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Adicionar um polígono para o multi atual", "Advanced actions": "Ações avançadas", "Advanced properties": "Propriedades avançadas", - "Advanced transition": "Transição avançada", "All properties are imported.": "Foram importadas todas as propriedades.", "Allow interactions": "Permitir interações", "An error occured": "Ocorreu um erro", @@ -190,7 +189,6 @@ var locale = { "Home": "Início", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Por quanto simplificar a polilinha em cada nível de aproximação (mais = melhor desempenho e aspeto mais suave, menos = mais preciso)", "If false, the polygon will act as a part of the underlying map.": "Se desativado, o polígono agirá como parte do mapa de baixo.", - "Iframe export options": "Opções de exportação Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe com altura personalizada (em px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe com altura e largura personalizados (em px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Mostrar/ocultar camada", "Simple link: [[http://example.com]]": "Link simples: [[http://example.com]]", "Slideshow": "Apresentação", - "Smart transitions": "Transições inteligentes", "Sort key": "Chave de ordenação", "Split line": "Linha de separação", "Start a hole here": "Começar um buraco aqui", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Parar apresentação", "Supported scheme": "Esquema suportado", "Supported variables that will be dynamically replaced": "Variáveis suportadas que serão substituídas de forma dinâmica", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "O símbolo pode ser um caractere unicode ou um URL. Pode usar as propriedades de elementos como variáveis: por exemplo.: com \"http://meuservidor.org/imagens/{nome}.png\", a variável {nome} será substituída pelo valor \"nome\" em cada marco.", "TMS format": "Formato TMS", "Text color for the cluster label": "Cor do texto para a etiqueta do aglomerado", "Text formatting": "Formatação do texto", "The name of the property to use as feature label (ex.: \"nom\")": "O nome da propriedade a usar como etiqueta do elemento (ex.: \"nome\")", - "The zoom and center have been setted.": "O centro e a aproximação foram definidos.", "To use if remote server doesn't allow cross domain (slower)": "Para usar caso o servidor remoto não permitir domínios cruzados (mais lento)", "To zoom": "Ao zoom", "Toggle edit mode (Shift+Click)": "Alternar modo de editar (Shift+Clique)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "milhas", "nautical miles": "milhas náuticas", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} milhas", - "{distance} yd": "{distance} yd", "1 day": "1 dia", "1 hour": "1 hora", "5 min": "5 min", @@ -365,7 +350,48 @@ var locale = { "Skipping unknown geometry.type: {type}": "A ignorar tipo de geometria desconhecido: {type}", "Optional.": "Opcional.", "Paste your data here": "Cole aqui os seus dados", - "Please save the map first": "Por favor primeiro grave o mapa" -}; -L.registerLocale("pt", locale); -L.setLocale("pt"); \ No newline at end of file + "Please save the map first": "Por favor primeiro grave o mapa", + "Feature identifier key": "Feature identifier key", + "Open current feature on load": "Open current feature on load", + "Permalink": "Permalink", + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("pt", locale) +L.setLocale("pt") diff --git a/umap/static/umap/locale/pt.json b/umap/static/umap/locale/pt.json index 09b70ebd..387d7389 100644 --- a/umap/static/umap/locale/pt.json +++ b/umap/static/umap/locale/pt.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Adicionar um polígono para o multi atual", "Advanced actions": "Ações avançadas", "Advanced properties": "Propriedades avançadas", - "Advanced transition": "Transição avançada", "All properties are imported.": "Foram importadas todas as propriedades.", "Allow interactions": "Permitir interações", "An error occured": "Ocorreu um erro", @@ -190,7 +189,6 @@ "Home": "Início", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Por quanto simplificar a polilinha em cada nível de aproximação (mais = melhor desempenho e aspeto mais suave, menos = mais preciso)", "If false, the polygon will act as a part of the underlying map.": "Se desativado, o polígono agirá como parte do mapa de baixo.", - "Iframe export options": "Opções de exportação Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe com altura personalizada (em px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe com altura e largura personalizados (em px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Mostrar/ocultar camada", "Simple link: [[http://example.com]]": "Link simples: [[http://example.com]]", "Slideshow": "Apresentação", - "Smart transitions": "Transições inteligentes", "Sort key": "Chave de ordenação", "Split line": "Linha de separação", "Start a hole here": "Começar um buraco aqui", @@ -279,12 +276,10 @@ "Stop slideshow": "Parar apresentação", "Supported scheme": "Esquema suportado", "Supported variables that will be dynamically replaced": "Variáveis suportadas que serão substituídas de forma dinâmica", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "O símbolo pode ser um caractere unicode ou um URL. Pode usar as propriedades de elementos como variáveis: por exemplo.: com \"http://meuservidor.org/imagens/{nome}.png\", a variável {nome} será substituída pelo valor \"nome\" em cada marco.", "TMS format": "Formato TMS", "Text color for the cluster label": "Cor do texto para a etiqueta do aglomerado", "Text formatting": "Formatação do texto", "The name of the property to use as feature label (ex.: \"nom\")": "O nome da propriedade a usar como etiqueta do elemento (ex.: \"nome\")", - "The zoom and center have been set.": "O centro e a aproximação foram definidos.", "To use if remote server doesn't allow cross domain (slower)": "Para usar caso o servidor remoto não permitir domínios cruzados (mais lento)", "To zoom": "Ao zoom", "Toggle edit mode (Shift+Click)": "Alternar modo de editar (Shift+Clique)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "milhas", "nautical miles": "milhas náuticas", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} milhas", - "{distance} yd": "{distance} yd", "1 day": "1 dia", "1 hour": "1 hora", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Opcional.", "Paste your data here": "Cole aqui os seus dados", "Please save the map first": "Por favor primeiro grave o mapa", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/pt_BR.js b/umap/static/umap/locale/pt_BR.js index 08020a05..910c3d50 100644 --- a/umap/static/umap/locale/pt_BR.js +++ b/umap/static/umap/locale/pt_BR.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Adicionar símbolo", "Allow scroll wheel zoom?": "Permitir zoom com roda do mause?", "Automatic": "Automático", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Adicionar um polígono para o multi atual", "Advanced actions": "Ações avançadas", "Advanced properties": "Propriedades avançadas", - "Advanced transition": "Transição avançada", "All properties are imported.": "Foram importadas todas as propriedades.", "Allow interactions": "Permitir interações", "An error occured": "Ocorreu um erro", @@ -190,7 +189,6 @@ var locale = { "Home": "Início", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Por quanto simplificar a polilinha em cada nível de aproximação (mais = melhor desempenho e aspeto mais suave, menos = mais preciso)", "If false, the polygon will act as a part of the underlying map.": "Se desativado, o polígono agirá como parte do mapa de baixo.", - "Iframe export options": "Opções de exportação Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe com altura personalizada (em px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe com altura e largura personalizados (em px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Mostrar/ocultar camada", "Simple link: [[http://example.com]]": "Link simples: [[http://example.com]]", "Slideshow": "Apresentação", - "Smart transitions": "Transições inteligentes", "Sort key": "Chave de ordenação", "Split line": "Linha de separação", "Start a hole here": "Começar um buraco aqui", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Parar apresentação", "Supported scheme": "Esquema suportado", "Supported variables that will be dynamically replaced": "Variáveis suportadas que serão substituídas de forma dinâmica", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "O símbolo pode ser um caractere unicode ou um URL. Pode usar as propriedades de elementos como variáveis: por exemplo.: com \"http://meuservidor.org/imagens/{nome}.png\", a variável {nome} será substituída pelo valor \"nome\" em cada marco.", "TMS format": "Formato TMS", "Text color for the cluster label": "Cor do texto para a etiqueta do aglomerado", "Text formatting": "Formatação do texto", "The name of the property to use as feature label (ex.: \"nom\")": "O nome da propriedade a usar como etiqueta do elemento (ex.: \"nome\")", - "The zoom and center have been set.": "O centro e a aproximação foram definidos.", "To use if remote server doesn't allow cross domain (slower)": "Para usar caso o servidor remoto não permitir domínios cruzados (mais lento)", "To zoom": "Ao zoom", "Toggle edit mode (Shift+Click)": "Alternar modo de editar (Shift+Clique)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "milhas", "nautical miles": "milhas náuticas", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} milhas", - "{distance} yd": "{distance} yd", "1 day": "1 dia", "1 hour": "1 hora", "5 min": "5 min", @@ -365,13 +350,48 @@ var locale = { "Skipping unknown geometry.type: {type}": "Ignorando geometry.type desconhecido: {type}", "Optional.": "Opcional.", "Paste your data here": "Cole seus dados aqui", - "Please save the map first": "Por favor, primeiro salve o mapa ", - "Unable to locate you.": "Unable to locate you.", + "Please save the map first": "Por favor, primeiro salve o mapa", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("pt_BR", locale); -L.setLocale("pt_BR"); \ No newline at end of file +L.registerLocale("pt_BR", locale) +L.setLocale("pt_BR") diff --git a/umap/static/umap/locale/pt_BR.json b/umap/static/umap/locale/pt_BR.json index e78c0f89..509dc7a5 100644 --- a/umap/static/umap/locale/pt_BR.json +++ b/umap/static/umap/locale/pt_BR.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Adicionar um polígono para o multi atual", "Advanced actions": "Ações avançadas", "Advanced properties": "Propriedades avançadas", - "Advanced transition": "Transição avançada", "All properties are imported.": "Foram importadas todas as propriedades.", "Allow interactions": "Permitir interações", "An error occured": "Ocorreu um erro", @@ -190,7 +189,6 @@ "Home": "Início", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Por quanto simplificar a polilinha em cada nível de aproximação (mais = melhor desempenho e aspeto mais suave, menos = mais preciso)", "If false, the polygon will act as a part of the underlying map.": "Se desativado, o polígono agirá como parte do mapa de baixo.", - "Iframe export options": "Opções de exportação Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe com altura personalizada (em px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe com altura e largura personalizados (em px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Mostrar/ocultar camada", "Simple link: [[http://example.com]]": "Link simples: [[http://example.com]]", "Slideshow": "Apresentação", - "Smart transitions": "Transições inteligentes", "Sort key": "Chave de ordenação", "Split line": "Linha de separação", "Start a hole here": "Começar um buraco aqui", @@ -279,12 +276,10 @@ "Stop slideshow": "Parar apresentação", "Supported scheme": "Esquema suportado", "Supported variables that will be dynamically replaced": "Variáveis suportadas que serão substituídas de forma dinâmica", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "O símbolo pode ser um caractere unicode ou um URL. Pode usar as propriedades de elementos como variáveis: por exemplo.: com \"http://meuservidor.org/imagens/{nome}.png\", a variável {nome} será substituída pelo valor \"nome\" em cada marco.", "TMS format": "Formato TMS", "Text color for the cluster label": "Cor do texto para a etiqueta do aglomerado", "Text formatting": "Formatação do texto", "The name of the property to use as feature label (ex.: \"nom\")": "O nome da propriedade a usar como etiqueta do elemento (ex.: \"nome\")", - "The zoom and center have been set.": "O centro e a aproximação foram definidos.", "To use if remote server doesn't allow cross domain (slower)": "Para usar caso o servidor remoto não permitir domínios cruzados (mais lento)", "To zoom": "Ao zoom", "Toggle edit mode (Shift+Click)": "Alternar modo de editar (Shift+Clique)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "milhas", "nautical miles": "milhas náuticas", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} milhas", - "{distance} yd": "{distance} yd", "1 day": "1 dia", "1 hour": "1 hora", "5 min": "5 min", @@ -365,10 +350,46 @@ "Skipping unknown geometry.type: {type}": "Ignorando geometry.type desconhecido: {type}", "Optional.": "Opcional.", "Paste your data here": "Cole seus dados aqui", - "Please save the map first": "Por favor, primeiro salve o mapa ", - "Unable to locate you.": "Unable to locate you.", + "Please save the map first": "Por favor, primeiro salve o mapa", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/pt_PT.js b/umap/static/umap/locale/pt_PT.js index a35100ac..3d7acfae 100644 --- a/umap/static/umap/locale/pt_PT.js +++ b/umap/static/umap/locale/pt_PT.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Adicionar símbolo", "Allow scroll wheel zoom?": "Permitir zoom com roda do rato?", "Automatic": "Automático", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Adicionar um polígono para o multi atual", "Advanced actions": "Ações avançadas", "Advanced properties": "Propriedades avançadas", - "Advanced transition": "Transição avançada", "All properties are imported.": "Foram importadas todas as propriedades.", "Allow interactions": "Permitir interações", "An error occured": "Ocorreu um erro", @@ -190,7 +189,6 @@ var locale = { "Home": "Início", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Por quanto simplificar a polilinha em cada nível de aproximação (mais = melhor desempenho e aspeto mais suave, menos = mais preciso)", "If false, the polygon will act as a part of the underlying map.": "Se desativado, o polígono agirá como parte do mapa de baixo.", - "Iframe export options": "Opções de exportação Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe com altura personalizada (em px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe com altura e largura personalizados (em px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Mostrar/ocultar camada", "Simple link: [[http://example.com]]": "Link simples: [[http://example.com]]", "Slideshow": "Apresentação", - "Smart transitions": "Transições inteligentes", "Sort key": "Chave de ordenação", "Split line": "Linha de separação", "Start a hole here": "Começar um buraco aqui", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Parar apresentação", "Supported scheme": "Esquema suportado", "Supported variables that will be dynamically replaced": "Variáveis suportadas que serão substituídas de forma dinâmica", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "O símbolo pode ser um caractere unicode ou um URL. Pode usar as propriedades de elementos como variáveis: por exemplo.: com \"http://meuservidor.org/imagens/{nome}.png\", a variável {nome} será substituída pelo valor \"nome\" em cada marco.", "TMS format": "Formato TMS", "Text color for the cluster label": "Cor do texto para a etiqueta do aglomerado", "Text formatting": "Formatação do texto", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "O centro e a aproximação foram definidos.", "To use if remote server doesn't allow cross domain (slower)": "Para usar caso o servidor remoto não permitir domínios cruzados (mais lento)", "To zoom": "Ao zoom", "Toggle edit mode (Shift+Click)": "Alternar modo de editar (Shift+Clique)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "milhas", "nautical miles": "milhas náuticas", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} milhas", - "{distance} yd": "{distance} yd", "1 day": "1 dia", "1 hour": "1 hora", "5 min": "5 min", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Opcional.", "Paste your data here": "Cole aqui os seus dados", "Please save the map first": "Por favor primeiro grave o mapa", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("pt_PT", locale); -L.setLocale("pt_PT"); \ No newline at end of file +L.registerLocale("pt_PT", locale) +L.setLocale("pt_PT") diff --git a/umap/static/umap/locale/pt_PT.json b/umap/static/umap/locale/pt_PT.json index fa055de8..2fe8226f 100644 --- a/umap/static/umap/locale/pt_PT.json +++ b/umap/static/umap/locale/pt_PT.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Adicionar um polígono para o multi atual", "Advanced actions": "Ações avançadas", "Advanced properties": "Propriedades avançadas", - "Advanced transition": "Transição avançada", "All properties are imported.": "Foram importadas todas as propriedades.", "Allow interactions": "Permitir interações", "An error occured": "Ocorreu um erro", @@ -190,7 +189,6 @@ "Home": "Início", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Por quanto simplificar a polilinha em cada nível de aproximação (mais = melhor desempenho e aspeto mais suave, menos = mais preciso)", "If false, the polygon will act as a part of the underlying map.": "Se desativado, o polígono agirá como parte do mapa de baixo.", - "Iframe export options": "Opções de exportação Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe com altura personalizada (em px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe com altura e largura personalizados (em px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Mostrar/ocultar camada", "Simple link: [[http://example.com]]": "Link simples: [[http://example.com]]", "Slideshow": "Apresentação", - "Smart transitions": "Transições inteligentes", "Sort key": "Chave de ordenação", "Split line": "Linha de separação", "Start a hole here": "Começar um buraco aqui", @@ -279,12 +276,10 @@ "Stop slideshow": "Parar apresentação", "Supported scheme": "Esquema suportado", "Supported variables that will be dynamically replaced": "Variáveis suportadas que serão substituídas de forma dinâmica", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "O símbolo pode ser um caractere unicode ou um URL. Pode usar as propriedades de elementos como variáveis: por exemplo.: com \"http://meuservidor.org/imagens/{nome}.png\", a variável {nome} será substituída pelo valor \"nome\" em cada marco.", "TMS format": "Formato TMS", "Text color for the cluster label": "Cor do texto para a etiqueta do aglomerado", "Text formatting": "Formatação do texto", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "O centro e a aproximação foram definidos.", "To use if remote server doesn't allow cross domain (slower)": "Para usar caso o servidor remoto não permitir domínios cruzados (mais lento)", "To zoom": "Ao zoom", "Toggle edit mode (Shift+Click)": "Alternar modo de editar (Shift+Clique)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "milhas", "nautical miles": "milhas náuticas", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} milhas", - "{distance} yd": "{distance} yd", "1 day": "1 dia", "1 hour": "1 hora", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Opcional.", "Paste your data here": "Cole aqui os seus dados", "Please save the map first": "Por favor primeiro grave o mapa", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/ro.js b/umap/static/umap/locale/ro.js index 48077669..3fca3313 100644 --- a/umap/static/umap/locale/ro.js +++ b/umap/static/umap/locale/ro.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Adaugă simbol", "Allow scroll wheel zoom?": "Allow scroll wheel zoom?", "Automatic": "Automatic", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ var locale = { "Home": "Acasă", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("ro", locale); -L.setLocale("ro"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("ro", locale) +L.setLocale("ro") diff --git a/umap/static/umap/locale/ro.json b/umap/static/umap/locale/ro.json index ebffe234..eff8f2d3 100644 --- a/umap/static/umap/locale/ro.json +++ b/umap/static/umap/locale/ro.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ "Home": "Acasă", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/ru.js b/umap/static/umap/locale/ru.js index ac453317..a4ad66e7 100644 --- a/umap/static/umap/locale/ru.js +++ b/umap/static/umap/locale/ru.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Добавить значок", "Allow scroll wheel zoom?": "Разрешить изменение масштаба колесом мыши?", "Automatic": "Автоматически", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Добавить полигон к текущему мультиполигону", "Advanced actions": "Дополнительные действия", "Advanced properties": "Дополнительные свойства", - "Advanced transition": "Дополнительные преобразования", "All properties are imported.": "Все свойства импортированы.", "Allow interactions": "Разрешить взаимодействие", "An error occured": "Произошла ошибка", @@ -190,7 +189,6 @@ var locale = { "Home": "Заглавная", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Насколько сильно упрощать линии на каждом масштабе (больше значение — больше скорость, но выглядит хуже; меньше значение — более гладкое отображение)", "If false, the polygon will act as a part of the underlying map.": "Если нет, тогда полигон будет выглядеть как часть карты", - "Iframe export options": "Свойства экспорта для Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe с указанием высоты (в пикселях): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe с заданной высотой и шириной (в px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Показать/скрыть слой", "Simple link: [[http://example.com]]": "Простая ссылка: [[http://example.com]]", "Slideshow": "Слайдшоу", - "Smart transitions": "Интеллектуальные преобразования", "Sort key": "Кнопка сортировки", "Split line": "Разделить линию", "Start a hole here": "Начать отверстие отсюда", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Остановить слайдшоу", "Supported scheme": "Поддерживаемая схема", "Supported variables that will be dynamically replaced": "Поддерживаемые переменные для автоматической замены", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Значок может быть как юникод-символом так и URL. Вы можете использовать свойства объектов как переменные. Например, в \"http://myserver.org/images/{name}.png\", переменная {name} будет заменена значением поля \"названия\" каждой метки на карте.", "TMS format": "Формат TMS", "Text color for the cluster label": "Цвет текста для меток кластера", "Text formatting": "Форматирование текста", "The name of the property to use as feature label (ex.: \"nom\")": "Название свойства в качестве метки объекта (напр., «Номер»)", - "The zoom and center have been set.": "Масштаб и положение установлены", "To use if remote server doesn't allow cross domain (slower)": "Если удалённый сервер не позволяет кросс-домен (медленно)", "To zoom": "Масштабировать", "Toggle edit mode (Shift+Click)": "Переключиться в режим редактирования (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "миля", "miles": "миль", "nautical miles": "морских миль", - "{area} acres": "{area} акров", - "{area} ha": "{area} гектар", - "{area} m²": "{area} м²", - "{area} mi²": "{area} миль²", - "{area} yd²": "{area} ярд²", - "{distance} NM": "{distance} ММ", - "{distance} km": "{distance} км", - "{distance} m": "{distance} м", - "{distance} miles": "{distance} миль", - "{distance} yd": "{distance} ярдов", "1 day": "1 день", "1 hour": "1 час", "5 min": "5 мин", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Необязательный.", "Paste your data here": "Вставить ваши данные сюда", "Please save the map first": "Пожалуйста, сначала сохраните карту", - "Unable to locate you.": "Не могу вас найти.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Постоянная ссылка", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("ru", locale); -L.setLocale("ru"); \ No newline at end of file +L.registerLocale("ru", locale) +L.setLocale("ru") diff --git a/umap/static/umap/locale/ru.json b/umap/static/umap/locale/ru.json index e44a29cd..ca83e1c0 100644 --- a/umap/static/umap/locale/ru.json +++ b/umap/static/umap/locale/ru.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Добавить полигон к текущему мультиполигону", "Advanced actions": "Дополнительные действия", "Advanced properties": "Дополнительные свойства", - "Advanced transition": "Дополнительные преобразования", "All properties are imported.": "Все свойства импортированы.", "Allow interactions": "Разрешить взаимодействие", "An error occured": "Произошла ошибка", @@ -190,7 +189,6 @@ "Home": "Заглавная", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Насколько сильно упрощать линии на каждом масштабе (больше значение — больше скорость, но выглядит хуже; меньше значение — более гладкое отображение)", "If false, the polygon will act as a part of the underlying map.": "Если нет, тогда полигон будет выглядеть как часть карты", - "Iframe export options": "Свойства экспорта для Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe с указанием высоты (в пикселях): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe с заданной высотой и шириной (в px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Показать/скрыть слой", "Simple link: [[http://example.com]]": "Простая ссылка: [[http://example.com]]", "Slideshow": "Слайдшоу", - "Smart transitions": "Интеллектуальные преобразования", "Sort key": "Кнопка сортировки", "Split line": "Разделить линию", "Start a hole here": "Начать отверстие отсюда", @@ -279,12 +276,10 @@ "Stop slideshow": "Остановить слайдшоу", "Supported scheme": "Поддерживаемая схема", "Supported variables that will be dynamically replaced": "Поддерживаемые переменные для автоматической замены", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Значок может быть как юникод-символом так и URL. Вы можете использовать свойства объектов как переменные. Например, в \"http://myserver.org/images/{name}.png\", переменная {name} будет заменена значением поля \"названия\" каждой метки на карте.", "TMS format": "Формат TMS", "Text color for the cluster label": "Цвет текста для меток кластера", "Text formatting": "Форматирование текста", "The name of the property to use as feature label (ex.: \"nom\")": "Название свойства в качестве метки объекта (напр., «Номер»)", - "The zoom and center have been set.": "Масштаб и положение установлены", "To use if remote server doesn't allow cross domain (slower)": "Если удалённый сервер не позволяет кросс-домен (медленно)", "To zoom": "Масштабировать", "Toggle edit mode (Shift+Click)": "Переключиться в режим редактирования (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "миля", "miles": "миль", "nautical miles": "морских миль", - "{area} acres": "{area} акров", - "{area} ha": "{area} гектар", - "{area} m²": "{area} м²", - "{area} mi²": "{area} миль²", - "{area} yd²": "{area} ярд²", - "{distance} NM": "{distance} ММ", - "{distance} km": "{distance} км", - "{distance} m": "{distance} м", - "{distance} miles": "{distance} миль", - "{distance} yd": "{distance} ярдов", "1 day": "1 день", "1 hour": "1 час", "5 min": "5 мин", @@ -366,9 +351,45 @@ "Optional.": "Необязательный.", "Paste your data here": "Вставить ваши данные сюда", "Please save the map first": "Пожалуйста, сначала сохраните карту", - "Unable to locate you.": "Не могу вас найти.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Постоянная ссылка", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/si_LK.js b/umap/static/umap/locale/si_LK.js index b6fbd9d6..f30913f2 100644 --- a/umap/static/umap/locale/si_LK.js +++ b/umap/static/umap/locale/si_LK.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Add symbol", "Allow scroll wheel zoom?": "Allow scroll wheel zoom?", "Automatic": "Automatic", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("si_LK", locale); -L.setLocale("si_LK"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("si_LK", locale) +L.setLocale("si_LK") diff --git a/umap/static/umap/locale/si_LK.json b/umap/static/umap/locale/si_LK.json index f111f462..f88450e3 100644 --- a/umap/static/umap/locale/si_LK.json +++ b/umap/static/umap/locale/si_LK.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/sk_SK.js b/umap/static/umap/locale/sk_SK.js index a6975d1c..518ecf4c 100644 --- a/umap/static/umap/locale/sk_SK.js +++ b/umap/static/umap/locale/sk_SK.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Pridať symbol", "Allow scroll wheel zoom?": "Povoliť približovanie kolieskom myši?", "Automatic": "Automaticky", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Pridať polygón k aktuálnemu multi", "Advanced actions": "Pokročilé akcie", "Advanced properties": "Pokročilé vlastnosti", - "Advanced transition": "Pokročilý prechod", "All properties are imported.": "Všetky vlastnosti sú naimportované.", "Allow interactions": "Povoliť interakcie", "An error occured": "Nastala chyba", @@ -190,7 +189,6 @@ var locale = { "Home": "Domov", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Ako veľmi vyhladzovať a zjednodušovať pri oddialeni (väčšie = rýchlejša odozva a plynulejší vzhľad, menšie = presnejšie)", "If false, the polygon will act as a part of the underlying map.": "Ak je vypnuté, polygón sa bude správať ako súčasť mapového podkladu.", - "Iframe export options": "Možnosti Iframe exportu", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe s vlastnou výškou (v px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe s vlastnou výškou a šírkou (v px): {{{http://iframe.url.com|height*widht}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Ukázať/skryť vrstvu", "Simple link: [[http://example.com]]": "Jednoduchý odkaz: [[http://priklad.sk]]", "Slideshow": "Prezentácia", - "Smart transitions": "Chytré prechody", "Sort key": "Kľúč radenia", "Split line": "Rozdelit čiaru", "Start a hole here": "Tu začať dieru", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Zastaviť prezentáciu", "Supported scheme": "Podporovaná schéma", "Supported variables that will be dynamically replaced": "Podporované premenné, ktoré budú automaticky nahradené", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "Formát TMS", "Text color for the cluster label": "Farba textu pre popis zhluku", "Text formatting": "Formátovanie textu", "The name of the property to use as feature label (ex.: \"nom\")": "Názov vlastnosti používať ako popis objektu (napr.: \"nom\")", - "The zoom and center have been set.": "Priblíženie a stred mapy boli nastavené", "To use if remote server doesn't allow cross domain (slower)": "Použiť keď vzdialený server nepovoľuje cross-domain (pomalšie)", "To zoom": "Max. priblíženie", "Toggle edit mode (Shift+Click)": "Prepnúť režim úprav (Shift+Klik)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("sk_SK", locale); -L.setLocale("sk_SK"); \ No newline at end of file +L.registerLocale("sk_SK", locale) +L.setLocale("sk_SK") diff --git a/umap/static/umap/locale/sk_SK.json b/umap/static/umap/locale/sk_SK.json index a0de36a9..b9219e2c 100644 --- a/umap/static/umap/locale/sk_SK.json +++ b/umap/static/umap/locale/sk_SK.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Pridať polygón k aktuálnemu multi", "Advanced actions": "Pokročilé akcie", "Advanced properties": "Pokročilé vlastnosti", - "Advanced transition": "Pokročilý prechod", "All properties are imported.": "Všetky vlastnosti sú naimportované.", "Allow interactions": "Povoliť interakcie", "An error occured": "Nastala chyba", @@ -190,7 +189,6 @@ "Home": "Domov", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Ako veľmi vyhladzovať a zjednodušovať pri oddialeni (väčšie = rýchlejša odozva a plynulejší vzhľad, menšie = presnejšie)", "If false, the polygon will act as a part of the underlying map.": "Ak je vypnuté, polygón sa bude správať ako súčasť mapového podkladu.", - "Iframe export options": "Možnosti Iframe exportu", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe s vlastnou výškou (v px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe s vlastnou výškou a šírkou (v px): {{{http://iframe.url.com|height*widht}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Ukázať/skryť vrstvu", "Simple link: [[http://example.com]]": "Jednoduchý odkaz: [[http://priklad.sk]]", "Slideshow": "Prezentácia", - "Smart transitions": "Chytré prechody", "Sort key": "Kľúč radenia", "Split line": "Rozdelit čiaru", "Start a hole here": "Tu začať dieru", @@ -279,12 +276,10 @@ "Stop slideshow": "Zastaviť prezentáciu", "Supported scheme": "Podporovaná schéma", "Supported variables that will be dynamically replaced": "Podporované premenné, ktoré budú automaticky nahradené", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "Formát TMS", "Text color for the cluster label": "Farba textu pre popis zhluku", "Text formatting": "Formátovanie textu", "The name of the property to use as feature label (ex.: \"nom\")": "Názov vlastnosti používať ako popis objektu (napr.: \"nom\")", - "The zoom and center have been set.": "Priblíženie a stred mapy boli nastavené", "To use if remote server doesn't allow cross domain (slower)": "Použiť keď vzdialený server nepovoľuje cross-domain (pomalšie)", "To zoom": "Max. priblíženie", "Toggle edit mode (Shift+Click)": "Prepnúť režim úprav (Shift+Klik)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/sl.js b/umap/static/umap/locale/sl.js index aa21c132..7e6abef1 100644 --- a/umap/static/umap/locale/sl.js +++ b/umap/static/umap/locale/sl.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Dodaj simbol", "Allow scroll wheel zoom?": "Ali naj se dovoli približanje pogleda s kolescem miške?", "Automatic": "Samodejno", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Dodaj mnogokotnik k trenutnemu večtočkovnemu predmetu", "Advanced actions": "Napredna dejanja", "Advanced properties": "Napredne nastavitve", - "Advanced transition": "Napredni prehodi", "All properties are imported.": "Vse lastnosti so uvožene.", "Allow interactions": "Dovoli interakcije", "An error occured": "Prišlo je do napake", @@ -190,7 +189,6 @@ var locale = { "Home": "Začetna stran", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Kako močno naj bodo poenostavljene prte na posamezni ravni približanja (močno = boljše delovanje in prijetnejši videz ali malo = bolj natančen prikaz)", "If false, the polygon will act as a part of the underlying map.": "Neizbrana možnost določa, da bo mnogokotnik obravnavan kot del zemljevida.", - "Iframe export options": "Možnosti izvoza v iFrame", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Predmet Iframe z višino po meri (v točkah): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Predmet Iframe z višino in širino po meri (v točkah): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Pokaži / Skrij plast", "Simple link: [[http://example.com]]": "Enostavna povezava: [[http://primer.com]]", "Slideshow": "Predstavitev", - "Smart transitions": "Pametni prehodi", "Sort key": "Razvrščanje", "Split line": "Ločitvena črta", "Start a hole here": "Začni z vrisovanjem luknje", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Zaustavi predstavitev", "Supported scheme": "Podprta shema", "Supported variables that will be dynamically replaced": "Podprte spremenljivke, ki bodo dinamično zamenjane", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "Zapis TMS", "Text color for the cluster label": "Barva besedila za oznako polja", "Text formatting": "Oblikovanje besedila", "The name of the property to use as feature label (ex.: \"nom\")": "Ime lastnosti, ki naj se uporabi kot oznaka predmeta (na primer »nom«)", - "The zoom and center have been setted.": "Vrednost in središčna točka sta nastavljeni.", "To use if remote server doesn't allow cross domain (slower)": "Za uporabo, ko oddaljeni stražnik ne dovoli vzporednih domen (počasneje)", "To zoom": "Za približanje", "Toggle edit mode (Shift+Click)": "Preklop načina urejanja (Shift+Klik)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "milje", "nautical miles": "navtične milje", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 dan", "1 hour": "1 ura", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("sl", locale); -L.setLocale("sl"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("sl", locale) +L.setLocale("sl") diff --git a/umap/static/umap/locale/sl.json b/umap/static/umap/locale/sl.json index 48f4cd23..27ce121a 100644 --- a/umap/static/umap/locale/sl.json +++ b/umap/static/umap/locale/sl.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Dodaj mnogokotnik k trenutnemu večtočkovnemu predmetu", "Advanced actions": "Napredna dejanja", "Advanced properties": "Napredne nastavitve", - "Advanced transition": "Napredni prehodi", "All properties are imported.": "Vse lastnosti so uvožene.", "Allow interactions": "Dovoli interakcije", "An error occured": "Prišlo je do napake", @@ -190,7 +189,6 @@ "Home": "Začetna stran", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Kako močno naj bodo poenostavljene prte na posamezni ravni približanja (močno = boljše delovanje in prijetnejši videz ali malo = bolj natančen prikaz)", "If false, the polygon will act as a part of the underlying map.": "Neizbrana možnost določa, da bo mnogokotnik obravnavan kot del zemljevida.", - "Iframe export options": "Možnosti izvoza v iFrame", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Predmet Iframe z višino po meri (v točkah): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Predmet Iframe z višino in širino po meri (v točkah): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Pokaži / Skrij plast", "Simple link: [[http://example.com]]": "Enostavna povezava: [[http://primer.com]]", "Slideshow": "Predstavitev", - "Smart transitions": "Pametni prehodi", "Sort key": "Razvrščanje", "Split line": "Ločitvena črta", "Start a hole here": "Začni z vrisovanjem luknje", @@ -279,12 +276,10 @@ "Stop slideshow": "Zaustavi predstavitev", "Supported scheme": "Podprta shema", "Supported variables that will be dynamically replaced": "Podprte spremenljivke, ki bodo dinamično zamenjane", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "Zapis TMS", "Text color for the cluster label": "Barva besedila za oznako polja", "Text formatting": "Oblikovanje besedila", "The name of the property to use as feature label (ex.: \"nom\")": "Ime lastnosti, ki naj se uporabi kot oznaka predmeta (na primer »nom«)", - "The zoom and center have been setted.": "Vrednost in središčna točka sta nastavljeni.", "To use if remote server doesn't allow cross domain (slower)": "Za uporabo, ko oddaljeni stražnik ne dovoli vzporednih domen (počasneje)", "To zoom": "Za približanje", "Toggle edit mode (Shift+Click)": "Preklop načina urejanja (Shift+Klik)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "milje", "nautical miles": "navtične milje", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 dan", "1 hour": "1 ura", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/sr.js b/umap/static/umap/locale/sr.js index fa0b5d18..e8aafecc 100644 --- a/umap/static/umap/locale/sr.js +++ b/umap/static/umap/locale/sr.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Додај симбол", "Allow scroll wheel zoom?": "Допусти увећање зумом миша", "Automatic": "Аутоматско", @@ -7,160 +7,159 @@ var locale = { "Caption": "Напомена", "Change symbol": "Промени симбол", "Choose the data format": "Одабери формат датума", - "Choose the layer of the feature": "Одабери лејер ", + "Choose the layer of the feature": "Одабери лејер", "Circle": "Круг", - "Clustered": "Clustered", + "Clustered": "Груписање", "Data browser": "Претражи податке", "Default": "Фабричка подешавања", "Default zoom level": "Подразумевани ниво зумирања", "Default: name": "Фабричко: Име", - "Display label": "Display label", - "Display the control to open OpenStreetMap editor": "Display the control to open OpenStreetMap editor", - "Display the data layers control": "Display the data layers control", - "Display the embed control": "Display the embed control", - "Display the fullscreen control": "Display the fullscreen control", - "Display the locate control": "Display the locate control", - "Display the measure control": "Display the measure control", - "Display the search control": "Display the search control", - "Display the tile layers control": "Display the tile layers control", - "Display the zoom control": "Display the zoom control", - "Do you want to display a caption bar?": "Do you want to display a caption bar?", + "Display label": "Прикажи ознаку", + "Display the control to open OpenStreetMap editor": "Прикажи контролу да бисте отворили OpenStreetMap уређивач", + "Display the data layers control": "Прикажи контролу слојева података", + "Display the embed control": "Прикажи уграђену контролу", + "Display the fullscreen control": "Прикажи контроле пуног режима", + "Display the locate control": "Прикажи контролу лоцирања", + "Display the measure control": "Прикажи контролу мере", + "Display the search control": "Прикажи контроле претраге", + "Display the tile layers control": "Прикажи контроле лејера", + "Display the zoom control": "Прикажи контроле зумирања", + "Do you want to display a caption bar?": "Да ли желите да прикажете траку натписа?", "Do you want to display a minimap?": "Желите ли приказати малу карту?", - "Do you want to display a panel on load?": "Do you want to display a panel on load?", + "Do you want to display a panel on load?": "Да ли желите да прикажете панел при учитавању?", "Do you want to display popup footer?": "Желите ли приказати скочни прозор у подножју?", - "Do you want to display the scale control?": "Do you want to display the scale control?", - "Do you want to display the «more» control?": "Do you want to display the «more» control?", - "Drop": "Drop", - "GeoRSS (only link)": "GeoRSS (only link)", - "GeoRSS (title + image)": "GeoRSS (title + image)", + "Do you want to display the scale control?": "Да ли желите да прикажете размеру?", + "Do you want to display the «more» control?": "Да ли желите да прикажете контролу «више»?", + "Drop": "Избаци", + "GeoRSS (only link)": "GeoRSS (само линк)", + "GeoRSS (title + image)": "GeoRSS (наслов+ слика)", "Heatmap": "Heatmap", - "Icon shape": "Icon shape", + "Icon shape": "Облик иконе", "Icon symbol": "Икона симбола", - "Inherit": "Inherit", - "Label direction": "Label direction", - "Label key": "Label key", - "Labels are clickable": "Labels are clickable", + "Inherit": "Наслеђено", + "Label direction": "Смер ознаке", + "Label key": "Кључ ознаке", + "Labels are clickable": "На ознаке је могуће кликнути", "None": "Ништа", "On the bottom": "На дну", "On the left": "На лево", "On the right": "На десно", "On the top": "На врху", - "Popup content template": "Popup content template", + "Popup content template": "Шаблон за садржај искачућег прозора", "Set symbol": "Постави симбол", - "Side panel": "Side panel", - "Simplify": "Simplify", + "Side panel": "Бочни панел", + "Simplify": "Поједноставити", "Symbol or url": "Симбол или url", "Table": "Табела", - "always": "always", - "clear": "clear", - "collapsed": "collapsed", + "always": "увек", + "clear": "очисти", + "collapsed": "срушено", "color": "боја", - "dash array": "dash array", - "define": "define", - "description": "Опис", - "expanded": "expanded", + "dash array": "цртица низ", + "define": "дефиниши", + "description": "опис", + "expanded": "проширен", "fill": "испуна", "fill color": "боја испуне", "fill opacity": "прозирност испуне", "hidden": "сакриј", - "iframe": "iframe", - "inherit": "inherit", + "iframe": "облик", + "inherit": "наследити", "name": "име", "never": "никад", "new window": "нови прозор", "no": "не", - "on hover": "on hover", + "on hover": "на лебдећи", "opacity": "прозирност", - "parent window": "parent window", + "parent window": "искачући прозор", "stroke": "линија", "weight": "дебљина", "yes": "да", - "{delay} seconds": "{delay} seconds", + "{delay} seconds": "{губици} секунди", "# one hash for main heading": "# једна тараба за главни наслов", "## two hashes for second heading": "## две тарабе за поднаслов", "### three hashes for third heading": "### три тарабе за под-поднаслова", "**double star for bold**": "** две звезвдице за подебљање слова**", "*simple star for italic*": "* једна стрелица за искошење слова*", "--- for an horizontal rule": "-- за хоризонталну црту", - "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".": "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".", + "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".": "Списак бројева одвојених зарезом који дефинише образац цртице цртице. Нпр .: \"5, 10, 15\".", "About": "Више о", "Action not allowed :(": "Акција није дозвољена :(", - "Activate slideshow mode": "Activate slideshow mode", + "Activate slideshow mode": "Активирајте режим презентације", "Add a layer": "Додај лејер", - "Add a line to the current multi": "Add a line to the current multi", - "Add a new property": "Add a new property", - "Add a polygon to the current multi": "Add a polygon to the current multi", + "Add a line to the current multi": "Додајте линију тренутном мулти", + "Add a new property": "Додајте нови ентитет", + "Add a polygon to the current multi": "Додајте полигон тренутном мулти", "Advanced actions": "Напредне акције", "Advanced properties": "Напредне поставке", - "Advanced transition": "Advanced transition", "All properties are imported.": "Све поставке су увезене", - "Allow interactions": "Allow interactions", + "Allow interactions": "Дозволи интеракције", "An error occured": "Догодила се грешка", "Are you sure you want to cancel your changes?": "Да ли сте сигурне да желите да откажете промене?", "Are you sure you want to clone this map and all its datalayers?": "Да ли сте сигурни да желите да умножите мапу и све податке на њој?", "Are you sure you want to delete the feature?": "Да ли сте сигурни да желите да обришете елемент?", "Are you sure you want to delete this layer?": "Да ли сте сигурни да желите да обришете лејер?", "Are you sure you want to delete this map?": "Да ли сте сигурни да желите да обришете мапу?", - "Are you sure you want to delete this property on all the features?": "Are you sure you want to delete this property on all the features?", - "Are you sure you want to restore this version?": "Are you sure you want to restore this version?", - "Attach the map to my account": "Attach the map to my account", + "Are you sure you want to delete this property on all the features?": "Јесте ли сигурни да желите да избришете овај ентитет на свим функцијама?", + "Are you sure you want to restore this version?": "Јесте ли сигурни да желите да вратите ову верзију?", + "Attach the map to my account": "Закачи мапу на мој налог.", "Auto": "Аутоматски", - "Autostart when map is loaded": "Autostart when map is loaded", + "Autostart when map is loaded": "Аутоматски покрени када се мапа учита", "Bring feature to center": "Центрирај елемент", "Browse data": "Претражи податке", "Cancel edits": "Откажи промене", "Center map on your location": "Центрирај мапу на основу локације", "Change map background": "Промени позадину карте", "Change tilelayers": "Промени наслов лејера", - "Choose a preset": "Choose a preset", - "Choose the format of the data to import": "Choose the format of the data to import", + "Choose a preset": "Изаберите претходно подешавање", + "Choose the format of the data to import": "Изаберите формат података за увоз", "Choose the layer to import in": "Одабери лејер за увоз", - "Click last point to finish shape": "Click last point to finish shape", + "Click last point to finish shape": "Кликните на последњу тачку да бисте довршили облик", "Click to add a marker": "Клик за додавање ознаке", "Click to continue drawing": "Клик да наставите са цртањем", "Click to edit": "Клик за уређивање", "Click to start drawing a line": "Клик да започнете цртање линије", "Click to start drawing a polygon": "Клик да започнете цртање површине", - "Clone": "Clone", - "Clone of {name}": "Clone of {name}", + "Clone": "Клон", + "Clone of {name}": "Клон од {име}", "Clone this feature": "Дуплирај елемент", "Clone this map": "Дуплирај мапу", "Close": "Затвори", - "Clustering radius": "Clustering radius", - "Comma separated list of properties to use when filtering features": "Comma separated list of properties to use when filtering features", - "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.", - "Continue line": "Continue line", - "Continue line (Ctrl+Click)": "Continue line (Ctrl+Click)", + "Clustering radius": "Радијус кластера", + "Comma separated list of properties to use when filtering features": "Својства која су одвојена зарезима која се користе за филтрирање функција", + "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Вредности одвојене зарезима, табом или новим редом. Подразумева се SRS WGS84. Увозе се само тачке геометрије. Увоз ће погледати заглавља ступаца за било које спомињање «лат» и «лон» на почетку заглавља, осетљив на велика и мала слова. Све друге колоне се увозе као својства.", + "Continue line": "Наставите линију", + "Continue line (Ctrl+Click)": "Наставите линију(Ctrl+Click)", "Coordinates": "Координате", - "Credits": "Credits", - "Current view instead of default map view?": "Current view instead of default map view?", + "Credits": "Заслуга", + "Current view instead of default map view?": "Тренутни приказ уместо подразумеваног приказа мапе?", "Custom background": "Одаберите позадину", - "Data is browsable": "Data is browsable", - "Default interaction options": "Default interaction options", + "Data is browsable": "Подаци се могу прегледати", + "Default interaction options": "Подразумеване могућности интеракције", "Default properties": "Фабричке вредности", - "Default shape properties": "Default shape properties", - "Define link to open in a new window on polygon click.": "Define link to open in a new window on polygon click.", - "Delay between two transitions when in play mode": "Delay between two transitions when in play mode", + "Default shape properties": "Подразумевана својства облика", + "Define link to open in a new window on polygon click.": "Дефинишите везу за отварање у новом прозору на клику полигона.", + "Delay between two transitions when in play mode": "Одгода између два прелаза у режиму репродукције", "Delete": "Обриши", "Delete all layers": "Обриши све лејере", "Delete layer": "Обриши лејер", "Delete this feature": "Обриши елемент", - "Delete this property on all the features": "Delete this property on all the features", + "Delete this property on all the features": "Обриши наведени ентитет на свим функцијама", "Delete this shape": "Обриши облик", - "Delete this vertex (Alt+Click)": "Delete this vertex (Alt+Click)", - "Directions from here": "Directions from here", + "Delete this vertex (Alt+Click)": "Обриши овај врх (Alt+Click)", + "Directions from here": "Упутства одавде", "Disable editing": "Онемогући уређивање", - "Display measure": "Display measure", - "Display on load": "Display on load", + "Display measure": "Мера приказа", + "Display on load": "Приказ при учитавању", "Download": "Преузимање", "Download data": "Преузимање података", - "Drag to reorder": "Drag to reorder", + "Drag to reorder": "Превуците за промену редоследа", "Draw a line": "Цртање линије", "Draw a marker": "Цртање ознаке", "Draw a polygon": "Цртање површине", "Draw a polyline": "Цртање изломљене линије", - "Dynamic": "Dynamic", - "Dynamic properties": "Dynamic properties", + "Dynamic": "Динамично", + "Dynamic properties": "Динамично подешавање", "Edit": "Уређивање", "Edit feature's layer": "Уређивање елемента одабраног лејера", "Edit map properties": "Уређивање мапе", @@ -190,7 +189,6 @@ var locale = { "Home": "Почетна страна", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -244,7 +242,7 @@ var locale = { "Problem in the response format": "Проблем у препознавању формата", "Properties imported:": "Properties imported:", "Property to use for sorting features": "Property to use for sorting features", - "Provide an URL here": "Упишите URL ", + "Provide an URL here": "Упишите URL", "Proxy request": "Proxy request", "Remote data": "Remote data", "Remove shape from the multi": "Remove shape from the multi", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Прикажи/сакриј лејер", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "Мапа је центрирана.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "Увећај", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,34 +338,60 @@ var locale = { "mi": "mi", "miles": "миље", "nautical miles": "наутичке миље", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 дан", "1 hour": "1 сат", "5 min": "5 минута", "Cache proxied request": "Cache proxied request", - "No cache": "No cache", + "No cache": "Нема кеша", "Popup": "Popup", "Popup (large)": "Popup (large)", - "Popup content style": "Popup content style", - "Popup shape": "Popup shape", - "Skipping unknown geometry.type: {type}": "Skipping unknown geometry.type: {type}", + "Popup content style": "Искачући стил", + "Popup shape": "Искачући облик", + "Skipping unknown geometry.type: {type}": "Прескакање непознате геометрије.type: {type}", "Optional.": "Опционо", "Paste your data here": "Прикачите Ваше податке овде", "Please save the map first": "Молимо Вас сачувајте мапу претходно", - "Unable to locate you.": "Unable to locate you.", - "Feature identifier key": "Feature identifier key", - "Open current feature on load": "Open current feature on load", - "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("sr", locale); -L.setLocale("sr"); \ No newline at end of file + "Feature identifier key": "Тастер идентификатора функцијеFeature identifier key", + "Open current feature on load": "Отворите тренутну функцију при учитавању", + "Permalink": "Трајни линк", + "The name of the property to use as feature unique identifier.": "Назив својства који се користи као јединствени идентификатор функције.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("sr", locale) +L.setLocale("sr") diff --git a/umap/static/umap/locale/sr.json b/umap/static/umap/locale/sr.json index da719c28..0dfb1e00 100644 --- a/umap/static/umap/locale/sr.json +++ b/umap/static/umap/locale/sr.json @@ -7,160 +7,159 @@ "Caption": "Напомена", "Change symbol": "Промени симбол", "Choose the data format": "Одабери формат датума", - "Choose the layer of the feature": "Одабери лејер ", + "Choose the layer of the feature": "Одабери лејер", "Circle": "Круг", - "Clustered": "Clustered", + "Clustered": "Груписање", "Data browser": "Претражи податке", "Default": "Фабричка подешавања", "Default zoom level": "Подразумевани ниво зумирања", "Default: name": "Фабричко: Име", - "Display label": "Display label", - "Display the control to open OpenStreetMap editor": "Display the control to open OpenStreetMap editor", - "Display the data layers control": "Display the data layers control", - "Display the embed control": "Display the embed control", - "Display the fullscreen control": "Display the fullscreen control", - "Display the locate control": "Display the locate control", - "Display the measure control": "Display the measure control", - "Display the search control": "Display the search control", - "Display the tile layers control": "Display the tile layers control", - "Display the zoom control": "Display the zoom control", - "Do you want to display a caption bar?": "Do you want to display a caption bar?", + "Display label": "Прикажи ознаку", + "Display the control to open OpenStreetMap editor": "Прикажи контролу да бисте отворили OpenStreetMap уређивач", + "Display the data layers control": "Прикажи контролу слојева података", + "Display the embed control": "Прикажи уграђену контролу", + "Display the fullscreen control": "Прикажи контроле пуног режима", + "Display the locate control": "Прикажи контролу лоцирања", + "Display the measure control": "Прикажи контролу мере", + "Display the search control": "Прикажи контроле претраге", + "Display the tile layers control": "Прикажи контроле лејера", + "Display the zoom control": "Прикажи контроле зумирања", + "Do you want to display a caption bar?": "Да ли желите да прикажете траку натписа?", "Do you want to display a minimap?": "Желите ли приказати малу карту?", - "Do you want to display a panel on load?": "Do you want to display a panel on load?", + "Do you want to display a panel on load?": "Да ли желите да прикажете панел при учитавању?", "Do you want to display popup footer?": "Желите ли приказати скочни прозор у подножју?", - "Do you want to display the scale control?": "Do you want to display the scale control?", - "Do you want to display the «more» control?": "Do you want to display the «more» control?", - "Drop": "Drop", - "GeoRSS (only link)": "GeoRSS (only link)", - "GeoRSS (title + image)": "GeoRSS (title + image)", + "Do you want to display the scale control?": "Да ли желите да прикажете размеру?", + "Do you want to display the «more» control?": "Да ли желите да прикажете контролу «више»?", + "Drop": "Избаци", + "GeoRSS (only link)": "GeoRSS (само линк)", + "GeoRSS (title + image)": "GeoRSS (наслов+ слика)", "Heatmap": "Heatmap", - "Icon shape": "Icon shape", + "Icon shape": "Облик иконе", "Icon symbol": "Икона симбола", - "Inherit": "Inherit", - "Label direction": "Label direction", - "Label key": "Label key", - "Labels are clickable": "Labels are clickable", + "Inherit": "Наслеђено", + "Label direction": "Смер ознаке", + "Label key": "Кључ ознаке", + "Labels are clickable": "На ознаке је могуће кликнути", "None": "Ништа", "On the bottom": "На дну", "On the left": "На лево", "On the right": "На десно", "On the top": "На врху", - "Popup content template": "Popup content template", + "Popup content template": "Шаблон за садржај искачућег прозора", "Set symbol": "Постави симбол", - "Side panel": "Side panel", - "Simplify": "Simplify", + "Side panel": "Бочни панел", + "Simplify": "Поједноставити", "Symbol or url": "Симбол или url", "Table": "Табела", - "always": "always", - "clear": "clear", - "collapsed": "collapsed", + "always": "увек", + "clear": "очисти", + "collapsed": "срушено", "color": "боја", - "dash array": "dash array", - "define": "define", - "description": "Опис", - "expanded": "expanded", + "dash array": "цртица низ", + "define": "дефиниши", + "description": "опис", + "expanded": "проширен", "fill": "испуна", "fill color": "боја испуне", "fill opacity": "прозирност испуне", "hidden": "сакриј", - "iframe": "iframe", - "inherit": "inherit", + "iframe": "облик", + "inherit": "наследити", "name": "име", "never": "никад", "new window": "нови прозор", "no": "не", - "on hover": "on hover", + "on hover": "на лебдећи", "opacity": "прозирност", - "parent window": "parent window", + "parent window": "искачући прозор", "stroke": "линија", "weight": "дебљина", "yes": "да", - "{delay} seconds": "{delay} seconds", + "{delay} seconds": "{губици} секунди", "# one hash for main heading": "# једна тараба за главни наслов", "## two hashes for second heading": "## две тарабе за поднаслов", "### three hashes for third heading": "### три тарабе за под-поднаслова", "**double star for bold**": "** две звезвдице за подебљање слова**", "*simple star for italic*": "* једна стрелица за искошење слова*", "--- for an horizontal rule": "-- за хоризонталну црту", - "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".": "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".", + "A comma separated list of numbers that defines the stroke dash pattern. Ex.: \"5, 10, 15\".": "Списак бројева одвојених зарезом који дефинише образац цртице цртице. Нпр .: \"5, 10, 15\".", "About": "Више о", "Action not allowed :(": "Акција није дозвољена :(", - "Activate slideshow mode": "Activate slideshow mode", + "Activate slideshow mode": "Активирајте режим презентације", "Add a layer": "Додај лејер", - "Add a line to the current multi": "Add a line to the current multi", - "Add a new property": "Add a new property", - "Add a polygon to the current multi": "Add a polygon to the current multi", + "Add a line to the current multi": "Додајте линију тренутном мулти", + "Add a new property": "Додајте нови ентитет", + "Add a polygon to the current multi": "Додајте полигон тренутном мулти", "Advanced actions": "Напредне акције", "Advanced properties": "Напредне поставке", - "Advanced transition": "Advanced transition", "All properties are imported.": "Све поставке су увезене", - "Allow interactions": "Allow interactions", + "Allow interactions": "Дозволи интеракције", "An error occured": "Догодила се грешка", "Are you sure you want to cancel your changes?": "Да ли сте сигурне да желите да откажете промене?", "Are you sure you want to clone this map and all its datalayers?": "Да ли сте сигурни да желите да умножите мапу и све податке на њој?", "Are you sure you want to delete the feature?": "Да ли сте сигурни да желите да обришете елемент?", "Are you sure you want to delete this layer?": "Да ли сте сигурни да желите да обришете лејер?", "Are you sure you want to delete this map?": "Да ли сте сигурни да желите да обришете мапу?", - "Are you sure you want to delete this property on all the features?": "Are you sure you want to delete this property on all the features?", - "Are you sure you want to restore this version?": "Are you sure you want to restore this version?", - "Attach the map to my account": "Attach the map to my account", + "Are you sure you want to delete this property on all the features?": "Јесте ли сигурни да желите да избришете овај ентитет на свим функцијама?", + "Are you sure you want to restore this version?": "Јесте ли сигурни да желите да вратите ову верзију?", + "Attach the map to my account": "Закачи мапу на мој налог.", "Auto": "Аутоматски", - "Autostart when map is loaded": "Autostart when map is loaded", + "Autostart when map is loaded": "Аутоматски покрени када се мапа учита", "Bring feature to center": "Центрирај елемент", "Browse data": "Претражи податке", "Cancel edits": "Откажи промене", "Center map on your location": "Центрирај мапу на основу локације", "Change map background": "Промени позадину карте", "Change tilelayers": "Промени наслов лејера", - "Choose a preset": "Choose a preset", - "Choose the format of the data to import": "Choose the format of the data to import", + "Choose a preset": "Изаберите претходно подешавање", + "Choose the format of the data to import": "Изаберите формат података за увоз", "Choose the layer to import in": "Одабери лејер за увоз", - "Click last point to finish shape": "Click last point to finish shape", + "Click last point to finish shape": "Кликните на последњу тачку да бисте довршили облик", "Click to add a marker": "Клик за додавање ознаке", "Click to continue drawing": "Клик да наставите са цртањем", "Click to edit": "Клик за уређивање", "Click to start drawing a line": "Клик да започнете цртање линије", "Click to start drawing a polygon": "Клик да започнете цртање површине", - "Clone": "Clone", - "Clone of {name}": "Clone of {name}", + "Clone": "Клон", + "Clone of {name}": "Клон од {име}", "Clone this feature": "Дуплирај елемент", "Clone this map": "Дуплирај мапу", "Close": "Затвори", - "Clustering radius": "Clustering radius", - "Comma separated list of properties to use when filtering features": "Comma separated list of properties to use when filtering features", - "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.", - "Continue line": "Continue line", - "Continue line (Ctrl+Click)": "Continue line (Ctrl+Click)", + "Clustering radius": "Радијус кластера", + "Comma separated list of properties to use when filtering features": "Својства која су одвојена зарезима која се користе за филтрирање функција", + "Comma, tab or semi-colon separated values. SRS WGS84 is implied. Only Point geometries are imported. The import will look at the column headers for any mention of «lat» and «lon» at the begining of the header, case insensitive. All other column are imported as properties.": "Вредности одвојене зарезима, табом или новим редом. Подразумева се SRS WGS84. Увозе се само тачке геометрије. Увоз ће погледати заглавља ступаца за било које спомињање «лат» и «лон» на почетку заглавља, осетљив на велика и мала слова. Све друге колоне се увозе као својства.", + "Continue line": "Наставите линију", + "Continue line (Ctrl+Click)": "Наставите линију(Ctrl+Click)", "Coordinates": "Координате", - "Credits": "Credits", - "Current view instead of default map view?": "Current view instead of default map view?", + "Credits": "Заслуга", + "Current view instead of default map view?": "Тренутни приказ уместо подразумеваног приказа мапе?", "Custom background": "Одаберите позадину", - "Data is browsable": "Data is browsable", - "Default interaction options": "Default interaction options", + "Data is browsable": "Подаци се могу прегледати", + "Default interaction options": "Подразумеване могућности интеракције", "Default properties": "Фабричке вредности", - "Default shape properties": "Default shape properties", - "Define link to open in a new window on polygon click.": "Define link to open in a new window on polygon click.", - "Delay between two transitions when in play mode": "Delay between two transitions when in play mode", + "Default shape properties": "Подразумевана својства облика", + "Define link to open in a new window on polygon click.": "Дефинишите везу за отварање у новом прозору на клику полигона.", + "Delay between two transitions when in play mode": "Одгода између два прелаза у режиму репродукције", "Delete": "Обриши", "Delete all layers": "Обриши све лејере", "Delete layer": "Обриши лејер", "Delete this feature": "Обриши елемент", - "Delete this property on all the features": "Delete this property on all the features", + "Delete this property on all the features": "Обриши наведени ентитет на свим функцијама", "Delete this shape": "Обриши облик", - "Delete this vertex (Alt+Click)": "Delete this vertex (Alt+Click)", - "Directions from here": "Directions from here", + "Delete this vertex (Alt+Click)": "Обриши овај врх (Alt+Click)", + "Directions from here": "Упутства одавде", "Disable editing": "Онемогући уређивање", - "Display measure": "Display measure", - "Display on load": "Display on load", + "Display measure": "Мера приказа", + "Display on load": "Приказ при учитавању", "Download": "Преузимање", "Download data": "Преузимање података", - "Drag to reorder": "Drag to reorder", + "Drag to reorder": "Превуците за промену редоследа", "Draw a line": "Цртање линије", "Draw a marker": "Цртање ознаке", "Draw a polygon": "Цртање површине", "Draw a polyline": "Цртање изломљене линије", - "Dynamic": "Dynamic", - "Dynamic properties": "Dynamic properties", + "Dynamic": "Динамично", + "Dynamic properties": "Динамично подешавање", "Edit": "Уређивање", "Edit feature's layer": "Уређивање елемента одабраног лејера", "Edit map properties": "Уређивање мапе", @@ -190,7 +189,6 @@ "Home": "Почетна страна", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -244,7 +242,7 @@ "Problem in the response format": "Проблем у препознавању формата", "Properties imported:": "Properties imported:", "Property to use for sorting features": "Property to use for sorting features", - "Provide an URL here": "Упишите URL ", + "Provide an URL here": "Упишите URL", "Proxy request": "Proxy request", "Remote data": "Remote data", "Remove shape from the multi": "Remove shape from the multi", @@ -269,7 +267,6 @@ "Show/hide layer": "Прикажи/сакриј лејер", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "Мапа је центрирана.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "Увећај", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,32 +338,58 @@ "mi": "mi", "miles": "миље", "nautical miles": "наутичке миље", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 дан", "1 hour": "1 сат", "5 min": "5 минута", "Cache proxied request": "Cache proxied request", - "No cache": "No cache", + "No cache": "Нема кеша", "Popup": "Popup", "Popup (large)": "Popup (large)", - "Popup content style": "Popup content style", - "Popup shape": "Popup shape", - "Skipping unknown geometry.type: {type}": "Skipping unknown geometry.type: {type}", + "Popup content style": "Искачући стил", + "Popup shape": "Искачући облик", + "Skipping unknown geometry.type: {type}": "Прескакање непознате геометрије.type: {type}", "Optional.": "Опционо", "Paste your data here": "Прикачите Ваше податке овде", "Please save the map first": "Молимо Вас сачувајте мапу претходно", - "Unable to locate you.": "Unable to locate you.", - "Feature identifier key": "Feature identifier key", - "Open current feature on load": "Open current feature on load", - "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "Feature identifier key": "Тастер идентификатора функцијеFeature identifier key", + "Open current feature on load": "Отворите тренутну функцију при учитавању", + "Permalink": "Трајни линк", + "The name of the property to use as feature unique identifier.": "Назив својства који се користи као јединствени идентификатор функције.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/sv.js b/umap/static/umap/locale/sv.js index dfc24280..06045814 100644 --- a/umap/static/umap/locale/sv.js +++ b/umap/static/umap/locale/sv.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Lägg till symbol", "Allow scroll wheel zoom?": "Tillåt zoom med musens rullhjul?", "Automatic": "Automatisk", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Lägg till en polygon till aktuell multi", "Advanced actions": "Avancerade åtgärder", "Advanced properties": "Avancerade egenskaper", - "Advanced transition": "Avancerad övergång", "All properties are imported.": "Alla attribut importeras.", "Allow interactions": "Tillåt interaktion", "An error occured": "Ett fel inträffade", @@ -190,7 +189,6 @@ var locale = { "Home": "Hem", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Hur mycket ska polygoner och multilinjer förenklas vid olika zoom-nivåer? (Mer = bättre prestanda och mjukare utseende, Mindre = mer exakt)", "If false, the polygon will act as a part of the underlying map.": "Om falskt, visas polygonen som en del av bakgrundskartan.", - "Iframe export options": "IFrame exportalternativ", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe med specifik höjd (i pixlar): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe med specifik höjd och bredd (i pixlar): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe (inbäddad ram): {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Visa/dölj lager", "Simple link: [[http://example.com]]": "Enkel hyperlänk: [[https://www.exempel.se]]", "Slideshow": "Bildspelsläge", - "Smart transitions": "Smarta övergångar", "Sort key": "Sorteringsnyckel", "Split line": "Dela upp linje", "Start a hole here": "Infoga ett hål här", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stoppa bildspel", "Supported scheme": "Schema som stöds", "Supported variables that will be dynamically replaced": "Variabler som stöds att ersättas dynamiskt", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbolen kan vara antingen en unicode-karaktär eller en URL. Du kan använda objektattribut som variabler: ex. med \"http://myserver.org/images/{namn}.png\", kommer variabeln {namn} att ersättas med \"namn\"-värdet för varje objekt.", "TMS format": "TMS format", "Text color for the cluster label": "Textfärg för klusteretiketten", "Text formatting": "Textformatering", "The name of the property to use as feature label (ex.: \"nom\")": "Egenskapen att använda som etikettrubrik på objekten (ex: \"namn\")", - "The zoom and center have been setted.": "Zoom och centrering har satts.", "To use if remote server doesn't allow cross domain (slower)": "Att använda om fjärrservern inte tillåter gränsöverskridande domäner (långsammare)", "To zoom": "Till zoom", "Toggle edit mode (Shift+Click)": "Växla redigeringsläge (Shift+klick)", @@ -343,16 +338,6 @@ var locale = { "mi": "miles", "miles": "engelska mil", "nautical miles": "nautiska mil", - "{area} acres": "{area} acre (ung. tunnland)", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} kvadrat-mile", - "{area} yd²": "{area} kvadratyard", - "{distance} NM": "{distance} M", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} engelska mil", - "{distance} yd": "{distance} yard", "1 day": "1 dag", "1 hour": "1 timme", "5 min": "5 min", @@ -365,12 +350,48 @@ var locale = { "Skipping unknown geometry.type: {type}": "Okänd geometrityp ignoreras: {type}", "Optional.": "Valfri.", "Paste your data here": "Klistra in data här", - "Please save the map first": "Spara kartan först, tack ;)", - "Unable to locate you.": "Misslyckades att hitta din aktuella plats.", + "Please save the map first": "Spara kartan först, tack 😉", "Feature identifier key": "Unik nyckel för objekt", "Open current feature on load": "Öppna nuvarande objekt vid uppstart", "Permalink": "Permanent länk", - "The name of the property to use as feature unique identifier.": "Egenskapen att använda som unik nyckel för objekten (ex: \"id\")" -}; -L.registerLocale("sv", locale); -L.setLocale("sv"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "Egenskapen att använda som unik nyckel för objekten (ex: \"id\")", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("sv", locale) +L.setLocale("sv") diff --git a/umap/static/umap/locale/sv.json b/umap/static/umap/locale/sv.json index 2010d7a1..fa1780c2 100644 --- a/umap/static/umap/locale/sv.json +++ b/umap/static/umap/locale/sv.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Lägg till en polygon till aktuell multi", "Advanced actions": "Avancerade åtgärder", "Advanced properties": "Avancerade egenskaper", - "Advanced transition": "Avancerad övergång", "All properties are imported.": "Alla attribut importeras.", "Allow interactions": "Tillåt interaktion", "An error occured": "Ett fel inträffade", @@ -190,7 +189,6 @@ "Home": "Hem", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Hur mycket ska polygoner och multilinjer förenklas vid olika zoom-nivåer? (Mer = bättre prestanda och mjukare utseende, Mindre = mer exakt)", "If false, the polygon will act as a part of the underlying map.": "Om falskt, visas polygonen som en del av bakgrundskartan.", - "Iframe export options": "IFrame exportalternativ", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe med specifik höjd (i pixlar): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe med specifik höjd och bredd (i pixlar): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe (inbäddad ram): {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Visa/dölj lager", "Simple link: [[http://example.com]]": "Enkel hyperlänk: [[https://www.exempel.se]]", "Slideshow": "Bildspelsläge", - "Smart transitions": "Smarta övergångar", "Sort key": "Sorteringsnyckel", "Split line": "Dela upp linje", "Start a hole here": "Infoga ett hål här", @@ -279,12 +276,10 @@ "Stop slideshow": "Stoppa bildspel", "Supported scheme": "Schema som stöds", "Supported variables that will be dynamically replaced": "Variabler som stöds att ersättas dynamiskt", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbolen kan vara antingen en unicode-karaktär eller en URL. Du kan använda objektattribut som variabler: ex. med \"http://myserver.org/images/{namn}.png\", kommer variabeln {namn} att ersättas med \"namn\"-värdet för varje objekt.", "TMS format": "TMS format", "Text color for the cluster label": "Textfärg för klusteretiketten", "Text formatting": "Textformatering", "The name of the property to use as feature label (ex.: \"nom\")": "Egenskapen att använda som etikettrubrik på objekten (ex: \"namn\")", - "The zoom and center have been setted.": "Zoom och centrering har satts.", "To use if remote server doesn't allow cross domain (slower)": "Att använda om fjärrservern inte tillåter gränsöverskridande domäner (långsammare)", "To zoom": "Till zoom", "Toggle edit mode (Shift+Click)": "Växla redigeringsläge (Shift+klick)", @@ -343,16 +338,6 @@ "mi": "miles", "miles": "engelska mil", "nautical miles": "nautiska mil", - "{area} acres": "{area} acre (ung. tunnland)", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} kvadrat-mile", - "{area} yd²": "{area} kvadratyard", - "{distance} NM": "{distance} M", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} engelska mil", - "{distance} yd": "{distance} yard", "1 day": "1 dag", "1 hour": "1 timme", "5 min": "5 min", @@ -365,10 +350,46 @@ "Skipping unknown geometry.type: {type}": "Okänd geometrityp ignoreras: {type}", "Optional.": "Valfri.", "Paste your data here": "Klistra in data här", - "Please save the map first": "Spara kartan först, tack ;)", - "Unable to locate you.": "Misslyckades att hitta din aktuella plats.", + "Please save the map first": "Spara kartan först, tack 😉", "Feature identifier key": "Unik nyckel för objekt", "Open current feature on load": "Öppna nuvarande objekt vid uppstart", "Permalink": "Permanent länk", - "The name of the property to use as feature unique identifier.": "Egenskapen att använda som unik nyckel för objekten (ex: \"id\")" + "The name of the property to use as feature unique identifier.": "Egenskapen att använda som unik nyckel för objekten (ex: \"id\")", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/th_TH.js b/umap/static/umap/locale/th_TH.js index abe773a4..2f89a234 100644 --- a/umap/static/umap/locale/th_TH.js +++ b/umap/static/umap/locale/th_TH.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Add symbol", "Allow scroll wheel zoom?": "Allow scroll wheel zoom?", "Automatic": "Automatic", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("th_TH", locale); -L.setLocale("th_TH"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("th_TH", locale) +L.setLocale("th_TH") diff --git a/umap/static/umap/locale/th_TH.json b/umap/static/umap/locale/th_TH.json index f111f462..f88450e3 100644 --- a/umap/static/umap/locale/th_TH.json +++ b/umap/static/umap/locale/th_TH.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/tr.js b/umap/static/umap/locale/tr.js index bc82a1b5..e4d42ae9 100644 --- a/umap/static/umap/locale/tr.js +++ b/umap/static/umap/locale/tr.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Sembol ekle", "Allow scroll wheel zoom?": "Kaydırma tekerleği yakınlaştırmasına izin verilsin mi?", "Automatic": "Otomatik", @@ -89,10 +89,9 @@ var locale = { "Add a layer": "Bir katman ekle", "Add a line to the current multi": "Mevcut çokluya bir satır ekle", "Add a new property": "Yeni bir özellik ekle", - "Add a polygon to the current multi": "Mevcut çokluya bir çokgen ekle ", + "Add a polygon to the current multi": "Mevcut çokluya bir çokgen ekle", "Advanced actions": "Gelişmiş eylemler", "Advanced properties": "Gelişmiş özellikler", - "Advanced transition": "Gelişmiş geçiş", "All properties are imported.": "Tüm özellikler içe aktarılır.", "Allow interactions": "Etkileşimlere izin ver", "An error occured": "Bir hata oluştu", @@ -190,7 +189,6 @@ var locale = { "Home": "Ana sayfa", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "Yanlış ise, çokgen altta yatan haritanın bir parçası olarak hareket edecektir.", - "Iframe export options": "Iframe dışa aktarma seçenekleri", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -203,7 +201,7 @@ var locale = { "Include full screen link?": "Tam ekran bağlantısını ekle?", "Interaction options": "Etkileşim seçenekleri", "Invalid umap data": "Geçersiz umap verisi", - "Invalid umap data in {filename}": " {filename}'de geçersiz umap verisi", + "Invalid umap data in {filename}": "{filename}'de geçersiz umap verisi", "Keep current visible layers": "Şuan görünen katmanları tut", "Latitude": "Enlem", "Layer": "Katman", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Katmanı göster/gizle", "Simple link: [[http://example.com]]": "Basit bağlantı: [[http://example.com]]", "Slideshow": "Slayt gösterisi", - "Smart transitions": "Akıllı geçişler", "Sort key": "Kısa anahtar", "Split line": "Çizgiyi böl", "Start a hole here": "Burada bir delik aç", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Slayt gösterisini durdur", "Supported scheme": "Desteklenen şema", "Supported variables that will be dynamically replaced": "Dinamik olarak değiştirilecek desteklenen değişkenler", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS formatı", "Text color for the cluster label": "Küme etiketi için metin rengi", "Text formatting": "Metin biçimlendirme", "The name of the property to use as feature label (ex.: \"nom\")": "Nesne etiketi olarak kullanılacak özelliğin adı (örn.: \"nom\")", - "The zoom and center have been setted.": "Yakınlaştırma ve merkez ayarlandı.", "To use if remote server doesn't allow cross domain (slower)": "Uzak sunucu etki alanları arası izin vermiyorsa kullanmak için (daha yavaş)", "To zoom": "Yakınlaştırmak için", "Toggle edit mode (Shift+Click)": "Düzenleme modunu değiştir (Shift+Click)", @@ -296,13 +291,13 @@ var locale = { "Untitled layer": "Adlandırılmamış katman", "Untitled map": "Adlandırılmamış harita", "Update permissions": "İzinleri güncelle", - "Update permissions and editors": "İzinleri ve düzenleyicileri güncelleyin\n", + "Update permissions and editors": "İzinleri ve düzenleyicileri güncelleyin", "Url": "Url", "Use current bounds": "Geçerli sınırları kullan", "Use placeholders with feature properties between brackets, eg. {name}, they will be dynamically replaced by the corresponding values.": "Parantezler arasında nesne özelliklerine sahip yer tutucuları kullanın, örneğin. {isim}, dinamik olarak karşılık gelen değerlerle değiştirilecektir.", "User content credits": "Kullanıcı içerik kredisi", "User interface options": "Kullanıcı arayüzü seçenekleri", - "Versions": "Sürümler ", + "Versions": "Sürümler", "View Fullscreen": "Tam ekranda görüntüle", "Where do we go from here?": "Buradan sonra nereye gidiyoruz?", "Whether to display or not polygons paths.": "Çokgen yolların görüntülenip görüntülenmeyeceği", @@ -330,7 +325,7 @@ var locale = { "max North": "max Kuzey", "max South": "max Güney", "max West": "max Batı", - "max zoom": "max yakınlaştır ", + "max zoom": "max yakınlaştır", "min zoom": "min yakınlaştırma", "next": "sonraki", "previous": "önceki", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "mil", "nautical miles": "deniz mil", - "{area} acres": "{area} dönüm", - "{area} ha": "{area} hektar", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 gün", "1 hour": "1 saat", "5 min": "5 dakika", @@ -366,11 +351,47 @@ var locale = { "Optional.": "İsteğe bağlı.", "Paste your data here": "Paste your data here", "Please save the map first": "Lütfen önce haritayı kaydedin", - "Unable to locate you.": "Seni bulamadık.", "Feature identifier key": "Nesne tanımlayıcı anahtarı", "Open current feature on load": "Mevcut yüklemede olan nesneyi aç", "Permalink": "Kalıcı bağlantı", - "The name of the property to use as feature unique identifier.": "Nesne özgün tanımlayıcısı olarak kullanılacak özelliğin adı" -}; -L.registerLocale("tr", locale); -L.setLocale("tr"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "Nesne özgün tanımlayıcısı olarak kullanılacak özelliğin adı", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("tr", locale) +L.setLocale("tr") diff --git a/umap/static/umap/locale/tr.json b/umap/static/umap/locale/tr.json index 91da9014..636eb5f0 100644 --- a/umap/static/umap/locale/tr.json +++ b/umap/static/umap/locale/tr.json @@ -89,10 +89,9 @@ "Add a layer": "Bir katman ekle", "Add a line to the current multi": "Mevcut çokluya bir satır ekle", "Add a new property": "Yeni bir özellik ekle", - "Add a polygon to the current multi": "Mevcut çokluya bir çokgen ekle ", + "Add a polygon to the current multi": "Mevcut çokluya bir çokgen ekle", "Advanced actions": "Gelişmiş eylemler", "Advanced properties": "Gelişmiş özellikler", - "Advanced transition": "Gelişmiş geçiş", "All properties are imported.": "Tüm özellikler içe aktarılır.", "Allow interactions": "Etkileşimlere izin ver", "An error occured": "Bir hata oluştu", @@ -190,7 +189,6 @@ "Home": "Ana sayfa", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "Yanlış ise, çokgen altta yatan haritanın bir parçası olarak hareket edecektir.", - "Iframe export options": "Iframe dışa aktarma seçenekleri", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -203,7 +201,7 @@ "Include full screen link?": "Tam ekran bağlantısını ekle?", "Interaction options": "Etkileşim seçenekleri", "Invalid umap data": "Geçersiz umap verisi", - "Invalid umap data in {filename}": " {filename}'de geçersiz umap verisi", + "Invalid umap data in {filename}": "{filename}'de geçersiz umap verisi", "Keep current visible layers": "Şuan görünen katmanları tut", "Latitude": "Enlem", "Layer": "Katman", @@ -269,7 +267,6 @@ "Show/hide layer": "Katmanı göster/gizle", "Simple link: [[http://example.com]]": "Basit bağlantı: [[http://example.com]]", "Slideshow": "Slayt gösterisi", - "Smart transitions": "Akıllı geçişler", "Sort key": "Kısa anahtar", "Split line": "Çizgiyi böl", "Start a hole here": "Burada bir delik aç", @@ -279,12 +276,10 @@ "Stop slideshow": "Slayt gösterisini durdur", "Supported scheme": "Desteklenen şema", "Supported variables that will be dynamically replaced": "Dinamik olarak değiştirilecek desteklenen değişkenler", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS formatı", "Text color for the cluster label": "Küme etiketi için metin rengi", "Text formatting": "Metin biçimlendirme", "The name of the property to use as feature label (ex.: \"nom\")": "Nesne etiketi olarak kullanılacak özelliğin adı (örn.: \"nom\")", - "The zoom and center have been setted.": "Yakınlaştırma ve merkez ayarlandı.", "To use if remote server doesn't allow cross domain (slower)": "Uzak sunucu etki alanları arası izin vermiyorsa kullanmak için (daha yavaş)", "To zoom": "Yakınlaştırmak için", "Toggle edit mode (Shift+Click)": "Düzenleme modunu değiştir (Shift+Click)", @@ -296,13 +291,13 @@ "Untitled layer": "Adlandırılmamış katman", "Untitled map": "Adlandırılmamış harita", "Update permissions": "İzinleri güncelle", - "Update permissions and editors": "İzinleri ve düzenleyicileri güncelleyin\n", + "Update permissions and editors": "İzinleri ve düzenleyicileri güncelleyin", "Url": "Url", "Use current bounds": "Geçerli sınırları kullan", "Use placeholders with feature properties between brackets, eg. {name}, they will be dynamically replaced by the corresponding values.": "Parantezler arasında nesne özelliklerine sahip yer tutucuları kullanın, örneğin. {isim}, dinamik olarak karşılık gelen değerlerle değiştirilecektir.", "User content credits": "Kullanıcı içerik kredisi", "User interface options": "Kullanıcı arayüzü seçenekleri", - "Versions": "Sürümler ", + "Versions": "Sürümler", "View Fullscreen": "Tam ekranda görüntüle", "Where do we go from here?": "Buradan sonra nereye gidiyoruz?", "Whether to display or not polygons paths.": "Çokgen yolların görüntülenip görüntülenmeyeceği", @@ -330,7 +325,7 @@ "max North": "max Kuzey", "max South": "max Güney", "max West": "max Batı", - "max zoom": "max yakınlaştır ", + "max zoom": "max yakınlaştır", "min zoom": "min yakınlaştırma", "next": "sonraki", "previous": "önceki", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "mil", "nautical miles": "deniz mil", - "{area} acres": "{area} dönüm", - "{area} ha": "{area} hektar", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 gün", "1 hour": "1 saat", "5 min": "5 dakika", @@ -366,9 +351,45 @@ "Optional.": "İsteğe bağlı.", "Paste your data here": "Paste your data here", "Please save the map first": "Lütfen önce haritayı kaydedin", - "Unable to locate you.": "Seni bulamadık.", "Feature identifier key": "Nesne tanımlayıcı anahtarı", "Open current feature on load": "Mevcut yüklemede olan nesneyi aç", "Permalink": "Kalıcı bağlantı", - "The name of the property to use as feature unique identifier.": "Nesne özgün tanımlayıcısı olarak kullanılacak özelliğin adı" + "The name of the property to use as feature unique identifier.": "Nesne özgün tanımlayıcısı olarak kullanılacak özelliğin adı", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/uk_UA.js b/umap/static/umap/locale/uk_UA.js index 1791e676..f85b39f8 100644 --- a/umap/static/umap/locale/uk_UA.js +++ b/umap/static/umap/locale/uk_UA.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Додати зображення", "Allow scroll wheel zoom?": "Дозволити зміну масштабу колесом миші?", "Automatic": "Автоматично", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Додаткові дії", "Advanced properties": "Розширенні параметри", - "Advanced transition": "Розширені переходи", "All properties are imported.": "Усі параметри імпортовано.", "Allow interactions": "Дозволити взаємодію", "An error occured": "Виникла помилка", @@ -190,7 +189,6 @@ var locale = { "Home": "Головна", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Наскільки сильно спрощувати лінії на кожному масштабі (більше значення — більша швидкість, але виглядає гірше; менше значення — більш точне зображення)", "If false, the polygon will act as a part of the underlying map.": "Якщо ні, тоді полігон буде виглядати як частина мапи", - "Iframe export options": "Параметри експорту для Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe із зазначенням висоти (в пікселях): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe з власними висотою та шириною (у пікселях): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -202,7 +200,7 @@ var locale = { "Imports all umap data, including layers and settings.": "Імпортувати всі дані, включаючи інформацію про шари та налаштування.", "Include full screen link?": "Долучити посилання на повноекранний вид?", "Interaction options": "Параметри взаємодії", - "Invalid umap data": "Невірні umap-дані ", + "Invalid umap data": "Невірні umap-дані", "Invalid umap data in {filename}": "Невірні umap-дані у файлі {filename}", "Keep current visible layers": "Залишити поточні видимі шари", "Latitude": "Широта", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Показати/приховати шар", "Simple link: [[http://example.com]]": "Просте посилання: [[http://example.com]]", "Slideshow": "Слайдшоу", - "Smart transitions": "Розумні переходи", "Sort key": "Ключ сортування", "Split line": "Розрізати лінію", "Start a hole here": "Почати отвір звідси", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Зупинити слайдшоу", "Supported scheme": "Підтримувана схема", "Supported variables that will be dynamically replaced": "Підтримувані змінні для автоматичної заміни", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Значок може бути як юнікод-символом так і URL. Ви можете використовувати параметри об'єктів як змінні. Наприклад, в \"http://myserver.org/images/{name}.png\", змінна {name} буде замінена значенням поля \"name\" кожної мітки на мапі.", "TMS format": "Формат TMS", "Text color for the cluster label": "Колір тексту для позначок кластера", "Text formatting": "Форматування тексту", "The name of the property to use as feature label (ex.: \"nom\")": "Назва параметру для використання в якості мітки об’єкта (напр.: „nom“)", - "The zoom and center have been set.": "Масштаб й центрування виставлені", "To use if remote server doesn't allow cross domain (slower)": "Якщо віддалений сервер не дозволяє крос-домен (повільно)", "To zoom": "Масштабувати", "Toggle edit mode (Shift+Click)": "Перейти у режим редагування (Shift+клац)", @@ -343,16 +338,6 @@ var locale = { "mi": "миля", "miles": "миль", "nautical miles": "морських миль", - "{area} acres": "{area} акрів", - "{area} ha": " {area} гектар", - "{area} m²": "{area} м²", - "{area} mi²": " {area} миль²", - "{area} yd²": " {area} ярд²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} км", - "{distance} m": "{distance} м", - "{distance} miles": " {distance} миль", - "{distance} yd": " {distance} ярдів", "1 day": "1 день", "1 hour": "1 година", "5 min": "5 хвилин", @@ -366,12 +351,47 @@ var locale = { "Optional.": "Необов’язково.", "Paste your data here": "Вставте ваші дані тут", "Please save the map first": "Спочатку збережіть вашу мапу", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("uk_UA", locale); -L.setLocale("uk_UA"); \ No newline at end of file +L.registerLocale("uk_UA", locale) +L.setLocale("uk_UA") diff --git a/umap/static/umap/locale/uk_UA.json b/umap/static/umap/locale/uk_UA.json index 7033d87f..aaffcda3 100644 --- a/umap/static/umap/locale/uk_UA.json +++ b/umap/static/umap/locale/uk_UA.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Додаткові дії", "Advanced properties": "Розширенні параметри", - "Advanced transition": "Розширені переходи", "All properties are imported.": "Усі параметри імпортовано.", "Allow interactions": "Дозволити взаємодію", "An error occured": "Виникла помилка", @@ -190,7 +189,6 @@ "Home": "Головна", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "Наскільки сильно спрощувати лінії на кожному масштабі (більше значення — більша швидкість, але виглядає гірше; менше значення — більш точне зображення)", "If false, the polygon will act as a part of the underlying map.": "Якщо ні, тоді полігон буде виглядати як частина мапи", - "Iframe export options": "Параметри експорту для Iframe", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe із зазначенням висоти (в пікселях): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe з власними висотою та шириною (у пікселях): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -202,7 +200,7 @@ "Imports all umap data, including layers and settings.": "Імпортувати всі дані, включаючи інформацію про шари та налаштування.", "Include full screen link?": "Долучити посилання на повноекранний вид?", "Interaction options": "Параметри взаємодії", - "Invalid umap data": "Невірні umap-дані ", + "Invalid umap data": "Невірні umap-дані", "Invalid umap data in {filename}": "Невірні umap-дані у файлі {filename}", "Keep current visible layers": "Залишити поточні видимі шари", "Latitude": "Широта", @@ -269,7 +267,6 @@ "Show/hide layer": "Показати/приховати шар", "Simple link: [[http://example.com]]": "Просте посилання: [[http://example.com]]", "Slideshow": "Слайдшоу", - "Smart transitions": "Розумні переходи", "Sort key": "Ключ сортування", "Split line": "Розрізати лінію", "Start a hole here": "Почати отвір звідси", @@ -279,12 +276,10 @@ "Stop slideshow": "Зупинити слайдшоу", "Supported scheme": "Підтримувана схема", "Supported variables that will be dynamically replaced": "Підтримувані змінні для автоматичної заміни", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Значок може бути як юнікод-символом так і URL. Ви можете використовувати параметри об'єктів як змінні. Наприклад, в \"http://myserver.org/images/{name}.png\", змінна {name} буде замінена значенням поля \"name\" кожної мітки на мапі.", "TMS format": "Формат TMS", "Text color for the cluster label": "Колір тексту для позначок кластера", "Text formatting": "Форматування тексту", "The name of the property to use as feature label (ex.: \"nom\")": "Назва параметру для використання в якості мітки об’єкта (напр.: „nom“)", - "The zoom and center have been set.": "Масштаб й центрування виставлені", "To use if remote server doesn't allow cross domain (slower)": "Якщо віддалений сервер не дозволяє крос-домен (повільно)", "To zoom": "Масштабувати", "Toggle edit mode (Shift+Click)": "Перейти у режим редагування (Shift+клац)", @@ -343,16 +338,6 @@ "mi": "миля", "miles": "миль", "nautical miles": "морських миль", - "{area} acres": "{area} акрів", - "{area} ha": " {area} гектар", - "{area} m²": "{area} м²", - "{area} mi²": " {area} миль²", - "{area} yd²": " {area} ярд²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} км", - "{distance} m": "{distance} м", - "{distance} miles": " {distance} миль", - "{distance} yd": " {distance} ярдів", "1 day": "1 день", "1 hour": "1 година", "5 min": "5 хвилин", @@ -366,9 +351,45 @@ "Optional.": "Необов’язково.", "Paste your data here": "Вставте ваші дані тут", "Please save the map first": "Спочатку збережіть вашу мапу", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/locale/vi.js b/umap/static/umap/locale/vi.js index d68895f4..e894c34c 100644 --- a/umap/static/umap/locale/vi.js +++ b/umap/static/umap/locale/vi.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "Thêm một symbol", "Allow scroll wheel zoom?": "Cho phép thu phóng bằng chuột giữa?", "Automatic": "Automatic", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Hoat động nâng cao", "Advanced properties": "Thuộc tính nâng cao", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "Có lỗi", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("vi", locale); -L.setLocale("vi"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("vi", locale) +L.setLocale("vi") diff --git a/umap/static/umap/locale/vi.json b/umap/static/umap/locale/vi.json index e4399c6e..5511a686 100644 --- a/umap/static/umap/locale/vi.json +++ b/umap/static/umap/locale/vi.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Hoat động nâng cao", "Advanced properties": "Thuộc tính nâng cao", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "Có lỗi", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/vi_VN.json b/umap/static/umap/locale/vi_VN.json index f111f462..f88450e3 100644 --- a/umap/static/umap/locale/vi_VN.json +++ b/umap/static/umap/locale/vi_VN.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/zh.js b/umap/static/umap/locale/zh.js index ad603a06..5c164586 100644 --- a/umap/static/umap/locale/zh.js +++ b/umap/static/umap/locale/zh.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "增加符号", "Allow scroll wheel zoom?": "是否允许滚轮缩放?", "Automatic": "Automatic", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "高级操作", "Advanced properties": "高级属性", - "Advanced transition": "Advanced transition", "All properties are imported.": "属性已导入。", "Allow interactions": "Allow interactions", "An error occured": "发生错误", @@ -190,7 +189,6 @@ var locale = { "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "显示/隐藏图层", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "幻灯秀", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "打断线", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "结束幻灯秀", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS格式", "Text color for the cluster label": "标注文本颜色", "Text formatting": "文本格式", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "缩放比例尺与中心设置完成", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "放大", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,11 +351,47 @@ var locale = { "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -}; -L.registerLocale("zh", locale); -L.setLocale("zh"); \ No newline at end of file + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} +L.registerLocale("zh", locale) +L.setLocale("zh") diff --git a/umap/static/umap/locale/zh.json b/umap/static/umap/locale/zh.json index 0c421898..7f38e640 100644 --- a/umap/static/umap/locale/zh.json +++ b/umap/static/umap/locale/zh.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "高级操作", "Advanced properties": "高级属性", - "Advanced transition": "Advanced transition", "All properties are imported.": "属性已导入。", "Allow interactions": "Allow interactions", "An error occured": "发生错误", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "显示/隐藏图层", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "幻灯秀", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "打断线", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "结束幻灯秀", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS格式", "Text color for the cluster label": "标注文本颜色", "Text formatting": "文本格式", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "缩放比例尺与中心设置完成", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "放大", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/zh_CN.json b/umap/static/umap/locale/zh_CN.json index f111f462..f88450e3 100644 --- a/umap/static/umap/locale/zh_CN.json +++ b/umap/static/umap/locale/zh_CN.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/zh_TW.Big5.json b/umap/static/umap/locale/zh_TW.Big5.json index f111f462..f88450e3 100644 --- a/umap/static/umap/locale/zh_TW.Big5.json +++ b/umap/static/umap/locale/zh_TW.Big5.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "Add a polygon to the current multi", "Advanced actions": "Advanced actions", "Advanced properties": "Advanced properties", - "Advanced transition": "Advanced transition", "All properties are imported.": "All properties are imported.", "Allow interactions": "Allow interactions", "An error occured": "An error occured", @@ -190,7 +189,6 @@ "Home": "Home", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)", "If false, the polygon will act as a part of the underlying map.": "If false, the polygon will act as a part of the underlying map.", - "Iframe export options": "Iframe export options", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "Show/hide layer", "Simple link: [[http://example.com]]": "Simple link: [[http://example.com]]", "Slideshow": "Slideshow", - "Smart transitions": "Smart transitions", "Sort key": "Sort key", "Split line": "Split line", "Start a hole here": "Start a hole here", @@ -279,12 +276,10 @@ "Stop slideshow": "Stop slideshow", "Supported scheme": "Supported scheme", "Supported variables that will be dynamically replaced": "Supported variables that will be dynamically replaced", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", "TMS format": "TMS format", "Text color for the cluster label": "Text color for the cluster label", "Text formatting": "Text formatting", "The name of the property to use as feature label (ex.: \"nom\")": "The name of the property to use as feature label (ex.: \"nom\")", - "The zoom and center have been set.": "The zoom and center have been set.", "To use if remote server doesn't allow cross domain (slower)": "To use if remote server doesn't allow cross domain (slower)", "To zoom": "To zoom", "Toggle edit mode (Shift+Click)": "Toggle edit mode (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "miles", "nautical miles": "nautical miles", - "{area} acres": "{area} acres", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} miles", - "{distance} yd": "{distance} yd", "1 day": "1 day", "1 hour": "1 hour", "5 min": "5 min", @@ -366,9 +351,45 @@ "Optional.": "Optional.", "Paste your data here": "Paste your data here", "Please save the map first": "Please save the map first", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } \ No newline at end of file diff --git a/umap/static/umap/locale/zh_TW.js b/umap/static/umap/locale/zh_TW.js index 447b9b8c..2e4ff1e8 100644 --- a/umap/static/umap/locale/zh_TW.js +++ b/umap/static/umap/locale/zh_TW.js @@ -1,4 +1,4 @@ -var locale = { +const locale = { "Add symbol": "新增圖示", "Allow scroll wheel zoom?": "允許捲動放大?", "Automatic": "自動", @@ -92,7 +92,6 @@ var locale = { "Add a polygon to the current multi": "新增多邊形", "Advanced actions": "進階動作", "Advanced properties": "進階屬性", - "Advanced transition": "進階轉換", "All properties are imported.": "所有物件皆已匯入", "Allow interactions": "允許互動", "An error occured": "發生錯誤", @@ -190,7 +189,6 @@ var locale = { "Home": "首頁", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "在不同縮放比例下,多邊形的精簡程度 (精簡越多有較好的效率、多邊形越平滑,精簡越少圖形越精確)", "If false, the polygon will act as a part of the underlying map.": "選擇「否」時,多邊形物件會被當成為底圖的一部分。", - "Iframe export options": "Iframe 匯出選項", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "自訂 iframe 高度 (以 px 為單位): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "自訂 iframe 高度和寬度 (以 px 為單位):{{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ var locale = { "Show/hide layer": "顯示/隱藏圖層", "Simple link: [[http://example.com]]": "簡單連結: [[http://example.com]]", "Slideshow": "投影片", - "Smart transitions": "智慧轉換", "Sort key": "排序鍵", "Split line": "分隔線", "Start a hole here": "開始一個凹洞", @@ -279,12 +276,10 @@ var locale = { "Stop slideshow": "中止投影片", "Supported scheme": "支援的模板", "Supported variables that will be dynamically replaced": "支援的物件將直接動態轉換", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "屬性標誌 (symbol) 可以是任一Unicode字元或URL地址。你可以使用項目屬性 (feature properties) 作為變數,如:\"http://myserver.org/images/{name}.png\" 北一URL中,變數 {name} 將會由各標記 (marker) 的 \"name\" 數值取代。", "TMS format": "TMS 格式", "Text color for the cluster label": "叢集標籤的文字顏色", "Text formatting": "文字格式", "The name of the property to use as feature label (ex.: \"nom\")": "用作圖徵標籤的屬性名稱 (例如:“nom”)", - "The zoom and center have been set.": "已完成置中及切換功能設定", "To use if remote server doesn't allow cross domain (slower)": "如果遠端伺服器不允許跨網域存取時使用 (效率較差)", "To zoom": "至縮放大小", "Toggle edit mode (Shift+Click)": "切換編輯模式 (Shift+Click)", @@ -343,16 +338,6 @@ var locale = { "mi": "mi", "miles": "英里", "nautical miles": "海里", - "{area} acres": "{area} ac", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} mi", - "{distance} yd": "{distance} yd", "1 day": "1日", "1 hour": "1小時", "5 min": "5分", @@ -366,12 +351,47 @@ var locale = { "Optional.": "可選", "Paste your data here": "請在此貼上你的資料", "Please save the map first": "請先儲存地圖", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." } -; -L.registerLocale("zh_TW", locale); -L.setLocale("zh_TW"); \ No newline at end of file +L.registerLocale("zh_TW", locale) +L.setLocale("zh_TW") diff --git a/umap/static/umap/locale/zh_TW.json b/umap/static/umap/locale/zh_TW.json index be2df608..53154d34 100644 --- a/umap/static/umap/locale/zh_TW.json +++ b/umap/static/umap/locale/zh_TW.json @@ -92,7 +92,6 @@ "Add a polygon to the current multi": "新增多邊形", "Advanced actions": "進階動作", "Advanced properties": "進階屬性", - "Advanced transition": "進階轉換", "All properties are imported.": "所有物件皆已匯入", "Allow interactions": "允許互動", "An error occured": "發生錯誤", @@ -190,7 +189,6 @@ "Home": "首頁", "How much to simplify the polyline on each zoom level (more = better performance and smoother look, less = more accurate)": "在不同縮放比例下,多邊形的精簡程度 (精簡越多有較好的效率、多邊形越平滑,精簡越少圖形越精確)", "If false, the polygon will act as a part of the underlying map.": "選擇「否」時,多邊形物件會被當成為底圖的一部分。", - "Iframe export options": "Iframe 匯出選項", "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "自訂 iframe 高度 (以 px 為單位): {{{http://iframe.url.com|height}}}", "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "自訂 iframe 高度和寬度 (以 px 為單位):{{{http://iframe.url.com|height*width}}}", "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}", @@ -269,7 +267,6 @@ "Show/hide layer": "顯示/隱藏圖層", "Simple link: [[http://example.com]]": "簡單連結: [[http://example.com]]", "Slideshow": "投影片", - "Smart transitions": "智慧轉換", "Sort key": "排序鍵", "Split line": "分隔線", "Start a hole here": "開始一個凹洞", @@ -279,12 +276,10 @@ "Stop slideshow": "中止投影片", "Supported scheme": "支援的模板", "Supported variables that will be dynamically replaced": "支援的物件將直接動態轉換", - "Symbol can be either a unicode caracter or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "屬性標誌 (symbol) 可以是任一Unicode字元或URL地址。你可以使用項目屬性 (feature properties) 作為變數,如:\"http://myserver.org/images/{name}.png\" 北一URL中,變數 {name} 將會由各標記 (marker) 的 \"name\" 數值取代。", "TMS format": "TMS 格式", "Text color for the cluster label": "叢集標籤的文字顏色", "Text formatting": "文字格式", "The name of the property to use as feature label (ex.: \"nom\")": "用作圖徵標籤的屬性名稱 (例如:“nom”)", - "The zoom and center have been set.": "已完成置中及切換功能設定", "To use if remote server doesn't allow cross domain (slower)": "如果遠端伺服器不允許跨網域存取時使用 (效率較差)", "To zoom": "至縮放大小", "Toggle edit mode (Shift+Click)": "切換編輯模式 (Shift+Click)", @@ -343,16 +338,6 @@ "mi": "mi", "miles": "英里", "nautical miles": "海里", - "{area} acres": "{area} ac", - "{area} ha": "{area} ha", - "{area} m²": "{area} m²", - "{area} mi²": "{area} mi²", - "{area} yd²": "{area} yd²", - "{distance} NM": "{distance} NM", - "{distance} km": "{distance} km", - "{distance} m": "{distance} m", - "{distance} miles": "{distance} mi", - "{distance} yd": "{distance} yd", "1 day": "1日", "1 hour": "1小時", "5 min": "5分", @@ -366,9 +351,45 @@ "Optional.": "可選", "Paste your data here": "請在此貼上你的資料", "Please save the map first": "請先儲存地圖", - "Unable to locate you.": "Unable to locate you.", "Feature identifier key": "Feature identifier key", "Open current feature on load": "Open current feature on load", "Permalink": "Permalink", - "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier." -} + "The name of the property to use as feature unique identifier.": "The name of the property to use as feature unique identifier.", + "Advanced filter keys": "Advanced filter keys", + "Comma separated list of properties to use for checkbox filtering": "Comma separated list of properties to use for checkbox filtering", + "Data filters": "Data filters", + "Do you want to display caption menus?": "Do you want to display caption menus?", + "Example: key1,key2,key3": "Example: key1,key2,key3", + "Invalid latitude or longitude": "Invalid latitude or longitude", + "Invalide property name: {name}": "Invalide property name: {name}", + "No results for these filters": "No results for these filters", + "Permanent credits": "Permanent credits", + "Permanent credits background": "Permanent credits background", + "Select data": "Select data", + "Will be permanently visible in the bottom left corner of the map": "Will be permanently visible in the bottom left corner of the map", + "{area} acres": "{area} acres", + "{area} ha": "{area} ha", + "{area} m²": "{area} m²", + "{area} mi²": "{area} mi²", + "{area} yd²": "{area} yd²", + "{distance} NM": "{distance} NM", + "{distance} km": "{distance} km", + "{distance} m": "{distance} m", + "{distance} miles": "{distance} miles", + "{distance} yd": "{distance} yd", + " (area: {measure})": "(area: {measure})", + " (length: {measure})": "(length: {measure})", + "Animated transitions": "Animated transitions", + "Background overlay url": "Background overlay url", + "Custom overlay": "Custom overlay", + "Display the star map button": "Display the star map button", + "Error in the overlay URL": "Error in the overlay URL", + "Map has been starred": "Map has been starred", + "Map has been unstarred": "Map has been unstarred", + "Opacity": "Opacity", + "Star this map": "Star this map", + "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.": "Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with \"http://myserver.org/images/{name}.png\", the {name} variable will be replaced by the \"name\" value of each marker.", + "Direct link": "Direct link", + "Export options": "Export options", + "The zoom and center have been modified.": "The zoom and center have been modified." +} \ No newline at end of file diff --git a/umap/static/umap/map.css b/umap/static/umap/map.css index 707821c7..66c4ea30 100644 --- a/umap/static/umap/map.css +++ b/umap/static/umap/map.css @@ -88,6 +88,12 @@ a.umap-control-less { background-position: -80px -161px; box-shadow: 0 0 4px 0 black inset; } +.leaflet-control-star a { + background-position: -118px -160px; +} +.leaflet-control-star.starred a { + background-position: -158px -160px; +} .leaflet-control-search a { background-position: -41px -121px; display: block; @@ -117,6 +123,12 @@ a.umap-control-text { .leaflet-control-edit-enable a:hover { background-color: #4d5759; } +.umap-permanent-credits-container { + max-width: 20rem; + margin-left: 5px!important; + margin-bottom: 5px!important; + padding: 0.5rem; +} @@ -280,6 +292,7 @@ ul.photon-autocomplete { position: absolute; margin: 0 calc(50% - 500px/2); width: 500px; + max-width: 100vw; padding: 40px 20px; border: 1px solid #222; background-color: #323737; @@ -729,20 +742,24 @@ a.add-datalayer:hover, margin-bottom: 14px; border-radius: 2px; } +.umap-browse-features h5, .umap-filter-data h5 { + margin-bottom: 0; + overflow: hidden; + padding-left: 5px; +} .umap-browse-features h5 { height: 30px; line-height: 30px; background-color: #eeeee0; - margin-bottom: 0; color: #666; - overflow: hidden; - padding-left: 5px; } .umap-browse-features h5 span { margin-left: 10px; } .umap-browse-features li { padding: 2px 0; +} +.umap-browse-features li, .umap-filter-data li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; @@ -775,6 +792,9 @@ a.add-datalayer:hover, .umap-browse-features .polygon .feature-color { background-position: -32px -16px; } +.umap-filter-data .property-container:not(:first-child) { + margin-top: 14px; +} .show-on-edit { display: none!important; } @@ -1359,6 +1379,10 @@ a.add-datalayer:hover, .leaflet-control-layers-expanded { margin-left: 10px; } + + .umap-permanent-credits-container { + max-width: 100%; + } } /* ****** */ diff --git a/umap/static/umap/test/Controls.js b/umap/static/umap/test/Controls.js index a0611f65..32725a42 100644 --- a/umap/static/umap/test/Controls.js +++ b/umap/static/umap/test/Controls.js @@ -1,50 +1,51 @@ -describe('L.Utorage.Controls', function(){ +describe('L.Utorage.Controls', function () { + before(function () { + this.server = sinon.fakeServer.create() + this.server.respondWith( + /\/datalayer\/62\/\?.*/, + JSON.stringify(RESPONSES.datalayer62_GET) + ) + this.map = initMap({ umap_id: 99 }) + this.server.respond() + this.datalayer = this.map.getDataLayerByUmapId(62) + }) + after(function () { + this.server.restore() + resetMap() + }) - before(function () { - this.server = sinon.fakeServer.create(); - this.server.respondWith('/datalayer/62/', JSON.stringify(RESPONSES.datalayer62_GET)); - this.map = initMap({umap_id: 99}); - this.server.respond(); - this.datalayer = this.map.getDataLayerByUmapId(62); - }); - after(function () { - this.server.restore(); - resetMap(); - }); + describe('#databrowser()', function () { + it('should be opened at datalayer button click', function () { + var button = qs('.umap-browse-actions .umap-browse-link') + assert.ok(button) + happen.click(button) + assert.ok(qs('#umap-ui-container .umap-browse-data')) + }) - describe('#databrowser()', function(){ + it('should contain datalayer section', function () { + assert.ok(qs('#browse_data_datalayer_62')) + }) - it('should be opened at datalayer button click', function() { - var button = qs('.umap-browse-actions .umap-browse-link'); - assert.ok(button); - happen.click(button); - assert.ok(qs('#umap-ui-container .umap-browse-data')); - }); + it("should contain datalayer's features list", function () { + assert.equal(qsa('#browse_data_datalayer_62 ul li').length, 3) + }) - it('should contain datalayer section', function() { - assert.ok(qs('#browse_data_datalayer_62')); - }); + it("should redraw datalayer's features list at feature delete", function () { + var oldConfirm = window.confirm + window.confirm = function () { + return true + } + enableEdit() + happen.once(qs('path[fill="DarkBlue"]'), { type: 'contextmenu' }) + happen.click(qs('.leaflet-contextmenu .umap-delete')) + assert.equal(qsa('#browse_data_datalayer_62 ul li').length, 2) + window.confirm = oldConfirm + }) - it('should contain datalayer\'s features list', function() { - assert.equal(qsa('#browse_data_datalayer_62 ul li').length, 3); - }); - - it('should redraw datalayer\'s features list at feature delete', function() { - var oldConfirm = window.confirm; - window.confirm = function () {return true;}; - enableEdit(); - happen.once(qs('path[fill="DarkBlue"]'), {type: 'contextmenu'}); - happen.click(qs('.leaflet-contextmenu .umap-delete')); - assert.equal(qsa('#browse_data_datalayer_62 ul li').length, 2); - window.confirm = oldConfirm; - }); - - it('should redraw datalayer\'s features list on edit cancel', function() { - clickCancel(); - happen.click(qs('.umap-browse-actions .umap-browse-link')); - assert.equal(qsa('#browse_data_datalayer_62 ul li').length, 3); - }); - - }); - -}); + it("should redraw datalayer's features list on edit cancel", function () { + clickCancel() + happen.click(qs('.umap-browse-actions .umap-browse-link')) + assert.equal(qsa('#browse_data_datalayer_62 ul li').length, 3) + }) + }) +}) diff --git a/umap/static/umap/test/DataLayer.js b/umap/static/umap/test/DataLayer.js index 72ece389..1bfab5ee 100644 --- a/umap/static/umap/test/DataLayer.js +++ b/umap/static/umap/test/DataLayer.js @@ -1,334 +1,376 @@ describe('L.U.DataLayer', function () { - var path = '/map/99/datalayer/edit/62/'; + var path = '/map/99/datalayer/edit/62/' + + before(function () { + this.server = sinon.fakeServer.create() + this.server.respondWith( + /\/datalayer\/62\/\?.*/, + JSON.stringify(RESPONSES.datalayer62_GET) + ) + this.map = initMap({ umap_id: 99 }) + this.datalayer = this.map.getDataLayerByUmapId(62) + this.server.respond() + enableEdit() + }) + after(function () { + this.server.restore() + resetMap() + }) + + describe('#init()', function () { + it('should be added in datalayers index', function () { + assert.notEqual(this.map.datalayers_index.indexOf(this.datalayer), -1) + }) + }) + + describe('#edit()', function () { + var editButton, form, input, forceButton + + it('row in control should be active', function () { + assert.notOk( + qs( + '.leaflet-control-browse #browse_data_toggle_' + + L.stamp(this.datalayer) + + '.off' + ) + ) + }) + + it('should have edit button', function () { + editButton = qs('#browse_data_toggle_' + L.stamp(this.datalayer) + ' .layer-edit') + assert.ok(editButton) + }) + + it('should have toggle visibility element', function () { + assert.ok(qs('.leaflet-control-browse i.layer-toggle')) + }) + + it('should exist only one datalayer', function () { + assert.equal(qsa('.leaflet-control-browse i.layer-toggle').length, 1) + }) + + it('should build a form on edit button click', function () { + happen.click(editButton) + form = qs('form.umap-form') + input = qs('form.umap-form input[name="name"]') + assert.ok(form) + assert.ok(input) + }) + + it('should update name on input change', function () { + var new_name = 'This is a new name' + input.value = new_name + happen.once(input, { type: 'input' }) + assert.equal(this.datalayer.options.name, new_name) + }) + + it('should have made datalayer dirty', function () { + assert.ok(this.datalayer.isDirty) + assert.notEqual(this.map.dirty_datalayers.indexOf(this.datalayer), -1) + }) + + it('should have made Map dirty', function () { + assert.ok(this.map.isDirty) + }) + + it('should call datalayer.save on save button click', function (done) { + sinon.spy(this.datalayer, 'save') + this.server.flush() + this.server.respondWith( + 'POST', + '/map/99/update/settings/', + JSON.stringify({ id: 99 }) + ) + this.server.respondWith( + 'POST', + '/map/99/datalayer/update/62/', + JSON.stringify(defaultDatalayerData()) + ) + clickSave() + this.server.respond() + this.server.respond() + assert(this.datalayer.save.calledOnce) + this.datalayer.save.restore() + done() + }) + + it('should show alert if server respond 412', function () { + cleanAlert() + this.server.flush() + this.server.respondWith( + 'POST', + '/map/99/update/settings/', + JSON.stringify({ id: 99 }) + ) + this.server.respondWith('POST', '/map/99/datalayer/update/62/', [412, {}, '']) + happen.click(editButton) + input = qs('form.umap-form input[name="name"]') + input.value = 'a new name' + happen.once(input, { type: 'input' }) + clickSave() + this.server.respond() + this.server.respond() + assert(L.DomUtil.hasClass(this.map._container, 'umap-alert')) + assert.notEqual(this.map.dirty_datalayers.indexOf(this.datalayer), -1) + forceButton = qs('#umap-alert-container .umap-action') + assert.ok(forceButton) + }) + + it('should save anyway on force save button click', function () { + sinon.spy(this.map, 'continueSaving') + happen.click(forceButton) + this.server.flush() + this.server.respond( + 'POST', + '/map/99/datalayer/update/62/', + JSON.stringify(defaultDatalayerData()) + ) + assert.notOk(qs('#umap-alert-container .umap-action')) + assert(this.map.continueSaving.calledOnce) + this.map.continueSaving.restore() + assert.equal(this.map.dirty_datalayers.indexOf(this.datalayer), -1) + }) + }) + + describe('#save() new', function () { + var newLayerButton, form, input, newDatalayer, editButton, manageButton + + it('should have a manage datalayers action', function () { + enableEdit() + manageButton = qs('.manage-datalayers') + assert.ok(manageButton) + happen.click(manageButton) + }) + + it('should have a new layer button', function () { + newLayerButton = qs('#umap-ui-container .add-datalayer') + assert.ok(newLayerButton) + }) + + it('should build a form on new layer button click', function () { + happen.click(newLayerButton) + form = qs('form.umap-form') + input = qs('form.umap-form input[name="name"]') + assert.ok(form) + assert.ok(input) + }) + + it('should have an empty name', function () { + assert.notOk(input.value) + }) + + it('should have created a new datalayer', function () { + assert.equal(this.map.datalayers_index.length, 2) + newDatalayer = this.map.datalayers_index[1] + }) + + it('should have made Map dirty', function () { + assert.ok(this.map.isDirty) + }) + + it('should update name on input change', function () { + var new_name = 'This is a new name' + input.value = new_name + happen.once(input, { type: 'input' }) + assert.equal(newDatalayer.options.name, new_name) + }) + + it('should set umap_id on save callback', function () { + assert.notOk(newDatalayer.umap_id) + this.server.flush() + this.server.respondWith( + 'POST', + '/map/99/update/settings/', + JSON.stringify({ id: 99 }) + ) + this.server.respondWith( + 'POST', + '/map/99/datalayer/create/', + JSON.stringify(defaultDatalayerData({ id: 63 })) + ) + clickSave() + this.server.respond() + this.server.respond() // First respond will then trigger another Xhr request (continueSaving) + assert.equal(newDatalayer.umap_id, 63) + }) + + it('should have unset map dirty', function () { + assert.notOk(this.map.isDirty) + }) + + it('should have edit button', function () { + editButton = qs('#browse_data_toggle_' + L.stamp(newDatalayer) + ' .layer-edit') + assert.ok(editButton) + }) + + it('should call update if we edit again', function () { + happen.click(editButton) + assert.notOk(this.map.isDirty) + input = qs('form.umap-form input[name="name"]') + input.value = "a new name again but we don't care which" + happen.once(input, { type: 'input' }) + assert.ok(this.map.isDirty) + var response = function (request) { + return request.respond( + 200, + {}, + JSON.stringify(defaultDatalayerData({ pk: 63 })) + ) + } + var spy = sinon.spy(response) + this.server.flush() + this.server.respondWith( + 'POST', + '/map/99/update/settings/', + JSON.stringify({ id: 99 }) + ) + this.server.respondWith('POST', '/map/99/datalayer/update/63/', spy) + clickSave() + this.server.respond() + this.server.respond() + assert.ok(spy.calledOnce) + }) + }) + + describe('#iconClassChange()', function () { + it('should change icon class', function () { + happen.click(qs('[data-id="' + this.datalayer._leaflet_id + '"] .layer-edit')) + changeSelectValue( + qs('form#datalayer-advanced-properties select[name=iconClass]'), + 'Circle' + ) + assert.notOk(qs('div.umap-div-icon')) + assert.ok(qs('div.umap-circle-icon')) + happen.click( + qs('form#datalayer-advanced-properties .umap-field-iconClass .undefine') + ) + assert.notOk(qs('div.umap-circle-icon')) + assert.ok(qs('div.umap-div-icon')) + clickCancel() + }) + }) + + describe('#show/hide', function () { + it('should hide features on hide', function () { + assert.ok(qs('div.umap-div-icon')) + assert.ok(qs('path[fill="none"]')) + this.datalayer.hide() + assert.notOk(qs('div.umap-div-icon')) + assert.notOk(qs('path[fill="none"]')) + }) + + it('should show features on show', function () { + assert.notOk(qs('div.umap-div-icon')) + assert.notOk(qs('path[fill="none"]')) + this.datalayer.show() + assert.ok(qs('div.umap-div-icon')) + assert.ok(qs('path[fill="none"]')) + }) + }) + + describe('#clone()', function () { + it('should clone everything but the id and the name', function () { + enableEdit() + var clone = this.datalayer.clone() + assert.notOk(clone.umap_id) + assert.notEqual(clone.options.name, this.datalayer.name) + assert.ok(clone.options.name) + assert.equal(clone.options.color, this.datalayer.options.color) + assert.equal(clone.options.stroke, this.datalayer.options.stroke) + clone._delete() + clickSave() + }) + }) + + describe('#restore()', function () { + var oldConfirm, + newConfirm = function () { + return true + } before(function () { - this.server = sinon.fakeServer.create(); - this.server.respondWith('GET', '/datalayer/62/', JSON.stringify(RESPONSES.datalayer62_GET)); - this.map = initMap({umap_id: 99}); - this.datalayer = this.map.getDataLayerByUmapId(62); - this.server.respond(); - enableEdit(); - }); + oldConfirm = window.confirm + window.confirm = newConfirm + }) after(function () { - this.server.restore(); - resetMap(); - }); + window.confirm = oldConfirm + }) - describe('#init()', function () { + it('should restore everything', function () { + enableEdit() + var geojson = L.Util.CopyJSON(RESPONSES.datalayer62_GET) + geojson.features.push({ + geometry: { + type: 'Point', + coordinates: [-1.274658203125, 50.57634993749885], + }, + type: 'Feature', + id: 1807, + properties: { _umap_options: {}, name: 'new point from restore' }, + }) + geojson._umap_options.color = 'Chocolate' + this.server.respondWith( + 'GET', + '/datalayer/62/olderversion.geojson', + JSON.stringify(geojson) + ) + sinon.spy(window, 'confirm') + this.datalayer.restore('olderversion.geojson') + this.server.respond() + assert(window.confirm.calledOnce) + window.confirm.restore() + assert.equal(this.datalayer.umap_id, 62) + assert.ok(this.datalayer.isDirty) + assert.equal(this.datalayer._index.length, 4) + assert.ok(qs('path[fill="Chocolate"]')) + }) - it('should be added in datalayers index', function () { - assert.notEqual(this.map.datalayers_index.indexOf(this.datalayer), -1); - }); + it('should revert anything on cancel click', function () { + clickCancel() + assert.equal(this.datalayer._index.length, 3) + assert.notOk(qs('path[fill="Chocolate"]')) + }) + }) - }); + describe('#delete()', function () { + var deleteLink, + deletePath = '/map/99/datalayer/delete/62/' - describe('#edit()', function () { - var editButton, form, input, forceButton; + it('should have a delete link in update form', function () { + enableEdit() + happen.click( + qs('#browse_data_toggle_' + L.stamp(this.datalayer) + ' .layer-edit') + ) + deleteLink = qs('a.delete_datalayer_button') + assert.ok(deleteLink) + }) - it('row in control should be active', function () { - assert.notOk(qs('.leaflet-control-browse #browse_data_toggle_' + L.stamp(this.datalayer) + '.off')); - }); + it('should delete features on datalayer delete', function () { + happen.click(deleteLink) + assert.notOk(qs('div.icon_container')) + }) - it('should have edit button', function () { - editButton = qs('#browse_data_toggle_' + L.stamp(this.datalayer) + ' .layer-edit'); - assert.ok(editButton); - }); + it('should have set map dirty', function () { + assert.ok(this.map.isDirty) + }) - it('should have toggle visibility element', function () { - assert.ok(qs('.leaflet-control-browse i.layer-toggle')); - }); + it('should delete layer control row on delete', function () { + assert.notOk( + qs('.leaflet-control-browse #browse_data_toggle_' + L.stamp(this.datalayer)) + ) + }) - it('should exist only one datalayer', function () { - assert.equal(qsa('.leaflet-control-browse i.layer-toggle').length, 1); - }); + it('should be removed from map.datalayers_index', function () { + assert.equal(this.map.datalayers_index.indexOf(this.datalayer), -1) + }) - it('should build a form on edit button click', function () { - happen.click(editButton); - form = qs('form.umap-form'); - input = qs('form.umap-form input[name="name"]'); - assert.ok(form); - assert.ok(input); - }); + it('should be removed from map.datalayers', function () { + assert.notOk(this.map.datalayers[L.stamp(this.datalayer)]) + }) - it('should update name on input change', function () { - var new_name = 'This is a new name'; - input.value = new_name; - happen.once(input, {type: 'input'}); - assert.equal(this.datalayer.options.name, new_name); - }); - - it('should have made datalayer dirty', function () { - assert.ok(this.datalayer.isDirty); - assert.notEqual(this.map.dirty_datalayers.indexOf(this.datalayer), -1); - }); - - it('should have made Map dirty', function () { - assert.ok(this.map.isDirty); - }); - - it('should call datalayer.save on save button click', function (done) { - sinon.spy(this.datalayer, 'save'); - this.server.flush(); - this.server.respondWith('POST', '/map/99/update/settings/', JSON.stringify({id: 99})); - this.server.respondWith('POST', '/map/99/datalayer/update/62/', JSON.stringify(defaultDatalayerData())); - clickSave(); - this.server.respond(); - this.server.respond(); - assert(this.datalayer.save.calledOnce); - this.datalayer.save.restore(); - done(); - }); - - it('should show alert if server respond 412', function () { - cleanAlert(); - this.server.flush(); - this.server.respondWith('POST', '/map/99/update/settings/', JSON.stringify({id: 99})); - this.server.respondWith('POST', '/map/99/datalayer/update/62/', [412, {}, '']); - happen.click(editButton); - input = qs('form.umap-form input[name="name"]'); - input.value = 'a new name'; - happen.once(input, {type: 'input'}); - clickSave(); - this.server.respond(); - this.server.respond(); - assert(L.DomUtil.hasClass(this.map._container, 'umap-alert')); - assert.notEqual(this.map.dirty_datalayers.indexOf(this.datalayer), -1); - forceButton = qs('#umap-alert-container .umap-action'); - assert.ok(forceButton); - }); - - it('should save anyway on force save button click', function () { - sinon.spy(this.map, 'continueSaving'); - happen.click(forceButton); - this.server.flush(); - this.server.respond('POST', '/map/99/datalayer/update/62/', JSON.stringify(defaultDatalayerData())); - assert.notOk(qs('#umap-alert-container .umap-action')); - assert(this.map.continueSaving.calledOnce); - this.map.continueSaving.restore(); - assert.equal(this.map.dirty_datalayers.indexOf(this.datalayer), -1); - }); - - }); - - describe('#save() new', function () { - var newLayerButton, form, input, newDatalayer, editButton, manageButton; - - it('should have a manage datalayers action', function () { - enableEdit(); - manageButton = qs('.manage-datalayers'); - assert.ok(manageButton); - happen.click(manageButton); - }); - - it('should have a new layer button', function () { - newLayerButton = qs('#umap-ui-container .add-datalayer'); - assert.ok(newLayerButton); - }); - - it('should build a form on new layer button click', function () { - happen.click(newLayerButton); - form = qs('form.umap-form'); - input = qs('form.umap-form input[name="name"]'); - assert.ok(form); - assert.ok(input); - }); - - it('should have an empty name', function () { - assert.notOk(input.value); - }); - - it('should have created a new datalayer', function () { - assert.equal(this.map.datalayers_index.length, 2); - newDatalayer = this.map.datalayers_index[1]; - }); - - it('should have made Map dirty', function () { - assert.ok(this.map.isDirty); - }); - - it('should update name on input change', function () { - var new_name = 'This is a new name'; - input.value = new_name; - happen.once(input, {type: 'input'}); - assert.equal(newDatalayer.options.name, new_name); - }); - - it('should set umap_id on save callback', function () { - assert.notOk(newDatalayer.umap_id); - this.server.flush(); - this.server.respondWith('POST', '/map/99/update/settings/', JSON.stringify({id: 99})); - this.server.respondWith('POST', '/map/99/datalayer/create/', JSON.stringify(defaultDatalayerData({id: 63}))); - clickSave(); - this.server.respond(); - this.server.respond(); // First respond will then trigger another Xhr request (continueSaving) - assert.equal(newDatalayer.umap_id, 63); - }); - - it('should have unset map dirty', function () { - assert.notOk(this.map.isDirty); - }); - - it('should have edit button', function () { - editButton = qs('#browse_data_toggle_' + L.stamp(newDatalayer) + ' .layer-edit'); - assert.ok(editButton); - }); - - it('should call update if we edit again', function () { - happen.click(editButton); - assert.notOk(this.map.isDirty); - input = qs('form.umap-form input[name="name"]'); - input.value = 'a new name again but we don\'t care which'; - happen.once(input, {type: 'input'}); - assert.ok(this.map.isDirty); - var response = function (request) { - return request.respond(200, {}, JSON.stringify(defaultDatalayerData({pk: 63}))); - }; - var spy = sinon.spy(response); - this.server.flush(); - this.server.respondWith('POST', '/map/99/update/settings/', JSON.stringify({id: 99})); - this.server.respondWith('POST', '/map/99/datalayer/update/63/', spy); - clickSave(); - this.server.respond(); - this.server.respond(); - assert.ok(spy.calledOnce); - }); - - }); - - describe('#iconClassChange()', function () { - - it('should change icon class', function () { - happen.click(qs('[data-id="' + this.datalayer._leaflet_id +'"] .layer-edit')); - changeSelectValue(qs('form#datalayer-advanced-properties select[name=iconClass]'), 'Circle'); - assert.notOk(qs('div.umap-div-icon')); - assert.ok(qs('div.umap-circle-icon')); - happen.click(qs('form#datalayer-advanced-properties .umap-field-iconClass .undefine')); - assert.notOk(qs('div.umap-circle-icon')); - assert.ok(qs('div.umap-div-icon')); - clickCancel(); - }); - - }); - - describe('#show/hide', function () { - - it('should hide features on hide', function () { - assert.ok(qs('div.umap-div-icon')); - assert.ok(qs('path[fill="none"]')); - this.datalayer.hide(); - assert.notOk(qs('div.umap-div-icon')); - assert.notOk(qs('path[fill="none"]')); - }); - - it('should show features on show', function () { - assert.notOk(qs('div.umap-div-icon')); - assert.notOk(qs('path[fill="none"]')); - this.datalayer.show(); - assert.ok(qs('div.umap-div-icon')); - assert.ok(qs('path[fill="none"]')); - }); - - }); - - describe('#clone()', function () { - - it('should clone everything but the id and the name', function () { - enableEdit(); - var clone = this.datalayer.clone(); - assert.notOk(clone.umap_id); - assert.notEqual(clone.options.name, this.datalayer.name); - assert.ok(clone.options.name); - assert.equal(clone.options.color, this.datalayer.options.color); - assert.equal(clone.options.stroke, this.datalayer.options.stroke); - clone._delete(); - clickSave(); - }); - - }); - - describe('#restore()', function () { - var oldConfirm, - newConfirm = function () { - return true; - }; - - before(function () { - oldConfirm = window.confirm; - window.confirm = newConfirm; - }); - after(function () { - window.confirm = oldConfirm; - }); - - it('should restore everything', function () { - enableEdit(); - var geojson = L.Util.CopyJSON(RESPONSES.datalayer62_GET); - geojson.features.push({ - 'geometry': { - 'type': 'Point', - 'coordinates': [-1.274658203125, 50.57634993749885] - }, - 'type': 'Feature', - 'id': 1807, - 'properties': {_umap_options: {}, name: 'new point from restore'} - }); - geojson._umap_options.color = 'Chocolate'; - this.server.respondWith('GET', '/datalayer/62/olderversion.geojson', JSON.stringify(geojson)); - sinon.spy(window, 'confirm'); - this.datalayer.restore('olderversion.geojson'); - this.server.respond(); - assert(window.confirm.calledOnce); - window.confirm.restore(); - assert.equal(this.datalayer.umap_id, 62); - assert.ok(this.datalayer.isDirty); - assert.equal(this.datalayer._index.length, 4); - assert.ok(qs('path[fill="Chocolate"]')); - }); - - it('should revert anything on cancel click', function () { - clickCancel(); - assert.equal(this.datalayer._index.length, 3); - assert.notOk(qs('path[fill="Chocolate"]')); - }); - - }); - - describe('#delete()', function () { - var deleteLink, deletePath = '/map/99/datalayer/delete/62/'; - - it('should have a delete link in update form', function () { - enableEdit(); - happen.click(qs('#browse_data_toggle_' + L.stamp(this.datalayer) + ' .layer-edit')); - deleteLink = qs('a.delete_datalayer_button'); - assert.ok(deleteLink); - }); - - it('should delete features on datalayer delete', function () { - happen.click(deleteLink); - assert.notOk(qs('div.icon_container')); - }); - - it('should have set map dirty', function () { - assert.ok(this.map.isDirty); - }); - - it('should delete layer control row on delete', function () { - assert.notOk(qs('.leaflet-control-browse #browse_data_toggle_' + L.stamp(this.datalayer))); - }); - - it('should be removed from map.datalayers_index', function () { - assert.equal(this.map.datalayers_index.indexOf(this.datalayer), -1); - }); - - it('should be removed from map.datalayers', function () { - assert.notOk(this.map.datalayers[L.stamp(this.datalayer)]); - }); - - it('should be visible again on edit cancel', function () { - clickCancel(); - assert.ok(qs('div.icon_container')); - }); - - }); - -}); + it('should be visible again on edit cancel', function () { + clickCancel() + assert.ok(qs('div.icon_container')) + }) + }) +}) diff --git a/umap/static/umap/test/Feature.js b/umap/static/umap/test/Feature.js index ee908e4f..cff88f7d 100644 --- a/umap/static/umap/test/Feature.js +++ b/umap/static/umap/test/Feature.js @@ -1,245 +1,284 @@ describe('L.U.FeatureMixin', function () { + before(function () { + this.server = sinon.fakeServer.create() + this.server.respondWith( + /\/datalayer\/62\/\?.*/, + JSON.stringify(RESPONSES.datalayer62_GET) + ) + this.map = initMap({ umap_id: 99 }) + this.datalayer = this.map.getDataLayerByUmapId(62) + this.server.respond() + }) + after(function () { + this.server.restore() + resetMap() + }) - before(function () { - this.server = sinon.fakeServer.create(); - this.server.respondWith('GET', '/datalayer/62/', JSON.stringify(RESPONSES.datalayer62_GET)); - this.map = initMap({umap_id: 99}); - this.datalayer = this.map.getDataLayerByUmapId(62); - this.server.respond(); - }); - after(function () { - this.server.restore(); - resetMap(); - }); + describe('#edit()', function () { + var link - describe('#edit()', function () { - var link; + it('should have datalayer features created', function () { + assert.equal( + document.querySelectorAll( + '#map > .leaflet-map-pane > .leaflet-overlay-pane path.leaflet-interactive' + ).length, + 2 + ) + assert.ok(qs('path[fill="none"]')) // Polyline + assert.ok(qs('path[fill="DarkBlue"]')) // Polygon + }) - it('should have datalayer features created', function () { - assert.equal(document.querySelectorAll('#map > .leaflet-map-pane > .leaflet-overlay-pane path.leaflet-interactive').length, 2); - assert.ok(qs('path[fill="none"]')); // Polyline - assert.ok(qs('path[fill="DarkBlue"]')); // Polygon - }); + it('should take into account styles changes made in the datalayer', function () { + enableEdit() + happen.click( + qs('#browse_data_toggle_' + L.stamp(this.datalayer) + ' .layer-edit') + ) + var colorInput = qs('form#datalayer-advanced-properties input[name=color]') + changeInputValue(colorInput, 'DarkRed') + assert.ok(qs('path[fill="none"]')) // Polyline fill is unchanged + assert.notOk(qs('path[fill="DarkBlue"]')) + assert.ok(qs('path[fill="DarkRed"]')) + }) - it('should take into account styles changes made in the datalayer', function () { - enableEdit(); - happen.click(qs('#browse_data_toggle_' + L.stamp(this.datalayer) + ' .layer-edit')); - var colorInput = qs('form#datalayer-advanced-properties input[name=color]'); - changeInputValue(colorInput, 'DarkRed'); - assert.ok(qs('path[fill="none"]')); // Polyline fill is unchanged - assert.notOk(qs('path[fill="DarkBlue"]')); - assert.ok(qs('path[fill="DarkRed"]')); - }); + it('should open a popup toolbar on feature click', function () { + enableEdit() + happen.click(qs('path[fill="DarkRed"]')) + var toolbar = qs('ul.leaflet-inplace-toolbar') + assert.ok(toolbar) + link = qs('a.umap-toggle-edit', toolbar) + assert.ok(link) + }) - it('should open a popup toolbar on feature click', function () { - enableEdit(); - happen.click(qs('path[fill="DarkRed"]')); - var toolbar = qs('ul.leaflet-inplace-toolbar'); - assert.ok(toolbar); - link = qs('a.umap-toggle-edit', toolbar); - assert.ok(link); - }); + it('should open a form on popup toolbar toggle edit click', function () { + happen.click(link) + var form = qs('form#umap-feature-properties') + var input = qs('form#umap-feature-properties input[name="name"]') + assert.ok(form) + assert.ok(input) + }) - it('should open a form on popup toolbar toggle edit click', function () { - happen.click(link); - var form = qs('form#umap-feature-properties'); - var input = qs('form#umap-feature-properties input[name="name"]'); - assert.ok(form); - assert.ok(input); - }); + it('should not handle _umap_options has normal property', function () { + assert.notOk(qs('form#umap-feature-properties input[name="_umap_options"]')) + }) - it('should not handle _umap_options has normal property', function () { - assert.notOk(qs('form#umap-feature-properties input[name="_umap_options"]')); - }); + it('should give precedence to feature style over datalayer styles', function () { + var input = qs('#umap-ui-container form input[name="color"]') + assert.ok(input) + changeInputValue(input, 'DarkGreen') + assert.notOk(qs('path[fill="DarkRed"]')) + assert.notOk(qs('path[fill="DarkBlue"]')) + assert.ok(qs('path[fill="DarkGreen"]')) + assert.ok(qs('path[fill="none"]')) // Polyline fill is unchanged + }) - it('should give precedence to feature style over datalayer styles', function () { - var input = qs('#umap-ui-container form input[name="color"]'); - assert.ok(input); - changeInputValue(input, 'DarkGreen'); - assert.notOk(qs('path[fill="DarkRed"]')); - assert.notOk(qs('path[fill="DarkBlue"]')); - assert.ok(qs('path[fill="DarkGreen"]')); - assert.ok(qs('path[fill="none"]')); // Polyline fill is unchanged - }); + it('should remove stroke if set to no', function () { + assert.notOk(qs('path[stroke="none"]')) + var defineButton = qs( + '#umap-feature-shape-properties .formbox:nth-child(4) .define' + ) + happen.click(defineButton) + var input = qs('#umap-feature-shape-properties input[name="stroke"]') + assert.ok(input) + input.checked = false + happen.once(input, { type: 'change' }) + assert.ok(qs('path[stroke="none"]')) + assert.ok(qs('path[fill="none"]')) // Polyline fill is unchanged + }) - it('should remove stroke if set to no', function () { - assert.notOk(qs('path[stroke="none"]')); - var defineButton = qs('#umap-feature-shape-properties .formbox:nth-child(4) .define'); - happen.click(defineButton); - var input = qs('#umap-feature-shape-properties input[name="stroke"]'); - assert.ok(input); - input.checked = false; - happen.once(input, {type: 'change'}); - assert.ok(qs('path[stroke="none"]')); - assert.ok(qs('path[fill="none"]')); // Polyline fill is unchanged - }); + it('should not override already set style on features', function () { + happen.click( + qs('#browse_data_toggle_' + L.stamp(this.datalayer) + ' .layer-edit') + ) + changeInputValue(qs('#umap-ui-container form input[name=color]'), 'Chocolate') + assert.notOk(qs('path[fill="DarkBlue"]')) + assert.notOk(qs('path[fill="DarkRed"]')) + assert.notOk(qs('path[fill="Chocolate"]')) + assert.ok(qs('path[fill="DarkGreen"]')) + assert.ok(qs('path[fill="none"]')) // Polyline fill is unchanged + }) - it('should not override already set style on features', function () { - happen.click(qs('#browse_data_toggle_' + L.stamp(this.datalayer) + ' .layer-edit')); - changeInputValue(qs('#umap-ui-container form input[name=color]'), 'Chocolate'); - assert.notOk(qs('path[fill="DarkBlue"]')); - assert.notOk(qs('path[fill="DarkRed"]')); - assert.notOk(qs('path[fill="Chocolate"]')); - assert.ok(qs('path[fill="DarkGreen"]')); - assert.ok(qs('path[fill="none"]')); // Polyline fill is unchanged - }); + it('should reset style on cancel click', function () { + clickCancel() + assert.ok(qs('path[fill="none"]')) // Polyline fill is unchanged + assert.ok(qs('path[fill="DarkBlue"]')) + assert.notOk(qs('path[fill="DarkRed"]')) + }) - it('should reset style on cancel click', function () { - clickCancel(); - assert.ok(qs('path[fill="none"]')); // Polyline fill is unchanged - assert.ok(qs('path[fill="DarkBlue"]')); - assert.notOk(qs('path[fill="DarkRed"]')); - }); + it('should set map.editedFeature on edit', function () { + enableEdit() + assert.notOk(this.map.editedFeature) + happen.click(qs('path[fill="DarkBlue"]')) + happen.click(qs('ul.leaflet-inplace-toolbar a.umap-toggle-edit')) + assert.ok(this.map.editedFeature) + disableEdit() + }) - it('should set map.editedFeature on edit', function () { - enableEdit(); - assert.notOk(this.map.editedFeature); - happen.click(qs('path[fill="DarkBlue"]')); - happen.click(qs('ul.leaflet-inplace-toolbar a.umap-toggle-edit')); - assert.ok(this.map.editedFeature); - disableEdit(); - }); + it('should reset map.editedFeature on panel open', function (done) { + enableEdit() + assert.notOk(this.map.editedFeature) + happen.click(qs('path[fill="DarkBlue"]')) + happen.click(qs('ul.leaflet-inplace-toolbar a.umap-toggle-edit')) + assert.ok(this.map.editedFeature) + this.map.displayCaption() + window.setTimeout(function () { + assert.notOk(this.map.editedFeature) + disableEdit() + done() + }, 1001) // CSS transition time. + }) + }) - it('should reset map.editedFeature on panel open', function (done) { - enableEdit(); - assert.notOk(this.map.editedFeature); - happen.click(qs('path[fill="DarkBlue"]')); - happen.click(qs('ul.leaflet-inplace-toolbar a.umap-toggle-edit')); - assert.ok(this.map.editedFeature); - this.map.displayCaption(); - window.setTimeout(function () { - assert.notOk(this.map.editedFeature); - disableEdit(); - done(); - }, 1001); // CSS transition time. - }); - - }); - - describe('#utils()', function () { - var poly, marker; - function setFeatures (datalayer) { - datalayer.eachLayer(function (layer) { - if (!poly && layer instanceof L.Polygon) { - poly = layer; - } - if (!marker && layer instanceof L.Marker) { - marker = layer; - } - }); + describe('#utils()', function () { + var poly, marker + function setFeatures(datalayer) { + datalayer.eachLayer(function (layer) { + if (!poly && layer instanceof L.Polygon) { + poly = layer } - it('should generate a valid geojson', function () { - setFeatures(this.datalayer); - assert.ok(poly); - assert.deepEqual(poly.toGeoJSON().geometry, {'type': 'Polygon', 'coordinates': [[[11.25, 53.585984], [10.151367, 52.975108], [12.689209, 52.167194], [14.084473, 53.199452], [12.634277, 53.618579], [11.25, 53.585984], [11.25, 53.585984]]]}); - // Ensure original latlngs has not been modified - assert.equal(poly.getLatLngs()[0].length, 6); - }); + if (!marker && layer instanceof L.Marker) { + marker = layer + } + }) + } + it('should generate a valid geojson', function () { + setFeatures(this.datalayer) + assert.ok(poly) + assert.deepEqual(poly.toGeoJSON().geometry, { + type: 'Polygon', + coordinates: [ + [ + [11.25, 53.585984], + [10.151367, 52.975108], + [12.689209, 52.167194], + [14.084473, 53.199452], + [12.634277, 53.618579], + [11.25, 53.585984], + [11.25, 53.585984], + ], + ], + }) + // Ensure original latlngs has not been modified + assert.equal(poly.getLatLngs()[0].length, 6) + }) - it('should remove empty _umap_options from exported geojson', function () { - setFeatures(this.datalayer); - assert.ok(poly); - assert.deepEqual(poly.toGeoJSON().properties, {name: 'name poly'}); - assert.ok(marker); - assert.deepEqual(marker.toGeoJSON().properties, {_umap_options: {color: 'OliveDrab'}, name: 'test'}); - }); + it('should remove empty _umap_options from exported geojson', function () { + setFeatures(this.datalayer) + assert.ok(poly) + assert.deepEqual(poly.toGeoJSON().properties, { name: 'name poly' }) + assert.ok(marker) + assert.deepEqual(marker.toGeoJSON().properties, { + _umap_options: { color: 'OliveDrab' }, + name: 'test', + }) + }) + }) - }); + describe('#changeDataLayer()', function () { + it('should change style on datalayer select change', function () { + enableEdit() + happen.click(qs('.manage-datalayers')) + happen.click(qs('#umap-ui-container .add-datalayer')) + changeInputValue(qs('form.umap-form input[name="name"]'), 'New layer') + changeInputValue( + qs('form#datalayer-advanced-properties input[name=color]'), + 'MediumAquaMarine' + ) + happen.click(qs('path[fill="DarkBlue"]')) + happen.click(qs('ul.leaflet-inplace-toolbar a.umap-toggle-edit')) + var select = qs('select[name=datalayer]') + select.selectedIndex = 0 + happen.once(select, { type: 'change' }) + assert.ok(qs('path[fill="none"]')) // Polyline fill is unchanged + assert.notOk(qs('path[fill="DarkBlue"]')) + assert.ok(qs('path[fill="MediumAquaMarine"]')) + clickCancel() + }) + }) - describe('#changeDataLayer()', function () { + describe('#openPopup()', function () { + it('should open a popup on click', function () { + assert.notOk(qs('.leaflet-popup-content')) + happen.click(qs('path[fill="DarkBlue"]')) + var title = qs('.leaflet-popup-content') + assert.ok(title) + assert.ok(title.innerHTML.indexOf('name poly')) + }) + }) - it('should change style on datalayer select change', function () { - enableEdit(); - happen.click(qs('.manage-datalayers')); - happen.click(qs('#umap-ui-container .add-datalayer')); - changeInputValue(qs('form.umap-form input[name="name"]'), 'New layer'); - changeInputValue(qs('form#datalayer-advanced-properties input[name=color]'), 'MediumAquaMarine'); - happen.click(qs('path[fill="DarkBlue"]')); - happen.click(qs('ul.leaflet-inplace-toolbar a.umap-toggle-edit')); - var select = qs('select[name=datalayer]'); - select.selectedIndex = 0; - happen.once(select, {type: 'change'}); - assert.ok(qs('path[fill="none"]')); // Polyline fill is unchanged - assert.notOk(qs('path[fill="DarkBlue"]')); - assert.ok(qs('path[fill="MediumAquaMarine"]')); - clickCancel(); - }); + describe('#tooltip', function () { + it('should have a tooltip when active and allow variables', function () { + this.map.options.showLabel = true + this.map.options.labelKey = 'Foo {name}' + this.datalayer.redraw() + assert.equal( + qs('.leaflet-tooltip-pane .leaflet-tooltip').textContent, + 'Foo name poly' + ) + }) + }) - }); + describe('#properties()', function () { + it('should rename property', function () { + var poly = this.datalayer._lineToLayer({}, [ + [0, 0], + [0, 1], + [0, 2], + ]) + poly.properties.prop1 = 'xxx' + poly.renameProperty('prop1', 'prop2') + assert.equal(poly.properties.prop2, 'xxx') + assert.ok(typeof poly.properties.prop1 === 'undefined') + }) - describe('#openPopup()', function () { + it('should not create property when renaming', function () { + var poly = this.datalayer._lineToLayer({}, [ + [0, 0], + [0, 1], + [0, 2], + ]) + delete poly.properties.prop2 // Make sure it doesn't exist + poly.renameProperty('prop1', 'prop2') + assert.ok(typeof poly.properties.prop2 === 'undefined') + }) - it('should open a popup on click', function () { - assert.notOk(qs('.leaflet-popup-content')); - happen.click(qs('path[fill="DarkBlue"]')); - var title = qs('.leaflet-popup-content'); - assert.ok(title); - assert.ok(title.innerHTML.indexOf('name poly')); - }); + it('should delete property', function () { + var poly = this.datalayer._lineToLayer({}, [ + [0, 0], + [0, 1], + [0, 2], + ]) + poly.properties.prop = 'xxx' + assert.equal(poly.properties.prop, 'xxx') + poly.deleteProperty('prop') + assert.ok(typeof poly.properties.prop === 'undefined') + }) + }) - }); + describe('#matchFilter()', function () { + var poly - describe('#tooltip', function () { + it('should filter on properties', function () { + poly = this.datalayer._lineToLayer({}, [ + [0, 0], + [0, 1], + [0, 2], + ]) + poly.properties.name = 'mooring' + assert.ok(poly.matchFilter('moo', ['name'])) + assert.notOk(poly.matchFilter('foo', ['name'])) + }) - it('should have a tooltip when active and allow variables', function () { - this.map.options.showLabel = true; - this.map.options.labelKey = "Foo {name}"; - this.datalayer.redraw(); - assert.equal(qs('.leaflet-tooltip-pane .leaflet-tooltip').textContent, "Foo name poly"); - }); + it('should be case unsensitive', function () { + assert.ok(poly.matchFilter('Moo', ['name'])) + }) - }); + it('should match also in the middle of a string', function () { + assert.ok(poly.matchFilter('oor', ['name'])) + }) - describe('#properties()', function () { - - it('should rename property', function () { - var poly = this.datalayer._lineToLayer({}, [[0, 0], [0, 1], [0, 2]]); - poly.properties.prop1 = 'xxx'; - poly.renameProperty('prop1', 'prop2'); - assert.equal(poly.properties.prop2, 'xxx'); - assert.ok(typeof poly.properties.prop1 === 'undefined'); - }); - - it('should not create property when renaming', function () { - var poly = this.datalayer._lineToLayer({}, [[0, 0], [0, 1], [0, 2]]); - delete poly.properties.prop2; // Make sure it doesn't exist - poly.renameProperty('prop1', 'prop2'); - assert.ok(typeof poly.properties.prop2 === 'undefined'); - }); - - it('should delete property', function () { - var poly = this.datalayer._lineToLayer({}, [[0, 0], [0, 1], [0, 2]]); - poly.properties.prop = 'xxx'; - assert.equal(poly.properties.prop, 'xxx'); - poly.deleteProperty('prop'); - assert.ok(typeof poly.properties.prop === 'undefined'); - }); - - }); - - describe('#matchFilter()', function () { - var poly; - - it('should filter on properties', function () { - poly = this.datalayer._lineToLayer({}, [[0, 0], [0, 1], [0, 2]]); - poly.properties.name = 'mooring'; - assert.ok(poly.matchFilter('moo', ['name'])); - assert.notOk(poly.matchFilter('foo', ['name'])); - }); - - it('should be case unsensitive', function () { - assert.ok(poly.matchFilter('Moo', ['name'])); - }); - - it('should match also in the middle of a string', function () { - assert.ok(poly.matchFilter('oor', ['name'])); - }); - - it('should handle multiproperties', function () { - poly.properties.city = 'Teulada'; - assert.ok(poly.matchFilter('eul', ['name', 'city', 'foo'])); - }); - - }); - -}); + it('should handle multiproperties', function () { + poly.properties.city = 'Teulada' + assert.ok(poly.matchFilter('eul', ['name', 'city', 'foo'])) + }) + }) +}) diff --git a/umap/static/umap/test/Map.js b/umap/static/umap/test/Map.js index e0135684..50f96dee 100644 --- a/umap/static/umap/test/Map.js +++ b/umap/static/umap/test/Map.js @@ -1,316 +1,330 @@ -describe('L.U.Map', function(){ +describe('L.U.Map', function () { + before(function () { + this.server = sinon.fakeServer.create() + this.server.respondWith( + /\/datalayer\/62\/\?.*/, + JSON.stringify(RESPONSES.datalayer62_GET) + ) + this.options = { + umap_id: 99, + } + this.map = initMap({ umap_id: 99 }) + this.server.respond() + this.datalayer = this.map.getDataLayerByUmapId(62) + }) + after(function () { + this.server.restore() + clickCancel() + resetMap() + }) + + describe('#init()', function () { + it('should be initialized', function () { + assert.equal(this.map.options.umap_id, 99) + }) + + it('should have created the edit button', function () { + assert.ok(qs('div.leaflet-control-edit-enable')) + }) + + it('should have datalayer control div', function () { + assert.ok(qs('div.leaflet-control-browse')) + }) + + it('should have datalayer actions div', function () { + assert.ok(qs('div.umap-browse-actions')) + }) + + it('should have icon container div', function () { + assert.ok(qs('div.icon_container')) + }) + + it('should hide icon container div when hiding datalayer', function () { + var el = qs( + '.leaflet-control-browse #browse_data_toggle_' + + L.stamp(this.datalayer) + + ' .layer-toggle' + ) + happen.click(el) + assert.notOk(qs('div.icon_container')) + }) + + it('enable edit on click on toggle button', function () { + var el = qs('div.leaflet-control-edit-enable a') + happen.click(el) + assert.isTrue(L.DomUtil.hasClass(document.body, 'umap-edit-enabled')) + }) + + it('should have only one datalayer in its index', function () { + assert.equal(this.map.datalayers_index.length, 1) + }) + }) + + describe('#editMetadata()', function () { + var form, input + + it('should build a form on editMetadata control click', function (done) { + var button = qs('a.update-map-settings') + assert.ok(button) + happen.click(button) + form = qs('form.umap-form') + input = qs('form[class="umap-form"] input[name="name"]') + assert.ok(form) + assert.ok(input) + done() + }) + + it('should update map name on input change', function () { + var new_name = 'This is a new name' + input.value = new_name + happen.once(input, { type: 'input' }) + assert.equal(this.map.options.name, new_name) + }) + + it('should have made Map dirty', function () { + assert.ok(this.map.isDirty) + }) + + it('should have added dirty class on map container', function () { + assert.ok(L.DomUtil.hasClass(this.map._container, 'umap-is-dirty')) + }) + }) + + describe('#delete()', function () { + var path = '/map/99/delete/', + oldConfirm, + newConfirm = function () { + return true + } before(function () { - this.server = sinon.fakeServer.create(); - this.server.respondWith('/datalayer/62/', JSON.stringify(RESPONSES.datalayer62_GET)); - this.options = { - umap_id: 99 - }; - this.map = initMap({umap_id: 99}); - this.server.respond(); - this.datalayer = this.map.getDataLayerByUmapId(62); - }); + oldConfirm = window.confirm + window.confirm = newConfirm + }) after(function () { - this.server.restore(); - clickCancel(); - resetMap(); - }); + window.confirm = oldConfirm + }) - describe('#init()', function(){ + it('should ask for confirmation on delete link click', function (done) { + var button = qs('a.update-map-settings') + assert.ok(button, 'update map info button exists') + happen.click(button) + var deleteLink = qs('a.umap-delete') + assert.ok(deleteLink, 'delete map button exists') + sinon.spy(window, 'confirm') + this.server.respondWith('POST', path, JSON.stringify({ redirect: '#' })) + happen.click(deleteLink) + this.server.respond() + assert(window.confirm.calledOnce) + window.confirm.restore() + done() + }) + }) - it('should be initialized', function(){ - assert.equal(this.map.options.umap_id, 99); - }); + describe('#importData()', function () { + var fileInput, textarea, submit, formatSelect, layerSelect, clearFlag - it('should have created the edit button', function(){ - assert.ok(qs('div.leaflet-control-edit-enable')); - }); + it('should build a form on click', function () { + happen.click(qs('a.upload-data')) + fileInput = qs('.umap-upload input[type="file"]') + textarea = qs('.umap-upload textarea') + submit = qs('.umap-upload input[type="button"]') + formatSelect = qs('.umap-upload select[name="format"]') + layerSelect = qs('.umap-upload select[name="datalayer"]') + assert.ok(fileInput) + assert.ok(submit) + assert.ok(textarea) + assert.ok(formatSelect) + assert.ok(layerSelect) + }) - it('should have datalayer control div', function(){ - assert.ok(qs('div.leaflet-control-browse')); - }); + it('should import geojson from textarea', function () { + this.datalayer.empty() + assert.equal(this.datalayer._index.length, 0) + textarea.value = + '{"type": "FeatureCollection", "features": [{"geometry": {"type": "Point", "coordinates": [6.922931671142578, 47.481161607175736]}, "type": "Feature", "properties": {"color": "", "name": "Chez R\u00e9my", "description": ""}}, {"geometry": {"type": "LineString", "coordinates": [[2.4609375, 48.88639177703194], [2.48291015625, 48.76343113791796], [2.164306640625, 48.719961222646276]]}, "type": "Feature", "properties": {"color": "", "name": "P\u00e9rif", "description": ""}}]}' + changeSelectValue(formatSelect, 'geojson') + happen.click(submit) + assert.equal(this.datalayer._index.length, 2) + }) - it('should have datalayer actions div', function(){ - assert.ok(qs('div.umap-browse-actions')); - }); + it('should import osm from textarea', function () { + this.datalayer.empty() + happen.click(qs('a.upload-data')) + textarea = qs('.umap-upload textarea') + submit = qs('.umap-upload input[type="button"]') + formatSelect = qs('.umap-upload select[name="format"]') + assert.equal(this.datalayer._index.length, 0) + textarea.value = + '{"version": 0.6,"generator": "Overpass API 0.7.55.4 3079d8ea","osm3s": {"timestamp_osm_base": "2018-09-22T05:26:02Z","copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."},"elements": [{"type": "node","id": 3619112991,"lat": 48.9352995,"lon": 2.3570684,"tags": {"information": "map","map_size": "city","map_type": "scheme","tourism": "information"}},{"type": "node","id": 3682500756,"lat": 48.9804426,"lon": 2.2719725,"tags": {"information": "map","level": "0","tourism": "information"}}]}' + changeSelectValue(formatSelect, 'osm') + happen.click(submit) + assert.equal(this.datalayer._index.length, 2) + assert.equal( + this.datalayer._layers[this.datalayer._index[0]].properties.tourism, + 'information' + ) + }) - it('should have icon container div', function(){ - assert.ok(qs('div.icon_container')); - }); + it('should import kml from textarea', function () { + this.datalayer.empty() + happen.click(qs('a.upload-data')) + textarea = qs('.umap-upload textarea') + submit = qs('.umap-upload input[type="button"]') + formatSelect = qs('.umap-upload select[name="format"]') + assert.equal(this.datalayer._index.length, 0) + textarea.value = kml_example + changeSelectValue(formatSelect, 'kml') + happen.click(submit) + assert.equal(this.datalayer._index.length, 3) + }) - it('should hide icon container div when hiding datalayer', function() { - var el = qs('.leaflet-control-browse #browse_data_toggle_' + L.stamp(this.datalayer) + ' .layer-toggle'); - happen.click(el); - assert.notOk(qs('div.icon_container')); - }); + it('should import gpx from textarea', function () { + this.datalayer.empty() + happen.click(qs('a.upload-data')) + textarea = qs('.umap-upload textarea') + submit = qs('.umap-upload input[type="button"]') + formatSelect = qs('.umap-upload select[name="format"]') + assert.equal(this.datalayer._index.length, 0) + textarea.value = gpx_example + changeSelectValue(formatSelect, 'gpx') + happen.click(submit) + assert.equal(this.datalayer._index.length, 2) + }) - it('enable edit on click on toggle button', function () { - var el = qs('div.leaflet-control-edit-enable a'); - happen.click(el); - assert.isTrue(L.DomUtil.hasClass(document.body, 'umap-edit-enabled')); - }); + it('should import csv from textarea', function () { + this.datalayer.empty() + happen.click(qs('a.upload-data')) + textarea = qs('.umap-upload textarea') + submit = qs('.umap-upload input[type="button"]') + formatSelect = qs('.umap-upload select[name="format"]') + assert.equal(this.datalayer._index.length, 0) + textarea.value = csv_example + changeSelectValue(formatSelect, 'csv') + happen.click(submit) + assert.equal(this.datalayer._index.length, 1) + }) - it('should have only one datalayer in its index', function () { - assert.equal(this.map.datalayers_index.length, 1); - }); - }); + it('should replace content if asked so', function () { + happen.click(qs('a.upload-data')) + textarea = qs('.umap-upload textarea') + submit = qs('.umap-upload input[type="button"]') + formatSelect = qs('.umap-upload select[name="format"]') + clearFlag = qs('.umap-upload input[name="clear"]') + clearFlag.checked = true + assert.equal(this.datalayer._index.length, 1) + textarea.value = csv_example + changeSelectValue(formatSelect, 'csv') + happen.click(submit) + assert.equal(this.datalayer._index.length, 1) + }) - describe('#editMetadata()', function () { - var form, input; + it('should import GeometryCollection from textarea', function () { + this.datalayer.empty() + textarea.value = + '{"type": "GeometryCollection","geometries": [{"type": "Point","coordinates": [-80.66080570220947,35.04939206472683]},{"type": "Polygon","coordinates": [[[-80.66458225250244,35.04496519190309],[-80.66344499588013,35.04603679820616],[-80.66258668899536,35.045580049697556],[-80.66387414932251,35.044280059194946],[-80.66458225250244,35.04496519190309]]]},{"type": "LineString","coordinates": [[-80.66237211227417,35.05950973022538],[-80.66269397735596,35.0592638296087],[-80.66284418106079,35.05893010615862],[-80.66308021545409,35.05833291342246],[-80.66359519958496,35.057753281001425],[-80.66387414932251,35.05740198662245],[-80.66441059112549,35.05703312589789],[-80.66486120223999,35.056787217822475],[-80.66541910171509,35.05650617911516],[-80.66563367843628,35.05631296444281],[-80.66601991653441,35.055891403570705],[-80.66619157791138,35.05545227534804],[-80.66619157791138,35.05517123204622],[-80.66625595092773,35.05489018777713],[-80.6662130355835,35.054222703761525],[-80.6662130355835,35.05392409072499],[-80.66595554351807,35.05290528508858],[-80.66569805145262,35.052044560077285],[-80.66550493240356,35.0514824490509],[-80.665762424469,35.05048117920187],[-80.66617012023926,35.04972582715769],[-80.66651344299316,35.049286665781096],[-80.66692113876343,35.0485313026898],[-80.66700696945189,35.048215102112344],[-80.66707134246826,35.04777593261294],[-80.66704988479614,35.04738946150025],[-80.66696405410767,35.04698542156371],[-80.66681385040283,35.046353007216055],[-80.66659927368164,35.04596652937105],[-80.66640615463257,35.04561518428889],[-80.6659984588623,35.045193568195565],[-80.66552639007568,35.044877354697526],[-80.6649899482727,35.04454357245502],[-80.66449642181396,35.04417465365292],[-80.66385269165039,35.04387600387859],[-80.66303730010986,35.043717894732545]]}]}' + formatSelect = qs('.umap-upload select[name="format"]') + changeSelectValue(formatSelect, 'geojson') + happen.click(submit) + assert.equal(this.datalayer._index.length, 3) + }) - it('should build a form on editMetadata control click', function (done) { - var button = qs('a.update-map-settings'); - assert.ok(button); - happen.click(button); - form = qs('form.umap-form'); - input = qs('form[class="umap-form"] input[name="name"]'); - assert.ok(form); - assert.ok(input); - done(); - }); + it('should import multipolygon', function () { + this.datalayer.empty() + textarea.value = + '{"type": "Feature", "properties": { "name": "Some states" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-109, 36], [-109, 40], [-102, 37], [-109, 36]], [[-108, 39], [-107, 37], [-104, 37], [-108, 39]]], [[[-119, 42], [-120, 39], [-114, 41], [-119, 42]]]] }}' + changeSelectValue(formatSelect, 'geojson') + happen.click(submit) + assert.equal(this.datalayer._index.length, 1) + var layer = this.datalayer.getFeatureByIndex(0) + assert.equal(layer._latlngs.length, 2) // Two shapes. + assert.equal(layer._latlngs[0].length, 2) // Hole. + }) - it('should update map name on input change', function () { - var new_name = 'This is a new name'; - input.value = new_name; - happen.once(input, {type: 'input'}); - assert.equal(this.map.options.name, new_name); - }); + it('should import multipolyline', function () { + this.datalayer.empty() + textarea.value = + '{"type": "FeatureCollection", "features": [{ "type": "Feature", "properties": {}, "geometry": { "type": "MultiLineString", "coordinates": [[[-108, 46], [-113, 43]], [[-112, 45], [-115, 44]]] } }]}' + changeSelectValue(formatSelect, 'geojson') + happen.click(submit) + assert.equal(this.datalayer._index.length, 1) + var layer = this.datalayer.getFeatureByIndex(0) + assert.equal(layer._latlngs.length, 2) // Two shapes. + }) - it('should have made Map dirty', function () { - assert.ok(this.map.isDirty); - }); + it('should import raw umap data from textarea', function () { + //Right now, the import function will try to save and reload. Stop this from happening. + var disabledSaveFunction = this.map.save + this.map.save = function () {} + happen.click(qs('a.upload-data')) + var initialLayerCount = Object.keys(this.map.datalayers).length + formatSelect = qs('.umap-upload select[name="format"]') + textarea = qs('.umap-upload textarea') + textarea.value = + '{ "type": "umap", "geometry": { "type": "Point", "coordinates": [3.0528, 50.6269] }, "properties": { "umap_id": 666, "longCredit": "the illustrious mapmaker", "shortCredit": "the mapmaker", "slideshow": {}, "captionBar": true, "dashArray": "5,5", "fillOpacity": "0.5", "fillColor": "Crimson", "fill": true, "weight": "2", "opacity": "0.9", "smoothFactor": "1", "iconClass": "Drop", "color": "Red", "limitBounds": {}, "tilelayer": { "maxZoom": 18, "url_template": "http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg", "minZoom": 0, "attribution": "Map tiles by [[http://stamen.com|Stamen Design]], under [[http://creativecommons.org/licenses/by/3.0|CC BY 3.0]]. Data by [[http://openstreetmap.org|OpenStreetMap]], under [[http://creativecommons.org/licenses/by-sa/3.0|CC BY SA]].", "name": "Watercolor" }, "licence": { "url": "", "name": "No licence set" }, "description": "Map description", "name": "Imported map", "tilelayersControl": true, "onLoadPanel": "caption", "displayPopupFooter": true, "miniMap": true, "moreControl": true, "scaleControl": true, "zoomControl": true, "scrollWheelZoom": true, "datalayersControl": true, "zoom": 6 }, "layers": [{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ [ [4.2939, 50.8893], [4.2441, 50.8196], [4.3869, 50.7642], [4.4813, 50.7929], [4.413, 50.9119], [4.2939, 50.8893] ] ] }, "properties": { "name": "Bruxelles", "description": "polygon" } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [3.0528, 50.6269] }, "properties": { "_umap_options": { "color": "Orange" }, "name": "Lille", "description": "une ville" } }], "_umap_options": { "displayOnLoad": true, "name": "Cities", "id": 108, "remoteData": {}, "description": "A layer with some cities", "color": "Navy", "iconClass": "Drop", "smoothFactor": "1", "dashArray": "5,1", "fillOpacity": "0.5", "fillColor": "Blue", "fill": true } }, { "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [1.7715, 50.9255], [1.6589, 50.9696], [1.4941, 51.0128], [1.4199, 51.0638], [1.2881, 51.1104] ] }, "properties": { "_umap_options": { "weight": "4" }, "name": "tunnel sous la Manche" } }], "_umap_options": { "displayOnLoad": true, "name": "Tunnels", "id": 109, "remoteData": {} } }]}' + formatSelect.value = 'umap' + submit = qs('.umap-upload input[type="button"]') + happen.click(submit) + assert.equal(Object.keys(this.map.datalayers).length, initialLayerCount + 2) + assert.equal(this.map.options.name, 'Imported map') + var foundFirstLayer = false + var foundSecondLayer = false + for (var idx in this.map.datalayers) { + var datalayer = this.map.datalayers[idx] + if (datalayer.options.name === 'Cities') { + foundFirstLayer = true + assert.equal(datalayer._index.length, 2) + } + if (datalayer.options.name === 'Tunnels') { + foundSecondLayer = true + assert.equal(datalayer._index.length, 1) + } + } + assert.equal(foundFirstLayer, true) + assert.equal(foundSecondLayer, true) + }) - it('should have added dirty class on map container', function () { - assert.ok(L.DomUtil.hasClass(this.map._container, 'umap-is-dirty')); - }); + it('should only import options on the whitelist (umap format import)', function () { + assert.equal(this.map.options.umap_id, 99) + }) - }); + it('should update title bar (umap format import)', function () { + var title = qs('#map div.umap-main-edit-toolbox h3 a.umap-click-to-edit') + assert.equal(title.innerHTML, 'Imported map') + }) - describe('#delete()', function () { - var path = '/map/99/delete/', - oldConfirm, - newConfirm = function () { - return true; - }; + it('should reinitialize controls (umap format import)', function () { + var minimap = qs('#map div.leaflet-control-container div.leaflet-control-minimap') + assert.ok(minimap) + }) - before(function () { - oldConfirm = window.confirm; - window.confirm = newConfirm; - }); - after(function () { - window.confirm = oldConfirm; - }); + it('should update the tilelayer switcher control (umap format import)', function () { + //The tilelayer in the imported data isn't in the tilelayer list (set in _pre.js), there should be no selection on the tilelayer switcher + var selectedLayer = qs('.umap-tilelayer-switcher-container li.selected') + assert.equal(selectedLayer, null) + }) - it('should ask for confirmation on delete link click', function (done) { - var button = qs('a.update-map-settings'); - assert.ok(button, 'update map info button exists'); - happen.click(button); - var deleteLink = qs('a.umap-delete'); - assert.ok(deleteLink, 'delete map button exists'); - sinon.spy(window, 'confirm'); - this.server.respondWith('POST', path, JSON.stringify({redirect: '#'})); - happen.click(deleteLink); - this.server.respond(); - assert(window.confirm.calledOnce); - window.confirm.restore(); - done(); - }); + it('should set the tilelayer (umap format import)', function () { + assert.equal( + this.map.selected_tilelayer._url, + 'http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg' + ) + }) + }) - }); + describe('#localizeUrl()', function () { + it('should replace known variables', function () { + assert.equal( + this.map.localizeUrl('http://example.org/{zoom}'), + 'http://example.org/' + this.map.getZoom() + ) + }) - describe('#importData()', function () { - var fileInput, textarea, submit, formatSelect, layerSelect, clearFlag; - - it('should build a form on click', function () { - happen.click(qs('a.upload-data')); - fileInput = qs('.umap-upload input[type="file"]'); - textarea = qs('.umap-upload textarea'); - submit = qs('.umap-upload input[type="button"]'); - formatSelect = qs('.umap-upload select[name="format"]'); - layerSelect = qs('.umap-upload select[name="datalayer"]'); - assert.ok(fileInput); - assert.ok(submit); - assert.ok(textarea); - assert.ok(formatSelect); - assert.ok(layerSelect); - }); - - it('should import geojson from textarea', function () { - this.datalayer.empty() - assert.equal(this.datalayer._index.length, 0); - textarea.value = '{"type": "FeatureCollection", "features": [{"geometry": {"type": "Point", "coordinates": [6.922931671142578, 47.481161607175736]}, "type": "Feature", "properties": {"color": "", "name": "Chez R\u00e9my", "description": ""}}, {"geometry": {"type": "LineString", "coordinates": [[2.4609375, 48.88639177703194], [2.48291015625, 48.76343113791796], [2.164306640625, 48.719961222646276]]}, "type": "Feature", "properties": {"color": "", "name": "P\u00e9rif", "description": ""}}]}'; - changeSelectValue(formatSelect, 'geojson'); - happen.click(submit); - assert.equal(this.datalayer._index.length, 2); - }); - - it('should import osm from textarea', function () { - this.datalayer.empty() - happen.click(qs('a.upload-data')); - textarea = qs('.umap-upload textarea'); - submit = qs('.umap-upload input[type="button"]'); - formatSelect = qs('.umap-upload select[name="format"]'); - assert.equal(this.datalayer._index.length, 0); - textarea.value = '{"version": 0.6,"generator": "Overpass API 0.7.55.4 3079d8ea","osm3s": {"timestamp_osm_base": "2018-09-22T05:26:02Z","copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."},"elements": [{"type": "node","id": 3619112991,"lat": 48.9352995,"lon": 2.3570684,"tags": {"information": "map","map_size": "city","map_type": "scheme","tourism": "information"}},{"type": "node","id": 3682500756,"lat": 48.9804426,"lon": 2.2719725,"tags": {"information": "map","level": "0","tourism": "information"}}]}'; - changeSelectValue(formatSelect, 'osm'); - happen.click(submit); - assert.equal(this.datalayer._index.length, 2); - assert.equal(this.datalayer._layers[this.datalayer._index[0]].properties.tourism, 'information'); - }); - - it('should import kml from textarea', function () { - this.datalayer.empty() - happen.click(qs('a.upload-data')); - textarea = qs('.umap-upload textarea'); - submit = qs('.umap-upload input[type="button"]'); - formatSelect = qs('.umap-upload select[name="format"]'); - assert.equal(this.datalayer._index.length, 0); - textarea.value = kml_example; - changeSelectValue(formatSelect, 'kml'); - happen.click(submit); - assert.equal(this.datalayer._index.length, 3); - }); - - it('should import gpx from textarea', function () { - this.datalayer.empty() - happen.click(qs('a.upload-data')); - textarea = qs('.umap-upload textarea'); - submit = qs('.umap-upload input[type="button"]'); - formatSelect = qs('.umap-upload select[name="format"]'); - assert.equal(this.datalayer._index.length, 0); - textarea.value = gpx_example; - changeSelectValue(formatSelect, 'gpx'); - happen.click(submit); - assert.equal(this.datalayer._index.length, 2); - }); - - it('should import csv from textarea', function () { - this.datalayer.empty() - happen.click(qs('a.upload-data')); - textarea = qs('.umap-upload textarea'); - submit = qs('.umap-upload input[type="button"]'); - formatSelect = qs('.umap-upload select[name="format"]'); - assert.equal(this.datalayer._index.length, 0); - textarea.value = csv_example; - changeSelectValue(formatSelect, 'csv'); - happen.click(submit); - assert.equal(this.datalayer._index.length, 1); - }); - - it('should replace content if asked so', function () { - happen.click(qs('a.upload-data')); - textarea = qs('.umap-upload textarea'); - submit = qs('.umap-upload input[type="button"]'); - formatSelect = qs('.umap-upload select[name="format"]'); - clearFlag = qs('.umap-upload input[name="clear"]'); - clearFlag.checked = true; - assert.equal(this.datalayer._index.length, 1); - textarea.value = csv_example; - changeSelectValue(formatSelect, 'csv'); - happen.click(submit); - assert.equal(this.datalayer._index.length, 1); - }); - - - it('should import GeometryCollection from textarea', function () { - this.datalayer.empty() - textarea.value = '{"type": "GeometryCollection","geometries": [{"type": "Point","coordinates": [-80.66080570220947,35.04939206472683]},{"type": "Polygon","coordinates": [[[-80.66458225250244,35.04496519190309],[-80.66344499588013,35.04603679820616],[-80.66258668899536,35.045580049697556],[-80.66387414932251,35.044280059194946],[-80.66458225250244,35.04496519190309]]]},{"type": "LineString","coordinates": [[-80.66237211227417,35.05950973022538],[-80.66269397735596,35.0592638296087],[-80.66284418106079,35.05893010615862],[-80.66308021545409,35.05833291342246],[-80.66359519958496,35.057753281001425],[-80.66387414932251,35.05740198662245],[-80.66441059112549,35.05703312589789],[-80.66486120223999,35.056787217822475],[-80.66541910171509,35.05650617911516],[-80.66563367843628,35.05631296444281],[-80.66601991653441,35.055891403570705],[-80.66619157791138,35.05545227534804],[-80.66619157791138,35.05517123204622],[-80.66625595092773,35.05489018777713],[-80.6662130355835,35.054222703761525],[-80.6662130355835,35.05392409072499],[-80.66595554351807,35.05290528508858],[-80.66569805145262,35.052044560077285],[-80.66550493240356,35.0514824490509],[-80.665762424469,35.05048117920187],[-80.66617012023926,35.04972582715769],[-80.66651344299316,35.049286665781096],[-80.66692113876343,35.0485313026898],[-80.66700696945189,35.048215102112344],[-80.66707134246826,35.04777593261294],[-80.66704988479614,35.04738946150025],[-80.66696405410767,35.04698542156371],[-80.66681385040283,35.046353007216055],[-80.66659927368164,35.04596652937105],[-80.66640615463257,35.04561518428889],[-80.6659984588623,35.045193568195565],[-80.66552639007568,35.044877354697526],[-80.6649899482727,35.04454357245502],[-80.66449642181396,35.04417465365292],[-80.66385269165039,35.04387600387859],[-80.66303730010986,35.043717894732545]]}]}'; - formatSelect = qs('.umap-upload select[name="format"]'); - changeSelectValue(formatSelect, 'geojson'); - happen.click(submit); - assert.equal(this.datalayer._index.length, 3); - }); - - it('should import multipolygon', function () { - this.datalayer.empty() - textarea.value = '{"type": "Feature", "properties": { "name": "Some states" }, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-109, 36], [-109, 40], [-102, 37], [-109, 36]], [[-108, 39], [-107, 37], [-104, 37], [-108, 39]]], [[[-119, 42], [-120, 39], [-114, 41], [-119, 42]]]] }}'; - changeSelectValue(formatSelect, 'geojson'); - happen.click(submit); - assert.equal(this.datalayer._index.length, 1); - var layer = this.datalayer.getFeatureByIndex(0); - assert.equal(layer._latlngs.length, 2); // Two shapes. - assert.equal(layer._latlngs[0].length, 2); // Hole. - }); - - it('should import multipolyline', function () { - this.datalayer.empty() - textarea.value = '{"type": "FeatureCollection", "features": [{ "type": "Feature", "properties": {}, "geometry": { "type": "MultiLineString", "coordinates": [[[-108, 46], [-113, 43]], [[-112, 45], [-115, 44]]] } }]}'; - changeSelectValue(formatSelect, 'geojson'); - happen.click(submit); - assert.equal(this.datalayer._index.length, 1); - var layer = this.datalayer.getFeatureByIndex(0); - assert.equal(layer._latlngs.length, 2); // Two shapes. - }); - - it('should import raw umap data from textarea', function () { - //Right now, the import function will try to save and reload. Stop this from happening. - var disabledSaveFunction = this.map.save; - this.map.save = function(){}; - happen.click(qs('a.upload-data')); - var initialLayerCount = Object.keys(this.map.datalayers).length; - formatSelect = qs('.umap-upload select[name="format"]'); - textarea = qs('.umap-upload textarea'); - textarea.value = '{ "type": "umap", "geometry": { "type": "Point", "coordinates": [3.0528, 50.6269] }, "properties": { "umap_id": 666, "longCredit": "the illustrious mapmaker", "shortCredit": "the mapmaker", "slideshow": {}, "captionBar": true, "dashArray": "5,5", "fillOpacity": "0.5", "fillColor": "Crimson", "fill": true, "weight": "2", "opacity": "0.9", "smoothFactor": "1", "iconClass": "Drop", "color": "Red", "limitBounds": {}, "tilelayer": { "maxZoom": 18, "url_template": "http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg", "minZoom": 0, "attribution": "Map tiles by [[http://stamen.com|Stamen Design]], under [[http://creativecommons.org/licenses/by/3.0|CC BY 3.0]]. Data by [[http://openstreetmap.org|OpenStreetMap]], under [[http://creativecommons.org/licenses/by-sa/3.0|CC BY SA]].", "name": "Watercolor" }, "licence": { "url": "", "name": "No licence set" }, "description": "Map description", "name": "Imported map", "tilelayersControl": true, "onLoadPanel": "caption", "displayPopupFooter": true, "miniMap": true, "moreControl": true, "scaleControl": true, "zoomControl": true, "scrollWheelZoom": true, "datalayersControl": true, "zoom": 6 }, "layers": [{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ [ [4.2939, 50.8893], [4.2441, 50.8196], [4.3869, 50.7642], [4.4813, 50.7929], [4.413, 50.9119], [4.2939, 50.8893] ] ] }, "properties": { "name": "Bruxelles", "description": "polygon" } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [3.0528, 50.6269] }, "properties": { "_umap_options": { "color": "Orange" }, "name": "Lille", "description": "une ville" } }], "_umap_options": { "displayOnLoad": true, "name": "Cities", "id": 108, "remoteData": {}, "description": "A layer with some cities", "color": "Navy", "iconClass": "Drop", "smoothFactor": "1", "dashArray": "5,1", "fillOpacity": "0.5", "fillColor": "Blue", "fill": true } }, { "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [1.7715, 50.9255], [1.6589, 50.9696], [1.4941, 51.0128], [1.4199, 51.0638], [1.2881, 51.1104] ] }, "properties": { "_umap_options": { "weight": "4" }, "name": "tunnel sous la Manche" } }], "_umap_options": { "displayOnLoad": true, "name": "Tunnels", "id": 109, "remoteData": {} } }]}'; - formatSelect.value = 'umap'; - submit = qs('.umap-upload input[type="button"]'); - happen.click(submit); - assert.equal(Object.keys(this.map.datalayers).length, initialLayerCount + 2); - assert.equal(this.map.options.name, "Imported map"); - var foundFirstLayer = false; - var foundSecondLayer = false; - for (var idx in this.map.datalayers) { - var datalayer = this.map.datalayers[idx]; - if (datalayer.options.name === "Cities") { - foundFirstLayer = true; - assert.equal(datalayer._index.length, 2); - } - if (datalayer.options.name === "Tunnels") { - foundSecondLayer = true; - assert.equal(datalayer._index.length, 1); - } - } - assert.equal(foundFirstLayer, true); - assert.equal(foundSecondLayer, true); - - }); - - it('should only import options on the whitelist (umap format import)', function () { - assert.equal(this.map.options.umap_id, 99); - }); - - it('should update title bar (umap format import)', function () { - var title = qs("#map div.umap-main-edit-toolbox h3 a.umap-click-to-edit"); - assert.equal(title.innerHTML, "Imported map"); - }); - - it('should reinitialize controls (umap format import)', function () { - var minimap = qs("#map div.leaflet-control-container div.leaflet-control-minimap"); - assert.ok(minimap); - }); - - it('should update the tilelayer switcher control (umap format import)', function () { - //The tilelayer in the imported data isn't in the tilelayer list (set in _pre.js), there should be no selection on the tilelayer switcher - var selectedLayer = qs(".umap-tilelayer-switcher-container li.selected"); - assert.equal(selectedLayer, null); - }); - - it('should set the tilelayer (umap format import)', function () { - assert.equal(this.map.selected_tilelayer._url, "http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.jpg"); - }); - - }); - - describe('#localizeUrl()', function () { - - it('should replace known variables', function () { - assert.equal(this.map.localizeUrl('http://example.org/{zoom}'), 'http://example.org/' + this.map.getZoom()); - }); - - it('should keep unknown variables', function () { - assert.equal(this.map.localizeUrl('http://example.org/{unkown}'), 'http://example.org/{unkown}'); - }); - - }); - - -}); + it('should keep unknown variables', function () { + assert.equal( + this.map.localizeUrl('http://example.org/{unkown}'), + 'http://example.org/{unkown}' + ) + }) + }) +}) diff --git a/umap/static/umap/test/Marker.js b/umap/static/umap/test/Marker.js index 9d607621..ab219bdf 100644 --- a/umap/static/umap/test/Marker.js +++ b/umap/static/umap/test/Marker.js @@ -1,82 +1,98 @@ describe('L.U.Marker', function () { + before(function () { + this.server = sinon.fakeServer.create() + var datalayer_response = JSON.parse(JSON.stringify(RESPONSES.datalayer62_GET)) // Copy. + datalayer_response._umap_options.iconClass = 'Drop' + this.server.respondWith(/\/datalayer\/62\/\?.*/, JSON.stringify(datalayer_response)) + this.map = initMap({ umap_id: 99 }) + this.datalayer = this.map.getDataLayerByUmapId(62) + this.server.respond() + }) + after(function () { + this.server.restore() + resetMap() + }) - before(function () { - this.server = sinon.fakeServer.create(); - var datalayer_response = JSON.parse(JSON.stringify(RESPONSES.datalayer62_GET)); // Copy. - datalayer_response._umap_options.iconClass = 'Drop'; - this.server.respondWith('GET', '/datalayer/62/', JSON.stringify(datalayer_response)); - this.map = initMap({umap_id: 99}); - this.datalayer = this.map.getDataLayerByUmapId(62); - this.server.respond(); - }); - after(function () { - this.server.restore(); - resetMap(); - }); + describe('#iconClassChange()', function () { + it('should change icon class', function () { + enableEdit() + happen.click(qs('div.umap-drop-icon')) + happen.click(qs('ul.leaflet-inplace-toolbar a.umap-toggle-edit')) + changeSelectValue( + qs( + 'form#umap-feature-shape-properties .umap-field-iconClass select[name=iconClass]' + ), + 'Circle' + ) + assert.notOk(qs('div.umap-drop-icon')) + assert.ok(qs('div.umap-circle-icon')) + happen.click( + qs('form#umap-feature-shape-properties .umap-field-iconClass .undefine') + ) + assert.notOk(qs('div.umap-circle-icon')) + assert.ok(qs('div.umap-drop-icon')) + clickCancel() + }) + }) - describe('#iconClassChange()', function () { + describe('#iconSymbolChange()', function () { + it('should change icon symbol', function () { + enableEdit() + happen.click(qs('div.umap-drop-icon')) + happen.click(qs('ul.leaflet-inplace-toolbar a.umap-toggle-edit')) + changeInputValue( + qs( + 'form#umap-feature-shape-properties .umap-field-iconUrl input[name=iconUrl]' + ), + '1' + ) + assert.equal(qs('div.umap-drop-icon span').textContent, '1') + changeInputValue( + qs( + 'form#umap-feature-shape-properties .umap-field-iconUrl input[name=iconUrl]' + ), + '{name}' + ) + assert.equal(qs('div.umap-drop-icon span').textContent, 'test') + clickCancel() + }) + }) - it('should change icon class', function () { - enableEdit(); - happen.click(qs('div.umap-drop-icon')); - happen.click(qs('ul.leaflet-inplace-toolbar a.umap-toggle-edit')); - changeSelectValue(qs('form#umap-feature-shape-properties .umap-field-iconClass select[name=iconClass]'), 'Circle'); - assert.notOk(qs('div.umap-drop-icon')); - assert.ok(qs('div.umap-circle-icon')); - happen.click(qs('form#umap-feature-shape-properties .umap-field-iconClass .undefine')); - assert.notOk(qs('div.umap-circle-icon')); - assert.ok(qs('div.umap-drop-icon')); - clickCancel(); - }); + describe('#iconClassChange()', function () { + it('should change icon class', function () { + enableEdit() + happen.click(qs('div.umap-drop-icon')) + happen.click(qs('ul.leaflet-inplace-toolbar a.umap-toggle-edit')) + changeSelectValue( + qs( + 'form#umap-feature-shape-properties .umap-field-iconClass select[name=iconClass]' + ), + 'Circle' + ) + assert.notOk(qs('div.umap-drop-icon')) + assert.ok(qs('div.umap-circle-icon')) + happen.click( + qs('form#umap-feature-shape-properties .umap-field-iconClass .undefine') + ) + assert.notOk(qs('div.umap-circle-icon')) + assert.ok(qs('div.umap-drop-icon')) + clickCancel() + }) + }) - }); - - describe('#iconSymbolChange()', function () { - - it('should change icon symbol', function () { - enableEdit(); - happen.click(qs('div.umap-drop-icon')); - happen.click(qs('ul.leaflet-inplace-toolbar a.umap-toggle-edit')); - changeInputValue(qs('form#umap-feature-shape-properties .umap-field-iconUrl input[name=iconUrl]'), '1'); - assert.equal(qs('div.umap-drop-icon span').textContent, '1'); - changeInputValue(qs('form#umap-feature-shape-properties .umap-field-iconUrl input[name=iconUrl]'), '{name}'); - assert.equal(qs('div.umap-drop-icon span').textContent, 'test'); - clickCancel(); - }); - - }); - - describe('#iconClassChange()', function () { - - it('should change icon class', function () { - enableEdit(); - happen.click(qs('div.umap-drop-icon')); - happen.click(qs('ul.leaflet-inplace-toolbar a.umap-toggle-edit')); - changeSelectValue(qs('form#umap-feature-shape-properties .umap-field-iconClass select[name=iconClass]'), 'Circle'); - assert.notOk(qs('div.umap-drop-icon')); - assert.ok(qs('div.umap-circle-icon')); - happen.click(qs('form#umap-feature-shape-properties .umap-field-iconClass .undefine')); - assert.notOk(qs('div.umap-circle-icon')); - assert.ok(qs('div.umap-drop-icon')); - clickCancel(); - }); - - }); - - describe('#clone', function () { - - it('should clone marker', function () { - var layer = new L.U.Marker(this.map, [10, 20], {datalayer: this.datalayer}).addTo(this.datalayer); - assert.equal(this.datalayer._index.length, 4); - other = layer.clone(); - assert.ok(this.map.hasLayer(other)); - assert.equal(this.datalayer._index.length, 5); - // Must not be the same reference - assert.notEqual(layer._latlng, other._latlng); - assert.equal(L.Util.formatNum(layer._latlng.lat), other._latlng.lat); - assert.equal(L.Util.formatNum(layer._latlng.lng), other._latlng.lng); - }); - - }); - -}); + describe('#clone', function () { + it('should clone marker', function () { + var layer = new L.U.Marker(this.map, [10, 20], { + datalayer: this.datalayer, + }).addTo(this.datalayer) + assert.equal(this.datalayer._index.length, 4) + other = layer.clone() + assert.ok(this.map.hasLayer(other)) + assert.equal(this.datalayer._index.length, 5) + // Must not be the same reference + assert.notEqual(layer._latlng, other._latlng) + assert.equal(L.Util.formatNum(layer._latlng.lat), other._latlng.lat) + assert.equal(L.Util.formatNum(layer._latlng.lng), other._latlng.lng) + }) + }) +}) diff --git a/umap/static/umap/test/Permissions.js b/umap/static/umap/test/Permissions.js index 7ead6bc7..2b5cc14a 100644 --- a/umap/static/umap/test/Permissions.js +++ b/umap/static/umap/test/Permissions.js @@ -1,77 +1,75 @@ describe('L.Permissions', function () { - var path = '/map/99/datalayer/edit/62/'; + var path = '/map/99/datalayer/edit/62/' - before(function () { - this.server = sinon.fakeServer.create(); - this.server.respondWith('GET', '/datalayer/62/', JSON.stringify(RESPONSES.datalayer62_GET)); - this.map = initMap({umap_id: 99}); - this.datalayer = this.map.getDataLayerByUmapId(62); - this.server.respond(); - enableEdit(); - }); - after(function () { - clickCancel(); - this.server.restore(); - resetMap(); - }); + before(function () { + this.server = sinon.fakeServer.create() + this.server.respondWith( + /\/datalayer\/62\/\?.*/, + JSON.stringify(RESPONSES.datalayer62_GET) + ) + this.map = initMap({ umap_id: 99 }) + this.datalayer = this.map.getDataLayerByUmapId(62) + this.server.respond() + enableEdit() + }) + after(function () { + clickCancel() + this.server.restore() + resetMap() + }) - describe('#open()', function () { - var button; + describe('#open()', function () { + var button - it('should exist update permissions link', function () { - button = qs('a.update-map-permissions'); - expect(button).to.be.ok; - }); + it('should exist update permissions link', function () { + button = qs('a.update-map-permissions') + expect(button).to.be.ok + }) - it('should open table button click', function () { - happen.click(button); - expect(qs('.permissions-panel')).to.be.ok; - }); + it('should open table button click', function () { + happen.click(button) + expect(qs('.permissions-panel')).to.be.ok + }) + }) + describe('#anonymous with cookie', function () { + var button - }); - describe('#anonymous with cookie', function () { - var button; + it('should only allow edit_status', function () { + this.map.permissions.options.anonymous_edit_url = 'http://anonymous.url' + button = qs('a.update-map-permissions') + happen.click(button) + expect(qs('select[name="edit_status"]')).to.be.ok + expect(qs('select[name="share_status"]')).not.to.be.ok + expect(qs('input.edit-owner')).not.to.be.ok + }) + }) - it('should only allow edit_status', function () { - this.map.permissions.options.anonymous_edit_url = 'http://anonymous.url'; - button = qs('a.update-map-permissions'); - happen.click(button); - expect(qs('select[name="edit_status"]')).to.be.ok; - expect(qs('select[name="share_status"]')).not.to.be.ok; - expect(qs('input.edit-owner')).not.to.be.ok; - }); + describe('#editor', function () { + var button - }); + it('should only allow editors', function () { + this.map.options.permissions.owner = { id: 1, url: '/url', name: 'jojo' } + button = qs('a.update-map-permissions') + happen.click(button) + expect(qs('select[name="edit_status"]')).not.to.be.ok + expect(qs('select[name="share_status"]')).not.to.be.ok + expect(qs('input.edit-owner')).not.to.be.ok + expect(qs('input.edit-editors')).to.be.ok + }) + }) - describe('#editor', function () { - var button; + describe('#owner', function () { + var button - it('should only allow editors', function () { - this.map.permissions.options.owner = {id: 1, url: '/url', name: 'jojo'}; - button = qs('a.update-map-permissions'); - happen.click(button); - expect(qs('select[name="edit_status"]')).not.to.be.ok; - expect(qs('select[name="share_status"]')).not.to.be.ok; - expect(qs('input.edit-owner')).not.to.be.ok; - expect(qs('input.edit-editors')).to.be.ok; - }); - - }); - - describe('#owner', function () { - var button; - - it('should allow everything', function () { - this.map.permissions.options.owner = {id: 1, url: '/url', name: 'jojo'}; - this.map.options.user = {id: 1, url: '/url', name: 'jojo'}; - button = qs('a.update-map-permissions'); - happen.click(button); - expect(qs('select[name="edit_status"]')).to.be.ok; - expect(qs('select[name="share_status"]')).to.be.ok; - expect(qs('input.edit-owner')).to.be.ok; - expect(qs('input.edit-editors')).to.be.ok; - }); - - }); - -}); + it('should allow everything', function () { + this.map.options.permissions.owner = { id: 1, url: '/url', name: 'jojo' } + this.map.options.user = { id: 1, url: '/url', name: 'jojo' } + button = qs('a.update-map-permissions') + happen.click(button) + expect(qs('select[name="edit_status"]')).to.be.ok + expect(qs('select[name="share_status"]')).to.be.ok + expect(qs('input.edit-owner')).to.be.ok + expect(qs('input.edit-editors')).to.be.ok + }) + }) +}) diff --git a/umap/static/umap/test/Polygon.js b/umap/static/umap/test/Polygon.js index 2dfdbc60..9b2070db 100644 --- a/umap/static/umap/test/Polygon.js +++ b/umap/static/umap/test/Polygon.js @@ -1,288 +1,367 @@ describe('L.U.Polygon', function () { - var p2ll, map; + var p2ll, map - before(function () { - this.map = map = initMap({umap_id: 99}); - enableEdit(); - p2ll = function (x, y) { - return map.containerPointToLatLng([x, y]); - }; - this.datalayer = this.map.createDataLayer(); - this.datalayer.connectToMap();; - }); + before(function () { + this.map = map = initMap({ umap_id: 99 }) + enableEdit() + p2ll = function (x, y) { + return map.containerPointToLatLng([x, y]) + } + this.datalayer = this.map.createDataLayer() + this.datalayer.connectToMap() + }) - after(function () { - clickCancel(); - resetMap(); - }); + after(function () { + clickCancel() + resetMap() + }) + afterEach(function () { + this.datalayer.empty() + }) + + describe('#isMulti()', function () { + it('should return false for basic Polygon', function () { + var layer = new L.U.Polygon( + this.map, + [ + [1, 2], + [3, 4], + [5, 6], + ], + { datalayer: this.datalayer } + ) + assert.notOk(layer.isMulti()) + }) + + it('should return false for nested basic Polygon', function () { + var latlngs = [[[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]]], + layer = new L.U.Polygon(this.map, latlngs, { datalayer: this.datalayer }) + assert.notOk(layer.isMulti()) + }) + + it('should return false for simple Polygon with hole', function () { + var layer = new L.U.Polygon( + this.map, + [ + [ + [1, 2], + [3, 4], + [5, 6], + ], + [ + [7, 8], + [9, 10], + [11, 12], + ], + ], + { datalayer: this.datalayer } + ) + assert.notOk(layer.isMulti()) + }) + + it('should return true for multi Polygon', function () { + var latLngs = [ + [ + [ + [1, 2], + [3, 4], + [5, 6], + ], + ], + [ + [ + [7, 8], + [9, 10], + [11, 12], + ], + ], + ] + var layer = new L.U.Polygon(this.map, latLngs, { datalayer: this.datalayer }) + assert.ok(layer.isMulti()) + }) + + it('should return true for multi Polygon with hole', function () { + var latLngs = [ + [ + [ + [10, 20], + [30, 40], + [50, 60], + ], + ], + [ + [ + [0, 10], + [10, 10], + [10, 0], + ], + [ + [2, 3], + [2, 4], + [3, 4], + ], + ], + ] + var layer = new L.U.Polygon(this.map, latLngs, { datalayer: this.datalayer }) + assert.ok(layer.isMulti()) + }) + }) + + describe('#contextmenu', function () { afterEach(function () { - this.datalayer.empty(); - }); + // Make sure contextmenu is hidden + happen.once(document, { type: 'keydown', keyCode: 27 }) + }) - describe('#isMulti()', function () { + describe('#in edit mode', function () { + it('should allow to remove shape when multi', function () { + var latlngs = [ + [[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]], + [[p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)]], + ], + layer = new L.U.Polygon(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.equal(qst('Remove shape from the multi'), 1) + }) - it('should return false for basic Polygon', function () { - var layer = new L.U.Polygon(this.map, [[1, 2], [3, 4], [5, 6]], {datalayer: this.datalayer}); - assert.notOk(layer.isMulti()) - }); + it('should not allow to remove shape when not multi', function () { + var latlngs = [[[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]]], + layer = new L.U.Polygon(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.notOk(qst('Remove shape from the multi')) + }) - it('should return false for nested basic Polygon', function () { - var latlngs = [ - [[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]] - ], - layer = new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}); - assert.notOk(layer.isMulti()) - }); + it('should not allow to isolate shape when not multi', function () { + var latlngs = [[[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]]], + layer = new L.U.Polygon(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.notOk(qst('Extract shape to separate feature')) + }) - it('should return false for simple Polygon with hole', function () { - var layer = new L.U.Polygon(this.map, [[[1, 2], [3, 4], [5, 6]], [[7, 8], [9, 10], [11, 12]]], {datalayer: this.datalayer}); - assert.notOk(layer.isMulti()) - }); + it('should allow to isolate shape when multi', function () { + var latlngs = [ + [[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]], + [[p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)]], + ], + layer = new L.U.Polygon(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.ok(qst('Extract shape to separate feature')) + }) - it('should return true for multi Polygon', function () { - var latLngs = [ - [ - [[1, 2], [3, 4], [5, 6]] - ], - [ - [[7, 8], [9, 10], [11, 12]] - ] - ]; - var layer = new L.U.Polygon(this.map, latLngs, {datalayer: this.datalayer}); - assert.ok(layer.isMulti()) - }); + it('should not allow to transform to lines when multi', function () { + var latlngs = [ + [[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]], + [[p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)]], + ], + layer = new L.U.Polygon(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.notOk(qst('Transform to lines')) + }) - it('should return true for multi Polygon with hole', function () { - var latLngs = [ - [[[10, 20], [30, 40], [50, 60]]], - [[[0, 10], [10, 10], [10, 0]], [[2, 3], [2, 4], [3, 4]]] - ]; - var layer = new L.U.Polygon(this.map, latLngs, {datalayer: this.datalayer}); - assert.ok(layer.isMulti()) - }); + it('should not allow to transform to lines when hole', function () { + var latlngs = [ + [ + [p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)], + [p2ll(120, 150), p2ll(150, 180), p2ll(180, 120)], + ], + ], + layer = new L.U.Polygon(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.notOk(qst('Transform to lines')) + }) - }); + it('should allow to transform to lines when not multi', function () { + var latlngs = [[[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]]] + new L.U.Polygon(this.map, latlngs, { datalayer: this.datalayer }).addTo( + this.datalayer + ) + happen.at('contextmenu', 150, 150) + assert.equal(qst('Transform to lines'), 1) + }) - describe('#contextmenu', function () { + it('should not allow to transfer shape when not editedFeature', function () { + new L.U.Polygon(this.map, [p2ll(100, 150), p2ll(100, 200), p2ll(200, 150)], { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.at('contextmenu', 110, 160) + assert.equal(qst('Delete this feature'), 1) // Make sure we have right clicked on the polygon. + assert.notOk(qst('Transfer shape to edited feature')) + }) - afterEach(function () { - // Make sure contextmenu is hidden - happen.once(document, {type: 'keydown', keyCode: 27}); - }); + it('should not allow to transfer shape when editedFeature is not a polygon', function () { + var layer = new L.U.Polygon( + this.map, + [p2ll(100, 150), p2ll(100, 200), p2ll(200, 150)], + { datalayer: this.datalayer } + ).addTo(this.datalayer), + other = new L.U.Polyline(this.map, [p2ll(200, 250), p2ll(200, 300)], { + datalayer: this.datalayer, + }).addTo(this.datalayer) + other.edit() + happen.once(layer._path, { type: 'contextmenu' }) + assert.equal(qst('Delete this feature'), 1) // Make sure we have right clicked on the polygon. + assert.notOk(qst('Transfer shape to edited feature')) + }) - describe('#in edit mode', function () { + it('should allow to transfer shape when another polygon is edited', function (done) { + this.datalayer.empty() + var layer = new L.U.Polygon( + this.map, + [p2ll(200, 300), p2ll(300, 200), p2ll(200, 100)], + { datalayer: this.datalayer } + ).addTo(this.datalayer) + layer.edit() // This moves the map to put "other" at the center. + var other = new L.U.Polygon( + this.map, + [p2ll(100, 150), p2ll(100, 200), p2ll(200, 150)], + { datalayer: this.datalayer } + ).addTo(this.datalayer) + happen.once(other._path, { type: 'contextmenu' }) + assert.equal(qst('Transfer shape to edited feature'), 1) + done() + }) + }) + }) - it('should allow to remove shape when multi', function () { - var latlngs = [ - [[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]], - [[p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)]] - ], - layer = new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}); - assert.equal(qst('Remove shape from the multi'), 1); - }); + describe('#addShape', function () { + it('"add shape" control should not be visible by default', function () { + assert.notOk(qs('.umap-draw-polygon-multi')) + }) - it('should not allow to remove shape when not multi', function () { - var latlngs = [ - [[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]] - ], - layer = new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}); - assert.notOk(qst('Remove shape from the multi')); - }); + it('"add shape" control should be visible when editing a Polygon', function () { + var layer = new L.U.Polygon(this.map, [p2ll(100, 100), p2ll(100, 200)], { + datalayer: this.datalayer, + }).addTo(this.datalayer) + layer.edit() + assert.ok(qs('.umap-draw-polygon-multi')) + }) - it('should not allow to isolate shape when not multi', function () { - var latlngs = [ - [[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]] - ], - layer = new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}); - assert.notOk(qst('Extract shape to separate feature')); - }); + it('"add shape" control should extend the same multi', function () { + var layer = new L.U.Polygon( + this.map, + [p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)], + { datalayer: this.datalayer } + ).addTo(this.datalayer) + layer.edit() + assert.notOk(layer.isMulti()) + happen.click(qs('.umap-draw-polygon-multi')) + happen.at('mousemove', 300, 300) + happen.at('click', 300, 300) + happen.at('mousemove', 350, 300) + happen.at('click', 350, 300) + happen.at('click', 350, 300) + assert.ok(layer.isMulti()) + assert.equal(this.datalayer._index.length, 1) + }) + }) - it('should allow to isolate shape when multi', function () { - var latlngs = [ - [[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]], - [[p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)]] - ], - layer = new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}); - assert.ok(qst('Extract shape to separate feature')); - }); + describe('#transferShape', function () { + it('should transfer simple polygon shape to another polygon', function () { + var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], + layer = new L.U.Polygon(this.map, latlngs, { datalayer: this.datalayer }).addTo( + this.datalayer + ), + other = new L.U.Polygon( + this.map, + [p2ll(200, 350), p2ll(200, 300), p2ll(300, 200)], + { datalayer: this.datalayer } + ).addTo(this.datalayer) + assert.ok(this.map.hasLayer(layer)) + layer.transferShape(p2ll(150, 150), other) + assert.equal(other._latlngs.length, 2) + assert.deepEqual(other._latlngs[1][0], latlngs) + assert.notOk(this.map.hasLayer(layer)) + }) - it('should not allow to transform to lines when multi', function () { - var latlngs = [ - [[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]], - [[p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)]] - ], - layer = new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}); - assert.notOk(qst('Transform to lines')); - }); + it('should transfer multipolygon shape to another polygon', function () { + var latlngs = [ + [ + [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], + [p2ll(120, 150), p2ll(150, 180), p2ll(180, 120)], + ], + [[p2ll(200, 300), p2ll(300, 200)]], + ], + layer = new L.U.Polygon(this.map, latlngs, { datalayer: this.datalayer }).addTo( + this.datalayer + ), + other = new L.U.Polygon( + this.map, + [p2ll(200, 350), p2ll(200, 300), p2ll(300, 200)], + { datalayer: this.datalayer } + ).addTo(this.datalayer) + assert.ok(this.map.hasLayer(layer)) + layer.transferShape(p2ll(150, 150), other) + assert.equal(other._latlngs.length, 2) + assert.deepEqual(other._latlngs[1][0], latlngs[0][0]) + assert.ok(this.map.hasLayer(layer)) + assert.equal(layer._latlngs.length, 1) + }) + }) - it('should not allow to transform to lines when hole', function () { - var latlngs = [ - [ - [p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)], - [p2ll(120, 150), p2ll(150, 180), p2ll(180, 120)] - ] - ], - layer = new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}); - assert.notOk(qst('Transform to lines')); - }); + describe('#isolateShape', function () { + it('should not allow to isolate simple polygon', function () { + var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], + layer = new L.U.Polygon(this.map, latlngs, { datalayer: this.datalayer }).addTo( + this.datalayer + ) + assert.equal(this.datalayer._index.length, 1) + assert.ok(this.map.hasLayer(layer)) + layer.isolateShape(p2ll(150, 150)) + assert.equal(layer._latlngs[0].length, 3) + assert.equal(this.datalayer._index.length, 1) + }) - it('should allow to transform to lines when not multi', function () { - var latlngs = [ - [[p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)]] - ]; - new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.at('contextmenu', 150, 150); - assert.equal(qst('Transform to lines'), 1); - }); + it('should isolate multipolygon shape', function () { + var latlngs = [ + [ + [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], + [p2ll(120, 150), p2ll(150, 180), p2ll(180, 120)], + ], + [[p2ll(200, 300), p2ll(300, 200)]], + ], + layer = new L.U.Polygon(this.map, latlngs, { datalayer: this.datalayer }).addTo( + this.datalayer + ) + assert.equal(this.datalayer._index.length, 1) + assert.ok(this.map.hasLayer(layer)) + var other = layer.isolateShape(p2ll(150, 150)) + assert.equal(this.datalayer._index.length, 2) + assert.equal(other._latlngs.length, 2) + assert.deepEqual(other._latlngs[0], latlngs[0][0]) + assert.ok(this.map.hasLayer(layer)) + assert.ok(this.map.hasLayer(other)) + assert.equal(layer._latlngs.length, 1) + other.remove() + }) + }) - it('should not allow to transfer shape when not editedFeature', function () { - new L.U.Polygon(this.map, [p2ll(100, 150), p2ll(100, 200), p2ll(200, 150)], {datalayer: this.datalayer}).addTo(this.datalayer); - happen.at('contextmenu', 110, 160); - assert.equal(qst('Delete this feature'), 1); // Make sure we have right clicked on the polygon. - assert.notOk(qst('Transfer shape to edited feature')); - }); - - it('should not allow to transfer shape when editedFeature is not a polygon', function () { - var layer = new L.U.Polygon(this.map, [p2ll(100, 150), p2ll(100, 200), p2ll(200, 150)], {datalayer: this.datalayer}).addTo(this.datalayer), - other = new L.U.Polyline(this.map, [p2ll(200, 250), p2ll(200, 300)], {datalayer: this.datalayer}).addTo(this.datalayer); - other.edit(); - happen.once(layer._path, {type: 'contextmenu'}); - assert.equal(qst('Delete this feature'), 1); // Make sure we have right clicked on the polygon. - assert.notOk(qst('Transfer shape to edited feature')); - }); - - it('should allow to transfer shape when another polygon is edited', function (done) { - this.datalayer.empty(); - var layer = new L.U.Polygon(this.map, [p2ll(200, 300), p2ll(300, 200), p2ll(200, 100)], {datalayer: this.datalayer}).addTo(this.datalayer); - layer.edit(); // This moves the map to put "other" at the center. - var other = new L.U.Polygon(this.map, [p2ll(100, 150), p2ll(100, 200), p2ll(200, 150)], {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(other._path, {type: 'contextmenu'}); - assert.equal(qst('Transfer shape to edited feature'), 1); - done(); - }); - - }); - - }); - - describe('#addShape', function () { - - it('"add shape" control should not be visible by default', function () { - assert.notOk(qs('.umap-draw-polygon-multi')); - }); - - it('"add shape" control should be visible when editing a Polygon', function () { - var layer = new L.U.Polygon(this.map, [p2ll(100, 100), p2ll(100, 200)], {datalayer: this.datalayer}).addTo(this.datalayer); - layer.edit(); - assert.ok(qs('.umap-draw-polygon-multi')); - }); - - it('"add shape" control should extend the same multi', function () { - var layer = new L.U.Polygon(this.map, [p2ll(100, 150), p2ll(150, 200), p2ll(200, 100)], {datalayer: this.datalayer}).addTo(this.datalayer); - layer.edit(); - assert.notOk(layer.isMulti()); - happen.click(qs('.umap-draw-polygon-multi')); - happen.at('mousemove', 300, 300); - happen.at('click', 300, 300); - happen.at('mousemove', 350, 300); - happen.at('click', 350, 300); - happen.at('click', 350, 300); - assert.ok(layer.isMulti()); - assert.equal(this.datalayer._index.length, 1); - }); - - }); - - describe('#transferShape', function () { - - it('should transfer simple polygon shape to another polygon', function () { - var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], - layer = new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer), - other = new L.U.Polygon(this.map, [p2ll(200, 350), p2ll(200, 300), p2ll(300, 200)], {datalayer: this.datalayer}).addTo(this.datalayer); - assert.ok(this.map.hasLayer(layer)); - layer.transferShape(p2ll(150, 150), other); - assert.equal(other._latlngs.length, 2); - assert.deepEqual(other._latlngs[1][0], latlngs); - assert.notOk(this.map.hasLayer(layer)); - }); - - it('should transfer multipolygon shape to another polygon', function () { - var latlngs = [ - [ - [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], - [p2ll(120, 150), p2ll(150, 180), p2ll(180, 120)] - ], - [[p2ll(200, 300), p2ll(300, 200)]] - ], - layer = new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer), - other = new L.U.Polygon(this.map, [p2ll(200, 350), p2ll(200, 300), p2ll(300, 200)], {datalayer: this.datalayer}).addTo(this.datalayer); - assert.ok(this.map.hasLayer(layer)); - layer.transferShape(p2ll(150, 150), other); - assert.equal(other._latlngs.length, 2); - assert.deepEqual(other._latlngs[1][0], latlngs[0][0]); - assert.ok(this.map.hasLayer(layer)); - assert.equal(layer._latlngs.length, 1); - }); - - }); - - describe('#isolateShape', function () { - - it('should not allow to isolate simple polygon', function () { - var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], - layer = new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - assert.equal(this.datalayer._index.length, 1); - assert.ok(this.map.hasLayer(layer)); - layer.isolateShape(p2ll(150, 150)); - assert.equal(layer._latlngs[0].length, 3); - assert.equal(this.datalayer._index.length, 1); - }); - - it('should isolate multipolygon shape', function () { - var latlngs = [ - [ - [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], - [p2ll(120, 150), p2ll(150, 180), p2ll(180, 120)] - ], - [[p2ll(200, 300), p2ll(300, 200)]] - ], - layer = new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - assert.equal(this.datalayer._index.length, 1); - assert.ok(this.map.hasLayer(layer)); - var other = layer.isolateShape(p2ll(150, 150)); - assert.equal(this.datalayer._index.length, 2); - assert.equal(other._latlngs.length, 2); - assert.deepEqual(other._latlngs[0], latlngs[0][0]); - assert.ok(this.map.hasLayer(layer)); - assert.ok(this.map.hasLayer(other)); - assert.equal(layer._latlngs.length, 1); - other.remove(); - }); - - }); - - describe('#clone', function () { - - it('should clone polygon', function () { - var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], - layer = new L.U.Polygon(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - assert.equal(this.datalayer._index.length, 1); - other = layer.clone(); - assert.ok(this.map.hasLayer(other)); - assert.equal(this.datalayer._index.length, 2); - // Must not be the same reference - assert.notEqual(layer._latlngs, other._latlngs); - assert.equal(L.Util.formatNum(layer._latlngs[0][0].lat), other._latlngs[0][0].lat); - assert.equal(L.Util.formatNum(layer._latlngs[0][0].lng), other._latlngs[0][0].lng); - }); - - }); - -}); + describe('#clone', function () { + it('should clone polygon', function () { + var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], + layer = new L.U.Polygon(this.map, latlngs, { datalayer: this.datalayer }).addTo( + this.datalayer + ) + assert.equal(this.datalayer._index.length, 1) + other = layer.clone() + assert.ok(this.map.hasLayer(other)) + assert.equal(this.datalayer._index.length, 2) + // Must not be the same reference + assert.notEqual(layer._latlngs, other._latlngs) + assert.equal(L.Util.formatNum(layer._latlngs[0][0].lat), other._latlngs[0][0].lat) + assert.equal(L.Util.formatNum(layer._latlngs[0][0].lng), other._latlngs[0][0].lng) + }) + }) +}) diff --git a/umap/static/umap/test/Polyline.js b/umap/static/umap/test/Polyline.js index c92b19d0..8e8d4607 100644 --- a/umap/static/umap/test/Polyline.js +++ b/umap/static/umap/test/Polyline.js @@ -1,326 +1,400 @@ describe('L.Utorage.Polyline', function () { - var p2ll, map; + var p2ll, map - before(function () { - this.map = map = initMap({umap_id: 99}); - enableEdit(); - p2ll = function (x, y) { - return map.containerPointToLatLng([x, y]); - }; - this.datalayer = this.map.createDataLayer(); - this.datalayer.connectToMap();; - }); + before(function () { + this.map = map = initMap({ umap_id: 99 }) + enableEdit() + p2ll = function (x, y) { + return map.containerPointToLatLng([x, y]) + } + this.datalayer = this.map.createDataLayer() + this.datalayer.connectToMap() + }) - after(function () { - clickCancel(); - resetMap(); - }); + after(function () { + clickCancel() + resetMap() + }) + afterEach(function () { + this.datalayer.empty() + }) + + describe('#isMulti()', function () { + it('should return false for basic Polyline', function () { + var layer = new L.U.Polyline( + this.map, + [ + [1, 2], + [3, 4], + [5, 6], + ], + { datalayer: this.datalayer } + ) + assert.notOk(layer.isMulti()) + }) + + it('should return false for nested basic Polyline', function () { + var layer = new L.U.Polyline( + this.map, + [ + [ + [1, 2], + [3, 4], + [5, 6], + ], + ], + { datalayer: this.datalayer } + ) + assert.notOk(layer.isMulti()) + }) + + it('should return true for multi Polyline', function () { + var latLngs = [ + [ + [ + [1, 2], + [3, 4], + [5, 6], + ], + ], + [ + [ + [7, 8], + [9, 10], + [11, 12], + ], + ], + ] + var layer = new L.U.Polyline(this.map, latLngs, { datalayer: this.datalayer }) + assert.ok(layer.isMulti()) + }) + }) + + describe('#contextmenu', function () { afterEach(function () { - this.datalayer.empty(); - }); + // Make sure contextmenu is hidden. + happen.once(document, { type: 'keydown', keyCode: 27 }) + }) - describe('#isMulti()', function () { + describe('#in edit mode', function () { + it('should allow to remove shape when multi', function () { + var latlngs = [ + [p2ll(100, 100), p2ll(100, 200)], + [p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)], + ], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.equal(qst('Remove shape from the multi'), 1) + }) - it('should return false for basic Polyline', function () { - var layer = new L.U.Polyline(this.map, [[1, 2], [3, 4], [5, 6]], {datalayer: this.datalayer}); - assert.notOk(layer.isMulti()) - }); + it('should not allow to remove shape when not multi', function () { + var latlngs = [[p2ll(100, 100), p2ll(100, 200)]], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.notOk(qst('Remove shape from the multi')) + }) - it('should return false for nested basic Polyline', function () { - var layer = new L.U.Polyline(this.map, [[[1, 2], [3, 4], [5, 6]]], {datalayer: this.datalayer}); - assert.notOk(layer.isMulti()) - }); + it('should not allow to isolate shape when not multi', function () { + var latlngs = [[p2ll(100, 100), p2ll(100, 200)]], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.notOk(qst('Extract shape to separate feature')) + }) - it('should return true for multi Polyline', function () { - var latLngs = [ - [ - [[1, 2], [3, 4], [5, 6]] - ], - [ - [[7, 8], [9, 10], [11, 12]] - ] - ]; - var layer = new L.U.Polyline(this.map, latLngs, {datalayer: this.datalayer}); - assert.ok(layer.isMulti()) - }); + it('should allow to isolate shape when multi', function () { + var latlngs = [ + [p2ll(100, 150), p2ll(100, 200)], + [p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)], + ], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.ok(qst('Extract shape to separate feature')) + }) - }); + it('should not allow to transform to polygon when multi', function () { + var latlngs = [ + [p2ll(100, 150), p2ll(100, 200)], + [p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)], + ], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.notOk(qst('Transform to polygon')) + }) - describe('#contextmenu', function () { + it('should allow to transform to polygon when not multi', function () { + var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.equal(qst('Transform to polygon'), 1) + }) - afterEach(function () { - // Make sure contextmenu is hidden. - happen.once(document, {type: 'keydown', keyCode: 27}); - }); + it('should not allow to transfer shape when not editedFeature', function () { + var layer = new L.U.Polyline(this.map, [p2ll(100, 150), p2ll(100, 200)], { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.notOk(qst('Transfer shape to edited feature')) + }) - describe('#in edit mode', function () { + it('should not allow to transfer shape when editedFeature is not a line', function () { + var layer = new L.U.Polyline(this.map, [p2ll(100, 150), p2ll(100, 200)], { + datalayer: this.datalayer, + }).addTo(this.datalayer), + other = new L.U.Polygon( + this.map, + [p2ll(200, 300), p2ll(300, 200), p2ll(200, 100)], + { datalayer: this.datalayer } + ).addTo(this.datalayer) + other.edit() + happen.once(layer._path, { type: 'contextmenu' }) + assert.notOk(qst('Transfer shape to edited feature')) + }) - it('should allow to remove shape when multi', function () { - var latlngs = [ - [p2ll(100, 100), p2ll(100, 200)], - [p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)] - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}) - assert.equal(qst('Remove shape from the multi'), 1); - }); + it('should allow to transfer shape when another line is edited', function () { + var layer = new L.U.Polyline( + this.map, + [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], + { datalayer: this.datalayer } + ).addTo(this.datalayer), + other = new L.U.Polyline(this.map, [p2ll(200, 300), p2ll(300, 200)], { + datalayer: this.datalayer, + }).addTo(this.datalayer) + other.edit() + happen.once(layer._path, { type: 'contextmenu' }) + assert.equal(qst('Transfer shape to edited feature'), 1) + }) - it('should not allow to remove shape when not multi', function () { - var latlngs = [ - [p2ll(100, 100), p2ll(100, 200)] - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}) - assert.notOk(qst('Remove shape from the multi')); - }); + it('should allow to merge lines when multi', function () { + var latlngs = [ + [p2ll(100, 100), p2ll(100, 200)], + [p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)], + ], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.equal(qst('Merge lines'), 1) + }) - it('should not allow to isolate shape when not multi', function () { - var latlngs = [ - [p2ll(100, 100), p2ll(100, 200)] - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}) - assert.notOk(qst('Extract shape to separate feature')); - }); + it('should not allow to merge lines when not multi', function () { + var latlngs = [[p2ll(100, 100), p2ll(100, 200)]], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + happen.once(layer._path, { type: 'contextmenu' }) + assert.notOk(qst('Merge lines')) + }) - it('should allow to isolate shape when multi', function () { - var latlngs = [ - [p2ll(100, 150), p2ll(100, 200)], - [p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)] - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}); - assert.ok(qst('Extract shape to separate feature')); - }); + it('should allow to split lines when clicking on vertex', function () { + var latlngs = [[p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)]], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + layer.enableEdit() + happen.at('contextmenu', 350, 400) + assert.equal(qst('Split line'), 1) + }) - it('should not allow to transform to polygon when multi', function () { - var latlngs = [ - [p2ll(100, 150), p2ll(100, 200)], - [p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)] - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}); - assert.notOk(qst('Transform to polygon')); - }); + it('should not allow to split lines when clicking on first vertex', function () { + var latlngs = [[p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)]], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + layer.enableEdit() + happen.at('contextmenu', 300, 350) + assert.equal(qst('Delete this feature'), 1) // Make sure we have clicked on the vertex. + assert.notOk(qst('Split line')) + }) - it('should allow to transform to polygon when not multi', function () { - var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}); - assert.equal(qst('Transform to polygon'), 1); - }); + it('should not allow to split lines when clicking on last vertex', function () { + var latlngs = [[p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)]], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + layer.enableEdit() + happen.at('contextmenu', 400, 300) + assert.equal(qst('Delete this feature'), 1) // Make sure we have clicked on the vertex. + assert.notOk(qst('Split line')) + }) + }) + }) - it('should not allow to transfer shape when not editedFeature', function () { - var layer = new L.U.Polyline(this.map, [p2ll(100, 150), p2ll(100, 200)], {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}); - assert.notOk(qst('Transfer shape to edited feature')); - }); + describe('#addShape', function () { + it('"add shape" control should not be visible by default', function () { + assert.notOk(qs('.umap-draw-polyline-multi')) + }) - it('should not allow to transfer shape when editedFeature is not a line', function () { - var layer = new L.U.Polyline(this.map, [p2ll(100, 150), p2ll(100, 200)], {datalayer: this.datalayer}).addTo(this.datalayer), - other = new L.U.Polygon(this.map, [p2ll(200, 300), p2ll(300, 200), p2ll(200, 100)], {datalayer: this.datalayer}).addTo(this.datalayer); - other.edit(); - happen.once(layer._path, {type: 'contextmenu'}); - assert.notOk(qst('Transfer shape to edited feature')); - }); + it('"add shape" control should be visible when editing a Polyline', function () { + var layer = new L.U.Polyline(this.map, [p2ll(100, 100), p2ll(100, 200)], { + datalayer: this.datalayer, + }).addTo(this.datalayer) + layer.edit() + assert.ok(qs('.umap-draw-polyline-multi')) + }) - it('should allow to transfer shape when another line is edited', function () { - var layer = new L.U.Polyline(this.map, [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], {datalayer: this.datalayer}).addTo(this.datalayer), - other = new L.U.Polyline(this.map, [p2ll(200, 300), p2ll(300, 200)], {datalayer: this.datalayer}).addTo(this.datalayer); - other.edit(); - happen.once(layer._path, {type: 'contextmenu'}); - assert.equal(qst('Transfer shape to edited feature'), 1); - }); + it('"add shape" control should extend the same multi', function () { + var layer = new L.U.Polyline(this.map, [p2ll(100, 100), p2ll(100, 200)], { + datalayer: this.datalayer, + }).addTo(this.datalayer) + layer.edit() + assert.notOk(layer.isMulti()) + happen.click(qs('.umap-draw-polyline-multi')) + happen.at('mousemove', 300, 300) + happen.at('click', 300, 300) + happen.at('mousemove', 350, 300) + happen.at('click', 350, 300) + happen.at('click', 350, 300) + assert.ok(layer.isMulti()) + assert.equal(this.datalayer._index.length, 1) + }) + }) - it('should allow to merge lines when multi', function () { - var latlngs = [ - [p2ll(100, 100), p2ll(100, 200)], - [p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)] - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}) - assert.equal(qst('Merge lines'), 1); - }); + describe('#transferShape', function () { + it('should transfer simple line shape to another line', function () { + var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer), + other = new L.U.Polyline(this.map, [p2ll(200, 300), p2ll(300, 200)], { + datalayer: this.datalayer, + }).addTo(this.datalayer) + assert.ok(this.map.hasLayer(layer)) + layer.transferShape(p2ll(150, 150), other) + assert.equal(other._latlngs.length, 2) + assert.deepEqual(other._latlngs[1], latlngs) + assert.notOk(this.map.hasLayer(layer)) + }) - it('should not allow to merge lines when not multi', function () { - var latlngs = [ - [p2ll(100, 100), p2ll(100, 200)] - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - happen.once(layer._path, {type: 'contextmenu'}) - assert.notOk(qst('Merge lines')); - }); + it('should transfer multi line shape to another line', function () { + var latlngs = [ + [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], + [p2ll(200, 300), p2ll(300, 200)], + ], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer), + other = new L.U.Polyline(this.map, [p2ll(250, 300), p2ll(350, 200)], { + datalayer: this.datalayer, + }).addTo(this.datalayer) + assert.ok(this.map.hasLayer(layer)) + layer.transferShape(p2ll(150, 150), other) + assert.equal(other._latlngs.length, 2) + assert.deepEqual(other._latlngs[1], latlngs[0]) + assert.ok(this.map.hasLayer(layer)) + assert.equal(layer._latlngs.length, 1) + }) + }) - it('should allow to split lines when clicking on vertex', function () { - var latlngs = [ - [p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)] - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - layer.enableEdit(); - happen.at('contextmenu', 350, 400); - assert.equal(qst('Split line'), 1); - }); + describe('#mergeShapes', function () { + it('should remove duplicated join point when merging', function () { + var latlngs = [ + [ + [0, 0], + [0, 1], + ], + [ + [0, 1], + [0, 2], + ], + ], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + layer.mergeShapes() + layer.disableEdit() // Remove vertex from latlngs to compare them. + assert.deepEqual(layer.getLatLngs(), [ + L.latLng([0, 0]), + L.latLng([0, 1]), + L.latLng([0, 2]), + ]) + assert(this.map.isDirty) + }) - it('should not allow to split lines when clicking on first vertex', function () { - var latlngs = [ - [p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)] - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - layer.enableEdit(); - happen.at('contextmenu', 300, 350); - assert.equal(qst('Delete this feature'), 1); // Make sure we have clicked on the vertex. - assert.notOk(qst('Split line')); - }); + it('should revert candidate if first point is closer', function () { + var latlngs = [ + [ + [0, 0], + [0, 1], + ], + [ + [0, 2], + [0, 1], + ], + ], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + layer.mergeShapes() + layer.disableEdit() + assert.deepEqual(layer.getLatLngs(), [ + L.latLng([0, 0]), + L.latLng([0, 1]), + L.latLng([0, 2]), + ]) + }) + }) - it('should not allow to split lines when clicking on last vertex', function () { - var latlngs = [ - [p2ll(300, 350), p2ll(350, 400), p2ll(400, 300)] - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - layer.enableEdit(); - happen.at('contextmenu', 400, 300); - assert.equal(qst('Delete this feature'), 1); // Make sure we have clicked on the vertex. - assert.notOk(qst('Split line')); - }); + describe('#isolateShape', function () { + it('should not allow to isolate simple line', function () { + var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + assert.equal(this.datalayer._index.length, 1) + assert.ok(this.map.hasLayer(layer)) + layer.isolateShape(p2ll(150, 150)) + assert.equal(layer._latlngs.length, 3) + assert.equal(this.datalayer._index.length, 1) + }) - }); + it('should isolate multipolyline shape', function () { + var latlngs = [ + [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], + [[p2ll(200, 300), p2ll(300, 200)]], + ], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + assert.equal(this.datalayer._index.length, 1) + assert.ok(this.map.hasLayer(layer)) + var other = layer.isolateShape(p2ll(150, 150)) + assert.equal(this.datalayer._index.length, 2) + assert.equal(other._latlngs.length, 3) + assert.deepEqual(other._latlngs, latlngs[0]) + assert.ok(this.map.hasLayer(layer)) + assert.ok(this.map.hasLayer(other)) + assert.equal(layer._latlngs.length, 1) + other.remove() + }) + }) - }); - - describe('#addShape', function () { - - it('"add shape" control should not be visible by default', function () { - assert.notOk(qs('.umap-draw-polyline-multi')); - }); - - it('"add shape" control should be visible when editing a Polyline', function () { - var layer = new L.U.Polyline(this.map, [p2ll(100, 100), p2ll(100, 200)], {datalayer: this.datalayer}).addTo(this.datalayer); - layer.edit(); - assert.ok(qs('.umap-draw-polyline-multi')); - }); - - it('"add shape" control should extend the same multi', function () { - var layer = new L.U.Polyline(this.map, [p2ll(100, 100), p2ll(100, 200)], {datalayer: this.datalayer}).addTo(this.datalayer); - layer.edit(); - assert.notOk(layer.isMulti()); - happen.click(qs('.umap-draw-polyline-multi')); - happen.at('mousemove', 300, 300); - happen.at('click', 300, 300); - happen.at('mousemove', 350, 300); - happen.at('click', 350, 300); - happen.at('click', 350, 300); - assert.ok(layer.isMulti()); - assert.equal(this.datalayer._index.length, 1); - }); - - }); - - describe('#transferShape', function () { - - it('should transfer simple line shape to another line', function () { - var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer), - other = new L.U.Polyline(this.map, [p2ll(200, 300), p2ll(300, 200)], {datalayer: this.datalayer}).addTo(this.datalayer); - assert.ok(this.map.hasLayer(layer)); - layer.transferShape(p2ll(150, 150), other); - assert.equal(other._latlngs.length, 2); - assert.deepEqual(other._latlngs[1], latlngs); - assert.notOk(this.map.hasLayer(layer)); - }); - - it('should transfer multi line shape to another line', function () { - var latlngs = [ - [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], - [p2ll(200, 300), p2ll(300, 200)] - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer), - other = new L.U.Polyline(this.map, [p2ll(250, 300), p2ll(350, 200)], {datalayer: this.datalayer}).addTo(this.datalayer); - assert.ok(this.map.hasLayer(layer)); - layer.transferShape(p2ll(150, 150), other); - assert.equal(other._latlngs.length, 2); - assert.deepEqual(other._latlngs[1], latlngs[0]); - assert.ok(this.map.hasLayer(layer)); - assert.equal(layer._latlngs.length, 1); - }); - - }); - - describe('#mergeShapes', function () { - - it('should remove duplicated join point when merging', function () { - var latlngs = [ - [[0, 0], [0, 1]], - [[0, 1], [0, 2]], - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - layer.mergeShapes(); - layer.disableEdit(); // Remove vertex from latlngs to compare them. - assert.deepEqual(layer.getLatLngs(), [L.latLng([0, 0]), L.latLng([0, 1]), L.latLng([0, 2])]); - assert(this.map.isDirty); - }); - - it('should revert candidate if first point is closer', function () { - var latlngs = [ - [[0, 0], [0, 1]], - [[0, 2], [0, 1]], - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - layer.mergeShapes(); - layer.disableEdit(); - assert.deepEqual(layer.getLatLngs(), [L.latLng([0, 0]), L.latLng([0, 1]), L.latLng([0, 2])]); - }); - - }); - - - describe('#isolateShape', function () { - - it('should not allow to isolate simple line', function () { - var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - assert.equal(this.datalayer._index.length, 1); - assert.ok(this.map.hasLayer(layer)); - layer.isolateShape(p2ll(150, 150)); - assert.equal(layer._latlngs.length, 3); - assert.equal(this.datalayer._index.length, 1); - }); - - it('should isolate multipolyline shape', function () { - var latlngs = [ - [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], - [[p2ll(200, 300), p2ll(300, 200)]] - ], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - assert.equal(this.datalayer._index.length, 1); - assert.ok(this.map.hasLayer(layer)); - var other = layer.isolateShape(p2ll(150, 150)); - assert.equal(this.datalayer._index.length, 2); - assert.equal(other._latlngs.length, 3); - assert.deepEqual(other._latlngs, latlngs[0]); - assert.ok(this.map.hasLayer(layer)); - assert.ok(this.map.hasLayer(other)); - assert.equal(layer._latlngs.length, 1); - other.remove(); - }); - - }); - - describe('#clone', function () { - - it('should clone polyline', function () { - var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], - layer = new L.U.Polyline(this.map, latlngs, {datalayer: this.datalayer}).addTo(this.datalayer); - assert.equal(this.datalayer._index.length, 1); - other = layer.clone(); - assert.ok(this.map.hasLayer(other)); - assert.equal(this.datalayer._index.length, 2); - // Must not be the same reference - assert.notEqual(layer._latlngs, other._latlngs); - assert.equal(L.Util.formatNum(layer._latlngs[0].lat), other._latlngs[0].lat); - assert.equal(L.Util.formatNum(layer._latlngs[0].lng), other._latlngs[0].lng); - }); - - }); - -}); + describe('#clone', function () { + it('should clone polyline', function () { + var latlngs = [p2ll(100, 150), p2ll(100, 200), p2ll(200, 100)], + layer = new L.U.Polyline(this.map, latlngs, { + datalayer: this.datalayer, + }).addTo(this.datalayer) + assert.equal(this.datalayer._index.length, 1) + other = layer.clone() + assert.ok(this.map.hasLayer(other)) + assert.equal(this.datalayer._index.length, 2) + // Must not be the same reference + assert.notEqual(layer._latlngs, other._latlngs) + assert.equal(L.Util.formatNum(layer._latlngs[0].lat), other._latlngs[0].lat) + assert.equal(L.Util.formatNum(layer._latlngs[0].lng), other._latlngs[0].lng) + }) + }) +}) diff --git a/umap/static/umap/test/TableEditor.js b/umap/static/umap/test/TableEditor.js index 6672c16a..5036a407 100644 --- a/umap/static/umap/test/TableEditor.js +++ b/umap/static/umap/test/TableEditor.js @@ -1,94 +1,100 @@ describe('L.TableEditor', function () { - var path = '/map/99/datalayer/edit/62/'; + var path = '/map/99/datalayer/edit/62/' + + before(function () { + this.server = sinon.fakeServer.create() + this.server.respondWith( + /\/datalayer\/62\/\?.*/, + JSON.stringify(RESPONSES.datalayer62_GET) + ) + this.map = initMap({ umap_id: 99 }) + this.datalayer = this.map.getDataLayerByUmapId(62) + this.server.respond() + enableEdit() + }) + after(function () { + clickCancel() + this.server.restore() + resetMap() + }) + + describe('#open()', function () { + var button + + it('should exist table click on edit mode', function () { + button = qs( + '#browse_data_toggle_' + L.stamp(this.datalayer) + ' .layer-table-edit' + ) + expect(button).to.be.ok + }) + + it('should open table button click', function () { + happen.click(button) + expect(qs('#umap-ui-container div.table')).to.be.ok + expect(qsa('#umap-ui-container div.table form').length).to.eql(3) // One per feature. + expect(qsa('#umap-ui-container div.table input').length).to.eql(3) // One per feature and per property. + }) + }) + describe('#properties()', function () { + var feature before(function () { - this.server = sinon.fakeServer.create(); - this.server.respondWith('GET', '/datalayer/62/', JSON.stringify(RESPONSES.datalayer62_GET)); - this.map = initMap({umap_id: 99}); - this.datalayer = this.map.getDataLayerByUmapId(62); - this.server.respond(); - enableEdit(); - }); - after(function () { - clickCancel(); - this.server.restore(); - resetMap(); - }); + var firstIndex = this.datalayer._index[0] + feature = this.datalayer._layers[firstIndex] + }) - describe('#open()', function () { - var button; + it('should create new property column', function () { + var newPrompt = function () { + return 'newprop' + } + var oldPrompt = window.prompt + window.prompt = newPrompt + var button = qs('#umap-ui-container .add-property') + expect(button).to.be.ok + happen.click(button) + expect(qsa('#umap-ui-container div.table input').length).to.eql(6) // One per feature and per property. + window.prompt = oldPrompt + }) - it('should exist table click on edit mode', function () { - button = qs('#browse_data_toggle_' + L.stamp(this.datalayer) + ' .layer-table-edit'); - expect(button).to.be.ok; - }); + it('should populate feature property on fill', function () { + var input = qs( + 'form#umap-feature-properties_' + L.stamp(feature) + ' input[name=newprop]' + ) + changeInputValue(input, 'the value') + expect(feature.properties.newprop).to.eql('the value') + }) - it('should open table button click', function () { - happen.click(button); - expect(qs('#umap-ui-container div.table')).to.be.ok; - expect(qsa('#umap-ui-container div.table form').length).to.eql(3); // One per feature. - expect(qsa('#umap-ui-container div.table input').length).to.eql(3); // One per feature and per property. - }); + it('should update property name on update click', function () { + var newPrompt = function () { + return 'newname' + } + var oldPrompt = window.prompt + window.prompt = newPrompt + var button = qs('#umap-ui-container div.thead div.tcell:last-of-type .umap-edit') + expect(button).to.be.ok + happen.click(button) + expect(qsa('#umap-ui-container div.table input').length).to.eql(6) + expect(feature.properties.newprop).to.be.undefined + expect(feature.properties.newname).to.eql('the value') + window.prompt = oldPrompt + }) - }); - describe('#properties()', function () { - var feature; - - before(function () { - var firstIndex = this.datalayer._index[0]; - feature = this.datalayer._layers[firstIndex]; - }); - - it('should create new property column', function () { - var newPrompt = function () { - return 'newprop'; - }; - var oldPrompt = window.prompt; - window.prompt = newPrompt; - var button = qs('#umap-ui-container .add-property'); - expect(button).to.be.ok; - happen.click(button); - expect(qsa('#umap-ui-container div.table input').length).to.eql(6); // One per feature and per property. - window.prompt = oldPrompt; - }); - - it('should populate feature property on fill', function () { - var input = qs('form#umap-feature-properties_' + L.stamp(feature) + ' input[name=newprop]'); - changeInputValue(input, 'the value'); - expect(feature.properties.newprop).to.eql('the value'); - }); - - it('should update property name on update click', function () { - var newPrompt = function () { - return 'newname'; - }; - var oldPrompt = window.prompt; - window.prompt = newPrompt; - var button = qs('#umap-ui-container div.thead div.tcell:last-of-type .umap-edit'); - expect(button).to.be.ok; - happen.click(button); - expect(qsa('#umap-ui-container div.table input').length).to.eql(6); - expect(feature.properties.newprop).to.be.undefined; - expect(feature.properties.newname).to.eql('the value'); - window.prompt = oldPrompt; - }); - - it('should update property on delete click', function () { - var oldConfirm, - newConfirm = function () { - return true; - }; - oldConfirm = window.confirm; - window.confirm = newConfirm; - var button = qs('#umap-ui-container div.thead div.tcell:last-of-type .umap-delete'); - expect(button).to.be.ok; - happen.click(button); - FEATURE = feature; - expect(qsa('#umap-ui-container div.table input').length).to.eql(3); - expect(feature.properties.newname).to.be.undefined; - window.confirm = oldConfirm; - }); - - }); - -}); + it('should update property on delete click', function () { + var oldConfirm, + newConfirm = function () { + return true + } + oldConfirm = window.confirm + window.confirm = newConfirm + var button = qs( + '#umap-ui-container div.thead div.tcell:last-of-type .umap-delete' + ) + expect(button).to.be.ok + happen.click(button) + FEATURE = feature + expect(qsa('#umap-ui-container div.table input').length).to.eql(3) + expect(feature.properties.newname).to.be.undefined + window.confirm = oldConfirm + }) + }) +}) diff --git a/umap/static/umap/test/Util.js b/umap/static/umap/test/Util.js index 04ba27b2..f6e9382d 100644 --- a/umap/static/umap/test/Util.js +++ b/umap/static/umap/test/Util.js @@ -1,285 +1,435 @@ describe('L.Util', function () { - - describe('#toHTML()', function () { - - it('should handle title', function () { - assert.equal(L.Util.toHTML('# A title'), '

    A title

    '); - }); - - it('should handle title in the middle of the content', function () { - assert.equal(L.Util.toHTML('A phrase\n## A title'), 'A phrase
    \n

    A title

    '); - }); - - it('should handle hr', function () { - assert.equal(L.Util.toHTML('---'), '
    '); - }); - - it('should handle bold', function () { - assert.equal(L.Util.toHTML('Some **bold**'), 'Some bold'); - }); - - it('should handle italic', function () { - assert.equal(L.Util.toHTML('Some *italic*'), 'Some italic'); - }); - - it('should handle newlines', function () { - assert.equal(L.Util.toHTML('two\nlines'), 'two
    \nlines'); - }); - - it('should not change last newline', function () { - assert.equal(L.Util.toHTML('two\nlines\n'), 'two
    \nlines\n'); - }); - - it('should handle two successive newlines', function () { - assert.equal(L.Util.toHTML('two\n\nlines\n'), 'two
    \n
    \nlines\n'); - }); - - it('should handle links without formatting', function () { - assert.equal(L.Util.toHTML('A simple http://osm.org link'), 'A simple http://osm.org link'); - }); - - it('should handle simple link in title', function () { - assert.equal(L.Util.toHTML('# http://osm.org'), '

    http://osm.org

    '); - }); - - it('should handle links with url parameter', function () { - assert.equal(L.Util.toHTML('A simple https://osm.org/?url=https%3A//anotherurl.com link'), 'A simple https://osm.org/?url=https%3A//anotherurl.com link'); - }); - - it('should handle simple link inside parenthesis', function () { - assert.equal(L.Util.toHTML('A simple link (http://osm.org)'), 'A simple link (http://osm.org)'); - }); - - it('should handle simple link with formatting', function () { - assert.equal(L.Util.toHTML('A simple [[http://osm.org]] link'), 'A simple http://osm.org link'); - }); - - it('should handle simple link with formatting and content', function () { - assert.equal(L.Util.toHTML('A simple [[http://osm.org|link]]'), 'A simple link'); - }); - - it('should handle simple link followed by a carriage return', function () { - assert.equal(L.Util.toHTML('A simple link http://osm.org\nAnother line'), 'A simple link http://osm.org
    \nAnother line'); - }); - - it('should handle image', function () { - assert.equal(L.Util.toHTML('A simple image: {{http://osm.org/pouet.png}}'), 'A simple image: '); - }); - - it('should handle image without text', function () { - assert.equal(L.Util.toHTML('{{http://osm.org/pouet.png}}'), ''); - }); - - it('should handle image with width', function () { - assert.equal(L.Util.toHTML('A simple image: {{http://osm.org/pouet.png|100}}'), 'A simple image: '); - }); - - it('should handle iframe', function () { - assert.equal(L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html}}}'), 'A simple iframe:
    '); - }); - - it('should handle iframe with height', function () { - assert.equal(L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html|200}}}'), 'A simple iframe:
    '); - }); - - it('should handle iframe with height and width', function () { - assert.equal(L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html|200*400}}}'), 'A simple iframe:
    '); - }); - - it('should handle iframe with height with px', function () { - assert.equal(L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html|200px}}}'), 'A simple iframe:
    '); - }); - - it('should handle iframe with url parameter', function () { - assert.equal(L.Util.toHTML('A simple iframe: {{{https://osm.org/?url=https%3A//anotherurl.com}}}'), 'A simple iframe:
    '); - }); - - it('should handle iframe with height with px', function () { - assert.equal(L.Util.toHTML('A double iframe: {{{https://osm.org/pouet}}}{{{https://osm.org/boudin}}}'), 'A double iframe:
    '); - }); - - it('http link with http link as parameter as variable', function () { - assert.equal(L.Util.toHTML('A phrase with a [[http://iframeurl.com?to=http://another.com]].'), 'A phrase with a http://iframeurl.com?to=http://another.com.'); - }); - - }); - - describe('#escapeHTML', function () { - - it('should escape HTML tags', function () { - assert.equal(L.Util.escapeHTML(''), '<a href="pouet">'); - }); - - it('should not fail with int value', function () { - assert.equal(L.Util.escapeHTML(25), '25'); - }); - - it('should not fail with null value', function () { - assert.equal(L.Util.escapeHTML(null), ''); - }); - - }); - - describe('#greedyTemplate', function () { - - it('should replace simple props', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {variable}.', {variable: 'thing'}), 'A phrase with a thing.'); - }); - - it('should not fail when missing key', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {missing}', {}), 'A phrase with a '); - }); - - it('should process brakets in brakets', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {{{variable}}}.', {variable: 'value'}), 'A phrase with a {{value}}.'); - }); - - it('should not process http links', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {{{http://iframeurl.com}}}.', {'http://iframeurl.com': 'value'}), 'A phrase with a {{{http://iframeurl.com}}}.'); - }); - - it('should not accept dash', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {var-iable}.', {'var-iable': 'value'}), 'A phrase with a {var-iable}.'); - }); - - it('should accept colon', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {variable:fr}.', {'variable:fr': 'value'}), 'A phrase with a value.'); - }); - - it('should replace even with ignore if key is found', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {variable:fr}.', {'variable:fr': 'value'}, true), 'A phrase with a value.'); - }); - - it('should keep string when using ignore if key is not found', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {variable:fr}.', {}, true), 'A phrase with a {variable:fr}.'); - }); - - it('should replace nested variables', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {fr.var}.', {fr: {var: 'value'}}), 'A phrase with a value.'); - }); - - it('should not fail if nested variable is missing', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {fr.var.foo}.', {fr: {var: 'value'}}), 'A phrase with a .'); - }); - - it('should not fail with nested variables and no data', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {fr.var.foo}.', {}), 'A phrase with a .'); - }); - - it('should handle fallback value if any', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {fr.var.bar|"default"}.', {}), 'A phrase with a default.'); - }); - - it('should handle fallback var if any', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {fr.var.bar|fallback}.', {fallback: "default"}), 'A phrase with a default.'); - }); - - it('should handle multiple fallbacks', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {fr.var.bar|try.again|"default"}.', {}), 'A phrase with a default.'); - }); - - it('should use the first defined value', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {fr.var.bar|try.again|"default"}.', {try: { again: 'please'}}), 'A phrase with a please.'); - }); - - it('should use the first defined value', function () { - assert.equal(L.Util.greedyTemplate('A phrase with a {fr.var.bar|try.again|"default"}.', {try: { again: 'again'}, fr: {var: {bar: 'value'}}}), 'A phrase with a value.'); - }); - - it('should support the first example from #820 when translated to final syntax', function () { - assert.equal(L.Util.greedyTemplate('# {name} ({ele|"-"} m ü. M.)', {name: 'Portalet'}), '# Portalet (- m ü. M.)'); - }); - - it('should support the first example from #820 when translated to final syntax when no fallback required', function () { - assert.equal(L.Util.greedyTemplate('# {name} ({ele|"-"} m ü. M.)', {name: 'Portalet', ele: 3344}), '# Portalet (3344 m ü. M.)'); - }); - - it('should support white space in fallback', function () { - assert.equal(L.Util.greedyTemplate('A phrase with {var|"white space in the fallback."}', {}), 'A phrase with white space in the fallback.'); - }); - - it('should support empty string as fallback', function () { - assert.equal(L.Util.greedyTemplate('A phrase with empty string ("{var|""}") in the fallback.', {}), 'A phrase with empty string ("") in the fallback.'); - }); - - it('should support e.g. links as fallback', function () { - assert.equal(L.Util.greedyTemplate('A phrase with {var|"[[https://osm.org|link]]"} as fallback.', {}), 'A phrase with [[https://osm.org|link]] as fallback.'); - }); - }); - - describe('#TextColorFromBackgroundColor', function () { - - it('should output white for black', function () { - document.body.style.backgroundColor = 'black'; - assert.equal(L.DomUtil.TextColorFromBackgroundColor(document.body), '#ffffff'); - }); - - it('should output white for brown', function () { - document.body.style.backgroundColor = 'brown'; - assert.equal(L.DomUtil.TextColorFromBackgroundColor(document.body), '#ffffff'); - }); - - it('should output black for white', function () { - document.body.style.backgroundColor = 'white'; - assert.equal(L.DomUtil.TextColorFromBackgroundColor(document.body), '#000000'); - }); - - it('should output black for tan', function () { - document.body.style.backgroundColor = 'tan'; - assert.equal(L.DomUtil.TextColorFromBackgroundColor(document.body), '#000000'); - }); - - it('should output black by default', function () { - document.body.style.backgroundColor = 'transparent'; - assert.equal(L.DomUtil.TextColorFromBackgroundColor(document.body), '#000000'); - }); - - }); - - - describe('#flattenCoordinates()', function () { - - it('should not alter already flat coords', function () { - var coords = [[1, 2], [3, 4]]; - assert.deepEqual(L.Util.flattenCoordinates(coords), coords); - }) - - it('should flatten nested coords', function () { - var coords = [[[1, 2], [3, 4]]]; - assert.deepEqual(L.Util.flattenCoordinates(coords), coords[0]); - coords = [[[[1, 2], [3, 4]]]]; - assert.deepEqual(L.Util.flattenCoordinates(coords), coords[0][0]); - }) - - it('should not fail on empty coords', function () { - var coords = []; - assert.deepEqual(L.Util.flattenCoordinates(coords), coords); - }) - - }); - - describe('#usableOption()', function () { - - it('should consider false', function () { - assert.ok(L.Util.usableOption({key: false}, 'key')); - }) - - it('should consider 0', function () { - assert.ok(L.Util.usableOption({key: 0}, 'key')); - }) - - it('should not consider undefined', function () { - assert.notOk(L.Util.usableOption({}, 'key')); - }) - - it('should not consider empty string', function () { - assert.notOk(L.Util.usableOption({key: ''}, 'key')); - }) - - it('should consider null', function () { - assert.ok(L.Util.usableOption({key: null}, 'key')); - }) - - }); - -}); + describe('#toHTML()', function () { + it('should handle title', function () { + assert.equal(L.Util.toHTML('# A title'), '

    A title

    ') + }) + + it('should handle title in the middle of the content', function () { + assert.equal( + L.Util.toHTML('A phrase\n## A title'), + 'A phrase
    \n

    A title

    ' + ) + }) + + it('should handle hr', function () { + assert.equal(L.Util.toHTML('---'), '
    ') + }) + + it('should handle bold', function () { + assert.equal(L.Util.toHTML('Some **bold**'), 'Some bold') + }) + + it('should handle italic', function () { + assert.equal(L.Util.toHTML('Some *italic*'), 'Some italic') + }) + + it('should handle newlines', function () { + assert.equal(L.Util.toHTML('two\nlines'), 'two
    \nlines') + }) + + it('should not change last newline', function () { + assert.equal(L.Util.toHTML('two\nlines\n'), 'two
    \nlines\n') + }) + + it('should handle two successive newlines', function () { + assert.equal(L.Util.toHTML('two\n\nlines\n'), 'two
    \n
    \nlines\n') + }) + + it('should handle links without formatting', function () { + assert.equal( + L.Util.toHTML('A simple http://osm.org link'), + 'A simple
    http://osm.org link' + ) + }) + + it('should handle simple link in title', function () { + assert.equal( + L.Util.toHTML('# http://osm.org'), + '

    http://osm.org

    ' + ) + }) + + it('should handle links with url parameter', function () { + assert.equal( + L.Util.toHTML('A simple https://osm.org/?url=https%3A//anotherurl.com link'), + 'A simple https://osm.org/?url=https%3A//anotherurl.com link' + ) + }) + + it('should handle simple link inside parenthesis', function () { + assert.equal( + L.Util.toHTML('A simple link (http://osm.org)'), + 'A simple link (http://osm.org)' + ) + }) + + it('should handle simple link with formatting', function () { + assert.equal( + L.Util.toHTML('A simple [[http://osm.org]] link'), + 'A simple http://osm.org link' + ) + }) + + it('should handle simple link with formatting and content', function () { + assert.equal( + L.Util.toHTML('A simple [[http://osm.org|link]]'), + 'A simple link' + ) + }) + + it('should handle simple link followed by a carriage return', function () { + assert.equal( + L.Util.toHTML('A simple link http://osm.org\nAnother line'), + 'A simple link http://osm.org
    \nAnother line' + ) + }) + + it('should handle image', function () { + assert.equal( + L.Util.toHTML('A simple image: {{http://osm.org/pouet.png}}'), + 'A simple image: ' + ) + }) + + it('should handle image without text', function () { + assert.equal( + L.Util.toHTML('{{http://osm.org/pouet.png}}'), + '' + ) + }) + + it('should handle image with width', function () { + assert.equal( + L.Util.toHTML('A simple image: {{http://osm.org/pouet.png|100}}'), + 'A simple image: ' + ) + }) + + it('should handle iframe', function () { + assert.equal( + L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html}}}'), + 'A simple iframe:
    ' + ) + }) + + it('should handle iframe with height', function () { + assert.equal( + L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html|200}}}'), + 'A simple iframe:
    ' + ) + }) + + it('should handle iframe with height and width', function () { + assert.equal( + L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html|200*400}}}'), + 'A simple iframe:
    ' + ) + }) + + it('should handle iframe with height with px', function () { + assert.equal( + L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html|200px}}}'), + 'A simple iframe:
    ' + ) + }) + + it('should handle iframe with url parameter', function () { + assert.equal( + L.Util.toHTML( + 'A simple iframe: {{{https://osm.org/?url=https%3A//anotherurl.com}}}' + ), + 'A simple iframe:
    ' + ) + }) + + it('should handle iframe with height with px', function () { + assert.equal( + L.Util.toHTML( + 'A double iframe: {{{https://osm.org/pouet}}}{{{https://osm.org/boudin}}}' + ), + 'A double iframe:
    ' + ) + }) + + it('http link with http link as parameter as variable', function () { + assert.equal( + L.Util.toHTML( + 'A phrase with a [[http://iframeurl.com?to=http://another.com]].' + ), + 'A phrase with a http://iframeurl.com?to=http://another.com.' + ) + }) + }) + + describe('#escapeHTML', function () { + it('should escape HTML tags', function () { + assert.equal(L.Util.escapeHTML(''), '') + }) + + it('should not fail with int value', function () { + assert.equal(L.Util.escapeHTML(25), '25') + }) + + it('should not fail with null value', function () { + assert.equal(L.Util.escapeHTML(null), '') + }) + }) + + describe('#greedyTemplate', function () { + it('should replace simple props', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {variable}.', { variable: 'thing' }), + 'A phrase with a thing.' + ) + }) + + it('should not fail when missing key', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {missing}', {}), + 'A phrase with a ' + ) + }) + + it('should process brakets in brakets', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {{{variable}}}.', { variable: 'value' }), + 'A phrase with a {{value}}.' + ) + }) + + it('should not process http links', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {{{http://iframeurl.com}}}.', { + 'http://iframeurl.com': 'value', + }), + 'A phrase with a {{{http://iframeurl.com}}}.' + ) + }) + + it('should not accept dash', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {var-iable}.', { 'var-iable': 'value' }), + 'A phrase with a {var-iable}.' + ) + }) + + it('should accept colon', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {variable:fr}.', { + 'variable:fr': 'value', + }), + 'A phrase with a value.' + ) + }) + + it('should replace even with ignore if key is found', function () { + assert.equal( + L.Util.greedyTemplate( + 'A phrase with a {variable:fr}.', + { 'variable:fr': 'value' }, + true + ), + 'A phrase with a value.' + ) + }) + + it('should keep string when using ignore if key is not found', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {variable:fr}.', {}, true), + 'A phrase with a {variable:fr}.' + ) + }) + + it('should replace nested variables', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {fr.var}.', { fr: { var: 'value' } }), + 'A phrase with a value.' + ) + }) + + it('should not fail if nested variable is missing', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {fr.var.foo}.', { + fr: { var: 'value' }, + }), + 'A phrase with a .' + ) + }) + + it('should not fail with nested variables and no data', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {fr.var.foo}.', {}), + 'A phrase with a .' + ) + }) + + it('should handle fallback value if any', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {fr.var.bar|"default"}.', {}), + 'A phrase with a default.' + ) + }) + + it('should handle fallback var if any', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {fr.var.bar|fallback}.', { + fallback: 'default', + }), + 'A phrase with a default.' + ) + }) + + it('should handle multiple fallbacks', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {fr.var.bar|try.again|"default"}.', {}), + 'A phrase with a default.' + ) + }) + + it('should use the first defined value', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {fr.var.bar|try.again|"default"}.', { + try: { again: 'please' }, + }), + 'A phrase with a please.' + ) + }) + + it('should use the first defined value', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with a {fr.var.bar|try.again|"default"}.', { + try: { again: 'again' }, + fr: { var: { bar: 'value' } }, + }), + 'A phrase with a value.' + ) + }) + + it('should support the first example from #820 when translated to final syntax', function () { + assert.equal( + L.Util.greedyTemplate('# {name} ({ele|"-"} m ü. M.)', { name: 'Portalet' }), + '# Portalet (- m ü. M.)' + ) + }) + + it('should support the first example from #820 when translated to final syntax when no fallback required', function () { + assert.equal( + L.Util.greedyTemplate('# {name} ({ele|"-"} m ü. M.)', { + name: 'Portalet', + ele: 3344, + }), + '# Portalet (3344 m ü. M.)' + ) + }) + + it('should support white space in fallback', function () { + assert.equal( + L.Util.greedyTemplate('A phrase with {var|"white space in the fallback."}', {}), + 'A phrase with white space in the fallback.' + ) + }) + + it('should support empty string as fallback', function () { + assert.equal( + L.Util.greedyTemplate( + 'A phrase with empty string ("{var|""}") in the fallback.', + {} + ), + 'A phrase with empty string ("") in the fallback.' + ) + }) + + it('should support e.g. links as fallback', function () { + assert.equal( + L.Util.greedyTemplate( + 'A phrase with {var|"[[https://osm.org|link]]"} as fallback.', + {} + ), + 'A phrase with [[https://osm.org|link]] as fallback.' + ) + }) + }) + + describe('#TextColorFromBackgroundColor', function () { + it('should output white for black', function () { + document.body.style.backgroundColor = 'black' + assert.equal(L.DomUtil.TextColorFromBackgroundColor(document.body), '#ffffff') + }) + + it('should output white for brown', function () { + document.body.style.backgroundColor = 'brown' + assert.equal(L.DomUtil.TextColorFromBackgroundColor(document.body), '#ffffff') + }) + + it('should output black for white', function () { + document.body.style.backgroundColor = 'white' + assert.equal(L.DomUtil.TextColorFromBackgroundColor(document.body), '#000000') + }) + + it('should output black for tan', function () { + document.body.style.backgroundColor = 'tan' + assert.equal(L.DomUtil.TextColorFromBackgroundColor(document.body), '#000000') + }) + + it('should output black by default', function () { + document.body.style.backgroundColor = 'transparent' + assert.equal(L.DomUtil.TextColorFromBackgroundColor(document.body), '#000000') + }) + }) + + describe('#flattenCoordinates()', function () { + it('should not alter already flat coords', function () { + var coords = [ + [1, 2], + [3, 4], + ] + assert.deepEqual(L.Util.flattenCoordinates(coords), coords) + }) + + it('should flatten nested coords', function () { + var coords = [ + [ + [1, 2], + [3, 4], + ], + ] + assert.deepEqual(L.Util.flattenCoordinates(coords), coords[0]) + coords = [ + [ + [ + [1, 2], + [3, 4], + ], + ], + ] + assert.deepEqual(L.Util.flattenCoordinates(coords), coords[0][0]) + }) + + it('should not fail on empty coords', function () { + var coords = [] + assert.deepEqual(L.Util.flattenCoordinates(coords), coords) + }) + }) + + describe('#usableOption()', function () { + it('should consider false', function () { + assert.ok(L.Util.usableOption({ key: false }, 'key')) + }) + + it('should consider 0', function () { + assert.ok(L.Util.usableOption({ key: 0 }, 'key')) + }) + + it('should not consider undefined', function () { + assert.notOk(L.Util.usableOption({}, 'key')) + }) + + it('should not consider empty string', function () { + assert.notOk(L.Util.usableOption({ key: '' }, 'key')) + }) + + it('should consider null', function () { + assert.ok(L.Util.usableOption({ key: null }, 'key')) + }) + }) +}) diff --git a/umap/static/umap/test/_pre.js b/umap/static/umap/test/_pre.js index 1bd25878..bebefaa1 100644 --- a/umap/static/umap/test/_pre.js +++ b/umap/static/umap/test/_pre.js @@ -1,301 +1,329 @@ -var qs = function (selector, element) {return (element || document).querySelector(selector);}; -var qsa = function (selector) {return document.querySelectorAll(selector);}; +var qs = function (selector, element) { + return (element || document).querySelector(selector) +} +var qsa = function (selector) { + return document.querySelectorAll(selector) +} var qst = function (text, parent) { - // find element by its text content - var r = document.evaluate("descendant::*[contains(text(),'" + text + "')]", parent || qs('#map'), null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null), count = 0; - while(r.iterateNext()) console.log(++count); - return count; -}; + // find element by its text content + var r = document.evaluate( + "descendant::*[contains(text(),'" + text + "')]", + parent || qs('#map'), + null, + XPathResult.UNORDERED_NODE_ITERATOR_TYPE, + null + ), + count = 0 + while (r.iterateNext()) console.log(++count) + return count +} happen.at = function (what, x, y, props) { - this.once(document.elementFromPoint(x, y), L.Util.extend({ + this.once( + document.elementFromPoint(x, y), + L.Util.extend( + { type: what, clientX: x, clientY: y, screenX: x, screenY: y, which: 1, - button: 0 - }, props || {})); -}; + button: 0, + }, + props || {} + ) + ) +} var resetMap = function () { - var mapElement = qs('#map'); - mapElement.innerHTML = 'Done'; - delete mapElement._leaflet_id; - document.body.className = ''; -}; + var mapElement = qs('#map') + mapElement.innerHTML = 'Done' + delete mapElement._leaflet_id + document.body.className = '' +} var enableEdit = function () { - happen.click(qs('div.leaflet-control-edit-enable a')); -}; + happen.click(qs('div.leaflet-control-edit-enable a')) +} var disableEdit = function () { - happen.click(qs('a.leaflet-control-edit-disable')); -}; + happen.click(qs('a.leaflet-control-edit-disable')) +} var clickSave = function () { - happen.click(qs('a.leaflet-control-edit-save')); -}; + happen.click(qs('a.leaflet-control-edit-save')) +} var clickCancel = function () { - var _confirm = window.confirm; - window.confirm = function (text) { - return true; - }; - happen.click(qs('a.leaflet-control-edit-cancel')); - happen.once(document.body, {type: 'keypress', keyCode: 13}); - window.confirm = _confirm; -}; + var _confirm = window.confirm + window.confirm = function (text) { + return true + } + happen.click(qs('a.leaflet-control-edit-cancel')) + happen.once(document.body, { type: 'keypress', keyCode: 13 }) + window.confirm = _confirm +} var changeInputValue = function (input, value) { - input.value = value; - happen.once(input, {type: 'input'}); - happen.once(input, {type: 'blur'}); -}; + input.value = value + happen.once(input, { type: 'input' }) + happen.once(input, { type: 'blur' }) +} var changeSelectValue = function (path_or_select, value) { - if (typeof path_or_select === 'string') path_or_select = qs(path_or_select); - var found = false; - for (var i = 0; i < path_or_select.length; i++) { - if (path_or_select.options[i].value === value) { - path_or_select.options[i].selected = true; - found = true; - } + if (typeof path_or_select === 'string') path_or_select = qs(path_or_select) + var found = false + for (var i = 0; i < path_or_select.length; i++) { + if (path_or_select.options[i].value === value) { + path_or_select.options[i].selected = true + found = true } - happen.once(path_or_select, {type: 'change'}); - if (!found) throw new Error('Value ' + value + 'not found in select ' + path_or_select); - return path_or_select; + } + happen.once(path_or_select, { type: 'change' }) + if (!found) + throw new Error('Value ' + value + 'not found in select ' + path_or_select) + return path_or_select } var cleanAlert = function () { - L.DomUtil.removeClass(qs('#map'), 'umap-alert'); - L.DomUtil.get('umap-alert-container').innerHTML = ''; - UI_ALERT_ID = null; // Prevent setTimeout to be called -}; + L.DomUtil.removeClass(qs('#map'), 'umap-alert') + L.DomUtil.get('umap-alert-container').innerHTML = '' + UI_ALERT_ID = null // Prevent setTimeout to be called +} var defaultDatalayerData = function (custom) { - var _default = { - iconClass: 'Default', - name: 'Elephants', - displayOnLoad: true, - id: 62, - pictogram_url: null, - opacity: null, - weight: null, - fillColor: '', - color: '', - stroke: true, - smoothFactor: null, - dashArray: '', - fillOpacity: null, - fill: true - }; - return L.extend({}, _default, custom); -}; + var _default = { + iconClass: 'Default', + name: 'Elephants', + displayOnLoad: true, + id: 62, + pictogram_url: null, + opacity: null, + weight: null, + fillColor: '', + color: '', + stroke: true, + smoothFactor: null, + dashArray: '', + fillOpacity: null, + fill: true, + } + return L.extend({}, _default, custom) +} -function initMap (options) { - default_options = { - "geometry": { - "type": "Point", - "coordinates": [5.0592041015625, 52.05924589011585] +function initMap(options) { + default_options = { + geometry: { + type: 'Point', + coordinates: [5.0592041015625, 52.05924589011585], + }, + type: 'Feature', + properties: { + umap_id: 42, + datalayers: [], + urls: { + map: '/map/{slug}_{pk}', + datalayer_view: '/datalayer/{pk}/', + map_update: '/map/{map_id}/update/settings/', + map_old_url: '/map/{username}/{slug}/', + map_clone: '/map/{map_id}/update/clone/', + map_short_url: '/m/{pk}/', + map_anonymous_edit_url: '/map/anonymous-edit/{signature}', + map_new: '/map/new/', + datalayer_update: '/map/{map_id}/datalayer/update/{pk}/', + map_delete: '/map/{map_id}/update/delete/', + map_create: '/map/create/', + logout: '/logout/', + datalayer_create: '/map/{map_id}/datalayer/create/', + login_popup_end: '/login/popupd/', + login: '/login/', + datalayer_delete: '/map/{map_id}/datalayer/delete/{pk}/', + datalayer_versions: '/map/{map_id}/datalayer/{pk}/versions/', + datalayer_version: '/datalayer/{pk}/{name}', + pictogram_list_json: '/pictogram/json/', + map_update_permissions: '/map/{map_id}/update/permissions/', + }, + default_iconUrl: '../src/img/marker.png', + zoom: 6, + tilelayers: [ + { + attribution: '\u00a9 OSM Contributors', + name: 'OpenStreetMap', + url_template: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', + minZoom: 0, + maxZoom: 18, + id: 1, + selected: true, }, - "type": "Feature", - "properties": { - "umap_id": 42, - "datalayers": [], - "urls": { - "map": "/map/{slug}_{pk}", - "datalayer_view": "/datalayer/{pk}/", - "map_update": "/map/{map_id}/update/settings/", - "map_old_url": "/map/{username}/{slug}/", - "map_clone": "/map/{map_id}/update/clone/", - "map_short_url": "/m/{pk}/", - "map_anonymous_edit_url": "/map/anonymous-edit/{signature}", - "map_new": "/map/new/", - "datalayer_update": "/map/{map_id}/datalayer/update/{pk}/", - "map_delete": "/map/{map_id}/update/delete/", - "map_create": "/map/create/", - "logout": "/logout/", - "datalayer_create": "/map/{map_id}/datalayer/create/", - "login_popup_end": "/login/popupd/", - "login": "/login/", - "datalayer_delete": "/map/{map_id}/datalayer/delete/{pk}/", - "datalayer_versions": "/map/{map_id}/datalayer/{pk}/versions/", - "datalayer_version": "/datalayer/{pk}/{name}", - "pictogram_list_json": "/pictogram/json/", - "map_update_permissions": "/map/{map_id}/update/permissions/" - }, - "default_iconUrl": "../src/img/marker.png", - "zoom": 6, - "tilelayers": [ - { - "attribution": "\u00a9 OSM Contributors", - "name": "OpenStreetMap", - "url_template": "http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png", - "minZoom": 0, - "maxZoom": 18, - "id": 1, - "selected": true - }, - { - "attribution": "HOT and friends", - "name": "HOT OSM-fr server", - "url_template": "http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png", - "rank": 99, - "minZoom": 0, - "maxZoom": 20, - "id": 2 - }], - "tilelayer": { - "attribution": "HOT and friends", - "name": "HOT OSM-fr server", - "url_template": "http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png", - "rank": 99, - "minZoom": 0, - "maxZoom": 20, - "id": 2 - }, - "licences": { - "No licence set": { - "url": "", - "name": "No licence set" - }, - "Licence ouverte/Open Licence": { - "url": "http://www.data.gouv.fr/Licence-Ouverte-Open-Licence", - "name": "Licence ouverte/Open Licence" - }, - "WTFPL": { - "url": "http://www.wtfpl.net/", - "name": "WTFPL" - }, - "ODbl": { - "url": "http://opendatacommons.org/licenses/odbl/", - "name": "ODbl" - } - }, - "name": "name of the map", - "description": "The description of the map", - "allowEdit": true, - "moreControl": true, - "scaleControl": true, - "miniMap": true, - "datalayersControl": true, - "displayCaptionOnLoad": false, - "displayPopupFooter": false, - "displayDataBrowserOnLoad": false - } - }; - default_options.properties.datalayers.push(defaultDatalayerData()); - options.properties = L.extend({}, default_options.properties, options); - return new L.U.Map("map", options); + { + attribution: 'HOT and friends', + name: 'HOT OSM-fr server', + url_template: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', + rank: 99, + minZoom: 0, + maxZoom: 20, + id: 2, + }, + ], + tilelayer: { + attribution: 'HOT and friends', + name: 'HOT OSM-fr server', + url_template: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', + rank: 99, + minZoom: 0, + maxZoom: 20, + id: 2, + }, + licences: { + 'No licence set': { + url: '', + name: 'No licence set', + }, + 'Licence ouverte/Open Licence': { + url: 'http://www.data.gouv.fr/Licence-Ouverte-Open-Licence', + name: 'Licence ouverte/Open Licence', + }, + 'WTFPL': { + url: 'http://www.wtfpl.net/', + name: 'WTFPL', + }, + 'ODbl': { + url: 'http://opendatacommons.org/licenses/odbl/', + name: 'ODbl', + }, + }, + name: 'name of the map', + description: 'The description of the map', + allowEdit: true, + moreControl: true, + scaleControl: true, + miniMap: true, + datalayersControl: true, + displayCaptionOnLoad: false, + displayPopupFooter: false, + displayDataBrowserOnLoad: false, + }, + } + default_options.properties.datalayers.push(defaultDatalayerData()) + options.properties = L.extend({}, default_options.properties, options) + return new L.U.Map('map', options) } var RESPONSES = { - 'datalayer62_GET': { - "crs": null, - "type": "FeatureCollection", - "_umap_options": defaultDatalayerData(), - "features": [{ - "geometry": { - "type": "Point", - "coordinates": [-0.274658203125, 52.57634993749885] - }, - "type": "Feature", - "id": 1807, - "properties": {_umap_options: {color: "OliveDrab"}, name: "test"} + datalayer62_GET: { + crs: null, + type: 'FeatureCollection', + _umap_options: defaultDatalayerData(), + features: [ + { + geometry: { + type: 'Point', + coordinates: [-0.274658203125, 52.57634993749885], }, - { - "geometry": { - "type": "LineString", - "coordinates": [[-0.5712890625, 54.47642158429295], [0.439453125, 54.610254981579146], [1.724853515625, 53.44880683542759], [4.163818359375, 53.98839506479995], [5.306396484375, 53.533778184257805], [6.591796875, 53.70971358510174], [7.042236328124999, 53.35055131839989]] - }, - "type": "Feature", - "id": 20, "properties": {"_umap_options": {"fill": false}, "name": "test"} + type: 'Feature', + id: 1807, + properties: { _umap_options: { color: 'OliveDrab' }, name: 'test' }, + }, + { + geometry: { + type: 'LineString', + coordinates: [ + [-0.5712890625, 54.47642158429295], + [0.439453125, 54.610254981579146], + [1.724853515625, 53.44880683542759], + [4.163818359375, 53.98839506479995], + [5.306396484375, 53.533778184257805], + [6.591796875, 53.70971358510174], + [7.042236328124999, 53.35055131839989], + ], }, - { - "geometry": { - "type": "Polygon", - "coordinates": [[[11.25, 53.585983654559804], [10.1513671875, 52.9751081817353], [12.689208984375, 52.16719363541221], [14.084472656249998, 53.199451902831555], [12.63427734375, 53.61857936489517], [11.25, 53.585983654559804], [11.25, 53.585983654559804]]] - }, - "type": "Feature", - "id": 76, - "properties": {name: "name poly"} - }] - } -}; - - -sinon.fakeServer.getRequest = function (path, method) { - var request; - for (var i=0, l=this.requests.length; i' + + '' + + '' + + 'Simple point' + + 'Here is a simple description.' + + '' + + '-122.0822035425683,37.42228990140251,0' + + '' + + '' + + '' + + 'Simple path' + + 'Simple description' + + '' + + '-112.2550785337791,36.07954952145647,2357 -112.2549277039738,36.08117083492122,2357 -112.2552505069063,36.08260761307279,2357' + + '' + + '' + + '' + + 'Simple polygon' + + 'A description.' + + '' + + '' + + '' + + '' + + ' -77.05788457660967,38.87253259892824,100 ' + + ' -77.05465973756702,38.87291016281703,100 ' + + ' -77.05315536854791,38.87053267794386,100 ' + + ' -77.05788457660967,38.87253259892824,100 ' + + '' + + '' + + '' + + '' + + '' + + '' -var kml_example = '' + -'' + -''+ -'Simple point'+ -'Here is a simple description.'+ -''+ -'-122.0822035425683,37.42228990140251,0'+ -''+ -''+ -''+ -'Simple path'+ -'Simple description'+ -''+ -'-112.2550785337791,36.07954952145647,2357 -112.2549277039738,36.08117083492122,2357 -112.2552505069063,36.08260761307279,2357'+ -''+ -''+ -''+ -'Simple polygon'+ -'A description.'+ -''+ -''+ -''+ -''+ -' -77.05788457660967,38.87253259892824,100 '+ -' -77.05465973756702,38.87291016281703,100 '+ -' -77.05315536854791,38.87053267794386,100 '+ -' -77.05788457660967,38.87253259892824,100 '+ -''+ -''+ -''+ -''+ -''+ -''; +var gpx_example = + '' + + ' 1374Simple PointSimple description' + + ' ' + + ' Simple path' + + ' Simple description' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '' -var gpx_example = '' + -' 1374Simple PointSimple description' + -' ' + -' Simple path' + -' Simple description' + -' ' + -' ' + -' ' + -' ' + -' ' + -' ' + -''; - -var csv_example = 'Foo,Latitude,Longitude,title,description\n' + -'bar,41.34,122.86,a point somewhere,the description of this point'; +var csv_example = + 'Foo,Latitude,Longitude,title,description\n' + + 'bar,41.34,122.86,a point somewhere,the description of this point' // Make Sinon log readable sinon.format = function (what) { - if (typeof what === 'object') { - return JSON.stringify(what, null, 4); - } else if (typeof what === "undefined") { - return ''; - } else { - return what.toString(); - } -}; + if (typeof what === 'object') { + return JSON.stringify(what, null, 4) + } else if (typeof what === 'undefined') { + return '' + } else { + return what.toString() + } +} diff --git a/umap/static/umap/test/index.html b/umap/static/umap/test/index.html index 4f531b7c..be656135 100644 --- a/umap/static/umap/test/index.html +++ b/umap/static/umap/test/index.html @@ -1,118 +1,120 @@ - - Umap front Tests - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + Umap front Tests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + +
    +
    + - + } + + diff --git a/umap/templates/auth/user_stars.html b/umap/templates/auth/user_stars.html new file mode 100644 index 00000000..47c3e569 --- /dev/null +++ b/umap/templates/auth/user_stars.html @@ -0,0 +1,20 @@ +{% extends "umap/content.html" %} + +{% load i18n %} + +{% block maincontent %} +
    +

    {% blocktrans %}Browse {{ current_user }}'s starred maps{% endblocktrans %}

    +
    +
    +
    + {% if maps %} + {% include "umap/map_list.html" %} + {% else %} +
    + {% blocktrans %}{{ current_user }} has no starred maps yet.{% endblocktrans %} +
    + {% endif %} +
    +
    +{% endblock maincontent %} diff --git a/umap/templates/umap/about_summary.html b/umap/templates/umap/about_summary.html index c580cf83..7901cb32 100644 --- a/umap/templates/umap/about_summary.html +++ b/umap/templates/umap/about_summary.html @@ -30,7 +30,9 @@
    {% spaceless %}
    - {% trans "Create a map" %} + {% if not UMAP_READONLY %} + {% trans "Create a map" %} + {% endif %} {% if demo_map %} {% trans "Play with the demo" %} {% endif %} diff --git a/umap/templates/umap/content.html b/umap/templates/umap/content.html index ca7fb698..dbd38ce5 100644 --- a/umap/templates/umap/content.html +++ b/umap/templates/umap/content.html @@ -18,6 +18,22 @@ {% endblock %} {% block content %} + {% if UMAP_READONLY %} +
    +
    +

    + {% blocktrans %}This instance of uMap is currently in read only mode, no creation/edit is allowed.{% endblocktrans %} +

    +
    +
    + {% endif %} + {% if UMAP_DEMO_SITE %} +
    +
    + {% blocktrans with repo_url="https://github.com/umap-project/umap" stable_url="http://umap.openstreetmap.fr" %}This is a demo instance, used for tests and pre-rolling releases. If you need a stable instance, please use {{ stable_url }}. You can also host your own instance, it's open source!{% endblocktrans %} +
    +
    + {% endif %} {% block maincontent %} {% endblock maincontent %} {% endblock content %} diff --git a/umap/templates/umap/home.html b/umap/templates/umap/home.html index b405786e..45bef52d 100644 --- a/umap/templates/umap/home.html +++ b/umap/templates/umap/home.html @@ -3,13 +3,6 @@ {% load umap_tags i18n %} {% block maincontent %} -{% if DEMO_SITE %} -
    -
    - {% blocktrans with repo_url="https://github.com/umap-project/umap" stable_url="http://umap.openstreetmap.fr" %}This is a demo instance, used for tests and pre-rolling releases. If you need a stable instance, please use {{ stable_url }}. You can also host your own instance, it's open source!{% endblocktrans %} -
    -
    -{% endif %} {% include "umap/search_bar.html" %} {% include "umap/about_summary.html" %} {% if showcase_map %} diff --git a/umap/templates/umap/js.html b/umap/templates/umap/js.html index 4866140d..e8c1e8e6 100644 --- a/umap/templates/umap/js.html +++ b/umap/templates/umap/js.html @@ -23,6 +23,7 @@ + {% endcompress %} {% if locale %} diff --git a/umap/templates/umap/locale.js b/umap/templates/umap/locale.js index 374a6206..7dcf434b 100644 --- a/umap/templates/umap/locale.js +++ b/umap/templates/umap/locale.js @@ -1,3 +1,3 @@ -var locale = {{ locale|safe }}; -L.registerLocale("{{ locale_code }}", locale); -L.setLocale("{{ locale_code }}"); \ No newline at end of file +const locale = {{ locale|safe }} +L.registerLocale("{{ locale_code }}", locale) +L.setLocale("{{ locale_code }}") diff --git a/umap/templates/umap/login_popup_end.html b/umap/templates/umap/login_popup_end.html index fe2c1bfc..459d5547 100644 --- a/umap/templates/umap/login_popup_end.html +++ b/umap/templates/umap/login_popup_end.html @@ -5,8 +5,11 @@ function proceed() { - if (window.opener) { + if (window.opener && window.opener.umap_proceed) { window.opener.umap_proceed(); + } else { + // Trade off as Twitter does not allow us to access window.opener + window.location.href = '{% url "user_maps" request.user.username %}' } } diff --git a/umap/templates/umap/navigation.html b/umap/templates/umap/navigation.html index 424f9f68..58c4d8e6 100644 --- a/umap/templates/umap/navigation.html +++ b/umap/templates/umap/navigation.html @@ -8,11 +8,12 @@
      {% if user.is_authenticated %}
    • {% trans "My maps" %} ({{ user }})
    • +
    • {% trans "Starred maps" %}
    • {% else %}
    • {% endif %}
    • {% trans "About" %}
    • -
    • {% trans "Feedback" %}
    • +
    • {% trans "Help" %}
    • {% if user.is_authenticated %} {% if user.has_usable_password %}
    • {% trans "Change password" %}
    • @@ -23,6 +24,8 @@
      - {% trans "Create a map" %} + {% if not UMAP_READONLY %} + {% trans "Create a map" %} + {% endif %}
      diff --git a/umap/tests/conftest.py b/umap/tests/conftest.py index e3d237e3..0f3bd6ce 100644 --- a/umap/tests/conftest.py +++ b/umap/tests/conftest.py @@ -2,6 +2,7 @@ import shutil import tempfile import pytest +from django.core.cache import cache from django.core.signing import get_cookie_signer from .base import DataLayerFactory, MapFactory, UserFactory @@ -12,6 +13,7 @@ TMP_ROOT = tempfile.mkdtemp() def pytest_configure(config): from django.conf import settings + settings.MEDIA_ROOT = TMP_ROOT @@ -19,11 +21,20 @@ def pytest_unconfigure(config): shutil.rmtree(TMP_ROOT, ignore_errors=True) +def pytest_runtest_teardown(): + cache.clear() + + @pytest.fixture def user(): return UserFactory(password="123123") +@pytest.fixture +def user2(): + return UserFactory(username="Averell", password="456456") + + @pytest.fixture def licence(): # Should be created by the migrations. diff --git a/umap/tests/test_datalayer_views.py b/umap/tests/test_datalayer_views.py index d88bdd69..e2c4e925 100644 --- a/umap/tests/test_datalayer_views.py +++ b/umap/tests/test_datalayer_views.py @@ -14,34 +14,32 @@ pytestmark = pytest.mark.django_db @pytest.fixture def post_data(): return { - "name": 'name', + "name": "name", "display_on_load": True, "rank": 0, - "geojson": '{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-3.1640625,53.014783245859235],[-3.1640625,51.86292391360244],[-0.50537109375,51.385495069223204],[1.16455078125,52.38901106223456],[-0.41748046875,53.91728101547621],[-2.109375,53.85252660044951],[-3.1640625,53.014783245859235]]]},"properties":{"_umap_options":{},"name":"Ho god, sounds like a polygouine"}},{"type":"Feature","geometry":{"type":"LineString","coordinates":[[1.8017578124999998,51.16556659836182],[-0.48339843749999994,49.710272582105695],[-3.1640625,50.0923932109388],[-5.60302734375,51.998410382390325]]},"properties":{"_umap_options":{},"name":"Light line"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[0.63720703125,51.15178610143037]},"properties":{"_umap_options":{},"name":"marker he"}}],"_umap_options":{"displayOnLoad":true,"name":"new name","id":1668,"remoteData":{},"color":"LightSeaGreen","description":"test"}}' # noqa + "geojson": '{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-3.1640625,53.014783245859235],[-3.1640625,51.86292391360244],[-0.50537109375,51.385495069223204],[1.16455078125,52.38901106223456],[-0.41748046875,53.91728101547621],[-2.109375,53.85252660044951],[-3.1640625,53.014783245859235]]]},"properties":{"_umap_options":{},"name":"Ho god, sounds like a polygouine"}},{"type":"Feature","geometry":{"type":"LineString","coordinates":[[1.8017578124999998,51.16556659836182],[-0.48339843749999994,49.710272582105695],[-3.1640625,50.0923932109388],[-5.60302734375,51.998410382390325]]},"properties":{"_umap_options":{},"name":"Light line"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[0.63720703125,51.15178610143037]},"properties":{"_umap_options":{},"name":"marker he"}}],"_umap_options":{"displayOnLoad":true,"name":"new name","id":1668,"remoteData":{},"color":"LightSeaGreen","description":"test"}}', } def test_get(client, settings, datalayer): - url = reverse('datalayer_view', args=(datalayer.pk, )) + url = reverse("datalayer_view", args=(datalayer.pk,)) response = client.get(url) - if getattr(settings, 'UMAP_XSENDFILE_HEADER', None): - assert response['ETag'] is not None - assert response['Last-Modified'] is not None - assert response['Cache-Control'] is not None - assert 'Content-Encoding' not in response + assert response["Last-Modified"] is not None + assert response["Cache-Control"] is not None + assert "Content-Encoding" not in response j = json.loads(response.content.decode()) - assert '_umap_options' in j - assert 'features' in j - assert j['type'] == 'FeatureCollection' + assert "_umap_options" in j + assert "features" in j + assert j["type"] == "FeatureCollection" def test_update(client, datalayer, map, post_data): - url = reverse('datalayer_update', args=(map.pk, datalayer.pk)) + url = reverse("datalayer_update", args=(map.pk, datalayer.pk)) client.login(username=map.owner.username, password="123123") - name = 'new name' + name = "new name" rank = 2 - post_data['name'] = name - post_data['rank'] = rank + post_data["name"] = name + post_data["rank"] = rank response = client.post(url, post_data, follow=True) assert response.status_code == 200 modified_datalayer = DataLayer.objects.get(pk=datalayer.pk) @@ -50,15 +48,17 @@ def test_update(client, datalayer, map, post_data): # Test response is a json j = json.loads(response.content.decode()) assert "id" in j - assert datalayer.pk == j['id'] + assert datalayer.pk == j["id"] -def test_should_not_be_possible_to_update_with_wrong_map_id_in_url(client, datalayer, map, post_data): # noqa +def test_should_not_be_possible_to_update_with_wrong_map_id_in_url( + client, datalayer, map, post_data +): other_map = MapFactory(owner=map.owner) - url = reverse('datalayer_update', args=(other_map.pk, datalayer.pk)) + url = reverse("datalayer_update", args=(other_map.pk, datalayer.pk)) client.login(username=map.owner.username, password="123123") - name = 'new name' - post_data['name'] = name + name = "new name" + post_data["name"] = name response = client.post(url, post_data, follow=True) assert response.status_code == 403 modified_datalayer = DataLayer.objects.get(pk=datalayer.pk) @@ -66,8 +66,8 @@ def test_should_not_be_possible_to_update_with_wrong_map_id_in_url(client, datal def test_delete(client, datalayer, map): - url = reverse('datalayer_delete', args=(map.pk, datalayer.pk)) - client.login(username=map.owner.username, password='123123') + url = reverse("datalayer_delete", args=(map.pk, datalayer.pk)) + client.login(username=map.owner.username, password="123123") response = client.post(url, {}, follow=True) assert response.status_code == 200 assert not DataLayer.objects.filter(pk=datalayer.pk).count() @@ -75,61 +75,60 @@ def test_delete(client, datalayer, map): assert Map.objects.filter(pk=map.pk).exists() # Test response is a json j = json.loads(response.content.decode()) - assert 'info' in j + assert "info" in j -def test_should_not_be_possible_to_delete_with_wrong_map_id_in_url(client, datalayer, map): # noqa +def test_should_not_be_possible_to_delete_with_wrong_map_id_in_url( + client, datalayer, map +): other_map = MapFactory(owner=map.owner) - url = reverse('datalayer_delete', args=(other_map.pk, datalayer.pk)) - client.login(username=map.owner.username, password='123123') + url = reverse("datalayer_delete", args=(other_map.pk, datalayer.pk)) + client.login(username=map.owner.username, password="123123") response = client.post(url, {}, follow=True) assert response.status_code == 403 assert DataLayer.objects.filter(pk=datalayer.pk).exists() -def test_get_gzipped(client, datalayer, settings): - url = reverse('datalayer_view', args=(datalayer.pk, )) - response = client.get(url, HTTP_ACCEPT_ENCODING='gzip') - if getattr(settings, 'UMAP_XSENDFILE_HEADER', None): - assert response['ETag'] is not None - assert response['Last-Modified'] is not None - assert response['Cache-Control'] is not None - assert response['Content-Encoding'] == 'gzip' - - -def test_optimistic_concurrency_control_with_good_etag(client, datalayer, map, post_data): # noqa - # Get Etag - url = reverse('datalayer_view', args=(datalayer.pk, )) +def test_optimistic_concurrency_control_with_good_last_modified( + client, datalayer, map, post_data +): + # Get Last-Modified + url = reverse("datalayer_view", args=(datalayer.pk,)) response = client.get(url) - etag = response['ETag'] - url = reverse('datalayer_update', - args=(map.pk, datalayer.pk)) + last_modified = response["Last-Modified"] + url = reverse("datalayer_update", args=(map.pk, datalayer.pk)) client.login(username=map.owner.username, password="123123") - name = 'new name' - post_data['name'] = 'new name' - response = client.post(url, post_data, follow=True, HTTP_IF_MATCH=etag) + name = "new name" + post_data["name"] = "new name" + response = client.post( + url, post_data, follow=True, HTTP_IF_UNMODIFIED_SINCE=last_modified + ) assert response.status_code == 200 modified_datalayer = DataLayer.objects.get(pk=datalayer.pk) assert modified_datalayer.name == name -def test_optimistic_concurrency_control_with_bad_etag(client, datalayer, map, post_data): # noqa - url = reverse('datalayer_update', args=(map.pk, datalayer.pk)) - client.login(username=map.owner.username, password='123123') - name = 'new name' - post_data['name'] = name - response = client.post(url, post_data, follow=True, HTTP_IF_MATCH='xxx') +def test_optimistic_concurrency_control_with_bad_last_modified( + client, datalayer, map, post_data +): + url = reverse("datalayer_update", args=(map.pk, datalayer.pk)) + client.login(username=map.owner.username, password="123123") + name = "new name" + post_data["name"] = name + response = client.post(url, post_data, follow=True, HTTP_IF_UNMODIFIED_SINCE="xxx") assert response.status_code == 412 modified_datalayer = DataLayer.objects.get(pk=datalayer.pk) assert modified_datalayer.name != name -def test_optimistic_concurrency_control_with_empty_etag(client, datalayer, map, post_data): # noqa - url = reverse('datalayer_update', args=(map.pk, datalayer.pk)) - client.login(username=map.owner.username, password='123123') - name = 'new name' - post_data['name'] = name - response = client.post(url, post_data, follow=True, HTTP_IF_MATCH=None) +def test_optimistic_concurrency_control_with_empty_last_modified( + client, datalayer, map, post_data +): + url = reverse("datalayer_update", args=(map.pk, datalayer.pk)) + client.login(username=map.owner.username, password="123123") + name = "new name" + post_data["name"] = name + response = client.post(url, post_data, follow=True, HTTP_IF_UNMODIFIED_SINCE=None) assert response.status_code == 200 modified_datalayer = DataLayer.objects.get(pk=datalayer.pk) assert modified_datalayer.name == name @@ -138,33 +137,36 @@ def test_optimistic_concurrency_control_with_empty_etag(client, datalayer, map, def test_versions_should_return_versions(client, datalayer, map, settings): root = datalayer.storage_root() datalayer.geojson.storage.save( - '%s/%s_1440924889.geojson' % (root, datalayer.pk), - ContentFile("{}")) + "%s/%s_1440924889.geojson" % (root, datalayer.pk), ContentFile("{}") + ) datalayer.geojson.storage.save( - '%s/%s_1440923687.geojson' % (root, datalayer.pk), - ContentFile("{}")) + "%s/%s_1440923687.geojson" % (root, datalayer.pk), ContentFile("{}") + ) datalayer.geojson.storage.save( - '%s/%s_1440918637.geojson' % (root, datalayer.pk), - ContentFile("{}")) - url = reverse('datalayer_versions', args=(datalayer.pk, )) + "%s/%s_1440918637.geojson" % (root, datalayer.pk), ContentFile("{}") + ) + url = reverse("datalayer_versions", args=(datalayer.pk,)) versions = json.loads(client.get(url).content.decode()) - assert len(versions['versions']) == 4 - version = {'name': '%s_1440918637.geojson' % datalayer.pk, 'size': 2, - 'at': '1440918637'} - assert version in versions['versions'] + assert len(versions["versions"]) == 4 + version = { + "name": "%s_1440918637.geojson" % datalayer.pk, + "size": 2, + "at": "1440918637", + } + assert version in versions["versions"] def test_version_should_return_one_version_geojson(client, datalayer, map): root = datalayer.storage_root() - name = '%s_1440924889.geojson' % datalayer.pk - datalayer.geojson.storage.save('%s/%s' % (root, name), ContentFile("{}")) - url = reverse('datalayer_version', args=(datalayer.pk, name)) + name = "%s_1440924889.geojson" % datalayer.pk + datalayer.geojson.storage.save("%s/%s" % (root, name), ContentFile("{}")) + url = reverse("datalayer_version", args=(datalayer.pk, name)) assert client.get(url).content.decode() == "{}" def test_update_readonly(client, datalayer, map, post_data, settings): settings.UMAP_READONLY = True - url = reverse('datalayer_update', args=(map.pk, datalayer.pk)) + url = reverse("datalayer_update", args=(map.pk, datalayer.pk)) client.login(username=map.owner.username, password="123123") response = client.post(url, post_data, follow=True) assert response.status_code == 403 diff --git a/umap/tests/test_map_views.py b/umap/tests/test_map_views.py index a33f9996..7a8f2f49 100644 --- a/umap/tests/test_map_views.py +++ b/umap/tests/test_map_views.py @@ -4,7 +4,8 @@ import pytest from django.contrib.auth import get_user_model from django.urls import reverse -from umap.models import DataLayer, Map +from django.core.signing import Signer +from umap.models import DataLayer, Map, Star from .base import login_required @@ -401,6 +402,20 @@ def test_anonymous_edit_url(cookieclient, anonymap): assert key in cookieclient.cookies +@pytest.mark.usefixtures('allow_anonymous') +def test_sha1_anonymous_edit_url(cookieclient, anonymap): + signer = Signer(algorithm='sha1') + signature = signer.sign(anonymap.pk) + url = reverse('map_anonymous_edit_url', kwargs={'signature': signature}) + canonical = reverse('map', kwargs={'pk': anonymap.pk, + 'slug': anonymap.slug}) + response = cookieclient.get(url) + assert response.status_code == 302 + assert response['Location'] == canonical + key, value = anonymap.signed_cookie_elements + assert key in cookieclient.cookies + + @pytest.mark.usefixtures('allow_anonymous') def test_bad_anonymous_edit_url_should_return_403(cookieclient, anonymap): url = anonymap.get_anonymous_edit_url() @@ -514,3 +529,43 @@ def test_create_readonly(client, user, post_data, settings): response = client.post(url, post_data) assert response.status_code == 403 assert response.content == b'Site is readonly for maintenance' + + +def test_search(client, map): + # Very basic search, that do not deal with accent nor case. + # See install.md for how to have a smarter dict + index. + map.name = "Blé dur" + map.save() + url = reverse("search") + response = client.get(url + "?q=Blé") + assert "Blé dur" in response.content.decode() + + +def test_authenticated_user_can_star_map(client, map, user): + url = reverse('map_star', args=(map.pk,)) + client.login(username=user.username, password="123123") + assert Star.objects.filter(by=user).count() == 0 + response = client.post(url) + assert response.status_code == 200 + assert Star.objects.filter(by=user).count() == 1 + + +def test_anonymous_cannot_star_map(client, map): + url = reverse('map_star', args=(map.pk,)) + assert Star.objects.count() == 0 + response = client.post(url) + assert response.status_code == 302 + assert "login" in response["Location"] + assert Star.objects.count() == 0 + + +def test_user_can_see_their_star(client, map, user): + url = reverse('map_star', args=(map.pk,)) + client.login(username=user.username, password="123123") + assert Star.objects.filter(by=user).count() == 0 + response = client.post(url) + assert response.status_code == 200 + url = reverse('user_stars', args=(user.username,)) + response = client.get(url) + assert response.status_code == 200 + assert map.name in response.content.decode() diff --git a/umap/tests/test_utils.py b/umap/tests/test_utils.py new file mode 100644 index 00000000..85862a03 --- /dev/null +++ b/umap/tests/test_utils.py @@ -0,0 +1,14 @@ +from pathlib import Path + +from umap.utils import gzip_file + + +def test_gzip_file(): + # Let's use any old file so we can check that the date of the gzip file is set. + src = Path(__file__).parent / "settings.py" + dest = Path("/tmp/test_settings.py.gz") + gzip_file(src, dest) + src_stat = src.stat() + dest_stat = dest.stat() + dest.unlink() + assert src_stat.st_mtime == dest_stat.st_mtime diff --git a/umap/tests/test_views.py b/umap/tests/test_views.py index 41232fa2..a4fa8d23 100644 --- a/umap/tests/test_views.py +++ b/umap/tests/test_views.py @@ -1,4 +1,6 @@ +import json import socket +from datetime import date, timedelta import pytest from django.conf import settings @@ -11,12 +13,12 @@ from umap.views import validate_url def get(target="http://osm.org/georss.xml", verb="get", **kwargs): defaults = { - 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest', - 'HTTP_REFERER': '%s/path/' % settings.SITE_URL + "HTTP_X_REQUESTED_WITH": "XMLHttpRequest", + "HTTP_REFERER": "%s/path/" % settings.SITE_URL, } defaults.update(kwargs) func = getattr(RequestFactory(**defaults), verb) - return func('/', {'url': target}) + return func("/", {"url": target}) def test_good_request_passes(): @@ -70,67 +72,127 @@ def test_unkown_domain_raises(): def test_valid_proxy_request(client): - url = reverse('ajax-proxy') - params = {'url': 'http://example.org'} + url = reverse("ajax-proxy") + params = {"url": "http://example.org"} headers = { - 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest', - 'HTTP_REFERER': settings.SITE_URL + "HTTP_X_REQUESTED_WITH": "XMLHttpRequest", + "HTTP_REFERER": settings.SITE_URL, } response = client.get(url, params, **headers) assert response.status_code == 200 - assert 'Example Domain' in response.content.decode() - assert 'Cookie' not in response['Vary'] + assert "Example Domain" in response.content.decode() + assert "Cookie" not in response["Vary"] def test_valid_proxy_request_with_ttl(client): - url = reverse('ajax-proxy') - params = {'url': 'http://example.org', 'ttl': 3600} + url = reverse("ajax-proxy") + params = {"url": "http://example.org", "ttl": 3600} headers = { - 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest', - 'HTTP_REFERER': settings.SITE_URL + "HTTP_X_REQUESTED_WITH": "XMLHttpRequest", + "HTTP_REFERER": settings.SITE_URL, } response = client.get(url, params, **headers) assert response.status_code == 200 - assert 'Example Domain' in response.content.decode() - assert 'Cookie' not in response['Vary'] - assert response['X-Accel-Expires'] == '3600' + assert "Example Domain" in response.content.decode() + assert "Cookie" not in response["Vary"] + assert response["X-Accel-Expires"] == "3600" def test_valid_proxy_request_with_invalid_ttl(client): - url = reverse('ajax-proxy') - params = {'url': 'http://example.org', 'ttl': 'invalid'} + url = reverse("ajax-proxy") + params = {"url": "http://example.org", "ttl": "invalid"} headers = { - 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest', - 'HTTP_REFERER': settings.SITE_URL + "HTTP_X_REQUESTED_WITH": "XMLHttpRequest", + "HTTP_REFERER": settings.SITE_URL, } response = client.get(url, params, **headers) assert response.status_code == 200 - assert 'Example Domain' in response.content.decode() - assert 'Cookie' not in response['Vary'] - assert 'X-Accel-Expires' not in response + assert "Example Domain" in response.content.decode() + assert "Cookie" not in response["Vary"] + assert "X-Accel-Expires" not in response @pytest.mark.django_db def test_login_does_not_contain_form_if_not_enabled(client, settings): settings.ENABLE_ACCOUNT_LOGIN = False - response = client.get(reverse('login')) - assert 'username' not in response.content.decode() + response = client.get(reverse("login")) + assert "username" not in response.content.decode() @pytest.mark.django_db def test_login_contains_form_if_enabled(client, settings): settings.ENABLE_ACCOUNT_LOGIN = True - response = client.get(reverse('login')) - assert 'username' in response.content.decode() + response = client.get(reverse("login")) + assert "username" in response.content.decode() @pytest.mark.django_db def test_can_login_with_username_and_password_if_enabled(client, settings): settings.ENABLE_ACCOUNT_LOGIN = True User = get_user_model() - user = User.objects.create(username='test') - user.set_password('test') + user = User.objects.create(username="test") + user.set_password("test") user.save() - client.post(reverse('login'), {'username': 'test', 'password': 'test'}) + client.post(reverse("login"), {"username": "test", "password": "test"}) user = get_user(client) assert user.is_authenticated + + +@pytest.mark.django_db +def test_stats_empty(client): + response = client.get(reverse("stats")) + assert json.loads(response.content.decode()) == { + "maps_active_last_week_count": 0, + "maps_count": 0, + "users_active_last_week_count": 0, + "users_count": 0, + } + + +@pytest.mark.django_db +def test_stats_basic(client, map, datalayer, user2): + map.owner.last_login = date.today() + map.owner.save() + user2.last_login = date.today() - timedelta(days=8) + user2.save() + response = client.get(reverse("stats")) + assert json.loads(response.content.decode()) == { + "maps_active_last_week_count": 1, + "maps_count": 1, + "users_active_last_week_count": 1, + "users_count": 2, + } + + +@pytest.mark.django_db +def test_read_only_displays_message_if_enabled(client, settings): + settings.UMAP_READONLY = True + response = client.get(reverse("home")) + assert ( + "This instance of uMap is currently in read only mode" + in response.content.decode() + ) + + +@pytest.mark.django_db +def test_read_only_does_not_display_message_if_disabled(client, settings): + settings.UMAP_READONLY = False + response = client.get(reverse("home")) + assert ( + "This instance of uMap is currently in read only mode" + not in response.content.decode() + ) + + +@pytest.mark.django_db +def test_read_only_hides_create_buttons_if_enabled(client, settings): + settings.UMAP_READONLY = True + response = client.get(reverse("home")) + assert "Create a map" not in response.content.decode() + + +@pytest.mark.django_db +def test_read_only_shows_create_buttons_if_disabled(client, settings): + settings.UMAP_READONLY = False + response = client.get(reverse("home")) + assert "Create a map" in response.content.decode() diff --git a/umap/urls.py b/umap/urls.py index e0ff193b..a6bcfab4 100644 --- a/umap/urls.py +++ b/umap/urls.py @@ -1,93 +1,160 @@ from django.conf import settings -from django.conf.urls import include, re_path +from django.urls import include, path, re_path from django.conf.urls.i18n import i18n_patterns from django.conf.urls.static import static from django.contrib import admin from django.contrib.auth import views as auth_views +from django.contrib.auth.decorators import login_required from django.contrib.staticfiles.urls import staticfiles_urlpatterns -from django.views.decorators.cache import (cache_control, cache_page, - never_cache) +from django.views.decorators.cache import cache_control, cache_page, never_cache from django.views.decorators.csrf import ensure_csrf_cookie from . import views -from .decorators import (jsonize_view, login_required_if_not_anonymous_allowed, - map_permissions_check) +from .decorators import ( + jsonize_view, + login_required_if_not_anonymous_allowed, + map_permissions_check, +) from .utils import decorated_patterns admin.autodiscover() urlpatterns = [ - re_path(r'^admin/', admin.site.urls), - re_path('', include('social_django.urls', namespace='social')), - re_path(r'^m/(?P\d+)/$', views.MapShortUrl.as_view(), - name='map_short_url'), - re_path(r'^ajax-proxy/$', cache_page(180)(views.ajax_proxy), - name='ajax-proxy'), - re_path(r'^change-password/', auth_views.PasswordChangeView.as_view(), - {'template_name': 'umap/password_change.html'}, - name='password_change'), - re_path(r'^change-password-done/', auth_views.PasswordChangeDoneView.as_view(), - {'template_name': 'umap/password_change_done.html'}, - name='password_change_done'), - re_path(r'^i18n/', include('django.conf.urls.i18n')), - re_path(r'^agnocomplete/', include('agnocomplete.urls')), + re_path(r"^admin/", admin.site.urls), + re_path("", include("social_django.urls", namespace="social")), + re_path(r"^m/(?P\d+)/$", views.MapShortUrl.as_view(), name="map_short_url"), + re_path(r"^ajax-proxy/$", cache_page(180)(views.ajax_proxy), name="ajax-proxy"), + re_path( + r"^change-password/", + auth_views.PasswordChangeView.as_view(), + {"template_name": "umap/password_change.html"}, + name="password_change", + ), + re_path( + r"^change-password-done/", + auth_views.PasswordChangeDoneView.as_view(), + {"template_name": "umap/password_change_done.html"}, + name="password_change_done", + ), + re_path(r"^i18n/", include("django.conf.urls.i18n")), + re_path(r"^agnocomplete/", include("agnocomplete.urls")), ] i18n_urls = [ - re_path(r'^login/$', jsonize_view(auth_views.LoginView.as_view()), name='login'), # noqa - re_path(r'^login/popup/end/$', views.LoginPopupEnd.as_view(), - name='login_popup_end'), - re_path(r'^logout/$', views.logout, name='logout'), - re_path(r'^map/(?P\d+)/geojson/$', views.MapViewGeoJSON.as_view(), - name='map_geojson'), - re_path(r'^map/anonymous-edit/(?P.+)$', - views.MapAnonymousEditUrl.as_view(), name='map_anonymous_edit_url'), - re_path(r'^pictogram/json/$', views.PictogramJSONList.as_view(), - name='pictogram_list_json'), + re_path(r"^login/$", jsonize_view(auth_views.LoginView.as_view()), name="login"), + re_path( + r"^login/popup/end/$", views.LoginPopupEnd.as_view(), name="login_popup_end" + ), + re_path(r"^logout/$", views.logout, name="logout"), + re_path( + r"^map/(?P\d+)/geojson/$", + views.MapViewGeoJSON.as_view(), + name="map_geojson", + ), + re_path( + r"^map/anonymous-edit/(?P.+)$", + views.MapAnonymousEditUrl.as_view(), + name="map_anonymous_edit_url", + ), + re_path( + r"^pictogram/json/$", + views.PictogramJSONList.as_view(), + name="pictogram_list_json", + ), ] -i18n_urls += decorated_patterns(cache_control(must_revalidate=True), - re_path(r'^datalayer/(?P[\d]+)/$', views.DataLayerView.as_view(), name='datalayer_view'), # noqa - re_path(r'^datalayer/(?P[\d]+)/versions/$', views.DataLayerVersions.as_view(), name='datalayer_versions'), # noqa - re_path(r'^datalayer/(?P[\d]+)/(?P[_\w]+.geojson)$', views.DataLayerVersion.as_view(), name='datalayer_version'), # noqa +i18n_urls += decorated_patterns( + cache_control(must_revalidate=True), + re_path( + r"^datalayer/(?P[\d]+)/$", + views.DataLayerView.as_view(), + name="datalayer_view", + ), + re_path( + r"^datalayer/(?P[\d]+)/versions/$", + views.DataLayerVersions.as_view(), + name="datalayer_versions", + ), + re_path( + r"^datalayer/(?P[\d]+)/(?P[_\w]+.geojson)$", + views.DataLayerVersion.as_view(), + name="datalayer_version", + ), ) -i18n_urls += decorated_patterns([ensure_csrf_cookie], - re_path(r'^map/(?P[-_\w]+)_(?P\d+)$', views.MapView.as_view(), name='map'), # noqa - re_path(r'^map/new/$', views.MapNew.as_view(), name='map_new'), +i18n_urls += decorated_patterns( + [ensure_csrf_cookie], + re_path( + r"^map/(?P[-_\w]+)_(?P\d+)$", views.MapView.as_view(), name="map" + ), + re_path(r"^map/new/$", views.MapNew.as_view(), name="map_new"), ) i18n_urls += decorated_patterns( [login_required_if_not_anonymous_allowed, never_cache], - re_path(r'^map/create/$', views.MapCreate.as_view(), name='map_create'), + re_path(r"^map/create/$", views.MapCreate.as_view(), name="map_create"), +) +i18n_urls += decorated_patterns( + [login_required], + re_path( + r"^map/(?P[\d]+)/star/$", + views.ToggleMapStarStatus.as_view(), + name="map_star", + ), ) i18n_urls += decorated_patterns( [map_permissions_check, never_cache], - re_path(r'^map/(?P[\d]+)/update/settings/$', views.MapUpdate.as_view(), - name='map_update'), - re_path(r'^map/(?P[\d]+)/update/permissions/$', - views.UpdateMapPermissions.as_view(), name='map_update_permissions'), - re_path(r'^map/(?P[\d]+)/update/owner/$', - views.AttachAnonymousMap.as_view(), name='map_attach_owner'), - re_path(r'^map/(?P[\d]+)/update/delete/$', - views.MapDelete.as_view(), name='map_delete'), - re_path(r'^map/(?P[\d]+)/update/clone/$', - views.MapClone.as_view(), name='map_clone'), - re_path(r'^map/(?P[\d]+)/datalayer/create/$', - views.DataLayerCreate.as_view(), name='datalayer_create'), - re_path(r'^map/(?P[\d]+)/datalayer/update/(?P\d+)/$', - views.DataLayerUpdate.as_view(), name='datalayer_update'), - re_path(r'^map/(?P[\d]+)/datalayer/delete/(?P\d+)/$', - views.DataLayerDelete.as_view(), name='datalayer_delete'), + re_path( + r"^map/(?P[\d]+)/update/settings/$", + views.MapUpdate.as_view(), + name="map_update", + ), + re_path( + r"^map/(?P[\d]+)/update/permissions/$", + views.UpdateMapPermissions.as_view(), + name="map_update_permissions", + ), + re_path( + r"^map/(?P[\d]+)/update/owner/$", + views.AttachAnonymousMap.as_view(), + name="map_attach_owner", + ), + re_path( + r"^map/(?P[\d]+)/update/delete/$", + views.MapDelete.as_view(), + name="map_delete", + ), + re_path( + r"^map/(?P[\d]+)/update/clone/$", + views.MapClone.as_view(), + name="map_clone", + ), + re_path( + r"^map/(?P[\d]+)/datalayer/create/$", + views.DataLayerCreate.as_view(), + name="datalayer_create", + ), + re_path( + r"^map/(?P[\d]+)/datalayer/update/(?P\d+)/$", + views.DataLayerUpdate.as_view(), + name="datalayer_update", + ), + re_path( + r"^map/(?P[\d]+)/datalayer/delete/(?P\d+)/$", + views.DataLayerDelete.as_view(), + name="datalayer_delete", + ), ) urlpatterns += i18n_patterns( - re_path(r'^$', views.home, name="home"), - re_path(r'^showcase/$', cache_page(24 * 60 * 60)(views.showcase), - name='maps_showcase'), - re_path(r'^search/$', views.search, name="search"), - re_path(r'^about/$', views.about, name="about"), - re_path(r'^user/(?P.+)/$', views.user_maps, name='user_maps'), - re_path(r'', include(i18n_urls)), + re_path(r"^$", views.home, name="home"), + re_path( + r"^showcase/$", cache_page(24 * 60 * 60)(views.showcase), name="maps_showcase" + ), + re_path(r"^search/$", views.search, name="search"), + re_path(r"^about/$", views.about, name="about"), + re_path(r"^user/(?P.+)/stars/$", views.user_stars, name="user_stars"), + re_path(r"^user/(?P.+)/$", views.user_maps, name="user_maps"), + re_path(r"", include(i18n_urls)), ) +urlpatterns += (path("stats/", cache_page(60 * 60)(views.stats), name="stats"),) if settings.DEBUG and settings.MEDIA_ROOT: - urlpatterns += static(settings.MEDIA_URL, - document_root=settings.MEDIA_ROOT) + urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += staticfiles_urlpatterns() diff --git a/umap/utils.py b/umap/utils.py index 46da7749..0890dbfd 100644 --- a/umap/utils.py +++ b/umap/utils.py @@ -1,11 +1,12 @@ import gzip +import os from django.urls import get_resolver from django.urls import URLPattern, URLResolver def get_uri_template(urlname, args=None, prefix=""): - ''' + """ Utility function to return an URI Template from a named URL in django Copied from django-digitalpaper. @@ -17,21 +18,22 @@ def get_uri_template(urlname, args=None, prefix=""): non-capturing parenthesis in them) by trying to find a pattern whose optional parameters match those you specified (a parameter is considered optional if it doesn't appear in every pattern possibility) - ''' + """ + def _convert(template, args=None): """URI template converter""" if not args: args = [] paths = template % dict([p, "{%s}" % p] for p in args) - return u'%s/%s' % (prefix, paths) + return "%s/%s" % (prefix, paths) resolver = get_resolver(None) - parts = urlname.split(':') + parts = urlname.split(":") if len(parts) > 1 and parts[0] in resolver.namespace_dict: namespace = parts[0] urlname = parts[1] nprefix, resolver = resolver.namespace_dict[namespace] - prefix = prefix + '/' + nprefix.rstrip('/') + prefix = prefix + "/" + nprefix.rstrip("/") possibilities = resolver.reverse_dict.getlist(urlname) for tmp in possibilities: possibility, pattern = tmp[:2] @@ -60,7 +62,6 @@ def get_uri_template(urlname, args=None, prefix=""): class DecoratedURLPattern(URLPattern): - def resolve(self, *args, **kwargs): result = URLPattern.resolve(self, *args, **kwargs) if result: @@ -96,6 +97,7 @@ def decorated_patterns(func, *urls): if not hasattr(pp, "_decorate_with"): setattr(pp, "_decorate_with", []) pp._decorate_with.append(func) + if func: if not isinstance(func, (list, tuple)): func = [func] @@ -106,10 +108,12 @@ def decorated_patterns(func, *urls): def gzip_file(from_path, to_path): - with open(from_path, 'rb') as f_in: - with gzip.open(to_path, 'wb') as f_out: + stat = os.stat(from_path) + with open(from_path, "rb") as f_in: + with gzip.open(to_path, "wb") as f_out: f_out.writelines(f_in) + os.utime(to_path, (stat.st_mtime, stat.st_mtime)) def is_ajax(request): - return request.headers.get('x-requested-with') == 'XMLHttpRequest' + return request.headers.get("x-requested-with") == "XMLHttpRequest" diff --git a/umap/views.py b/umap/views.py index 56eb50ca..ed242369 100644 --- a/umap/views.py +++ b/umap/views.py @@ -1,27 +1,32 @@ -import hashlib import json +import mimetypes import os import re import socket +from datetime import date, timedelta +from pathlib import Path -import mimetypes from django.conf import settings from django.contrib import messages from django.contrib.auth import logout as do_logout from django.contrib.auth import get_user_model from django.contrib.gis.measure import D +from django.contrib.postgres.search import SearchQuery, SearchVector from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.core.signing import BadSignature, Signer from django.core.validators import URLValidator, ValidationError from django.db.models import Q -from django.http import (HttpResponse, HttpResponseBadRequest, - HttpResponseForbidden, HttpResponsePermanentRedirect, - HttpResponseRedirect) +from django.http import ( + HttpResponse, + HttpResponseBadRequest, + HttpResponseForbidden, + HttpResponsePermanentRedirect, + HttpResponseRedirect, +) from django.middleware.gzip import re_accepts_gzip from django.shortcuts import get_object_or_404 -from django.template.loader import render_to_string from django.urls import reverse, reverse_lazy -from django.utils.encoding import force_bytes, smart_bytes +from django.utils.encoding import smart_bytes from django.utils.http import http_date from django.utils.translation import gettext as _ from django.utils.translation import to_locale @@ -31,10 +36,17 @@ from django.views.generic.detail import BaseDetailView from django.views.generic.edit import CreateView, DeleteView, UpdateView from django.views.generic.list import ListView -from .forms import (DEFAULT_LATITUDE, DEFAULT_LONGITUDE, DEFAULT_CENTER, - AnonymousMapPermissionsForm, DataLayerForm, FlatErrorList, - MapSettingsForm, UpdateMapPermissionsForm) -from .models import DataLayer, Licence, Map, Pictogram, TileLayer +from .forms import ( + DEFAULT_LATITUDE, + DEFAULT_LONGITUDE, + DEFAULT_CENTER, + AnonymousMapPermissionsForm, + DataLayerForm, + FlatErrorList, + MapSettingsForm, + UpdateMapPermissionsForm, +) +from .models import DataLayer, Licence, Map, Pictogram, Star, TileLayer from .utils import get_uri_template, gzip_file, is_ajax try: @@ -50,11 +62,13 @@ except ImportError: User = get_user_model() -PRIVATE_IP = re.compile(r'((^127\.)|(^10\.)' - r'|(^172\.1[6-9]\.)' - r'|(^172\.2[0-9]\.)' - r'|(^172\.3[0-1]\.)' - r'|(^192\.168\.))') +PRIVATE_IP = re.compile( + r"((^127\.)|(^10\.)" + r"|(^172\.1[6-9]\.)" + r"|(^172\.2[0-9]\.)" + r"|(^172\.3[0-1]\.)" + r"|(^192\.168\.))" +) ANONYMOUS_COOKIE_MAX_AGE = 60 * 60 * 24 * 30 # One month @@ -63,7 +77,7 @@ class PaginatorMixin(object): def paginate(self, qs, per_page=None): paginator = Paginator(qs, per_page or self.per_page) - page = self.request.GET.get('p') + page = self.request.GET.get("p") try: qs = paginator.page(page) except PageNotAnInteger: @@ -82,9 +96,11 @@ class Home(TemplateView, PaginatorMixin): def get_context_data(self, **kwargs): qs = Map.public - if (settings.UMAP_EXCLUDE_DEFAULT_MAPS and - 'spatialite' not in settings.DATABASES['default']['ENGINE']): - # Unsupported query type for sqlite. + if ( + settings.UMAP_EXCLUDE_DEFAULT_MAPS + and "spatialite" not in settings.DATABASES["default"]["ENGINE"] + ): + # Unsupported query type for sqlite. qs = qs.filter(center__distance_gt=(DEFAULT_CENTER, D(km=1))) demo_map = None if hasattr(settings, "UMAP_DEMO_PK"): @@ -102,14 +118,13 @@ class Home(TemplateView, PaginatorMixin): pass else: qs = qs.exclude(id=showcase_map.pk) - maps = qs.order_by('-modified_at')[:50] + maps = qs.order_by("-modified_at")[:50] maps = self.paginate(maps, settings.UMAP_MAPS_PER_PAGE) return { "maps": maps, "demo_map": demo_map, "showcase_map": showcase_map, - "DEMO_SITE": settings.UMAP_DEMO_SITE } def get_template_names(self): @@ -121,39 +136,44 @@ class Home(TemplateView, PaginatorMixin): else: return [self.template_name] + home = Home.as_view() class About(Home): - template_name = "umap/about.html" + about = About.as_view() class UserMaps(DetailView, PaginatorMixin): model = User - slug_url_kwarg = 'username' - slug_field = 'username' + slug_url_kwarg = "username" + slug_field = "username" list_template_name = "umap/map_list.html" context_object_name = "current_user" + def is_owner(self): + return self.request.user == self.object + + @property + def per_page(self): + if self.is_owner(): + return settings.UMAP_MAPS_PER_PAGE_OWNER + return settings.UMAP_MAPS_PER_PAGE + + def get_map_queryset(self): + return Map.objects if self.is_owner() else Map.public + + def get_maps(self): + qs = self.get_map_queryset() + qs = qs.filter(Q(owner=self.object) | Q(editors=self.object)) + return qs.distinct().order_by("-modified_at") + def get_context_data(self, **kwargs): - owner = self.request.user == self.object - manager = Map.objects if owner else Map.public - maps = manager.filter(Q(owner=self.object) | Q(editors=self.object)) - if owner: - per_page = settings.UMAP_MAPS_PER_PAGE_OWNER - limit = 100 - else: - per_page = settings.UMAP_MAPS_PER_PAGE - limit = 50 - maps = maps.distinct().order_by('-modified_at')[:limit] - maps = self.paginate(maps, per_page) - kwargs.update({ - "maps": maps - }) - return super(UserMaps, self).get_context_data(**kwargs) + kwargs.update({"maps": self.paginate(self.get_maps(), self.per_page)}) + return super().get_context_data(**kwargs) def get_template_names(self): """ @@ -164,28 +184,39 @@ class UserMaps(DetailView, PaginatorMixin): else: return super(UserMaps, self).get_template_names() + user_maps = UserMaps.as_view() +class UserStars(UserMaps): + template_name = "auth/user_stars.html" + + def get_maps(self): + qs = self.get_map_queryset() + stars = Star.objects.filter(by=self.object).values("map") + qs = qs.filter(pk__in=stars) + return qs.order_by("-modified_at") + + +user_stars = UserStars.as_view() + + class Search(TemplateView, PaginatorMixin): template_name = "umap/search.html" list_template_name = "umap/map_list.html" def get_context_data(self, **kwargs): - q = self.request.GET.get('q') + q = self.request.GET.get("q") results = [] if q: - where = "to_tsvector(name) @@ plainto_tsquery(%s)" - if getattr(settings, 'UMAP_USE_UNACCENT', False): - where = "to_tsvector(unaccent(name)) @@ plainto_tsquery(unaccent(%s))" # noqa - results = Map.objects.filter(share_status=Map.PUBLIC) - results = results.extra(where=[where], params=[q]) - results = results.order_by('-modified_at') - results = self.paginate(results) - kwargs.update({ - 'maps': results, - 'q': q - }) + vector = SearchVector("name", config=settings.UMAP_SEARCH_CONFIGURATION) + query = SearchQuery( + q, config=settings.UMAP_SEARCH_CONFIGURATION, search_type="websearch" + ) + qs = Map.objects.annotate(search=vector).filter(search=query) + qs = qs.filter(share_status=Map.PUBLIC).order_by("-modified_at") + results = self.paginate(qs) + kwargs.update({"maps": results, "q": q}) return kwargs def get_template_names(self): @@ -197,57 +228,52 @@ class Search(TemplateView, PaginatorMixin): else: return super(Search, self).get_template_names() + search = Search.as_view() class MapsShowCase(View): - def get(self, *args, **kwargs): maps = Map.public.filter(center__distance_gt=(DEFAULT_CENTER, D(km=1))) - maps = maps.order_by('-modified_at')[:2500] + maps = maps.order_by("-modified_at")[:2500] def make(m): description = m.description or "" if m.owner: - description = u"{description}\n{by} [[{url}|{name}]]".format( + description = "{description}\n{by} [[{url}|{name}]]".format( description=description, by=_("by"), - url=reverse('user_maps', - kwargs={"username": m.owner.username}), + url=reverse("user_maps", kwargs={"username": m.owner.username}), name=m.owner, ) - description = u"{}\n[[{}|{}]]".format( - description, m.get_absolute_url(), _("View the map")) - geometry = m.settings.get('geometry', json.loads(m.center.geojson)) + description = "{}\n[[{}|{}]]".format( + description, m.get_absolute_url(), _("View the map") + ) + geometry = m.settings.get("geometry", json.loads(m.center.geojson)) return { "type": "Feature", "geometry": geometry, - "properties": { - "name": m.name, - "description": description - } + "properties": {"name": m.name, "description": description}, } - geojson = { - "type": "FeatureCollection", - "features": [make(m) for m in maps] - } + geojson = {"type": "FeatureCollection", "features": [make(m) for m in maps]} return HttpResponse(smart_bytes(json.dumps(geojson))) + showcase = MapsShowCase.as_view() def validate_url(request): assert request.method == "GET" assert is_ajax(request) - url = request.GET.get('url') + url = request.GET.get("url") assert url try: URLValidator(url) except ValidationError: raise AssertionError() - assert 'HTTP_REFERER' in request.META - referer = urlparse(request.META.get('HTTP_REFERER')) + assert "HTTP_REFERER" in request.META + referer = urlparse(request.META.get("HTTP_REFERER")) toproxy = urlparse(url) local = urlparse(settings.SITE_URL) assert toproxy.hostname @@ -264,38 +290,39 @@ def validate_url(request): class AjaxProxy(View): - def get(self, *args, **kwargs): # You should not use this in production (use Nginx or so) try: url = validate_url(self.request) except AssertionError: return HttpResponseBadRequest() - headers = { - 'User-Agent': 'uMapProxy +http://wiki.openstreetmap.org/wiki/UMap' - } + headers = {"User-Agent": "uMapProxy +http://wiki.openstreetmap.org/wiki/UMap"} request = Request(url, headers=headers) opener = build_opener() try: proxied_request = opener.open(request) except HTTPError as e: - return HttpResponse(e.msg, status=e.code, - content_type='text/plain') + return HttpResponse(e.msg, status=e.code, content_type="text/plain") else: status_code = proxied_request.code - mimetype = proxied_request.headers.get('Content-Type') or mimetypes.guess_type(url) # noqa + mimetype = proxied_request.headers.get( + "Content-Type" + ) or mimetypes.guess_type( + url + ) # noqa content = proxied_request.read() # Quick hack to prevent Django from adding a Vary: Cookie header self.request.session.accessed = False - response = HttpResponse(content, status=status_code, - content_type=mimetype) + response = HttpResponse(content, status=status_code, content_type=mimetype) try: - ttl = int(self.request.GET.get('ttl')) + ttl = int(self.request.GET.get("ttl")) except (TypeError, ValueError): pass else: - response['X-Accel-Expires'] = ttl + response["X-Accel-Expires"] = ttl return response + + ajax_proxy = AjaxProxy.as_view() @@ -303,6 +330,7 @@ ajax_proxy = AjaxProxy.as_view() # Utils # # ############## # + def _urls_for_js(urls=None): """ Return templated URLs prepared for javascript. @@ -310,28 +338,15 @@ def _urls_for_js(urls=None): if urls is None: # prevent circular import from .urls import urlpatterns, i18n_urls - urls = [url.name for url in urlpatterns + i18n_urls - if getattr(url, 'name', None)] + + urls = [ + url.name for url in urlpatterns + i18n_urls if getattr(url, "name", None) + ] urls = dict(zip(urls, [get_uri_template(url) for url in urls])) - urls.update(getattr(settings, 'UMAP_EXTRA_URLS', {})) + urls.update(getattr(settings, "UMAP_EXTRA_URLS", {})) return urls -def render_to_json(templates, context, request): - """ - Generate a JSON HttpResponse with rendered template HTML. - """ - html = render_to_string( - templates, - context=context, - request=request - ) - _json = json.dumps({ - "html": html - }) - return HttpResponse(_json) - - def simple_json_response(**kwargs): return HttpResponse(json.dumps(kwargs)) @@ -342,39 +357,42 @@ def simple_json_response(**kwargs): class FormLessEditMixin: - http_method_names = [u'post', ] + http_method_names = [ + "post", + ] def form_invalid(self, form): - return simple_json_response(errors=form.errors, - error=str(form.errors)) + return simple_json_response(errors=form.errors, error=str(form.errors)) def get_form(self, form_class=None): kwargs = self.get_form_kwargs() - kwargs['error_class'] = FlatErrorList + kwargs["error_class"] = FlatErrorList return self.get_form_class()(**kwargs) class MapDetailMixin: - model = Map def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) properties = { - 'urls': _urls_for_js(), - 'tilelayers': TileLayer.get_list(), - 'allowEdit': self.is_edit_allowed(), - 'default_iconUrl': "%sumap/img/marker.png" % settings.STATIC_URL, # noqa - 'umap_id': self.get_umap_id(), - 'licences': dict((l.name, l.json) for l in Licence.objects.all()), - 'edit_statuses': [(i, str(label)) for i, label in Map.EDIT_STATUS], - 'share_statuses': [(i, str(label)) - for i, label in Map.SHARE_STATUS if i != Map.BLOCKED], - 'anonymous_edit_statuses': [(i, str(label)) for i, label - in AnonymousMapPermissionsForm.STATUS], + "urls": _urls_for_js(), + "tilelayers": TileLayer.get_list(), + "allowEdit": self.is_edit_allowed(), + "default_iconUrl": "%sumap/img/marker.png" % settings.STATIC_URL, # noqa + "umap_id": self.get_umap_id(), + "starred": self.is_starred(), + "licences": dict((l.name, l.json) for l in Licence.objects.all()), + "edit_statuses": [(i, str(label)) for i, label in Map.EDIT_STATUS], + "share_statuses": [ + (i, str(label)) for i, label in Map.SHARE_STATUS if i != Map.BLOCKED + ], + "anonymous_edit_statuses": [ + (i, str(label)) for i, label in AnonymousMapPermissionsForm.STATUS + ], } if self.get_short_url(): - properties['shortUrl'] = self.get_short_url() + properties["shortUrl"] = self.get_short_url() if settings.USE_I18N: locale = settings.LANGUAGE_CODE @@ -382,23 +400,21 @@ class MapDetailMixin: if hasattr(self.request, "LANGUAGE_CODE"): locale = self.request.LANGUAGE_CODE locale = to_locale(locale) - properties['locale'] = locale - context['locale'] = locale + properties["locale"] = locale + context["locale"] = locale user = self.request.user if not user.is_anonymous: - properties['user'] = { - 'id': user.pk, - 'name': user.get_username(), - 'url': reverse(settings.USER_MAPS_URL, - args=(user.get_username(), )) + properties["user"] = { + "id": user.pk, + "name": user.get_username(), + "url": reverse(settings.USER_MAPS_URL, args=(user.get_username(),)), } map_settings = self.get_geojson() if "properties" not in map_settings: - map_settings['properties'] = {} - map_settings['properties'].update(properties) - map_settings['properties']['datalayers'] = self.get_datalayers() - context['map_settings'] = json.dumps(map_settings, - indent=settings.DEBUG) + map_settings["properties"] = {} + map_settings["properties"].update(properties) + map_settings["properties"]["datalayers"] = self.get_datalayers() + context["map_settings"] = json.dumps(map_settings, indent=settings.DEBUG) return context def get_datalayers(self): @@ -410,16 +426,19 @@ class MapDetailMixin: def get_umap_id(self): return None + def is_starred(self): + return False + def get_geojson(self): return { "geometry": { "coordinates": [DEFAULT_LONGITUDE, DEFAULT_LATITUDE], - "type": "Point" + "type": "Point", }, "properties": { - "zoom": getattr(settings, 'LEAFLET_ZOOM', 6), + "zoom": getattr(settings, "LEAFLET_ZOOM", 6), "datalayers": [], - } + }, } def get_short_url(self): @@ -427,25 +446,27 @@ class MapDetailMixin: class PermissionsMixin: - def get_permissions(self): permissions = {} - permissions['edit_status'] = self.object.edit_status - permissions['share_status'] = self.object.share_status + permissions["edit_status"] = self.object.edit_status + permissions["share_status"] = self.object.share_status if self.object.owner: - permissions['owner'] = { - 'id': self.object.owner.pk, - 'name': self.object.owner.get_username(), - 'url': reverse(settings.USER_MAPS_URL, - args=(self.object.owner.get_username(), )) + permissions["owner"] = { + "id": self.object.owner.pk, + "name": self.object.owner.get_username(), + "url": reverse( + settings.USER_MAPS_URL, args=(self.object.owner.get_username(),) + ), } - permissions['editors'] = [{ - 'id': editor.pk, - 'name': editor.get_username(), - } for editor in self.object.editors.all()] - if (not self.object.owner - and self.object.is_anonymous_owner(self.request)): - permissions['anonymous_edit_url'] = self.get_anonymous_edit_url() + permissions["editors"] = [ + { + "id": editor.pk, + "name": editor.get_username(), + } + for editor in self.object.editors.all() + ] + if not self.object.owner and self.object.is_anonymous_owner(self.request): + permissions["anonymous_edit_url"] = self.get_anonymous_edit_url() return permissions def get_anonymous_edit_url(self): @@ -454,13 +475,12 @@ class PermissionsMixin: class MapView(MapDetailMixin, PermissionsMixin, DetailView): - def get(self, request, *args, **kwargs): self.object = self.get_object() canonical = self.get_canonical_url() if not request.path == canonical: - if request.META.get('QUERY_STRING'): - canonical = "?".join([canonical, request.META['QUERY_STRING']]) + if request.META.get("QUERY_STRING"): + canonical = "?".join([canonical, request.META["QUERY_STRING"]]) return HttpResponsePermanentRedirect(canonical) if not self.object.can_view(request): return HttpResponseForbidden() @@ -481,29 +501,32 @@ class MapView(MapDetailMixin, PermissionsMixin, DetailView): def get_short_url(self): shortUrl = None - if hasattr(settings, 'SHORT_SITE_URL'): - short_path = reverse_lazy('map_short_url', - kwargs={'pk': self.object.pk}) + if hasattr(settings, "SHORT_SITE_URL"): + short_path = reverse_lazy("map_short_url", kwargs={"pk": self.object.pk}) shortUrl = "%s%s" % (settings.SHORT_SITE_URL, short_path) return shortUrl def get_geojson(self): map_settings = self.object.settings if "properties" not in map_settings: - map_settings['properties'] = {} - map_settings['properties']['name'] = self.object.name - map_settings['properties']['permissions'] = self.get_permissions() + map_settings["properties"] = {} + map_settings["properties"]["name"] = self.object.name + map_settings["properties"]["permissions"] = self.get_permissions() return map_settings + def is_starred(self): + user = self.request.user + if not user.is_authenticated: + return False + return Star.objects.filter(by=user, map=self.object).exists() + class MapViewGeoJSON(MapView): - def get_canonical_url(self): - return reverse('map_geojson', args=(self.object.pk, )) + return reverse("map_geojson", args=(self.object.pk,)) def render_to_response(self, context, *args, **kwargs): - return HttpResponse(context['map_settings'], - content_type='application/json') + return HttpResponse(context["map_settings"], content_type="application/json") class MapNew(MapDetailMixin, TemplateView): @@ -529,19 +552,17 @@ class MapCreate(FormLessEditMixin, PermissionsMixin, CreateView): msg = _("Congratulations, your map has been created!") permissions = self.get_permissions() # User does not have the cookie yet. - permissions['anonymous_edit_url'] = anonymous_url + permissions["anonymous_edit_url"] = anonymous_url response = simple_json_response( id=self.object.pk, url=self.object.get_absolute_url(), permissions=permissions, - info=msg + info=msg, ) if not self.request.user.is_authenticated: key, value = self.object.signed_cookie_elements response.set_signed_cookie( - key=key, - value=value, - max_age=ANONYMOUS_COOKIE_MAX_AGE + key=key, value=value, max_age=ANONYMOUS_COOKIE_MAX_AGE ) return response @@ -549,7 +570,7 @@ class MapCreate(FormLessEditMixin, PermissionsMixin, CreateView): class MapUpdate(FormLessEditMixin, PermissionsMixin, UpdateView): model = Map form_class = MapSettingsForm - pk_url_kwarg = 'map_id' + pk_url_kwarg = "map_id" def form_valid(self, form): self.object.settings = form.cleaned_data["settings"] @@ -564,7 +585,7 @@ class MapUpdate(FormLessEditMixin, PermissionsMixin, UpdateView): class UpdateMapPermissions(FormLessEditMixin, UpdateView): model = Map - pk_url_kwarg = 'map_id' + pk_url_kwarg = "map_id" def get_form_class(self): if self.object.owner: @@ -576,25 +597,25 @@ class UpdateMapPermissions(FormLessEditMixin, UpdateView): form = super().get_form(form_class) user = self.request.user if self.object.owner and not user == self.object.owner: - del form.fields['edit_status'] - del form.fields['share_status'] - del form.fields['owner'] + del form.fields["edit_status"] + del form.fields["share_status"] + del form.fields["owner"] return form def form_valid(self, form): self.object = form.save() - return simple_json_response( - info=_("Map editors updated with success!")) + return simple_json_response(info=_("Map editors updated with success!")) class AttachAnonymousMap(View): - def post(self, *args, **kwargs): - self.object = kwargs['map_inst'] - if (self.object.owner - or not self.object.is_anonymous_owner(self.request) - or not self.object.can_edit(self.request.user, self.request) - or not self.request.user.is_authenticated): + self.object = kwargs["map_inst"] + if ( + self.object.owner + or not self.object.is_anonymous_owner(self.request) + or not self.object.can_edit(self.request.user, self.request) + or not self.request.user.is_authenticated + ): return HttpResponseForbidden() self.object.owner = self.request.user self.object.save() @@ -605,33 +626,30 @@ class MapDelete(DeleteView): model = Map pk_url_kwarg = "map_id" - def delete(self, *args, **kwargs): + def form_valid(self, form): self.object = self.get_object() if self.object.owner and self.request.user != self.object.owner: - return HttpResponseForbidden( - _('Only its owner can delete the map.')) - if not self.object.owner\ - and not self.object.is_anonymous_owner(self.request): + return HttpResponseForbidden(_("Only its owner can delete the map.")) + if not self.object.owner and not self.object.is_anonymous_owner(self.request): return HttpResponseForbidden() self.object.delete() return simple_json_response(redirect="/") class MapClone(PermissionsMixin, View): - def post(self, *args, **kwargs): - if not getattr(settings, "UMAP_ALLOW_ANONYMOUS", False) \ - and not self.request.user.is_authenticated: + if ( + not getattr(settings, "UMAP_ALLOW_ANONYMOUS", False) + and not self.request.user.is_authenticated + ): return HttpResponseForbidden() owner = self.request.user if self.request.user.is_authenticated else None - self.object = kwargs['map_inst'].clone(owner=owner) + self.object = kwargs["map_inst"].clone(owner=owner) response = simple_json_response(redirect=self.object.get_absolute_url()) if not self.request.user.is_authenticated: key, value = self.object.signed_cookie_elements response.set_signed_cookie( - key=key, - value=value, - max_age=ANONYMOUS_COOKIE_MAX_AGE + key=key, value=value, max_age=ANONYMOUS_COOKIE_MAX_AGE ) msg = _( "Your map has been cloned! If you want to edit this map from " @@ -644,42 +662,56 @@ class MapClone(PermissionsMixin, View): return response +class ToggleMapStarStatus(View): + def post(self, *args, **kwargs): + map_inst = get_object_or_404(Map, pk=kwargs["map_id"]) + qs = Star.objects.filter(map=map_inst, by=self.request.user) + if qs.exists(): + qs.delete() + status = False + else: + Star.objects.create(map=map_inst, by=self.request.user) + status = True + return simple_json_response(starred=status) + + class MapShortUrl(RedirectView): query_string = True permanent = True def get_redirect_url(self, **kwargs): - map_inst = get_object_or_404(Map, pk=kwargs['pk']) + map_inst = get_object_or_404(Map, pk=kwargs["pk"]) url = map_inst.get_absolute_url() if self.query_string: - args = self.request.META.get('QUERY_STRING', '') + args = self.request.META.get("QUERY_STRING", "") if args: url = "%s?%s" % (url, args) return url class MapAnonymousEditUrl(RedirectView): - permanent = False def get(self, request, *args, **kwargs): signer = Signer() try: - pk = signer.unsign(self.kwargs['signature']) + pk = signer.unsign(self.kwargs["signature"]) except BadSignature: - return HttpResponseForbidden() - else: - map_inst = get_object_or_404(Map, pk=pk) - url = map_inst.get_absolute_url() - response = HttpResponseRedirect(url) - if not map_inst.owner: - key, value = map_inst.signed_cookie_elements - response.set_signed_cookie( - key=key, - value=value, - max_age=ANONYMOUS_COOKIE_MAX_AGE - ) - return response + signer = Signer(algorithm="sha1") + try: + pk = signer.unsign(self.kwargs["signature"]) + except BadSignature: + return HttpResponseForbidden() + + map_inst = get_object_or_404(Map, pk=pk) + url = map_inst.get_absolute_url() + response = HttpResponseRedirect(url) + if not map_inst.owner: + key, value = map_inst.signed_cookie_elements + response.set_signed_cookie( + key=key, value=value, max_age=ANONYMOUS_COOKIE_MAX_AGE + ) + return response # ############## # @@ -688,38 +720,16 @@ class MapAnonymousEditUrl(RedirectView): class GZipMixin(object): + EXT = ".gz" - EXT = '.gz' - - def _path(self): + @property + def path(self): return self.object.geojson.path - def path(self): - """ - Serve gzip file if client accept it. - Generate or update the gzip file if needed. - """ - path = self._path() - statobj = os.stat(path) - ae = self.request.META.get('HTTP_ACCEPT_ENCODING', '') - if re_accepts_gzip.search(ae) and getattr(settings, 'UMAP_GZIP', True): - gzip_path = "{path}{ext}".format(path=path, ext=self.EXT) - up_to_date = True - if not os.path.exists(gzip_path): - up_to_date = False - else: - gzip_statobj = os.stat(gzip_path) - if statobj.st_mtime > gzip_statobj.st_mtime: - up_to_date = False - if not up_to_date: - gzip_file(path, gzip_path) - path = gzip_path - return path - - def etag(self): - path = self.path() - with open(path, mode='rb') as f: - return hashlib.md5(f.read()).hexdigest() + @property + def last_modified(self): + stat = os.stat(self.path) + return http_date(stat.st_mtime) class DataLayerView(GZipMixin, BaseDetailView): @@ -727,34 +737,39 @@ class DataLayerView(GZipMixin, BaseDetailView): def render_to_response(self, context, **response_kwargs): response = None - path = self.path() + path = self.path + # Generate gzip if needed + accepts_gzip = re_accepts_gzip.search( + self.request.META.get("HTTP_ACCEPT_ENCODING", "") + ) + if accepts_gzip and settings.UMAP_GZIP: + gzip_path = Path(f"{path}{self.EXT}") + if not gzip_path.exists(): + gzip_file(path, gzip_path) - if getattr(settings, 'UMAP_XSENDFILE_HEADER', None): + if getattr(settings, "UMAP_XSENDFILE_HEADER", None): response = HttpResponse() - path = path.replace(settings.MEDIA_ROOT, '/internal') + path = path.replace(settings.MEDIA_ROOT, "/internal") response[settings.UMAP_XSENDFILE_HEADER] = path else: - # TODO IMS + # Do not use in production + # (no gzip/cache-control/If-Modified-Since/If-None-Match) statobj = os.stat(path) - with open(path, 'rb') as f: - response = HttpResponse( - f.read(), # should not be used in production! - content_type='application/json' - ) - response["Last-Modified"] = http_date(statobj.st_mtime) - response['ETag'] = '%s' % hashlib.md5(force_bytes(response.content)).hexdigest() # noqa - response['Content-Length'] = len(response.content) - if path.endswith(self.EXT): - response['Content-Encoding'] = 'gzip' + with open(path, "rb") as f: + # Should not be used in production! + response = HttpResponse(f.read(), content_type="application/geo+json") + response["Last-Modified"] = self.last_modified + response["Content-Length"] = statobj.st_size return response class DataLayerVersion(DataLayerView): - - def _path(self): - return '{root}/{path}'.format( + @property + def path(self): + return "{root}/{path}".format( root=settings.MEDIA_ROOT, - path=self.object.get_version_path(self.kwargs['name'])) + path=self.object.get_version_path(self.kwargs["name"]), + ) class DataLayerCreate(FormLessEditMixin, GZipMixin, CreateView): @@ -762,10 +777,11 @@ class DataLayerCreate(FormLessEditMixin, GZipMixin, CreateView): form_class = DataLayerForm def form_valid(self, form): - form.instance.map = self.kwargs['map_inst'] + form.instance.map = self.kwargs["map_inst"] self.object = form.save() + # Simple response with only metadatas (including new id) response = simple_json_response(**self.object.metadata) - response['ETag'] = self.etag() + response["Last-Modified"] = self.last_modified return response @@ -775,25 +791,26 @@ class DataLayerUpdate(FormLessEditMixin, GZipMixin, UpdateView): def form_valid(self, form): self.object = form.save() + # Simple response with only metadatas (client should not reload all data + # on save) response = simple_json_response(**self.object.metadata) - response['ETag'] = self.etag() + response["Last-Modified"] = self.last_modified return response - def if_match(self): + def is_unmodified(self): """Optimistic concurrency control.""" - match = True - if_match = self.request.META.get('HTTP_IF_MATCH') - if if_match: - etag = self.etag() - if etag != if_match: - match = False - return match + modified = True + if_unmodified = self.request.META.get("HTTP_IF_UNMODIFIED_SINCE") + if if_unmodified: + if self.last_modified != if_unmodified: + modified = False + return modified def post(self, request, *args, **kwargs): self.object = self.get_object() - if self.object.map != self.kwargs['map_inst']: + if self.object.map != self.kwargs["map_inst"]: return HttpResponseForbidden() - if not self.if_match(): + if not self.is_unmodified(): return HttpResponse(status=412) return super(DataLayerUpdate, self).post(request, *args, **kwargs) @@ -801,9 +818,9 @@ class DataLayerUpdate(FormLessEditMixin, GZipMixin, UpdateView): class DataLayerDelete(DeleteView): model = DataLayer - def delete(self, *args, **kwargs): + def form_valid(self, form): self.object = self.get_object() - if self.object.map != self.kwargs['map_inst']: + if self.object.map != self.kwargs["map_inst"]: return HttpResponseForbidden() self.object.delete() return simple_json_response(info=_("Layer successfully deleted.")) @@ -820,6 +837,7 @@ class DataLayerVersions(BaseDetailView): # Picto # # ############## # + class PictogramJSONList(ListView): model = Pictogram @@ -832,6 +850,23 @@ class PictogramJSONList(ListView): # Generic # # ############## # + +def stats(request): + last_week = date.today() - timedelta(days=7) + return simple_json_response( + **{ + "maps_count": Map.objects.count(), + "maps_active_last_week_count": Map.objects.filter( + modified_at__gt=last_week + ).count(), + "users_count": User.objects.count(), + "users_active_last_week_count": User.objects.filter( + last_login__gt=last_week + ).count(), + } + ) + + def logout(request): do_logout(request) return simple_json_response(redirect="/") @@ -842,4 +877,5 @@ class LoginPopupEnd(TemplateView): End of a loggin process in popup. Basically close the popup. """ + template_name = "umap/login_popup_end.html"