umap-project 3.4.2__py3-none-any.whl → 3.6.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. umap/__init__.py +1 -1
  2. umap/locale/br/LC_MESSAGES/django.mo +0 -0
  3. umap/locale/br/LC_MESSAGES/django.po +71 -57
  4. umap/locale/de/LC_MESSAGES/django.mo +0 -0
  5. umap/locale/de/LC_MESSAGES/django.po +20 -16
  6. umap/locale/en/LC_MESSAGES/django.po +14 -14
  7. umap/locale/hu/LC_MESSAGES/django.mo +0 -0
  8. umap/locale/hu/LC_MESSAGES/django.po +20 -16
  9. umap/locale/pl/LC_MESSAGES/django.mo +0 -0
  10. umap/locale/pl/LC_MESSAGES/django.po +32 -27
  11. umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
  12. umap/locale/zh_TW/LC_MESSAGES/django.po +20 -16
  13. umap/management/commands/clean_tilelayer.py +0 -1
  14. umap/management/commands/search_maps.py +95 -0
  15. umap/settings/__init__.py +9 -1
  16. umap/settings/base.py +7 -6
  17. umap/static/umap/css/icon.css +8 -0
  18. umap/static/umap/img/16-white.svg +5 -2
  19. umap/static/umap/img/16.svg +1 -1
  20. umap/static/umap/img/source/16-white.svg +7 -4
  21. umap/static/umap/img/source/16.svg +1 -1
  22. umap/static/umap/js/modules/autocomplete.js +1 -9
  23. umap/static/umap/js/modules/browser.js +27 -10
  24. umap/static/umap/js/modules/data/features.js +3 -2
  25. umap/static/umap/js/modules/data/fields.js +12 -2
  26. umap/static/umap/js/modules/data/layer.js +13 -9
  27. umap/static/umap/js/modules/domutils.js +4 -0
  28. umap/static/umap/js/modules/filters.js +11 -10
  29. umap/static/umap/js/modules/form/builder.js +17 -16
  30. umap/static/umap/js/modules/form/fields.js +16 -16
  31. umap/static/umap/js/modules/permissions.js +10 -2
  32. umap/static/umap/js/modules/rendering/controls.js +202 -9
  33. umap/static/umap/js/modules/rendering/layers/classified.js +1 -1
  34. umap/static/umap/js/modules/rendering/map.js +45 -35
  35. umap/static/umap/js/modules/rendering/template.js +12 -6
  36. umap/static/umap/js/modules/rules.js +1 -1
  37. umap/static/umap/js/modules/ui/bar.js +2 -1
  38. umap/static/umap/js/modules/ui/hash.js +36 -0
  39. umap/static/umap/js/modules/ui/loader.js +26 -0
  40. umap/static/umap/js/modules/ui/panel.js +7 -0
  41. umap/static/umap/js/modules/umap.js +6 -0
  42. umap/static/umap/js/modules/utils.js +5 -4
  43. umap/static/umap/js/umap.controls.js +0 -182
  44. umap/static/umap/locale/am_ET.js +2 -5
  45. umap/static/umap/locale/am_ET.json +2 -5
  46. umap/static/umap/locale/ar.js +2 -5
  47. umap/static/umap/locale/ar.json +2 -5
  48. umap/static/umap/locale/ast.js +2 -5
  49. umap/static/umap/locale/ast.json +2 -5
  50. umap/static/umap/locale/bg.js +2 -5
  51. umap/static/umap/locale/bg.json +2 -5
  52. umap/static/umap/locale/br.js +40 -43
  53. umap/static/umap/locale/br.json +40 -43
  54. umap/static/umap/locale/ca.js +2 -5
  55. umap/static/umap/locale/ca.json +2 -5
  56. umap/static/umap/locale/cs_CZ.js +0 -3
  57. umap/static/umap/locale/cs_CZ.json +0 -3
  58. umap/static/umap/locale/da.js +1 -4
  59. umap/static/umap/locale/da.json +1 -4
  60. umap/static/umap/locale/de.js +27 -30
  61. umap/static/umap/locale/de.json +27 -30
  62. umap/static/umap/locale/el.js +0 -3
  63. umap/static/umap/locale/el.json +0 -3
  64. umap/static/umap/locale/en.js +0 -3
  65. umap/static/umap/locale/en.json +0 -3
  66. umap/static/umap/locale/en_US.json +2 -5
  67. umap/static/umap/locale/es.js +0 -3
  68. umap/static/umap/locale/es.json +0 -3
  69. umap/static/umap/locale/et.js +0 -3
  70. umap/static/umap/locale/et.json +0 -3
  71. umap/static/umap/locale/eu.js +0 -3
  72. umap/static/umap/locale/eu.json +0 -3
  73. umap/static/umap/locale/fa_IR.js +0 -3
  74. umap/static/umap/locale/fa_IR.json +0 -3
  75. umap/static/umap/locale/fi.js +2 -5
  76. umap/static/umap/locale/fi.json +2 -5
  77. umap/static/umap/locale/fr.js +3 -6
  78. umap/static/umap/locale/fr.json +3 -6
  79. umap/static/umap/locale/gl.js +0 -3
  80. umap/static/umap/locale/gl.json +0 -3
  81. umap/static/umap/locale/he.js +2 -5
  82. umap/static/umap/locale/he.json +2 -5
  83. umap/static/umap/locale/hr.js +2 -5
  84. umap/static/umap/locale/hr.json +2 -5
  85. umap/static/umap/locale/hu.js +7 -10
  86. umap/static/umap/locale/hu.json +7 -10
  87. umap/static/umap/locale/id.js +2 -5
  88. umap/static/umap/locale/id.json +2 -5
  89. umap/static/umap/locale/is.js +0 -3
  90. umap/static/umap/locale/is.json +0 -3
  91. umap/static/umap/locale/it.js +0 -3
  92. umap/static/umap/locale/it.json +0 -3
  93. umap/static/umap/locale/ja.js +2 -5
  94. umap/static/umap/locale/ja.json +2 -5
  95. umap/static/umap/locale/ko.js +2 -5
  96. umap/static/umap/locale/ko.json +2 -5
  97. umap/static/umap/locale/lt.js +2 -5
  98. umap/static/umap/locale/lt.json +2 -5
  99. umap/static/umap/locale/ms.js +0 -3
  100. umap/static/umap/locale/ms.json +0 -3
  101. umap/static/umap/locale/nl.js +0 -3
  102. umap/static/umap/locale/nl.json +0 -3
  103. umap/static/umap/locale/no.js +2 -5
  104. umap/static/umap/locale/no.json +2 -5
  105. umap/static/umap/locale/pl.js +2 -5
  106. umap/static/umap/locale/pl.json +2 -5
  107. umap/static/umap/locale/pl_PL.json +2 -5
  108. umap/static/umap/locale/pt.js +0 -3
  109. umap/static/umap/locale/pt.json +0 -3
  110. umap/static/umap/locale/pt_BR.js +2 -5
  111. umap/static/umap/locale/pt_BR.json +2 -5
  112. umap/static/umap/locale/pt_PT.js +2 -5
  113. umap/static/umap/locale/pt_PT.json +2 -5
  114. umap/static/umap/locale/ro.js +2 -5
  115. umap/static/umap/locale/ro.json +2 -5
  116. umap/static/umap/locale/ru.js +2 -5
  117. umap/static/umap/locale/ru.json +2 -5
  118. umap/static/umap/locale/sk_SK.js +2 -5
  119. umap/static/umap/locale/sk_SK.json +2 -5
  120. umap/static/umap/locale/sl.js +2 -5
  121. umap/static/umap/locale/sl.json +2 -5
  122. umap/static/umap/locale/sr.js +2 -5
  123. umap/static/umap/locale/sr.json +2 -5
  124. umap/static/umap/locale/sv.js +2 -5
  125. umap/static/umap/locale/sv.json +2 -5
  126. umap/static/umap/locale/th_TH.js +2 -5
  127. umap/static/umap/locale/th_TH.json +2 -5
  128. umap/static/umap/locale/tr.js +2 -5
  129. umap/static/umap/locale/tr.json +2 -5
  130. umap/static/umap/locale/uk_UA.js +2 -5
  131. umap/static/umap/locale/uk_UA.json +2 -5
  132. umap/static/umap/locale/vi.js +2 -5
  133. umap/static/umap/locale/vi.json +2 -5
  134. umap/static/umap/locale/vi_VN.json +2 -5
  135. umap/static/umap/locale/zh.js +2 -5
  136. umap/static/umap/locale/zh.json +2 -5
  137. umap/static/umap/locale/zh_CN.json +2 -5
  138. umap/static/umap/locale/zh_TW.Big5.json +2 -5
  139. umap/static/umap/locale/zh_TW.js +1 -4
  140. umap/static/umap/locale/zh_TW.json +1 -4
  141. umap/static/umap/map.css +1 -17
  142. umap/static/umap/vendors/locatecontrol/L.Control.Locate.esm.js +942 -0
  143. umap/static/umap/vendors/photon/leaflet.photon.esm.js +472 -0
  144. umap/sync/app.py +4 -1
  145. umap/templates/umap/css.html +0 -2
  146. umap/templates/umap/js.html +0 -5
  147. umap/templates/umap/team_form.html +2 -1
  148. umap/tests/fixtures/test_upload_data_with_enum.umap +151 -0
  149. umap/tests/integration/test_edit_map.py +2 -0
  150. umap/tests/integration/test_filters.py +24 -0
  151. umap/tests/integration/test_import.py +40 -23
  152. umap/tests/integration/test_map.py +1 -1
  153. umap/tests/integration/test_optimistic_merge.py +7 -1
  154. umap/tests/integration/test_remote_data.py +1 -1
  155. umap/tests/test_search_maps_command.py +44 -0
  156. umap/utils.py +9 -3
  157. umap/views.py +17 -4
  158. {umap_project-3.4.2.dist-info → umap_project-3.6.1.dist-info}/METADATA +24 -18
  159. {umap_project-3.4.2.dist-info → umap_project-3.6.1.dist-info}/RECORD +162 -163
  160. {umap_project-3.4.2.dist-info → umap_project-3.6.1.dist-info}/WHEEL +1 -1
  161. umap/static/umap/vendors/hash/leaflet-hash.js +0 -162
  162. umap/static/umap/vendors/loading/Control.Loading.css +0 -26
  163. umap/static/umap/vendors/loading/Control.Loading.js +0 -351
  164. umap/static/umap/vendors/locatecontrol/L.Control.Locate.min.css +0 -1
  165. umap/static/umap/vendors/locatecontrol/L.Control.Locate.min.css.map +0 -1
  166. umap/static/umap/vendors/locatecontrol/L.Control.Locate.min.js +0 -4
  167. umap/static/umap/vendors/locatecontrol/L.Control.Locate.min.js.map +0 -1
  168. umap/static/umap/vendors/photon/leaflet.photon.js +0 -487
  169. {umap_project-3.4.2.dist-info → umap_project-3.6.1.dist-info}/entry_points.txt +0 -0
  170. {umap_project-3.4.2.dist-info → umap_project-3.6.1.dist-info}/licenses/LICENSE +0 -0
