umap-project 1.14.0a5__py3-none-any.whl → 2.0.0a1__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 (216) hide show
  1. umap/__init__.py +1 -1
  2. umap/decorators.py +0 -14
  3. umap/locale/br/LC_MESSAGES/django.mo +0 -0
  4. umap/locale/br/LC_MESSAGES/django.po +137 -85
  5. umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
  6. umap/locale/cs_CZ/LC_MESSAGES/django.po +136 -84
  7. umap/locale/el/LC_MESSAGES/django.mo +0 -0
  8. umap/locale/el/LC_MESSAGES/django.po +136 -84
  9. umap/locale/en/LC_MESSAGES/django.po +128 -88
  10. umap/locale/es/LC_MESSAGES/django.mo +0 -0
  11. umap/locale/es/LC_MESSAGES/django.po +136 -84
  12. umap/locale/fr/LC_MESSAGES/django.mo +0 -0
  13. umap/locale/fr/LC_MESSAGES/django.po +131 -91
  14. umap/locale/hu/LC_MESSAGES/django.mo +0 -0
  15. umap/locale/hu/LC_MESSAGES/django.po +137 -85
  16. umap/locale/it/LC_MESSAGES/django.mo +0 -0
  17. umap/locale/it/LC_MESSAGES/django.po +136 -84
  18. umap/locale/ms/LC_MESSAGES/django.mo +0 -0
  19. umap/locale/ms/LC_MESSAGES/django.po +136 -84
  20. umap/locale/pl/LC_MESSAGES/django.mo +0 -0
  21. umap/locale/pl/LC_MESSAGES/django.po +136 -84
  22. umap/locale/sv/LC_MESSAGES/django.mo +0 -0
  23. umap/locale/sv/LC_MESSAGES/django.po +135 -83
  24. umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
  25. umap/locale/zh_TW/LC_MESSAGES/django.po +143 -91
  26. umap/models.py +23 -1
  27. umap/settings/__init__.py +1 -4
  28. umap/settings/base.py +1 -0
  29. umap/static/umap/base.css +5 -0
  30. umap/static/umap/content.css +185 -13
  31. umap/static/umap/favicons/icon.svg +2 -2
  32. umap/static/umap/img/edit.svg +3 -3
  33. umap/static/umap/img/icon-delete.svg +4 -0
  34. umap/static/umap/img/icon-download.svg +13 -0
  35. umap/static/umap/img/icon-duplicate.svg +5 -0
  36. umap/static/umap/img/icon-edit.svg +12 -0
  37. umap/static/umap/img/icon-share.svg +11 -0
  38. umap/static/umap/img/icon-view.svg +12 -0
  39. umap/static/umap/img/logo.svg +2 -2
  40. umap/static/umap/img/logo_small.svg +2 -2
  41. umap/static/umap/img/marker.svg +4 -0
  42. umap/static/umap/img/opensource.svg +2 -2
  43. umap/static/umap/img/osm.svg +2 -2
  44. umap/static/umap/js/components/fragment.js +1 -1
  45. umap/static/umap/js/modules/browser.js +159 -0
  46. umap/static/umap/js/modules/global.js +3 -1
  47. umap/static/umap/js/modules/request.js +155 -0
  48. umap/static/umap/js/umap.autocomplete.js +28 -38
  49. umap/static/umap/js/umap.controls.js +73 -58
  50. umap/static/umap/js/umap.core.js +4 -9
  51. umap/static/umap/js/umap.datalayer.permissions.js +13 -12
  52. umap/static/umap/js/umap.features.js +51 -49
  53. umap/static/umap/js/umap.forms.js +19 -19
  54. umap/static/umap/js/umap.icon.js +17 -17
  55. umap/static/umap/js/umap.importer.js +2 -1
  56. umap/static/umap/js/umap.js +242 -291
  57. umap/static/umap/js/umap.layer.js +173 -141
  58. umap/static/umap/js/umap.permissions.js +24 -25
  59. umap/static/umap/js/umap.popup.js +14 -14
  60. umap/static/umap/js/umap.share.js +4 -4
  61. umap/static/umap/js/umap.slideshow.js +4 -4
  62. umap/static/umap/js/umap.tableeditor.js +2 -2
  63. umap/static/umap/js/umap.ui.js +1 -1
  64. umap/static/umap/locale/am_ET.js +1 -11
  65. umap/static/umap/locale/am_ET.json +1 -11
  66. umap/static/umap/locale/ar.js +1 -11
  67. umap/static/umap/locale/ar.json +1 -11
  68. umap/static/umap/locale/ast.js +1 -11
  69. umap/static/umap/locale/ast.json +1 -11
  70. umap/static/umap/locale/bg.js +1 -11
  71. umap/static/umap/locale/bg.json +1 -11
  72. umap/static/umap/locale/br.js +1 -11
  73. umap/static/umap/locale/br.json +1 -11
  74. umap/static/umap/locale/ca.js +1 -11
  75. umap/static/umap/locale/ca.json +1 -11
  76. umap/static/umap/locale/cs_CZ.js +1 -11
  77. umap/static/umap/locale/cs_CZ.json +1 -11
  78. umap/static/umap/locale/da.js +1 -11
  79. umap/static/umap/locale/da.json +1 -11
  80. umap/static/umap/locale/de.js +1 -11
  81. umap/static/umap/locale/de.json +1 -11
  82. umap/static/umap/locale/el.js +1 -11
  83. umap/static/umap/locale/el.json +1 -11
  84. umap/static/umap/locale/en.js +1 -11
  85. umap/static/umap/locale/en.json +1 -11
  86. umap/static/umap/locale/en_US.json +1 -11
  87. umap/static/umap/locale/es.js +1 -11
  88. umap/static/umap/locale/es.json +1 -11
  89. umap/static/umap/locale/et.js +1 -11
  90. umap/static/umap/locale/et.json +1 -11
  91. umap/static/umap/locale/fa_IR.js +6 -16
  92. umap/static/umap/locale/fa_IR.json +6 -16
  93. umap/static/umap/locale/fi.js +1 -11
  94. umap/static/umap/locale/fi.json +1 -11
  95. umap/static/umap/locale/fr.js +1 -11
  96. umap/static/umap/locale/fr.json +1 -11
  97. umap/static/umap/locale/gl.js +1 -11
  98. umap/static/umap/locale/gl.json +1 -11
  99. umap/static/umap/locale/he.js +1 -11
  100. umap/static/umap/locale/he.json +1 -11
  101. umap/static/umap/locale/hr.js +1 -11
  102. umap/static/umap/locale/hr.json +1 -11
  103. umap/static/umap/locale/hu.js +1 -11
  104. umap/static/umap/locale/hu.json +1 -11
  105. umap/static/umap/locale/id.js +1 -11
  106. umap/static/umap/locale/id.json +1 -11
  107. umap/static/umap/locale/is.js +1 -11
  108. umap/static/umap/locale/is.json +1 -11
  109. umap/static/umap/locale/it.js +1 -11
  110. umap/static/umap/locale/it.json +1 -11
  111. umap/static/umap/locale/ja.js +1 -11
  112. umap/static/umap/locale/ja.json +1 -11
  113. umap/static/umap/locale/ko.js +1 -11
  114. umap/static/umap/locale/ko.json +1 -11
  115. umap/static/umap/locale/lt.js +1 -11
  116. umap/static/umap/locale/lt.json +1 -11
  117. umap/static/umap/locale/ms.js +1 -11
  118. umap/static/umap/locale/ms.json +1 -11
  119. umap/static/umap/locale/nl.js +1 -11
  120. umap/static/umap/locale/nl.json +1 -11
  121. umap/static/umap/locale/no.js +1 -11
  122. umap/static/umap/locale/no.json +1 -11
  123. umap/static/umap/locale/pl.js +1 -11
  124. umap/static/umap/locale/pl.json +1 -11
  125. umap/static/umap/locale/pl_PL.json +1 -11
  126. umap/static/umap/locale/pt.js +1 -11
  127. umap/static/umap/locale/pt.json +1 -11
  128. umap/static/umap/locale/pt_BR.js +1 -11
  129. umap/static/umap/locale/pt_BR.json +1 -11
  130. umap/static/umap/locale/pt_PT.js +1 -11
  131. umap/static/umap/locale/pt_PT.json +1 -11
  132. umap/static/umap/locale/ro.js +1 -11
  133. umap/static/umap/locale/ro.json +1 -11
  134. umap/static/umap/locale/ru.js +1 -11
  135. umap/static/umap/locale/ru.json +1 -11
  136. umap/static/umap/locale/sk_SK.js +1 -11
  137. umap/static/umap/locale/sk_SK.json +1 -11
  138. umap/static/umap/locale/sl.js +1 -11
  139. umap/static/umap/locale/sl.json +1 -11
  140. umap/static/umap/locale/sr.js +1 -11
  141. umap/static/umap/locale/sr.json +1 -11
  142. umap/static/umap/locale/sv.js +1 -11
  143. umap/static/umap/locale/sv.json +1 -11
  144. umap/static/umap/locale/th_TH.js +1 -11
  145. umap/static/umap/locale/th_TH.json +1 -11
  146. umap/static/umap/locale/tr.js +1 -11
  147. umap/static/umap/locale/tr.json +1 -11
  148. umap/static/umap/locale/uk_UA.js +1 -11
  149. umap/static/umap/locale/uk_UA.json +1 -11
  150. umap/static/umap/locale/vi.js +1 -11
  151. umap/static/umap/locale/vi.json +1 -11
  152. umap/static/umap/locale/vi_VN.json +1 -11
  153. umap/static/umap/locale/zh.js +1 -11
  154. umap/static/umap/locale/zh.json +1 -11
  155. umap/static/umap/locale/zh_CN.json +1 -11
  156. umap/static/umap/locale/zh_TW.Big5.json +1 -11
  157. umap/static/umap/locale/zh_TW.js +17 -27
  158. umap/static/umap/locale/zh_TW.json +17 -27
  159. umap/static/umap/map.css +2 -2
  160. umap/static/umap/nav.css +2 -1
  161. umap/static/umap/test/.eslintrc +0 -1
  162. umap/static/umap/test/Choropleth.js +29 -27
  163. umap/static/umap/test/DataLayer.js +207 -239
  164. umap/static/umap/test/Feature.js +33 -58
  165. umap/static/umap/test/Map.Export.js +11 -11
  166. umap/static/umap/test/Map.js +66 -67
  167. umap/static/umap/test/Marker.js +36 -32
  168. umap/static/umap/test/Polygon.js +95 -95
  169. umap/static/umap/test/Polyline.js +31 -31
  170. umap/static/umap/test/TableEditor.js +29 -25
  171. umap/static/umap/test/_pre.js +2 -7
  172. umap/static/umap/test/index.html +4 -4
  173. umap/storage.py +2 -0
  174. umap/templates/auth/user_form.html +3 -2
  175. umap/templates/base.html +1 -0
  176. umap/templates/registration/login.html +51 -36
  177. umap/templates/umap/about_summary.html +1 -1
  178. umap/templates/umap/branding.html +3 -0
  179. umap/templates/umap/content.html +15 -39
  180. umap/templates/umap/header.html +0 -0
  181. umap/templates/umap/home.html +4 -2
  182. umap/templates/umap/js.html +0 -2
  183. umap/templates/umap/map_detail.html +9 -0
  184. umap/templates/umap/map_init.html +1 -1
  185. umap/templates/umap/map_messages.html +4 -2
  186. umap/templates/umap/map_table.html +130 -69
  187. umap/templates/umap/navigation.html +2 -4
  188. umap/templates/umap/user_dashboard.html +29 -6
  189. umap/tests/base.py +1 -1
  190. umap/tests/integration/conftest.py +18 -0
  191. umap/tests/integration/test_anonymous_owned_map.py +6 -3
  192. umap/tests/integration/test_browser.py +166 -6
  193. umap/tests/integration/test_collaborative_editing.py +23 -5
  194. umap/tests/integration/test_dashboard.py +17 -0
  195. umap/tests/integration/test_edit_datalayer.py +4 -3
  196. umap/tests/integration/test_export_map.py +1 -1
  197. umap/tests/integration/test_import.py +9 -4
  198. umap/tests/integration/test_map.py +64 -0
  199. umap/tests/integration/test_map_preview.py +75 -0
  200. umap/tests/integration/test_owned_map.py +11 -25
  201. umap/tests/integration/test_picto.py +3 -3
  202. umap/tests/integration/test_querystring.py +52 -0
  203. umap/tests/integration/test_share.py +22 -0
  204. umap/tests/test_map_views.py +157 -14
  205. umap/tests/test_views.py +50 -11
  206. umap/urls.py +6 -12
  207. umap/views.py +170 -47
  208. {umap_project-1.14.0a5.dist-info → umap_project-2.0.0a1.dist-info}/METADATA +13 -15
  209. {umap_project-1.14.0a5.dist-info → umap_project-2.0.0a1.dist-info}/RECORD +212 -200
  210. umap/static/umap/js/umap.browser.js +0 -148
  211. umap/static/umap/js/umap.xhr.js +0 -304
  212. umap/static/umap/test/Controls.js +0 -100
  213. umap/static/umap/test/Map.Init.js +0 -46
  214. {umap_project-1.14.0a5.dist-info → umap_project-2.0.0a1.dist-info}/WHEEL +0 -0
  215. {umap_project-1.14.0a5.dist-info → umap_project-2.0.0a1.dist-info}/entry_points.txt +0 -0
  216. {umap_project-1.14.0a5.dist-info → umap_project-2.0.0a1.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
6
+ # Supaplex <bejokeup@gmail.com>, 2019,2023-2024
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-01-08 12:33+0000\n"
18
+ "POT-Creation-Date: 2024-02-09 10:52+0000\n"
19
19
  "PO-Revision-Date: 2013-11-22 14:00+0000\n"
20
- "Last-Translator: Sean Young <assanges@icloud.com>, 2016,2018,2023\n"
20
+ "Last-Translator: Supaplex <bejokeup@gmail.com>, 2019,2023-2024\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"
@@ -33,7 +33,7 @@ msgstr "僅能由私密連結編輯"
33
33
  msgid "Everyone can edit"
34
34
  msgstr "所有人皆可編輯"
35
35
 
36
- #: forms.py:69 models.py:349
36
+ #: forms.py:69 models.py:371
37
37
  msgid "Inherit"
38
38
  msgstr "繼承"
39
39
 
@@ -41,107 +41,107 @@ msgstr "繼承"
41
41
  msgid "Site is readonly for maintenance"
42
42
  msgstr "網站目前因維護中設定為唯讀狀態"
43
43
 
44
- #: models.py:49
44
+ #: models.py:50
45
45
  msgid "name"
46
46
  msgstr "名稱"
47
47
 
48
- #: models.py:80
48
+ #: models.py:81
49
49
  msgid "details"
50
50
  msgstr "詳情"
51
51
 
52
- #: models.py:81
52
+ #: models.py:82
53
53
  msgid "Link to a page where the licence is detailed."
54
54
  msgstr "連結至授權條款說明網址"
55
55
 
56
- #: models.py:91
56
+ #: models.py:92
57
57
  msgid "URL template using OSM tile format"
58
58
  msgstr "URL 樣板,使用 OSM 地圖磚格式"
59
59
 
60
- #: models.py:97
60
+ #: models.py:98
61
61
  msgid "Order of the tilelayers in the edit box"
62
62
  msgstr "編輯方塊中地圖磚的圖層順序"
63
63
 
64
- #: models.py:143 models.py:350
64
+ #: models.py:144 models.py:372
65
65
  msgid "Everyone"
66
66
  msgstr "所有人"
67
67
 
68
- #: models.py:144 models.py:150 models.py:351
68
+ #: models.py:145 models.py:151 models.py:373
69
69
  msgid "Editors only"
70
70
  msgstr "只有編輯者"
71
71
 
72
- #: models.py:145 models.py:352
72
+ #: models.py:146 models.py:374
73
73
  msgid "Owner only"
74
74
  msgstr "只有擁有者"
75
75
 
76
- #: models.py:148
76
+ #: models.py:149
77
77
  msgid "Everyone (public)"
78
78
  msgstr "所有人 (公開)"
79
79
 
80
- #: models.py:149
80
+ #: models.py:150
81
81
  msgid "Anyone with link"
82
82
  msgstr "任何有連結的人"
83
83
 
84
- #: models.py:151
84
+ #: models.py:152
85
85
  msgid "Blocked"
86
86
  msgstr "已經封銷了"
87
87
 
88
- #: models.py:154 models.py:356
88
+ #: models.py:155 models.py:378
89
89
  msgid "description"
90
90
  msgstr "描述"
91
91
 
92
- #: models.py:155
92
+ #: models.py:156
93
93
  msgid "center"
94
94
  msgstr "中心"
95
95
 
96
- #: models.py:156
96
+ #: models.py:157
97
97
  msgid "zoom"
98
98
  msgstr "縮放"
99
99
 
100
- #: models.py:158
100
+ #: models.py:159
101
101
  msgid "locate"
102
102
  msgstr "定位"
103
103
 
104
- #: models.py:158
104
+ #: models.py:159
105
105
  msgid "Locate user on load?"
106
106
  msgstr "載入時使用定位功能?"
107
107
 
108
- #: models.py:162
108
+ #: models.py:163
109
109
  msgid "Choose the map licence."
110
110
  msgstr "選擇地圖授權"
111
111
 
112
- #: models.py:163
112
+ #: models.py:164
113
113
  msgid "licence"
114
114
  msgstr "授權"
115
115
 
116
- #: models.py:174
116
+ #: models.py:175
117
117
  msgid "owner"
118
118
  msgstr "擁有者"
119
119
 
120
- #: models.py:178
120
+ #: models.py:179
121
121
  msgid "editors"
122
122
  msgstr "編輯者"
123
123
 
124
- #: models.py:183 models.py:370
124
+ #: models.py:184 models.py:392
125
125
  msgid "edit status"
126
126
  msgstr "編輯狀態"
127
127
 
128
- #: models.py:188
128
+ #: models.py:189
129
129
  msgid "share status"
130
130
  msgstr "分享狀態"
131
131
 
132
- #: models.py:191 models.py:365
132
+ #: models.py:192 models.py:387
133
133
  msgid "settings"
134
134
  msgstr "設定"
135
135
 
136
- #: models.py:298
136
+ #: models.py:320
137
137
  msgid "Clone of"
138
138
  msgstr "複製"
139
139
 
140
- #: models.py:360
140
+ #: models.py:382
141
141
  msgid "display on load"
142
142
  msgstr "載入時顯示"
143
143
 
144
- #: models.py:361
144
+ #: models.py:383
145
145
  msgid "Display this layer on load."
146
146
  msgstr "載入此圖層時顯示"
147
147
 
@@ -159,28 +159,27 @@ msgstr "瀏覽 %(current_user)s 的地圖"
159
159
  msgid "%(current_user)s has no maps."
160
160
  msgstr "%(current_user)s 沒有任何地圖。"
161
161
 
162
- #: templates/auth/user_form.html:6 templates/umap/navigation.html:12
163
- #: templates/umap/user_dashboard.html:4 templates/umap/user_dashboard.html:10
164
- msgid "My Dashboard"
165
- msgstr "我的儀表板"
166
-
167
162
  #: templates/auth/user_form.html:6
163
+ msgid "My Maps"
164
+ msgstr ""
165
+
166
+ #: templates/auth/user_form.html:7
168
167
  msgid "My Profile"
169
168
  msgstr "我的個人檔案"
170
169
 
171
- #: templates/auth/user_form.html:19
170
+ #: templates/auth/user_form.html:20
172
171
  msgid "Save"
173
172
  msgstr "儲存"
174
173
 
175
- #: templates/auth/user_form.html:24
174
+ #: templates/auth/user_form.html:25
176
175
  msgid "Your current providers"
177
176
  msgstr "你目前的供應商"
178
177
 
179
- #: templates/auth/user_form.html:30
178
+ #: templates/auth/user_form.html:31
180
179
  msgid "Connect to another provider"
181
180
  msgstr "連線到其他供應商"
182
181
 
183
- #: templates/auth/user_form.html:32
182
+ #: templates/auth/user_form.html:33
184
183
  msgid ""
185
184
  "It's a good habit to connect your account to more than one provider, in case"
186
185
  " one provider becomes unavailable, temporarily or even permanently."
@@ -202,23 +201,23 @@ msgid ""
202
201
  "them in your site."
203
202
  msgstr "uMap 允許你在數分鐘內創建有開放街圖的圖層的地圖,並且能內嵌到你的網站。"
204
203
 
205
- #: templates/registration/login.html:3
204
+ #: templates/registration/login.html:16
206
205
  msgid "Please log in with your account"
207
206
  msgstr "請先登入"
208
207
 
209
- #: templates/registration/login.html:15
208
+ #: templates/registration/login.html:28
210
209
  msgid "Username"
211
210
  msgstr "使用者名稱"
212
211
 
213
- #: templates/registration/login.html:18
212
+ #: templates/registration/login.html:31
214
213
  msgid "Password"
215
214
  msgstr "密碼"
216
215
 
217
- #: templates/registration/login.html:19
216
+ #: templates/registration/login.html:32
218
217
  msgid "Login"
219
218
  msgstr "登入"
220
219
 
221
- #: templates/registration/login.html:24
220
+ #: templates/registration/login.html:37
222
221
  msgid "Please choose a provider"
223
222
  msgstr "選擇服務商"
224
223
 
@@ -262,8 +261,8 @@ msgstr "內嵌並分享您的地圖"
262
261
  msgid "And it's <a href=\"%(repo_url)s\">open source</a>!"
263
262
  msgstr "而且是 <a href=\"%(repo_url)s\">開放原始碼</a> 的!"
264
263
 
265
- #: templates/umap/about_summary.html:48 templates/umap/navigation.html:42
266
- #: templates/umap/user_dashboard.html:20
264
+ #: templates/umap/about_summary.html:48 templates/umap/navigation.html:40
265
+ #: templates/umap/user_dashboard.html:41
267
266
  msgid "Create a map"
268
267
  msgstr "建立地圖"
269
268
 
@@ -271,13 +270,13 @@ msgstr "建立地圖"
271
270
  msgid "Play with the demo"
272
271
  msgstr "播放展示"
273
272
 
274
- #: templates/umap/content.html:23
273
+ #: templates/umap/content.html:22
275
274
  msgid ""
276
275
  "This instance of uMap is currently in read only mode, no creation/edit is "
277
276
  "allowed."
278
277
  msgstr "這份 uMap 目前是唯讀模式,並不允許創建/編輯。"
279
278
 
280
- #: templates/umap/content.html:31
279
+ #: templates/umap/content.html:30
281
280
  #, python-format
282
281
  msgid ""
283
282
  "This is a demo instance, used for tests and pre-rolling releases. If you "
@@ -290,7 +289,7 @@ msgstr "這是範例服務﹐提供測試與正式版發行前驗證使用。如
290
289
  msgid "Map of the uMaps"
291
290
  msgstr "uMaps 地圖"
292
291
 
293
- #: templates/umap/home.html:13
292
+ #: templates/umap/home.html:14
294
293
  msgid "Get inspired, browse maps"
295
294
  msgstr "找點子,瀏覽其他地圖"
296
295
 
@@ -298,7 +297,7 @@ msgstr "找點子,瀏覽其他地圖"
298
297
  msgid "You are logged in. Continuing..."
299
298
  msgstr "您已登入,繼續中..."
300
299
 
301
- #: templates/umap/map_list.html:9 views.py:296
300
+ #: templates/umap/map_list.html:9 views.py:341
302
301
  msgid "by"
303
302
  msgstr "由"
304
303
 
@@ -312,89 +311,121 @@ msgstr "名稱"
312
311
 
313
312
  #: templates/umap/map_table.html:6
314
313
  msgid "Preview"
315
- msgstr ""
314
+ msgstr "預纜"
316
315
 
317
316
  #: templates/umap/map_table.html:7
318
- msgid "Who can see / edit"
319
- msgstr "誰可以檢視 / 編輯"
317
+ msgid "Who can see"
318
+ msgstr ""
320
319
 
321
320
  #: templates/umap/map_table.html:8
321
+ msgid "Who can edit"
322
+ msgstr ""
323
+
324
+ #: templates/umap/map_table.html:9
322
325
  msgid "Last save"
323
326
  msgstr "最後儲存"
324
327
 
325
- #: templates/umap/map_table.html:9
328
+ #: templates/umap/map_table.html:10
326
329
  msgid "Owner"
327
330
  msgstr "擁有者"
328
331
 
329
- #: templates/umap/map_table.html:10
332
+ #: templates/umap/map_table.html:11
330
333
  msgid "Actions"
331
334
  msgstr "動作"
332
335
 
333
- #: templates/umap/map_table.html:22
336
+ #: templates/umap/map_table.html:24 templates/umap/map_table.html:26
334
337
  msgid "Open preview"
335
- msgstr ""
338
+ msgstr "開啟預纜"
336
339
 
337
- #: templates/umap/map_table.html:38
340
+ #: templates/umap/map_table.html:45 templates/umap/map_table.html:47
338
341
  msgid "Share"
339
342
  msgstr "分享"
340
343
 
341
- #: templates/umap/map_table.html:39
344
+ #: templates/umap/map_table.html:50 templates/umap/map_table.html:52
342
345
  msgid "Edit"
343
346
  msgstr "編輯"
344
347
 
345
- #: templates/umap/map_table.html:40
348
+ #: templates/umap/map_table.html:55 templates/umap/map_table.html:57
346
349
  msgid "Download"
347
350
  msgstr "下載"
348
351
 
349
- #: templates/umap/map_table.html:49
350
- msgid "first"
352
+ #: templates/umap/map_table.html:62 templates/umap/map_table.html:64
353
+ msgid "Clone"
351
354
  msgstr ""
352
355
 
353
- #: templates/umap/map_table.html:50
354
- msgid "previous"
356
+ #: templates/umap/map_table.html:72 templates/umap/map_table.html:74
357
+ msgid "Delete"
355
358
  msgstr ""
356
359
 
357
- #: templates/umap/map_table.html:59
360
+ #: templates/umap/map_table.html:86
361
+ msgid "first"
362
+ msgstr "第一"
363
+
364
+ #: templates/umap/map_table.html:87
365
+ msgid "previous"
366
+ msgstr "先前"
367
+
368
+ #: templates/umap/map_table.html:96
358
369
  #, python-format
359
370
  msgid ""
360
371
  "\n"
361
- " Page %(maps_number)s of %(num_pages)s\n"
362
- " "
372
+ " Page %(maps_number)s of %(num_pages)s\n"
373
+ " "
363
374
  msgstr ""
364
375
 
365
- #: templates/umap/map_table.html:65
376
+ #: templates/umap/map_table.html:102
366
377
  msgid "next"
367
- msgstr ""
378
+ msgstr "之後"
368
379
 
369
- #: templates/umap/map_table.html:66
380
+ #: templates/umap/map_table.html:103
370
381
  msgid "last"
382
+ msgstr "最後"
383
+
384
+ #: templates/umap/map_table.html:111
385
+ #, python-format
386
+ msgid ""
387
+ "\n"
388
+ " Lines per page: %(per_page)s\n"
389
+ " "
371
390
  msgstr ""
372
391
 
373
- #: templates/umap/navigation.html:15
392
+ #: templates/umap/map_table.html:116
393
+ #, python-format
394
+ msgid ""
395
+ "\n"
396
+ " %(count)s maps\n"
397
+ " "
398
+ msgstr ""
399
+
400
+ #: templates/umap/navigation.html:10 templates/umap/user_dashboard.html:4
401
+ msgid "My Dashboard"
402
+ msgstr "我的儀表板"
403
+
404
+ #: templates/umap/navigation.html:13
374
405
  msgid "Starred maps"
375
406
  msgstr "打心號的地圖"
376
407
 
377
- #: templates/umap/navigation.html:19
408
+ #: templates/umap/navigation.html:17
378
409
  msgid "Log in"
379
410
  msgstr "登入"
380
411
 
381
- #: templates/umap/navigation.html:19
412
+ #: templates/umap/navigation.html:17
382
413
  msgid "Sign in"
383
414
  msgstr "註冊"
384
415
 
385
- #: templates/umap/navigation.html:23
416
+ #: templates/umap/navigation.html:21
386
417
  msgid "About"
387
418
  msgstr "關於"
388
419
 
389
- #: templates/umap/navigation.html:26
420
+ #: templates/umap/navigation.html:24
390
421
  msgid "Help"
391
422
  msgstr "幫助"
392
423
 
393
- #: templates/umap/navigation.html:31
424
+ #: templates/umap/navigation.html:29
394
425
  msgid "Change password"
395
426
  msgstr "更改密碼"
396
427
 
397
- #: templates/umap/navigation.html:35
428
+ #: templates/umap/navigation.html:33
398
429
  msgid "Log out"
399
430
  msgstr "登出"
400
431
 
@@ -450,7 +481,7 @@ msgstr "最新創建地圖"
450
481
  msgid "Search maps"
451
482
  msgstr "搜尋地圖"
452
483
 
453
- #: templates/umap/search_bar.html:14
484
+ #: templates/umap/search_bar.html:14 templates/umap/user_dashboard.html:25
454
485
  msgid "Search"
455
486
  msgstr "搜尋"
456
487
 
@@ -458,60 +489,81 @@ msgstr "搜尋"
458
489
  msgid "Search my maps"
459
490
  msgstr "搜尋我的地圖"
460
491
 
461
- #: templates/umap/user_dashboard.html:10
492
+ #: templates/umap/user_dashboard.html:11
493
+ #, python-format
494
+ msgid "My Maps (%(count)s)"
495
+ msgstr ""
496
+
497
+ #: templates/umap/user_dashboard.html:13
462
498
  msgid "My profile"
463
499
  msgstr "我的個人檔案"
464
500
 
465
- #: templates/umap/user_dashboard.html:20
501
+ #: templates/umap/user_dashboard.html:21
502
+ msgid "Map’s title"
503
+ msgstr ""
504
+
505
+ #: templates/umap/user_dashboard.html:31
506
+ #, python-format
507
+ msgid ""
508
+ "\n"
509
+ " Download %(count)s maps\n"
510
+ " "
511
+ msgstr ""
512
+
513
+ #: templates/umap/user_dashboard.html:41
466
514
  msgid "You have no map yet."
467
515
  msgstr "你目前還沒有地圖。"
468
516
 
469
- #: views.py:301
517
+ #: views.py:346
470
518
  msgid "View the map"
471
519
  msgstr "檢視地圖"
472
520
 
473
- #: views.py:660
521
+ #: views.py:704
522
+ msgid "See full screen"
523
+ msgstr ""
524
+
525
+ #: views.py:779
474
526
  msgid "Map has been updated!"
475
527
  msgstr "地圖已經更新"
476
528
 
477
- #: views.py:685
529
+ #: views.py:804
478
530
  msgid "Map editors updated with success!"
479
531
  msgstr "地圖編輯者更新完成"
480
532
 
481
- #: views.py:723
533
+ #: views.py:842
482
534
  #, python-format
483
535
  msgid "The uMap edit link for your map: %(map_name)s"
484
536
  msgstr "你的地圖 uMap 編輯連結:%(map_name)s"
485
537
 
486
- #: views.py:726
538
+ #: views.py:845
487
539
  #, python-format
488
540
  msgid "Here is your secret edit link: %(link)s"
489
541
  msgstr "這是你的祕密編輯連結:%(link)s"
490
542
 
491
- #: views.py:732
543
+ #: views.py:851
492
544
  #, python-format
493
545
  msgid "Email sent to %(email)s"
494
546
  msgstr "電子郵件寄至 %(email)s"
495
547
 
496
- #: views.py:743
548
+ #: views.py:862
497
549
  msgid "Only its owner can delete the map."
498
550
  msgstr "只有擁有者可以刪除此地圖"
499
551
 
500
- #: views.py:766
552
+ #: views.py:890
501
553
  #, python-format
502
554
  msgid ""
503
555
  "Your map has been cloned! If you want to edit this map from another "
504
556
  "computer, please use this link: %(anonymous_url)s"
505
557
  msgstr "您的地圖已複製完成!如果您想在不同的機器編輯這個地圖,請使用這個連結:%(anonymous_url)s"
506
558
 
507
- #: views.py:771
559
+ #: views.py:895
508
560
  msgid "Congratulations, your map has been cloned!"
509
561
  msgstr "恭喜,您的地圖已被複製!"
510
562
 
511
- #: views.py:1007
563
+ #: views.py:1131
512
564
  msgid "Layer successfully deleted."
513
565
  msgstr "圖層已刪除"
514
566
 
515
- #: views.py:1029
567
+ #: views.py:1153
516
568
  msgid "Permissions updated with success!"
517
569
  msgstr "權限更新完成"
umap/models.py CHANGED
@@ -1,3 +1,4 @@
1
+ import json
1
2
  import os
2
3
  import time
3
4
 
@@ -216,12 +217,26 @@ class Map(NamedModel):
216
217
  "umap_id": self.pk,
217
218
  "onLoadPanel": "none",
218
219
  "captionBar": False,
219
- "default_iconUrl": "%sumap/img/marker.png" % settings.STATIC_URL,
220
+ "default_iconUrl": "%sumap/img/marker.svg" % settings.STATIC_URL,
220
221
  "slideshow": {},
221
222
  }
