umap-project 2.9.0b0__py3-none-any.whl → 2.9.2__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.

Potentially problematic release.


This version of umap-project might be problematic. Click here for more details.

Files changed (205) hide show
  1. umap/__init__.py +1 -1
  2. umap/admin.py +15 -2
  3. umap/locale/br/LC_MESSAGES/django.mo +0 -0
  4. umap/locale/br/LC_MESSAGES/django.po +111 -67
  5. umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
  6. umap/locale/cs_CZ/LC_MESSAGES/django.po +112 -67
  7. umap/locale/el/LC_MESSAGES/django.mo +0 -0
  8. umap/locale/el/LC_MESSAGES/django.po +132 -87
  9. umap/locale/en/LC_MESSAGES/django.po +11 -10
  10. umap/locale/es/LC_MESSAGES/django.mo +0 -0
  11. umap/locale/es/LC_MESSAGES/django.po +117 -71
  12. umap/locale/fr/LC_MESSAGES/django.mo +0 -0
  13. umap/locale/fr/LC_MESSAGES/django.po +11 -10
  14. umap/locale/gl/LC_MESSAGES/django.mo +0 -0
  15. umap/locale/gl/LC_MESSAGES/django.po +219 -173
  16. umap/locale/it/LC_MESSAGES/django.mo +0 -0
  17. umap/locale/it/LC_MESSAGES/django.po +145 -100
  18. umap/locale/nl/LC_MESSAGES/django.mo +0 -0
  19. umap/locale/nl/LC_MESSAGES/django.po +198 -152
  20. umap/locale/pt/LC_MESSAGES/django.mo +0 -0
  21. umap/locale/pt/LC_MESSAGES/django.po +118 -73
  22. umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
  23. umap/locale/zh_TW/LC_MESSAGES/django.po +112 -67
  24. umap/middleware.py +30 -1
  25. umap/models.py +20 -10
  26. umap/settings/base.py +2 -1
  27. umap/static/umap/base.css +4 -1
  28. umap/static/umap/css/bar.css +32 -0
  29. umap/static/umap/css/contextmenu.css +14 -2
  30. umap/static/umap/css/form.css +5 -10
  31. umap/static/umap/css/icon.css +39 -3
  32. umap/static/umap/css/panel.css +18 -1
  33. umap/static/umap/css/popup.css +0 -1
  34. umap/static/umap/img/16-white.svg +3 -3
  35. umap/static/umap/img/16.svg +1 -1
  36. umap/static/umap/img/24-white.svg +17 -16
  37. umap/static/umap/img/24.svg +29 -18
  38. umap/static/umap/img/providers/twitter-oauth2.png +0 -0
  39. umap/static/umap/img/source/16-white.svg +4 -4
  40. umap/static/umap/img/source/16.svg +1 -1
  41. umap/static/umap/img/source/24-white.svg +20 -18
  42. umap/static/umap/img/source/24.svg +30 -19
  43. umap/static/umap/js/modules/browser.js +2 -2
  44. umap/static/umap/js/modules/caption.js +4 -4
  45. umap/static/umap/js/modules/data/features.js +80 -32
  46. umap/static/umap/js/modules/data/layer.js +37 -50
  47. umap/static/umap/js/modules/form/builder.js +23 -22
  48. umap/static/umap/js/modules/form/fields.js +13 -5
  49. umap/static/umap/js/modules/formatter.js +6 -2
  50. umap/static/umap/js/modules/help.js +17 -23
  51. umap/static/umap/js/modules/importer.js +5 -2
  52. umap/static/umap/js/modules/permissions.js +6 -2
  53. umap/static/umap/js/modules/rendering/layers/classified.js +1 -1
  54. umap/static/umap/js/modules/rendering/map.js +1 -21
  55. umap/static/umap/js/modules/rendering/ui.js +20 -38
  56. umap/static/umap/js/modules/rules.js +1 -1
  57. umap/static/umap/js/modules/saving.js +5 -0
  58. umap/static/umap/js/modules/schema.js +4 -1
  59. umap/static/umap/js/modules/sync/engine.js +39 -14
  60. umap/static/umap/js/modules/sync/updaters.js +7 -6
  61. umap/static/umap/js/modules/sync/websocket.js +48 -40
  62. umap/static/umap/js/modules/ui/bar.js +84 -0
  63. umap/static/umap/js/modules/ui/base.js +11 -0
  64. umap/static/umap/js/modules/ui/contextmenu.js +9 -2
  65. umap/static/umap/js/modules/ui/panel.js +5 -1
  66. umap/static/umap/js/modules/umap.js +85 -44
  67. umap/static/umap/js/umap.controls.js +11 -341
  68. umap/static/umap/locale/am_ET.js +17 -5
  69. umap/static/umap/locale/am_ET.json +17 -5
  70. umap/static/umap/locale/ar.js +17 -5
  71. umap/static/umap/locale/ar.json +17 -5
  72. umap/static/umap/locale/ast.js +17 -5
  73. umap/static/umap/locale/ast.json +17 -5
  74. umap/static/umap/locale/bg.js +17 -5
  75. umap/static/umap/locale/bg.json +17 -5
  76. umap/static/umap/locale/br.js +20 -15
  77. umap/static/umap/locale/br.json +20 -15
  78. umap/static/umap/locale/ca.js +8 -4
  79. umap/static/umap/locale/ca.json +8 -4
  80. umap/static/umap/locale/cs_CZ.js +8 -4
  81. umap/static/umap/locale/cs_CZ.json +8 -4
  82. umap/static/umap/locale/da.js +17 -5
  83. umap/static/umap/locale/da.json +17 -5
  84. umap/static/umap/locale/de.js +8 -4
  85. umap/static/umap/locale/de.json +8 -4
  86. umap/static/umap/locale/el.js +54 -50
  87. umap/static/umap/locale/el.json +54 -50
  88. umap/static/umap/locale/en.js +9 -4
  89. umap/static/umap/locale/en.json +9 -4
  90. umap/static/umap/locale/en_US.json +17 -5
  91. umap/static/umap/locale/es.js +13 -9
  92. umap/static/umap/locale/es.json +13 -9
  93. umap/static/umap/locale/et.js +17 -5
  94. umap/static/umap/locale/et.json +17 -5
  95. umap/static/umap/locale/eu.js +8 -4
  96. umap/static/umap/locale/eu.json +8 -4
  97. umap/static/umap/locale/fa_IR.js +8 -4
  98. umap/static/umap/locale/fa_IR.json +8 -4
  99. umap/static/umap/locale/fi.js +17 -5
  100. umap/static/umap/locale/fi.json +17 -5
  101. umap/static/umap/locale/fr.js +9 -4
  102. umap/static/umap/locale/fr.json +9 -4
  103. umap/static/umap/locale/gl.js +13 -9
  104. umap/static/umap/locale/gl.json +13 -9
  105. umap/static/umap/locale/he.js +17 -5
  106. umap/static/umap/locale/he.json +17 -5
  107. umap/static/umap/locale/hr.js +17 -5
  108. umap/static/umap/locale/hr.json +17 -5
  109. umap/static/umap/locale/hu.js +8 -4
  110. umap/static/umap/locale/hu.json +8 -4
  111. umap/static/umap/locale/id.js +17 -5
  112. umap/static/umap/locale/id.json +17 -5
  113. umap/static/umap/locale/is.js +17 -5
  114. umap/static/umap/locale/is.json +17 -5
  115. umap/static/umap/locale/it.js +31 -27
  116. umap/static/umap/locale/it.json +31 -27
  117. umap/static/umap/locale/ja.js +17 -5
  118. umap/static/umap/locale/ja.json +17 -5
  119. umap/static/umap/locale/ko.js +17 -5
  120. umap/static/umap/locale/ko.json +17 -5
  121. umap/static/umap/locale/lt.js +17 -5
  122. umap/static/umap/locale/lt.json +17 -5
  123. umap/static/umap/locale/ms.js +8 -4
  124. umap/static/umap/locale/ms.json +8 -4
  125. umap/static/umap/locale/nl.js +132 -127
  126. umap/static/umap/locale/nl.json +132 -127
  127. umap/static/umap/locale/no.js +17 -5
  128. umap/static/umap/locale/no.json +17 -5
  129. umap/static/umap/locale/pl.js +8 -4
  130. umap/static/umap/locale/pl.json +8 -4
  131. umap/static/umap/locale/pl_PL.json +17 -5
  132. umap/static/umap/locale/pt.js +38 -33
  133. umap/static/umap/locale/pt.json +38 -33
  134. umap/static/umap/locale/pt_BR.js +17 -5
  135. umap/static/umap/locale/pt_BR.json +17 -5
  136. umap/static/umap/locale/pt_PT.js +8 -4
  137. umap/static/umap/locale/pt_PT.json +8 -4
  138. umap/static/umap/locale/ro.js +17 -5
  139. umap/static/umap/locale/ro.json +17 -5
  140. umap/static/umap/locale/ru.js +17 -5
  141. umap/static/umap/locale/ru.json +17 -5
  142. umap/static/umap/locale/sk_SK.js +17 -5
  143. umap/static/umap/locale/sk_SK.json +17 -5
  144. umap/static/umap/locale/sl.js +17 -5
  145. umap/static/umap/locale/sl.json +17 -5
  146. umap/static/umap/locale/sr.js +17 -5
  147. umap/static/umap/locale/sr.json +17 -5
  148. umap/static/umap/locale/sv.js +17 -5
  149. umap/static/umap/locale/sv.json +17 -5
  150. umap/static/umap/locale/th_TH.js +8 -4
  151. umap/static/umap/locale/th_TH.json +8 -4
  152. umap/static/umap/locale/tr.js +17 -5
  153. umap/static/umap/locale/tr.json +17 -5
  154. umap/static/umap/locale/uk_UA.js +17 -5
  155. umap/static/umap/locale/uk_UA.json +17 -5
  156. umap/static/umap/locale/vi.js +17 -5
  157. umap/static/umap/locale/vi.json +17 -5
  158. umap/static/umap/locale/vi_VN.json +17 -5
  159. umap/static/umap/locale/zh.js +17 -5
  160. umap/static/umap/locale/zh.json +17 -5
  161. umap/static/umap/locale/zh_CN.json +17 -5
  162. umap/static/umap/locale/zh_TW.Big5.json +17 -5
  163. umap/static/umap/locale/zh_TW.js +14 -10
  164. umap/static/umap/locale/zh_TW.json +14 -10
  165. umap/static/umap/map.css +17 -68
  166. umap/static/umap/nav.css +4 -0
  167. umap/static/umap/vars.css +1 -0
  168. umap/static/umap/vendors/dompurify/purify.es.js +138 -354
  169. umap/static/umap/vendors/dompurify/purify.es.mjs.map +1 -1
  170. umap/static/umap/vendors/editable/Leaflet.Editable.js +1 -0
  171. umap/sync/app.py +19 -13
  172. umap/sync/payloads.py +8 -1
  173. umap/templates/auth/user_form.html +2 -2
  174. umap/templates/umap/content_footer.html +1 -1
  175. umap/templates/umap/css.html +0 -2
  176. umap/templates/umap/js.html +0 -1
  177. umap/templates/umap/messages.html +5 -1
  178. umap/templates/umap/search_bar.html +1 -0
  179. umap/tests/integration/test_anonymous_owned_map.py +2 -2
  180. umap/tests/integration/test_basics.py +2 -5
  181. umap/tests/integration/test_categorized_layer.py +4 -8
  182. umap/tests/integration/test_choropleth.py +1 -1
  183. umap/tests/integration/test_conditional_rules.py +3 -3
  184. umap/tests/integration/test_draw_polygon.py +11 -19
  185. umap/tests/integration/test_draw_polyline.py +6 -14
  186. umap/tests/integration/test_edit_datalayer.py +10 -10
  187. umap/tests/integration/test_edit_map.py +27 -1
  188. umap/tests/integration/test_edit_marker.py +5 -5
  189. umap/tests/integration/test_edit_polygon.py +5 -5
  190. umap/tests/integration/test_features_id_generation.py +2 -6
  191. umap/tests/integration/test_import.py +93 -29
  192. umap/tests/integration/test_owned_map.py +1 -1
  193. umap/tests/integration/test_save.py +2 -2
  194. umap/tests/integration/test_tableeditor.py +7 -7
  195. umap/tests/integration/test_view_marker.py +10 -0
  196. umap/tests/integration/test_websocket_sync.py +128 -32
  197. umap/utils.py +4 -1
  198. umap/views.py +1 -10
  199. {umap_project-2.9.0b0.dist-info → umap_project-2.9.2.dist-info}/METADATA +13 -13
  200. {umap_project-2.9.0b0.dist-info → umap_project-2.9.2.dist-info}/RECORD +203 -205
  201. umap/static/umap/vendors/toolbar/leaflet.toolbar.css +0 -1
  202. umap/static/umap/vendors/toolbar/leaflet.toolbar.js +0 -1
  203. {umap_project-2.9.0b0.dist-info → umap_project-2.9.2.dist-info}/WHEEL +0 -0
  204. {umap_project-2.9.0b0.dist-info → umap_project-2.9.2.dist-info}/entry_points.txt +0 -0
  205. {umap_project-2.9.0b0.dist-info → umap_project-2.9.2.dist-info}/licenses/LICENSE +0 -0