@@ -10,6 +10,7 @@
10
10
  # Krzysztof Chorzempa, 2023-2024
11
11
  # Maciej Kowalik <m.kowalik.79@gmail.com>, 2016
12
12
  # maro21 OSM, 2020-2021
13
+ # Piotr Deres, 2025
13
14
  # Piotr Strebski <strebski@gmail.com>, 2020
14
15
  # Piotr Strebski <strebski@gmail.com>, 2020
15
16
  # Teiron, 2016
@@ -18,9 +19,9 @@ msgid ""
18
19
  msgstr ""
19
20
  "Project-Id-Version: uMap\n"
20
21
  "Report-Msgid-Bugs-To: \n"
21
- "POT-Creation-Date: 2025-10-17 06:00+0000\n"
22
+ "POT-Creation-Date: 2025-11-24 14:49+0000\n"
22
23
  "PO-Revision-Date: 2013-11-22 14:00+0000\n"
23
- "Last-Translator: Tomasz Nycz <tomasz.merkato@gmail.com>, 2018\n"
24
+ "Last-Translator: Piotr Deres, 2025\n"
24
25
  "Language-Team: Polish (http://app.transifex.com/openstreetmap/umap/language/pl/)\n"
25
26
  "MIME-Version: 1.0\n"
26
27
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -30,7 +31,7 @@ msgstr ""
30
31
 