222
223
  )
223
224
  return map_settings
224
225
 
226
+ def generate_umapjson(self, request):
227
+ umapjson = self.settings
228
+ umapjson["type"] = "umap"
229
+ umapjson["uri"] = request.build_absolute_uri(self.get_absolute_url())
230
+ datalayers = []
231
+ for datalayer in self.datalayer_set.all():
232
+ with open(datalayer.geojson.path, "rb") as f:
233
+ layer = json.loads(f.read())
234
+ if datalayer.settings:
235
+ layer["_umap_options"] = datalayer.settings
236
+ datalayers.append(layer)
237
+ umapjson["layers"] = datalayers
238
+ return umapjson
239
+
225
240
  def get_absolute_url(self):
226
241
  return reverse("map", kwargs={"slug": self.slug or "map", "map_id": self.pk})
227
242
 
@@ -242,6 +257,13 @@ class Map(NamedModel):
242
257
  has_anonymous_cookie = False
243
258
  return has_anonymous_cookie
244
259
 
260
+ def can_delete(self, user=None, request=None):
261
+ if self.owner and user != self.owner:
262
+ return False
263
+ if not self.owner and not self.is_anonymous_owner(request):
264
+ return False
265
+ return True
266
+
245
267
  def can_edit(self, user=None, request=None):