@@ -3,7 +3,7 @@
3
3
  # This file is distributed under the same license as the PACKAGE package.
4
4
  #
5
5
  # Translators:
6
- # Supaplex <bejokeup@gmail.com>, 2019,2023-2024
6
+ # Supaplex <bejokeup@gmail.com>, 2019,2023-2025
7
7
  # Chia-liang Kao <clkao@clkao.org>, 2014
8
8
  # coop.shen <coop.shen@gmail.com>, 2014
9
9
  # coop.shen <coop.shen@gmail.com>, 2014
@@ -15,9 +15,9 @@ msgid ""
15
15
  msgstr ""
16
16
  "Project-Id-Version: uMap\n"
17
17
  "Report-Msgid-Bugs-To: \n"
18
- "POT-Creation-Date: 2024-12-24 08:39+0000\n"
18
+ "POT-Creation-Date: 2025-03-03 17:36+0000\n"
19
19
  "PO-Revision-Date: 2013-11-22 14:00+0000\n"
20
- "Last-Translator: Supaplex <bejokeup@gmail.com>, 2019,2023-2024\n"
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"
22
22
  "MIME-Version: 1.0\n"
23
23
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -31,17 +31,25 @@ msgstr "CSV 匯出"
31
31
 
32
32
  #: decorators.py:60