31
32
  #: admin.py:16
32
33
  msgid "CSV Export"
33
- msgstr ""
34
+ msgstr "Eksport CSV"
34
35
 
35
36
  #: decorators.py:60
36
37
  msgid "This map is not publicly available"
@@ -46,7 +47,7 @@ msgid ""
46
47
  "Using “%(name)s” to authenticate is deprecated and will be removed soon. "
47
48
  "Please configure another provider below before losing access to your account"
48
49
  " and maps. Then, please logout and login again with the new provider."
49
- msgstr ""
50
+ msgstr "Uwierzytelnianie przy pomocy „%(name)s” jest przestarzałe i wkrótce zostanie usunięte. Skonfiguruj innego dostawcę, zanim utracisz dostęp do konta i map. Następnie wyloguj się i zaloguj ponownie, używając nowego dostawcy."
50
51
 
51
52
  #: models.py:61 models.py:80
52
53
  msgid "name"
@@ -273,7 +274,7 @@ msgid ""
273
274
  "<a href=\"https://discover.umap-project.org/support/faq/#map-statuses\" "
274
275
  "target=\"_blank\">Find out here the documentation</a> on how to manage map’s"
275
276
  " permissions."
276
- msgstr ""
277
+ msgstr "<a href=\"https://discover.umap-project.org/support/faq/#map-statuses\" target=\"_blank\">Tutaj znajdziesz dokumentację</a>, jak zarządzać uprawnieniami mapy."
277
278
 
278
279
  #: templates/403.html:10 templates/404.html:8
279
280
  msgid "← Go to the homepage"
@@ -323,7 +324,7 @@ msgstr "Dobrym nawykiem jest połączenie Twojego konta z więcej niż jednym do
323
324
  #: templates/auth/user_stars.html:6
324
325
  #, python-format
325
326
  msgid "%(current_user)s’s starred maps"
326
- msgstr ""
327
+ msgstr "Mapy oznaczone gwiazdką użytkownika %(current_user)s"
327
328
 
328
329
  #: templates/auth/user_stars.html:12
329
330
  #, python-format
@@ -347,11 +348,11 @@ msgstr "Zaloguj się"
347
348
 
348
349
  #: templates/registration/login.html:22
349
350
  msgid "To save and easily find your maps, identify yourself."
350
- msgstr ""
351
+ msgstr "Aby zapisać i łatwo odnaleźć swoje mapy, zidentyfikuj się."
351
352
 
352
353
  #: templates/registration/login.html:25
353
354
  msgid "Please log in with your account:"
354
- msgstr ""
355
+ msgstr "Zaloguj się przy pomocy swojego konta:"
355
356
 
356
357
  #: templates/registration/login.html:42
357
358
  msgid "Username"
@@ -430,17 +431,17 @@ msgid ""
430
431
  "Oops, I didn't mean it, I want to <a href=\"%(login_url)s\" "
431
432
  "class=\"login\">create an account</a> or <a href=\"%(login_url)s\" "
432
433
  "class=\"login\">log in</a> (no worry, we'll attach the map to your account)."
433
- msgstr ""
434
+ msgstr " Ups, nie to miałem na myśli. Chcę <a href=\"%(login_url)s\" class=\"login\">utworzyć konto</a> lub <a href=\"%(login_url)s\" class=\"login\">zalogować się</a> (nie martw się, dodamy mapę do Twojego konta)."
434
435
 
435
436
  #: templates/umap/components/alerts/alert.html:35
436
437
  msgid ""
437
438
  "Yes, I want to continue editing anonymously, I will save the secret edit "
438
439
  "link to be able to edit this map later or on another device"
439
- msgstr ""
440
+ msgstr "Tak, chcę kontynuować edycję anonimowo. Zachowam tajny link do edycji, aby móc edytować tę mapę później lub na innym urządzeniu."
440
441
 
441
442
  #: templates/umap/components/alerts/alert.html:39
442
443
  msgid "Here is your secret link to edit the map, please keep it safe:"
443
- msgstr ""
444
+ msgstr "To jest tajny link, który umożliwia edycję mapy. Zachowaj go w bezpiecznym miejscu:"
444
445
 
445
446
  #: templates/umap/components/alerts/alert.html:43
446
447
  msgid "Copy link"
@@ -505,6 +506,10 @@ msgstr "Kontakt"
505
506
  msgid "Help"
506
507
  msgstr "Pomoc"
507
508
 
509
+ #: templates/umap/content_footer.html:10
510
+ msgid "Terms of Service"
511
+ msgstr "Regulamin"
512
+
508
513
  #: templates/umap/dashboard_menu.html:6
509
514
  #, python-format
510
515
  msgid "My Maps (%(count)s)"
@@ -529,7 +534,7 @@ msgstr "Mój profil"
529
534
 
530
535
  #: templates/umap/dashboard_menu.html:20
531
536
  msgid "My teams"
532
- msgstr "Mój zespół"
537
+ msgstr "Moje zespoły"
533
538
 
534
539
  #: templates/umap/home.html:14
535
540
  msgid "Map of the uMaps"
@@ -709,7 +714,7 @@ msgstr "Twoje hasło zostało zmienione."
709
714
 
710
715
  #: templates/umap/search.html:6
711
716
  msgid "Explore maps"
712
- msgstr ""
717
+ msgstr "Przeglądaj mapy"
713
718
 