246
268
  """
247
269
  Define if a user can edit or not the instance, according to his account
umap/settings/__init__.py CHANGED
@@ -34,10 +34,7 @@ if path:
34
34
  for key in dir(d):
35
35
  if key.isupper():
36
36
  value = getattr(d, key)
37
- if key.startswith("LEAFLET_STORAGE"):
38
- # Retrocompat pre 1.0, remove me in 1.1.
39
- globals()["UMAP" + key[15:]] = value
40
- elif key == "UMAP_CUSTOM_TEMPLATES":
37
+ if key == "UMAP_CUSTOM_TEMPLATES":
41
38
  if "DIRS" in globals()["TEMPLATES"][0]:
42
39
  globals()["TEMPLATES"][0]["DIRS"].insert(0, value)
43
40
  else:
umap/settings/base.py CHANGED
@@ -255,6 +255,7 @@ DATABASES = {"default": env.db(default="postgis://localhost:5432/umap")}
255
255
  UMAP_DEFAULT_SHARE_STATUS = None
256
256
  UMAP_DEFAULT_EDIT_STATUS = None
257
257
  UMAP_DEFAULT_FEATURES_HAVE_OWNERS = False
258
+ UMAP_HOME_FEED = "latest"
258
259
 
259
260
  UMAP_READONLY = env("UMAP_READONLY", default=False)
260
261
  UMAP_GZIP = True
umap/static/umap/base.css CHANGED
@@ -679,6 +679,9 @@ input[type=hidden].blur + [type="button"] {
679
679
  overflow-x: hidden;
680
680
  }
681
681
  #umap-ui-container {
682
+ /* Added for playwright to consider the element as non visible */
683
+ /* as being out of the visible viewport is not enough */
684
+ visibility: hidden;
682
685
  position: absolute;
683
686
  bottom: 0;
684
687
  padding: 0 10px;
@@ -970,6 +973,7 @@ input:invalid {
970
973
  }
971
974
  .umap-ui #umap-ui-container {
972
975
  right: 0;
976
+ visibility: visible;
973
977
  }
974
978
  }
975
979
  @media all and (orientation:portrait) {
@@ -982,6 +986,7 @@ input:invalid {
982
986
  }
983
987
  .umap-ui #umap-ui-container {
984
988
  right: 0;
989
+ visibility: visible;
985
990
  }
986
991
  .umap-ui .leaflet-right {
987
992
  right: 0;