33
33
  msgid "This map is not publicly available"
34
- msgstr ""
34
+ msgstr "這份地圖並非公開可及的"
35
35
 
36
- #: middleware.py:13
36
+ #: middleware.py:19
37
37
  msgid "Site is readonly for maintenance"
38
38
  msgstr "網站目前因維護中設定為唯讀狀態"
39
39
 
40
+ #: middleware.py:34
41
+ #, python-format
42
+ msgid ""
43
+ "Using “%(name)s” to authenticate is deprecated and will be removed soon. "
44
+ "Please configure another provider below before losing access to your account"
45
+ " and maps."
46
+ msgstr ""
47
+
40
48
  #: models.py:60 models.py:79
41
49
  msgid "name"
42
50
  msgstr "名稱"
43
51
 
44
- #: models.py:62 models.py:475
52
+ #: models.py:62 models.py:485
45
53
  msgid "description"
46
54
  msgstr "描述"
47
55
 
@@ -61,23 +69,23 @@ msgstr "URL 樣板,使用 OSM 地圖磚格式"
61
69
  msgid "Order of the tilelayers in the edit box"
62
70
  msgstr "編輯方塊中地圖磚的圖層順序"
63
71
 
64
- #: models.py:175 models.py:469
72
+ #: models.py:175 models.py:479
65
73
  msgid "Only editable with secret edit link"