714
719
  #: templates/umap/search.html:19
715
720
  #, python-format
@@ -781,7 +786,7 @@ msgstr "Przeszukaj moje mapy"
781
786
 
782
787
  #: templates/umap/user_dashboard.html:11
783
788
  msgid "Map’s name"
784
- msgstr ""
789
+ msgstr "Nazwa mapy"
785
790
 
786
791
  #: templates/umap/user_dashboard.html:12
787
792
  #, python-format
@@ -794,49 +799,49 @@ msgstr "Nie masz jeszcze żadnej mapy."
794
799
 
795
800
  #: templates/umap/user_teams.html:6
796
801
  msgid "My Teams"
797
- msgstr ""
802
+ msgstr "Moje zespoły"
798
803
 
799
804
  #: templates/umap/user_teams.html:21
800
805
  msgid "Users"
801
- msgstr ""
806
+ msgstr "Użytkownicy"
802
807
 
803
808
  #: templates/umap/user_teams.html:52
804
809
  msgid "New team"
805
- msgstr ""
810
+ msgstr "Nowy zespół"
806
811
 
807
812
  #: templates/umap/user_templates.html:10
808
813
  msgid "Search my templates"
809
- msgstr ""
814
+ msgstr "Szukaj moich szablonów"
810
815
 
811
816
  #: templates/umap/user_templates.html:11
812
817
  msgid "Template’s name"
813
- msgstr ""
818
+ msgstr "Nazwa szablonu"
814
819
 
815
820
  #: templates/umap/user_templates.html:12
816
821
  #, python-format
817
822
  msgid "Download %(count)s templates"
818
- msgstr ""
823
+ msgstr "Pobierz %(count)s szablon"
819
824
 
820
825
  #: templates/umap/user_templates.html:15
821
826
  msgid "You have no template yet."
822
- msgstr ""
827
+ msgstr "Nie masz jeszcze szablonów."
823
828
 
824
829
  #: templates/umap/user_templates.html:16
825
830
  msgid "Create a template"
826
- msgstr ""
831
+ msgstr "Utwórz szablon"
827
832
 
828
833
  #: templates/umap/user_templates.html:17
829
834
  msgid "No template found."
830
- msgstr ""
835
+ msgstr "Nie znaleziono szablonu."
831
836
 
832
837
  #: views.py:235
833
838
  msgid "Cannot delete a team with more than one member"
834
- msgstr ""
839
+ msgstr "Nie można usunąć zespołu z więcej niż jednym członkiem"
835
840
 
836
841
  #: views.py:239
837
842
  #, python-format
838
843
  msgid "Team “%(name)s” has been deleted"
839
- msgstr ""
844
+ msgstr "Zespół “%(name)s” został usunięty"
840
845
 
841
846
  #: views.py:464
842
847
  msgid "View the map"
@@ -844,7 +849,7 @@ msgstr "Zobacz mapę"
844
849
 
845
850
  #: views.py:872
846
851
  msgid "See full screen"
847
- msgstr ""
852
+ msgstr "Zobacz pełny ekran"
848
853
 
849
854
  #: views.py:1015
850
855
  msgid "Map editors updated with success!"
@@ -899,4 +904,4 @@ msgstr "Pomyślnie zaktualizowano uprawnienia!"
899
904
 
900
905
  #: views.py:1405
901
906
  msgid "Generic"
902
- msgstr ""
907
+ msgstr "Ogólny"
Binary file
@@ -15,7 +15,7 @@ msgid ""
15
15
  msgstr ""
16
16
  "Project-Id-Version: uMap\n"
17
17
  "Report-Msgid-Bugs-To: \n"
18
- "POT-Creation-Date: 2025-10-14 15:28+0000\n"
18
+ "POT-Creation-Date: 2025-11-24 14:49+0000\n"
19
19
  "PO-Revision-Date: 2013-11-22 14:00+0000\n"
20
20
  "Last-Translator: Supaplex <bejokeup@gmail.com>, 2019,2023-2025\n"
21
21
  "Language-Team: Chinese (Taiwan) (http://app.transifex.com/openstreetmap/umap/language/zh_TW/)\n"
@@ -49,7 +49,7 @@ msgstr "使用 \"%(name)s\" 來認證已經棄用並且很快將移除。請設
49
49
  msgid "name"
50
50
  msgstr "名稱"
51
51
 
52
- #: models.py:63 models.py:503
52
+ #: models.py:63 models.py:507
53
53
  msgid "description"
54
54
  msgstr "描述"
55
55
 
@@ -69,23 +69,23 @@ msgstr "URL 樣板,使用 OSM 地圖磚格式"
69
69
  msgid "Order of the tilelayers in the edit box"
70
70
  msgstr "編輯方塊中地圖磚的圖層順序"
71
71
 
72
- #: models.py:176 models.py:497
72
+ #: models.py:176 models.py:501
73
73
  msgid "Only editable with secret edit link"
74
74
  msgstr "僅能由私密連結編輯"
75
75
 
76
- #: models.py:177 models.py:498
76
+ #: models.py:177 models.py:502
77
77
  msgid "Everyone can edit"
78
78
  msgstr "所有人皆可編輯"
79
79
 
80
- #: models.py:180 models.py:491
80
+ #: models.py:180 models.py:495
81
81
  msgid "Everyone"
82
82
  msgstr "所有人"
83
83
 
84
- #: models.py:181 models.py:190 models.py:492
84
+ #: models.py:181 models.py:190 models.py:496
85
85
  msgid "Editors and team only"
86
86
  msgstr "只有編輯者與團隊"
87
87
 
88
- #: models.py:182 models.py:493
88
+ #: models.py:182 models.py:497
89
89
  msgid "Owner only"
90
90
  msgstr "只有擁有者"
91
91
 
@@ -105,7 +105,7 @@ msgstr "任何有連結的人"
105
105
  msgid "Blocked"
106
106
  msgstr "已經封銷了"
107
107
 