66
74
  msgstr "僅能由私密連結編輯"
67
75
 
68
- #: models.py:176 models.py:470
76
+ #: models.py:176 models.py:480
69
77
  msgid "Everyone can edit"
70
78
  msgstr "所有人皆可編輯"
71
79
 
72
- #: models.py:179 models.py:463
80
+ #: models.py:179 models.py:473
73
81
  msgid "Everyone"
74
82
  msgstr "所有人"
75
83
 
76
- #: models.py:180 models.py:189 models.py:464
84
+ #: models.py:180 models.py:189 models.py:474
77
85
  msgid "Editors and team only"
78
86
  msgstr "只有編輯者與團隊"
79
87
 
80
- #: models.py:181 models.py:465
88
+ #: models.py:181 models.py:475
81
89
  msgid "Owner only"
82
90
  msgstr "只有擁有者"
83
91
 
@@ -97,7 +105,7 @@ msgstr "任何有連結的人"
97
105
  msgid "Blocked"
98
106
  msgstr "已經封銷了"
99
107
 
100
- #: models.py:191
108
+ #: models.py:191 models.py:469
101
109
  msgid "Deleted"
102
110
  msgstr "已刪除"
103
111
 
@@ -137,31 +145,31 @@ msgstr "編輯者"
137
145
  msgid "team"
138
146
  msgstr "團隊"
139
147
 
140
- #: models.py:229 models.py:491
148
+ #: models.py:229 models.py:501
141
149
  msgid "edit status"
142
150
  msgstr "編輯狀態"
143
151
 
144
- #: models.py:234
152
+ #: models.py:234 models.py:506
145
153
  msgid "share status"
146
154
  msgstr "分享狀態"
147
155
 
148
- #: models.py:237 models.py:486
156
+ #: models.py:237 models.py:496
149
157
  msgid "settings"
150
158
  msgstr "設定"
151
159
 
152
- #: models.py:402
160
+ #: models.py:407
153
161
  msgid "Clone of"
154
162
  msgstr "複製"
155
163
 
156
- #: models.py:462 models.py:468
164
+ #: models.py:468 models.py:472 models.py:478
157
165
  msgid "Inherit"
158
166
  msgstr "繼承"
159
167
 
160
- #: models.py:481
168
+ #: models.py:491
161
169
  msgid "display on load"
162
170
  msgstr "載入時顯示"
163
171
 
164
- #: models.py:482
172
+ #: models.py:492
165
173
  msgid "Display this layer on load."
166
174
  msgstr "載入此圖層時顯示"
167
175
 
@@ -170,50 +178,64 @@ msgid ""
170
178
  "<a href=\"https://discover.umap-project.org/support/faq/#map-statuses\" "
171
179
  "target=\"_blank\">Find out here the documentation</a> on how to manage map’s"
172
180
  " permissions."
173
- msgstr ""
181
+ msgstr "<a href=\"https://discover.umap-project.org/support/faq/#map-statuses\" target=\"_blank\">在說明文件尋找資訊</a>,要如何管理地圖權限。"
174
182
 
175
183
  #: templates/403.html:10 templates/404.html:8
176
184
  msgid "← Go to the homepage"
177
- msgstr ""
185
+ msgstr "← 回到首頁"
178
186
 
179
187
  #: templates/404.html:7
180
188
  msgid "404 Page Not Found"
181
- msgstr ""
189
+ msgstr "404 頁面"
182
190
 
183
- #: templates/auth/user_detail.html:8
191
+ #: templates/auth/user_detail.html:6
192
+ #, python-format
193
+ msgid "%(current_user)s’s maps"
194
+ msgstr "%(current_user)s的地圖"
195
+
196
+ #: templates/auth/user_detail.html:12
184
197
  #, python-format
185
198
  msgid "Browse %(current_user)s's maps"
186
199
  msgstr "瀏覽 %(current_user)s 的地圖"
187
200
 
188
- #: templates/auth/user_detail.html:17
201
+ #: templates/auth/user_detail.html:21
189
202
  #, python-format
190
203
  msgid "%(current_user)s has no maps."
191
204
  msgstr "%(current_user)s 沒有任何地圖。"
192
205
 
193
- #: templates/auth/user_form.html:21 templates/umap/team_form.html:21
206
+ #: templates/auth/user_form.html:6
207
+ msgid "My Profile"
208
+ msgstr "我的檔案"
209
+
210
+ #: templates/auth/user_form.html:24 templates/umap/team_form.html:25
194
211
  msgid "Save"
195
212
  msgstr "儲存"
196
213
 
197
- #: templates/auth/user_form.html:27
214
+ #: templates/auth/user_form.html:30
198
215
  msgid "Your current providers"
199
216
  msgstr "你目前的供應商"
200
217
 
201
- #: templates/auth/user_form.html:39
218
+ #: templates/auth/user_form.html:44
202
219
  msgid "Connect to another provider"
203
220
  msgstr "連線到其他供應商"
204
221
 
205
- #: templates/auth/user_form.html:42
222
+ #: templates/auth/user_form.html:47
206
223
  msgid ""
207
224
  "It's a good habit to connect your account to more than one provider, in case"
208
225
  " one provider becomes unavailable, temporarily or even permanently."
209
226
  msgstr "用你的帳號連到多個供應商是好的習慣,因為有時候供應商會出狀況,甚至永久停止運作。"
210
227
 
211
- #: templates/auth/user_stars.html:8
228
+ #: templates/auth/user_stars.html:6
229
+ #, python-format
230
+ msgid "%(current_user)s’s starred maps"
231
+ msgstr "%(current_user)s的打星號地圖"
232
+
233
+ #: templates/auth/user_stars.html:12
212
234
  #, python-format
213
235
  msgid "Browse %(current_user)s's starred maps"
214
236
  msgstr "瀏覽 %(current_user)s 已打心號的地圖"
215
237
 
216
- #: templates/auth/user_stars.html:17
238
+ #: templates/auth/user_stars.html:21
217
239
  #, python-format
218
240
  msgid "%(current_user)s has no starred maps yet."
219
241
  msgstr "%(current_user)s 沒有任何打心號的地圖。"
@@ -248,6 +270,10 @@ msgstr "密碼"
248
270
  msgid "Please choose a provider:"
249
271
  msgstr "請選擇提供商:"
250
272
 
273
+ #: templates/umap/about.html:5 templates/umap/navigation.html:22
274
+ msgid "About"
275
+ msgstr "關於"
276
+
251
277
  #: templates/umap/about_summary.html:12
252
278
  #, python-format
253
279
  msgid ""
@@ -415,7 +441,7 @@ msgstr "由"
415
441
  msgid "More"
416
442
  msgstr "更多"
417
443
 
418
- #: templates/umap/map_table.html:8 templates/umap/user_teams.html:14
444
+ #: templates/umap/map_table.html:8 templates/umap/user_teams.html:18
419
445
  msgid "Name"
420
446
  msgstr "名稱"
421
447
 
@@ -439,7 +465,7 @@ msgstr "最後儲存"
439
465
  msgid "Owner"
440
466
  msgstr "擁有者"
441
467
 
442
- #: templates/umap/map_table.html:26 templates/umap/user_teams.html:20
468
+ #: templates/umap/map_table.html:26 templates/umap/user_teams.html:24
443
469
  msgid "Actions"
444
470
  msgstr "動作"
445
471
 
@@ -452,7 +478,7 @@ msgid "Share"
452
478
  msgstr "分享"
453
479
 
454
480
  #: templates/umap/map_table.html:78 templates/umap/map_table.html:80
455
- #: templates/umap/user_teams.html:38 templates/umap/user_teams.html:40
481
+ #: templates/umap/user_teams.html:42 templates/umap/user_teams.html:44
456
482
  msgid "Edit"
457
483
  msgstr "編輯"
458
484
 
@@ -515,10 +541,6 @@ msgstr "登入"
515
541
  msgid "Sign in"
516
542
  msgstr "註冊"
517
543
 
518
- #: templates/umap/navigation.html:22
519
- msgid "About"
520
- msgstr "關於"
521
-
522
544
  #: templates/umap/navigation.html:30
523
545
  msgid "Change password"
524
546
  msgstr "更改密碼"
@@ -527,51 +549,57 @@ msgstr "更改密碼"
527
549
  msgid "Log out"
528
550
  msgstr "登出"
529
551
 
530
- #: templates/umap/password_change.html:7
552
+ #: templates/umap/password_change.html:6
553
+ #: templates/umap/password_change.html:11
531
554
  msgid "Password change"
532
555
  msgstr "密碼變更"
533
556
 
534
- #: templates/umap/password_change.html:10
557
+ #: templates/umap/password_change.html:14
535
558
  msgid ""
536
559
  "Please enter your old password, for security's sake, and then enter your new"
537
560
  " password twice so we can verify you typed it in correctly."
538
561
  msgstr "為確保賬戸安全,請先輸入你的舊有密碼。然後輸入新密碼兩次,以便確認新密碼輸入正確。"
539
562
 
540
- #: templates/umap/password_change.html:17
563
+ #: templates/umap/password_change.html:21
541
564
  msgid "Old password"
542
565
  msgstr "舊密碼"
543
566
 
544
- #: templates/umap/password_change.html:22
567
+ #: templates/umap/password_change.html:26
545
568
  msgid "New password"
546
569
  msgstr "新密碼"
547
570
 
548
- #: templates/umap/password_change.html:26
571
+ #: templates/umap/password_change.html:30
549
572
  msgid "New password confirmation"
550
573
  msgstr "再次輸入新密碼"
551
574
 
552
- #: templates/umap/password_change.html:27
575
+ #: templates/umap/password_change.html:31
553
576
  msgid "Change my password"
554
577
  msgstr "更改我的密碼"