108
- #: models.py:192 models.py:487
108
+ #: models.py:192 models.py:491
109
109
  msgid "Deleted"
110
110
  msgstr "已刪除"
111
111
 
@@ -145,15 +145,15 @@ msgstr "編輯者"
145
145
  msgid "team"
146
146
  msgstr "團隊"
147
147
 
148
- #: models.py:230 models.py:519
148
+ #: models.py:230 models.py:523
149
149
  msgid "edit status"
150
150
  msgstr "編輯狀態"
151
151
 
152
- #: models.py:235 models.py:524
152
+ #: models.py:235 models.py:528
153
153
  msgid "share status"
154
154
  msgstr "分享狀態"
155
155
 
156
- #: models.py:238 models.py:514
156
+ #: models.py:238 models.py:518
157
157
  msgid "settings"
158
158
  msgstr "設定"
159
159
 
@@ -169,15 +169,15 @@ msgstr "這份地圖是模版地圖"
169
169
  msgid "Clone of"
170
170
  msgstr "複製"
171
171
 
172
- #: models.py:486 models.py:490 models.py:496
172
+ #: models.py:490 models.py:494 models.py:500
173
173
  msgid "Inherit"
174
174
  msgstr "繼承"
175
175
 
176
- #: models.py:509
176
+ #: models.py:513
177
177
  msgid "display on load"
178
178
  msgstr "載入時顯示"
179
179
 
180
- #: models.py:510
180
+ #: models.py:514
181
181
  msgid "Display this layer on load."
182
182
  msgstr "載入此圖層時顯示"
183
183
 
@@ -427,13 +427,13 @@ msgid ""
427
427
  "Oops, I didn't mean it, I want to <a href=\"%(login_url)s\" "
428
428
  "class=\"login\">create an account</a> or <a href=\"%(login_url)s\" "
429
429
  "class=\"login\">log in</a> (no worry, we'll attach the map to your account)."
430
- msgstr ""
430
+ msgstr "噢,我意思並非如此,我想要<a href=\"%(login_url)s\" class=\"login\">創建帳號</a>或是<a href=\"%(login_url)s\" class=\"login\">登入</a>(不用擔心,我們會連結地圖到你的帳號)。"
431
431
 
432
432
  #: templates/umap/components/alerts/alert.html:35
433
433
  msgid ""
434
434
  "Yes, I want to continue editing anonymously, I will save the secret edit "
435
435
  "link to be able to edit this map later or on another device"
436
- msgstr ""
436
+ msgstr "是,我想以暱名方式繼續編輯,我會存下祕密編輯連結,讓我之後能編輯這份地圖,或是在其他裝置編輯"
437
437
 
438
438
  #: templates/umap/components/alerts/alert.html:39
439
439
  msgid "Here is your secret link to edit the map, please keep it safe:"
@@ -502,6 +502,10 @@ msgstr "聯絡"
502
502
  msgid "Help"
503
503
  msgstr "幫助"
504
504
 
505
+ #: templates/umap/content_footer.html:10
506
+ msgid "Terms of Service"
507
+ msgstr "服務條款"
508
+
505
509
  #: templates/umap/dashboard_menu.html:6
506
510
  #, python-format
507
511
  msgid "My Maps (%(count)s)"
@@ -1,4 +1,3 @@
1
- import json
2
1
  import sys
3
2
 
4
3
  from django.core.management.base import BaseCommand
@@ -0,0 +1,95 @@
1
+ from django.conf import settings
2
+ from django.contrib.postgres.search import SearchQuery, SearchVector
3
+ from django.core.management.base import BaseCommand
4
+
5
+ from umap.models import Map
6
+
7
+ vector = SearchVector("name", config=settings.UMAP_SEARCH_CONFIGURATION)
8
+
9
+
10
+ def confirm(prompt):
11
+ return input(f"{prompt} [Y/n]").upper() in ["", "Y"]
12
+
13
+
14
+ class Command(BaseCommand):
15
+ help = "Search maps in bulk, and delete, block or restore them."
16
+
17
+ def add_arguments(self, parser):
18
+ parser.add_argument("search", help="Actual search.")
19
+ parser.add_argument(
20
+ "--dry-run",
21
+ help="Do not make actions, just display",
22
+ action="store_true",
23
+ )
24
+ parser.add_argument(
25
+ "--delete",
26
+ help="Mark maps as deleted",
27
+ action="store_true",
28
+ )
29
+ parser.add_argument(
30
+ "--restore",
31
+ help="Restore delete maps in the search results",
32
+ action="store_true",
33
+ )
34
+ parser.add_argument(
35
+ "--block",
36
+ help="Block maps in the search results",
37
+ action="store_true",
38
+ )
39
+ parser.add_argument(
40
+ "--public",
41
+ help="Search only public maps",
42
+ action="store_true",
43
+ )
44
+ parser.add_argument(
45
+ "--no-input", action="store_true", help="Do not ask for confirm."
46
+ )
47
+
48
+ def confirm(self, message):
49
+ result = "n"
50
+ if not self.dry_run:
51
+ if self.no_input:
52
+ return True
53
+ result = input("%s (y/N) " % message) or "n"
54
+ if result[0].lower() != "y":
55
+ self.stdout.write("⚠ Action cancelled.")
56
+ return False
57
+ return True
58
+
59
+ def handle(self, *args, **options):
60
+ self.dry_run = options["dry_run"]
61
+ self.no_input = options["no_input"]
62
+ query = SearchQuery(
63
+ options["search"],
64
+ config=settings.UMAP_SEARCH_CONFIGURATION,
65
+ search_type="websearch",
66
+ )
67
+ qs = Map.public.all() if options["public"] else Map.objects.all()
68
+ qs = qs.annotate(search=vector).filter(search=query)
69
+ for mm in qs:
70
+ row = [
71
+ mm.pk,
72
+ mm.name[:50],
73
+ str(mm.owner or "")[:10],
74
+ mm.get_share_status_display(),
75
+ settings.SITE_URL + mm.get_absolute_url(),
76
+ ]
77
+ print("{:1} | {:<50} | {:<10} | {:<20} | {}".format(*row))
78
+ if options["delete"] and self.confirm(f"Delete {qs.count()} maps?"):
79
+ for mm in qs:
80
+ mm.move_to_trash()
81
+ print("Done!")
82
+ elif options["restore"]:
83
+ to_restore = [
84
+ mm for mm in qs if mm.share_status in [Map.DELETED, Map.BLOCKED]
85
+ ]
86
+ if self.confirm(f"Restore {len(to_restore)} maps?"):
87
+ for mm in to_restore:
88
+ mm.share_status = Map.DRAFT
89
+ mm.save()
90
+ print("Done!")
91
+ elif options["block"] and self.confirm(f"Block {qs.count()} maps?"):
92
+ for mm in qs:
93
+ mm.share_status = Map.BLOCKED
94
+ mm.save()
95
+ print("Done!")
umap/settings/__init__.py CHANGED
@@ -14,11 +14,19 @@ path = os.environ.get("UMAP_SETTINGS")
14
14
  if not path:
15
15
  # Retrocompat
16
16
  path = os.path.join("/etc", "umap", "umap.conf")
17
+ print(f"No UMAP_SETTINGS defined in env var. Trying in {path}")
17
18
  if not os.path.exists(path):
18
19
  # Retrocompat
19
20
  path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "local.py")
21
+ print(f"File /etc/umap/umap.conf not found, now trying {path}")
20
22
  if not os.path.exists(path):
21
- print(colorize("No valid UMAP_SETTINGS found", fg="yellow"))
23
+ print(
24
+ colorize(
25
+ "No regular settings found. "
26
+ "You can still use env vars for configuring uMap.",
27
+ fg="yellow",
28
+ )
29
+ )
22
30
  path = None
23
31
 
24
32
  if path:
umap/settings/base.py CHANGED
@@ -120,7 +120,7 @@ LANGUAGES = (
120
120
  # Make this unique, and don't share it with anybody.
121
121
  SECRET_KEY = env("SECRET_KEY", default=None)
122
122
 
123
- INSTALLED_APPS = (
123
+ INSTALLED_APPS = [
124
124
  "django.contrib.auth",
125
125
  "django.contrib.contenttypes",
126
126
  "django.contrib.sessions",
@@ -136,7 +136,7 @@ INSTALLED_APPS = (
136
136
  # Django does not find the app config in the default place, so the app is not loaded
137
137
  # so the "autodiscover" is not run.
138
138
  "agnocomplete.app.AgnocompleteConfig",
139
- )
139
+ ]
140
140
  DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
141
141
 
142
142
  EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
@@ -229,7 +229,7 @@ TEMPLATES = [
229
229
  # Middleware
230
230
  # =============================================================================
231
231
 
232
- MIDDLEWARE = (
232
+ MIDDLEWARE = [
233
233
  "django.contrib.sessions.middleware.SessionMiddleware",
234
234
  "django.middleware.locale.LocaleMiddleware",
235
235
  "django.middleware.common.CommonMiddleware",
@@ -238,7 +238,7 @@ MIDDLEWARE = (
238
238
  "django.contrib.auth.middleware.AuthenticationMiddleware",
239
239
  "django.contrib.messages.middleware.MessageMiddleware",
240
240
  "umap.middleware.deprecated_auth_backend",
241
- )
241
+ ]
242
242
 
243
243
 
244
244
  # =============================================================================
@@ -338,8 +338,8 @@ UMAP_READONLY = env("UMAP_READONLY", default=False)
338
338
  UMAP_GZIP = True
339
339
  LOCALE_PATHS = [os.path.join(PROJECT_DIR, "locale")]
340
340
 
341
- LEAFLET_LONGITUDE = env.int("LEAFLET_LONGITUDE", default=2)
342
- LEAFLET_LATITUDE = env.int("LEAFLET_LATITUDE", default=51)
341
+ LEAFLET_LONGITUDE = env.float("LEAFLET_LONGITUDE", default=2)
342
+ LEAFLET_LATITUDE = env.float("LEAFLET_LATITUDE", default=51)
343
343
  LEAFLET_ZOOM = env.int("LEAFLET_ZOOM", default=6)
344
344
  UMAP_PICTOGRAMS_COLLECTIONS = {}
345
345
 
@@ -353,6 +353,7 @@ SOCIAL_AUTH_LOGIN_REDIRECT_URL = "/login/popup/end/"
353
353
  AUTHENTICATION_BACKENDS = ()
354
354
  DEPRECATED_AUTHENTICATION_BACKENDS = []
355
355
 
356
+ SOCIAL_AUTH_REDIRECT_IS_HTTPS = env.bool("SOCIAL_AUTH_REDIRECT_IS_HTTPS", default=False)
356
357
  SOCIAL_AUTH_OPENSTREETMAP_OAUTH2_KEY = env(
357
358
  "SOCIAL_AUTH_OPENSTREETMAP_OAUTH2_KEY", default=""
358
359
  )
@@ -228,6 +228,14 @@ html[dir="rtl"] .icon {
228
228
  background-position: var(--tile) calc(var(--tile) * 4);
229
229
  }
230
230
 
231
+ .icon-locate {
232
+ background-position: 0px calc(var(--tile) * 3);
233
+ }
234
+
235
+ .active .icon-locate {
236
+ background-position: calc(var(--tile) * 2) calc(var(--tile) * 4);
237
+ }
238
+
231
239
  .icon-magic {
232
240
  background-position: calc(var(--tile) * 7) 0;
233
241
  }
@@ -32,7 +32,6 @@
32
32
  </metadata>
33
33
  <g id="layer1" transform="translate(0 -812.36)">
34
34
  <path id="path6" transform="translate(0 812.36)" d="m106.59 43.849c-3.1009-0.58252-5.5294-2.8635-6.3194-5.9353-0.23482-0.91317-0.29424-2.2415-0.14177-3.1695 0.51108-3.1108 2.8336-5.668 5.8628-6.455 3.7298-0.96909 7.5978 0.86166 9.2444 4.3755 0.52616 1.1228 0.76105 2.332 0.7086 3.6477-0.0496 1.2454-0.28677 2.1826-0.82249 3.2508-1.0498 2.0933-2.8894 3.5595-5.2481 4.1831-0.49134 0.1299-0.73215 0.15444-1.689 0.17211-0.81094 0.01498-1.2469-4e-3 -1.5952-0.06942zm2.4397-5.8477v-3.0462h-2.0509v6.0923h2.0509zm-0.53434-4.5639c0.33094-0.09915 0.70763-0.44461 0.87372-0.80128 0.4662-1.0012-0.2615-2.1447-1.3648-2.1447-0.44164 0-0.73107 0.12392-1.0653 0.45609-0.42453 0.42196-0.54914 0.93769-0.37666 1.5589 0.0814 0.29328 0.60383 0.8291 0.89905 0.92215 0.28553 0.09 0.74987 0.09398 1.034 0.0089z" fill="#f2f2f2" stroke="#999" stroke-width=".25" style="paint-order:fill markers stroke"/>
35
- <text id="text4457" x="5.7867966" y="897.80786" fill="#000000" font-family="sans-serif" letter-spacing="0px" word-spacing="0px" style="line-height:0%" xml:space="preserve"><tspan id="tspan4459" x="5.7867966" y="897.80786" font-family="sans-serif" font-size="40px" style="line-height:1.25"> </tspan></text>
36
35
  <g id="g3001" transform="translate(-23.256 -119.39)">
37
36
  <path id="path3014" d="m35.256 935.75c-4.4124 0-8.0001 3.5878-8.0001 8.0001 0 4.4124 3.5878 8.0001 8.0001 8.0001s8.0001-3.5878 8.0001-8.0001c0-4.4124-3.5878-8.0001-8.0001-8.0001zm0 1.0003c3.8719 0 6.9999 3.1279 6.9999 6.9999 0 3.8719-3.1279 6.9999-6.9999 6.9999s-6.9999-3.128-6.9999-6.9999c0-3.8719 3.1279-6.9999 6.9999-6.9999z" color="#000000" color-rendering="auto" fill="#f2f2f2" image-rendering="auto" shape-rendering="auto" solid-color="#000000" stroke="#999" stroke-width=".25" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
38
37
  <g id="text3784" transform="translate(27.256 -100.61)" fill="#4d4d4d">
@@ -45,7 +44,6 @@
45
44
  <path id="path4392" d="m37.518 866.36c-2.4668 0-4.4825 2.0157-4.4825 4.4825 0 0.8298 0.23375 1.5964 0.63035 2.2645l-3.6654 3.6655 1.5875 1.5875 3.6654-3.6654c0.66814 0.39662 1.4348 0.63042 2.2646 0.63042 2.4668 0 4.4825-2.0157 4.4825-4.4825s-2.0157-4.4825-4.4825-4.4825zm0 1.4942c1.6593 0 2.9883 1.329 2.9883 2.9883s-1.3291 2.9883-2.9883 2.9883-2.9883-1.329-2.9883-2.9883 1.3291-2.9883 2.9883-2.9883zm0 1.4941c-0.81636 0-1.4942 0.6779-1.4942 1.4942s0.67781 1.4942 1.4942 1.4942 1.4942-0.6779 1.4942-1.4942-0.67781-1.4942-1.4942-1.4942z" color="#000000" fill="#b3b3b3" style="text-decoration-line:none;text-indent:0;text-transform:none"/>
46
45
  <path id="table-5" d="m54 819.36v2h12v-2zm0 3v1h4v-1zm5 0v1h7v-1zm-5 2v1h4v-1zm5 0v1h7v-1zm-5 2v1h4v-1zm5 0v1h7v-1zm-5 2v1h4v-1zm5 0v1h7v-1z" fill="#f2f2f2"/>
47
46
  <path id="path3684" d="m63.714 866.36-1.1428 1.1429 2.2857 2.2857 1.1428-1.1429zm-1.7143 1.7143-6.2857 6.2857 2.2857 2.2857 6.2857-6.2857zm-6.2857 6.2857-1.7143 4 4-1.7143z" fill="#f2f2f2" stroke="#999" stroke-width=".25"/>
48
- <text id="text4457-6" x="41.647079" y="916.79706" fill="#000000" font-family="sans-serif" letter-spacing="0px" word-spacing="0px" style="line-height:0%" xml:space="preserve"><tspan id="tspan4459-6" x="41.647079" y="916.79706" font-family="sans-serif" font-size="30.476px" style="line-height:1.25"> </tspan></text>
49
47
  <path id="path3684-2" d="m63.714 890.36-1.1428 1.1428 2.2857 2.2858 1.1428-1.1429zm-1.7143 1.7143-6.2857 6.2857 2.2857 2.2857 6.2857-6.2857zm-6.2857 6.2857-1.7143 4 4-1.7143z" fill="#b3b3b3"/>
50
48
  <g id="g4717" transform="translate(-54.789 -114.48)">
51
49
  <path id="path3862" transform="translate(-1.2108 854.84)" d="m141.27 173.42-6.7559 2.6797 0.95313 6.3457 5.8711 3.127 4.1484-7.873zm-1.4473 2.4883 2.9902 1.6016-0.5918 2.4316-3.3574 1.5039-1.7383-3.8106z" fill="#f2f2f2" fill-rule="evenodd" stroke="#999" stroke-width=".25"/>
@@ -234,5 +232,10 @@
234
232
  <path id="path1-06" d="m130.2 1010.4v1.1998h3.6v-1.1998h1.2v1.1998h2.4c0.33137 0 0.6 0.2687 0.6 0.6001v9.6c0 0.3314-0.26863 0.6-0.6 0.6h-10.8c-0.33137 0-0.60001-0.2686-0.60001-0.6v-9.6c0-0.3314 0.26864-0.6001 0.60001-0.6001h2.4v-1.1998zm6.6 6h-9.6v4.7998h9.6zm-7.8-3.6001h-1.8v2.3999h9.6v-2.3999h-1.8v1.2001h-1.2v-1.2001h-3.6v1.2001h-1.2z" fill="#efefef" stroke="#b3b3b3" stroke-width=".25"/>
235
233
  <path id="path1-61" d="m156 1022.4c-3.3137 0-6-2.6863-6-5.9999 0-3.3137 2.6863-6 6-6 3.3137 0 6 2.6863 6 6 0 3.3136-2.6863 5.9999-6 5.9999zm0-1.2c2.651 0 4.8-2.149 4.8-4.7999 0-2.651-2.149-4.8001-4.8-4.8001-2.651 0-4.8 2.1491-4.8 4.8001 0 2.6509 2.149 4.7999 4.8 4.7999zm0.60001-4.7999h2.4v1.1999h-3.6v-4.2h1.2z" fill="#efefef" stroke="#b3b3b3" stroke-width=".25"/>
236
234
  <path id="path1-79" d="m180.11 1011h6.6667v1.3333h-6.6667zm0 2.6667h4v1.3333h-4zm0 4h6.6667v1.3333h-6.6667zm0 2.6666h4v1.3334h-4zm-5.3333-9.3333h4v4h-4zm1.3333 1.3333v1.3334h1.3333v-1.3334zm-1.3333 5.3334h4v4h-4zm1.3333 1.3333v1.3333h1.3333v-1.3333z" fill="#efefef" stroke="#b3b3b3" stroke-width=".25"/>
235
+ <path id="geolocation" class="sprite" d="m20.1 896.21c0-0.30044-0.01965-0.59644-0.05246-0.88887h-0.89867c-0.40089-3.2151-2.9449-5.7591-6.16-6.1609v-0.89778c-0.29244-0.0329-0.58844-0.0525-0.88889-0.0525-0.30044 0-0.59644 0.0197-0.88889 0.0525v0.89867c-3.2151 0.40089-5.7591 2.9449-6.1609 6.16h-0.89778c-0.03288 0.29244-0.05243 0.58843-0.05243 0.88887 0 0.30045 0.01965 0.59645 0.05243 0.88891h0.89866c0.40089 3.2151 2.9449 5.7591 6.16 6.1609v0.89867c0.29244 0.032 0.58844 0.0513 0.88889 0.0513 0.30044 0 0.59644-0.0194 0.88889-0.0527v-0.89867c3.2142-0.40174 5.7591-2.9449 6.1609-6.16h0.89867c0.032-0.29156 0.05155-0.58756 0.05155-0.88889zm-7.1111 5.2534v-0.80891c0-0.49156-0.39822-0.88889-0.88889-0.88889-0.49067 0-0.88889 0.39733-0.88889 0.88889v0.80891c-2.2311-0.37513-3.9884-2.1316-4.3636-4.3636l0.808-6.6e-4c0.49156 0 0.88889-0.39823 0.88889-0.8889 0-0.49066-0.39733-0.88888-0.88889-0.88888h-0.80889c0.376-2.2311 2.1333-3.9884 4.3644-4.3644v0.80889c0 0.49067 0.39822 0.88889 0.88889 0.88889 0.49066 0 0.88889-0.39822 0.88889-0.88889v-0.80889c2.232 0.37511 3.9893 2.1324 4.3644 4.3644h-0.80889c-0.49156 0-0.88889 0.39822-0.88889 0.88888 0 0.49067 0.39733 0.8889 0.88889 0.8889l0.80889 6.6e-4c-0.376 2.232-2.1324 3.9884-4.3644 4.3636z" fill="#f2f2f2" stroke="#999" stroke-width=".25"/>
236
+ <g id="geolocation-active" class="sprite" transform="matrix(.66667 0 0 .66667 -6.6665 232.22)" fill="#f2f2f2" stroke="#999" stroke-width=".375">
237
+ <path id="path4611-6" d="m112 1032.4c0-0.4507-0.0293-0.8947-0.0787-1.3334h-1.348c-0.60133-4.8226-4.4173-8.6387-9.24-9.2413v-1.3467c-0.43867-0.049-0.88267-0.079-1.3333-0.079-0.45067 0-0.89467 0.029-1.3333 0.079v1.348c-4.8227 0.6013-8.6387 4.4174-9.2413 9.24h-1.3467c-0.04933 0.4387-0.07867 0.8827-0.07867 1.3334 0 0.4506 0.02933 0.8946 0.07867 1.3333h1.348c0.60133 4.8227 4.4173 8.6387 9.24 9.2414v1.348c0.43867 0.048 0.88267 0.077 1.3333 0.077 0.45066 0 0.89466-0.029 1.3333-0.079v-1.348c4.8213-0.6026 8.6387-4.4173 9.2413-9.24h1.348c0.048-0.4373 0.0773-0.8813 0.0773-1.3333zm-10.667 7.88v-1.2134c0-0.7373-0.59733-1.3333-1.3333-1.3333-0.736 0-1.3333 0.596-1.3333 1.3333v1.2134c-3.3467-0.5627-5.9827-3.1974-6.5453-6.5454h1.212c0.73733 0 1.3333-0.5973 1.3333-1.3333s-0.596-1.3333-1.3333-1.3333h-1.2133c0.564-3.3467 3.2-5.9827 6.5467-6.5467v1.2133c0 0.736 0.59733 1.3334 1.3333 1.3334 0.736 0 1.3333-0.5974 1.3333-1.3334v-1.2133c3.348 0.5627 5.984 3.1987 6.5467 6.5467h-1.2133c-0.73733 0-1.3333 0.5973-1.3333 1.3333s0.596 1.3333 1.3333 1.3333h1.2133c-0.564 3.348-3.1987 5.9827-6.5467 6.5454z"/>
238
+ <circle id="path4819-7" transform="rotate(248.18)" cx="-995.56" cy="-290.92" r="2.5"/>
239
+ </g>
237
240
  </g>
238
241
  </svg>