555
578
 
556
- #: templates/umap/password_change_done.html:7
579
+ #: templates/umap/password_change_done.html:6
580
+ #: templates/umap/password_change_done.html:11
557
581
  msgid "Password change successful"
558
582
  msgstr "成功更改密碼"
559
583
 
560
- #: templates/umap/password_change_done.html:10
584
+ #: templates/umap/password_change_done.html:14
561
585
  msgid "Your password was changed."
562
586
  msgstr "你的密碼已更改。"
563
587
 
564
- #: templates/umap/search.html:15
588
+ #: templates/umap/search.html:6
589
+ msgid "Explore maps"
590
+ msgstr "瀏覽地圖"
591
+
592
+ #: templates/umap/search.html:19
565
593
  #, python-format
566
594
  msgid "%(count)s map found:"
567
595
  msgid_plural "%(count)s maps found:"
568
596
  msgstr[0] "已找到%(count)s份地圖:"
569
597
 
570
- #: templates/umap/search.html:24
598
+ #: templates/umap/search.html:28
571
599
  msgid "No map found."
572
600
  msgstr "找不到地圖。"
573
601
 
574
- #: templates/umap/search.html:29
602
+ #: templates/umap/search.html:33
575
603
  msgid "Latest created maps"
576
604
  msgstr "最新創建地圖"
577
605
 
@@ -579,25 +607,38 @@ msgstr "最新創建地圖"
579
607
  msgid "Search maps"
580
608
  msgstr "搜尋地圖"
581
609
 
582
- #: templates/umap/search_bar.html:15
610
+ #: templates/umap/search_bar.html:16
583
611
  msgid "Search"
584
612
  msgstr "搜尋"
585
613
 
586
- #: templates/umap/team_detail.html:10
614
+ #: templates/umap/team_confirm_delete.html:6
615
+ msgid "Team deletion"
616
+ msgstr "團隊刪除"
617
+
618
+ #: templates/umap/team_detail.html:6
619
+ #, python-format
620
+ msgid "%(current_team)s’s maps"
621
+ msgstr "%(current_team)s的地圖"
622
+
623
+ #: templates/umap/team_detail.html:14
587
624
  #, python-format
588
625
  msgid "Browse %(current_team)s's maps"
589
626
  msgstr "瀏覽%(current_team)s的地圖"
590
627
 
591
- #: templates/umap/team_detail.html:22
628
+ #: templates/umap/team_detail.html:26
592
629
  #, python-format
593
630
  msgid "%(current_team)s has no public maps."
594
631
  msgstr "%(current_team)s沒有公開地圖"
595
632
 
596
- #: templates/umap/team_form.html:24
633
+ #: templates/umap/team_form.html:6
634
+ msgid "Create or edit a team"
635
+ msgstr "創建或是編輯團隊"
636
+
637
+ #: templates/umap/team_form.html:28
597
638
  msgid "Delete this team"
598
639
  msgstr "刪除這個團隊"
599
640
 
600
- #: templates/umap/team_form.html:47
641
+ #: templates/umap/team_form.html:51
601
642
  msgid "Add user"
602
643
  msgstr "新增使用者"
603
644
 
@@ -618,11 +659,15 @@ msgstr "下載%(count)s地圖"
618
659
  msgid "You have no map yet."
619
660
  msgstr "你目前還沒有地圖。"
620
661
 
621
- #: templates/umap/user_teams.html:17
662
+ #: templates/umap/user_teams.html:6
663
+ msgid "My Teams"
664
+ msgstr "我的團隊"
665
+
666
+ #: templates/umap/user_teams.html:21
622
667
  msgid "Users"
623
668
  msgstr "使用者"
624
669
 
625
- #: templates/umap/user_teams.html:48
670
+ #: templates/umap/user_teams.html:52
626
671
  msgid "New team"
627
672
  msgstr "新的團隊"
628
673
 
@@ -639,57 +684,57 @@ msgstr "已經刪除團隊 \"%(name)s\" "
639
684
  msgid "View the map"
640
685
  msgstr "檢視地圖"
641
686
 
642
- #: views.py:825
687
+ #: views.py:838
643
688
  msgid "See full screen"
644
689
  msgstr "檢視全螢幕"
645
690
 
646
- #: views.py:968
691
+ #: views.py:981
647
692
  msgid "Map editors updated with success!"
648
693
  msgstr "地圖編輯者更新完成"
649
694
 
650
- #: views.py:1004
695
+ #: views.py:1017
651
696
  #, python-format
652
697
  msgid "The uMap edit link for your map: %(map_name)s"
653
698
  msgstr "你的地圖 uMap 編輯連結:%(map_name)s"
654
699
 
655
- #: views.py:1007
700
+ #: views.py:1020
656
701
  #, python-format
657
702
  msgid "Here is your secret edit link: %(link)s"
658
703
  msgstr "這是你的祕密編輯連結:%(link)s"
659
704
 
660
- #: views.py:1014
705
+ #: views.py:1027
661
706
  #, python-format
662
707
  msgid "Can't send email to %(email)s"
663
708
  msgstr "無法傳送電子郵件到%(email)s"
664
709
 
665
- #: views.py:1017
710
+ #: views.py:1030
666
711
  #, python-format
667
712
  msgid "Email sent to %(email)s"
668
713
  msgstr "電子郵件寄至 %(email)s"
669
714
 
670
- #: views.py:1028
715
+ #: views.py:1041
671
716
  msgid "Only its owner can delete the map."
672
717
  msgstr "只有擁有者可以刪除此地圖"
673
718
 
674
- #: views.py:1031
719
+ #: views.py:1044
675
720
  msgid "Map successfully deleted."
676
721
  msgstr "成功刪除地圖"
677
722
 
678
- #: views.py:1057
723
+ #: views.py:1070
679
724
  #, python-format
680
725
  msgid ""
681
726
  "Your map has been cloned! If you want to edit this map from another "
682
727
  "computer, please use this link: %(anonymous_url)s"
683
728
  msgstr "您的地圖已複製完成!如果您想在不同的機器編輯這個地圖,請使用這個連結:%(anonymous_url)s"
684
729
 
685
- #: views.py:1062
730
+ #: views.py:1075
686
731
  msgid "Congratulations, your map has been cloned!"
687
732
  msgstr "恭喜,您的地圖已被複製!"
688
733
 
689
- #: views.py:1313
734
+ #: views.py:1329
690
735
  msgid "Layer successfully deleted."
691
736
  msgstr "圖層已刪除"
692
737
 
693
- #: views.py:1335
738
+ #: views.py:1351
694
739
  msgid "Permissions updated with success!"
695
740
  msgstr "權限更新完成"
umap/middleware.py CHANGED
@@ -1,6 +1,12 @@
1
1
  from django.conf import settings
2
+ from django.contrib import messages
3
+ from django.contrib.auth import BACKEND_SESSION_KEY
2
4
  from django.core.exceptions import MiddlewareNotUsed
3
- from django.http import HttpResponseForbidden
5
+ from django.http import (
6
+ HttpResponseForbidden,
7
+ HttpResponseRedirect,
8
+ )
9
+ from django.urls import reverse
4
10
  from django.utils.translation import gettext as _
5
11
 
6
12
 
@@ -15,3 +21,26 @@ def readonly_middleware(get_response):
15
21
  return get_response(request)
16
22
 
17
23
  return middleware
24
+
25
+
26
+ def deprecated_auth_backend(get_response):
27
+ def middleware(request):
28
+ backend = request.session.get(BACKEND_SESSION_KEY)
29
+ if backend in settings.DEPRECATED_AUTHENTICATION_BACKENDS:
30
+ name = backend.split(".")[-1]
31
+ messages.error(
32
+ request,
33
+ _(
34
+ "Using “%(name)s” to authenticate is deprecated and will be "
35
+ "removed soon. "
36
+ "Please configure another provider below before losing access "
37
+ "to your account and maps."
38
+ )
39
+ % {"name": name},
40
+ )
41
+ if "/map/" in request.path:
42
+ return HttpResponseRedirect(reverse("user_profile"))
43
+
44
+ return get_response(request)
45
+
46
+ return middleware
umap/models.py CHANGED
@@ -523,17 +523,27 @@ class DataLayer(NamedModel):
523
523
  def metadata(self, request=None):
524
524
  # Retrocompat: minimal settings for maps not saved after settings property
525
525
  # has been introduced
526
- obj = self.settings or {
527
- "name": self.name,
528
- "displayOnLoad": self.display_on_load,
529
- }
526
+ metadata = self.settings
527
+ if not metadata:
528
+ # Fallback to file for old datalayers.
529
+ data = json.loads(self.geojson.read().decode())
530
+ metadata = data.get("_umap_options")
531
+ if not metadata:
532
+ metadata = {
533
+ "name": self.name,
534
+ "displayOnLoad": self.display_on_load,
535
+ }
536
+ # Save it to prevent file reading at each map load.
537
+ self.settings = metadata
538
+ # Do not update the modified_at.
539
+ self.save(update_fields=["settings"])
530
540
  if self.old_id:
531
- obj["old_id"] = self.old_id
532
- obj["id"] = self.pk
533
- obj["permissions"] = {"edit_status": self.edit_status}
534
- obj["editMode"] = "advanced" if self.can_edit(request) else "disabled"
535
- obj["_referenceVersion"] = self.reference_version
536
- return obj
541
+ metadata["old_id"] = self.old_id
542
+ metadata["id"] = self.pk
543
+ metadata["permissions"] = {"edit_status": self.edit_status}
544
+ metadata["editMode"] = "advanced" if self.can_edit(request) else "disabled"
545
+ metadata["_referenceVersion"] = self.reference_version
546
+ return metadata
537
547
 
538
548
  def clone(self, map_inst=None):
539
549
  new = self.__class__.objects.get(pk=self.pk)
umap/settings/base.py CHANGED
@@ -235,6 +235,7 @@ MIDDLEWARE = (
235
235
  "django.middleware.csrf.CsrfViewMiddleware",
236
236
  "django.contrib.auth.middleware.AuthenticationMiddleware",
237
237
  "django.contrib.messages.middleware.MessageMiddleware",
238
+ "umap.middleware.deprecated_auth_backend",
238
239
  )
239
240
 
240
241
 
@@ -274,7 +275,7 @@ UMAP_MAPS_PER_PAGE = 5
274
275
  UMAP_MAPS_PER_SEARCH = 25
275
276
  UMAP_MAPS_PER_PAGE_OWNER = 10
276
277
  UMAP_SEARCH_CONFIGURATION = "simple"
277
- UMAP_HELP_URL = "https://wiki.openstreetmap.org/wiki/UMap#Feedback_and_help"
278
+ UMAP_HELP_URL = "https://discover.umap-project.org/"
278
279
  USER_MAPS_URL = "user_maps"
279
280
  DATABASES = {
280
281
  "default": env.db(
umap/static/umap/base.css CHANGED
@@ -19,7 +19,10 @@ h1, h2, h3, h4, h5, h6, label, hr {
19
19
  }
20
20
  a {
21
21
  text-decoration: none;
22
- color: SeaGreen;
22
+ color: #1F5C39;
23
+ }
24
+ a[href^="http"]:not(nav.umap-nav a) {
25
+ text-decoration: underline;
23
26
  }
24
27
  button {
25
28
  cursor: pointer;
@@ -201,3 +201,35 @@
201
201
  .umap-caption-bar-enabled {
202
202
  --current-footer-height: var(--footer-height);
203
203
  }
204
+ .umap-edit-bar {
205
+ position: absolute;
206
+ right: var(--panel-gutter);
207
+ display: none;
208
+ top: calc(var(--current-header-height) + var(--panel-gutter));
209
+ flex-direction: column;
210
+ z-index: var(--zindex-panels);
211
+ width: var(--control-size);
212
+ background-color: var(--background-color);
213
+ border-radius: var(--border-radius);
214
+ }
215
+ .umap-edit-enabled .umap-edit-bar {
216
+ display: flex;
217
+ }
218
+ .umap-edit-bar li {
219
+ width: var(--control-size);
220
+ height: var(--control-size);
221
+ }
222
+ .umap-edit-bar button {
223
+ padding: 0;
224
+ border-radius: 0;
225
+ }
226
+ .umap-edit-bar li:first-of-type button {
227
+ border-radius: var(--border-radius) var(--border-radius) 0 0;
228
+ }
229
+ .umap-edit-bar li:last-of-type button {
230
+ border-radius: 0 0 var(--border-radius) var(--border-radius);
231
+ }
232
+ .umap-edit-bar hr {
233
+ padding: 0;
234
+ margin: 0;
235
+ }
@@ -1,12 +1,20 @@
1
1
  .umap-contextmenu {
2
2
  background-color: var(--background-color);
3
- padding: calc(var(--box-padding) / 2) var(--box-padding);
3
+ padding: calc(var(--box-padding) / 2) calc(var(--box-padding) / 2);
4
4
  position: fixed;
5
5
  z-index: var(--zindex-contextmenu);
6
6
  border-radius: var(--border-radius);
7
7
  box-shadow: var(--block-shadow);
8
+ display: flex;
9
+ flex-direction: column;
8
10
  }
9
- .umap-contextmenu li + li {
11
+ .umap-contextmenu-rows {
12
+ flex-direction: row;
13
+ align-items: center;
14
+ justify-content: center;
15
+ align-content: center;
16
+ }
17
+ .umap-contextmenu:not(.umap-contextmenu-rows) li + li {
10
18
  margin-top: var(--text-margin);
11
19
  }
12
20
 
@@ -14,3 +22,7 @@
14
22
  margin-top: var(--text-margin);
15
23
  margin-bottom: var(--text-margin);
16
24
  }
25
+
26
+ .dark.umap-contextmenu li button .icon:hover {
27
+ background-color: var(--color-mediumGray);
28
+ }
@@ -87,6 +87,7 @@ input[type="submit"] {
87
87
  border: none;
88
88
  text-decoration: none;
89
89
  background-color: white;
90
+ justify-content: center;
90
91
  }
91
92
  .dark .button,
92
93
  .dark [type="button"] {
@@ -136,6 +137,9 @@ button.round {
136
137
  border-radius: 20px;
137
138
  border: 0.5px solid rgba(153, 153, 153, 0.40);
138
139
  }
140
+ button.round.small {
141
+ padding: var(--button-padding-small);
142
+ }
139
143
  .help-text, .helptext {
140
144
  display: block;
141
145
  padding: 7px 7px;
@@ -475,15 +479,6 @@ i.info {
475
479
  .umap-download:before {
476
480
  background-position: -72px -78px;
477
481
  }
478
- .permissions-panel,
479
- .umap-upload,
480
- .umap-share,
481
- .umap-datalayer-container,
482
- .umap-layer-properties-container,
483
- .umap-browse-data,
484
- .umap-tilelayer-switcher-container {
485
- padding: 0 10px;
486
- }
487
482
  .umap-field-datalist {
488
483
  display: flex;
489
484
  justify-content: space-between;
@@ -614,6 +609,6 @@ input[type=hidden].blur + [type="button"] {
614
609
  input.highlightable:not(:placeholder-shown) {
615
610
  border: 1px solid var(--color-brightCyan);
616
611
  }
617
- .umap-upload [type=url] {
612
+ .umap-import [type=url] {
618
613
  margin-bottom: 0;
619
614
  }