wagtail 6.3.1__py3-none-any.whl → 6.4rc1__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 (307) hide show
  1. wagtail/__init__.py +1 -1
  2. wagtail/actions/publish_revision.py +4 -5
  3. wagtail/admin/auth.py +0 -2
  4. wagtail/admin/checks.py +1 -1
  5. wagtail/admin/filters.py +3 -1
  6. wagtail/admin/forms/account.py +21 -11
  7. wagtail/admin/forms/collections.py +2 -9
  8. wagtail/admin/forms/formsets.py +32 -0
  9. wagtail/admin/forms/pages.py +5 -1
  10. wagtail/admin/forms/workflows.py +2 -13
  11. wagtail/admin/locale/ar/LC_MESSAGES/django.mo +0 -0
  12. wagtail/admin/locale/ar/LC_MESSAGES/django.po +68 -1
  13. wagtail/admin/locale/ar/LC_MESSAGES/djangojs.mo +0 -0
  14. wagtail/admin/locale/ar/LC_MESSAGES/djangojs.po +5 -1
  15. wagtail/admin/locale/en/LC_MESSAGES/django.po +312 -356
  16. wagtail/admin/locale/en/LC_MESSAGES/djangojs.po +21 -16
  17. wagtail/admin/locale/gl/LC_MESSAGES/djangojs.mo +0 -0
  18. wagtail/admin/locale/gl/LC_MESSAGES/djangojs.po +5 -5
  19. wagtail/admin/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  20. wagtail/admin/locale/pt_BR/LC_MESSAGES/django.po +29 -0
  21. wagtail/admin/menu.py +0 -13
  22. wagtail/admin/panels/base.py +2 -2
  23. wagtail/admin/panels/group.py +4 -1
  24. wagtail/admin/panels/inline_panel.py +5 -2
  25. wagtail/admin/panels/model_utils.py +36 -0
  26. wagtail/admin/panels/page_utils.py +2 -40
  27. wagtail/admin/panels/signal_handlers.py +0 -2
  28. wagtail/admin/static/wagtailadmin/css/core.css +1 -1
  29. wagtail/admin/static/wagtailadmin/css/panels/draftail.css +1 -1
  30. wagtail/admin/static/wagtailadmin/css/panels/streamfield.css +1 -1
  31. wagtail/admin/static/wagtailadmin/js/comments.js +1 -1
  32. wagtail/admin/static/wagtailadmin/js/core.js +1 -1
  33. wagtail/admin/static/wagtailadmin/js/core.js.LICENSE.txt +1 -8
  34. wagtail/admin/static/wagtailadmin/js/draftail.js +1 -1
  35. wagtail/admin/static/wagtailadmin/js/modal-workflow.js +1 -1
  36. wagtail/admin/static/wagtailadmin/js/page-chooser-modal.js +1 -1
  37. wagtail/admin/static/wagtailadmin/js/privacy-switch.js +1 -1
  38. wagtail/admin/static/wagtailadmin/js/sidebar.js +1 -1
  39. wagtail/admin/static/wagtailadmin/js/telepath/blocks.js +1 -1
  40. wagtail/admin/static/wagtailadmin/js/userbar.js +1 -1
  41. wagtail/admin/static/wagtailadmin/js/userbar.js.LICENSE.txt +1 -1
  42. wagtail/admin/static/wagtailadmin/js/vendor.js +1 -1
  43. wagtail/admin/static/wagtailadmin/js/vendor.js.LICENSE.txt +7 -0
  44. wagtail/admin/templates/wagtailadmin/404.html +4 -0
  45. wagtail/admin/templates/wagtailadmin/chooser/browse.html +2 -1
  46. wagtail/admin/templates/wagtailadmin/chooser/tables/parent_page_cell.html +1 -1
  47. wagtail/admin/templates/wagtailadmin/collections/_privacy_switch.html +8 -1
  48. wagtail/admin/templates/wagtailadmin/generic/confirm_delete.html +15 -9
  49. wagtail/admin/templates/wagtailadmin/generic/confirm_unpublish.html +21 -25
  50. wagtail/admin/templates/wagtailadmin/generic/form.html +1 -1
  51. wagtail/admin/templates/wagtailadmin/generic/preview_error.html +3 -0
  52. wagtail/admin/templates/wagtailadmin/generic/revisions/compare.html +63 -76
  53. wagtail/admin/templates/wagtailadmin/pages/_editor_js.html +0 -2
  54. wagtail/admin/templates/wagtailadmin/pages/edit.html +1 -5
  55. wagtail/admin/templates/wagtailadmin/panels/inline_panel_child.html +1 -0
  56. wagtail/admin/templates/wagtailadmin/permissions/includes/collection_member_permissions_form.html +1 -1
  57. wagtail/admin/templates/wagtailadmin/permissions/includes/collection_member_permissions_formset.html +6 -22
  58. wagtail/admin/templates/wagtailadmin/shared/formatted_field.html +2 -2
  59. wagtail/admin/templates/wagtailadmin/shared/header.html +2 -2
  60. wagtail/admin/templates/wagtailadmin/shared/page_status_tag_new.html +32 -39
  61. wagtail/admin/templates/wagtailadmin/shared/revisions/confirm_unschedule.html +13 -17
  62. wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/privacy.html +15 -3
  63. wagtail/admin/templates/wagtailadmin/shared/side_panels/preview.html +1 -1
  64. wagtail/admin/templates/wagtailadmin/skeleton.html +4 -2
  65. wagtail/admin/templates/wagtailadmin/workflows/create.html +1 -1
  66. wagtail/admin/templates/wagtailadmin/workflows/edit.html +1 -1
  67. wagtail/admin/templates/wagtailadmin/workflows/includes/workflow_pages_form.html +1 -1
  68. wagtail/admin/templates/wagtailadmin/workflows/includes/workflow_pages_formset.html +6 -23
  69. wagtail/admin/templatetags/wagtailadmin_tags.py +12 -0
  70. wagtail/admin/templatetags/wagtailuserbar.py +2 -3
  71. wagtail/admin/tests/pages/test_create_page.py +110 -1
  72. wagtail/admin/tests/pages/test_edit_page.py +3 -2
  73. wagtail/admin/tests/pages/test_explorer_view.py +18 -0
  74. wagtail/admin/tests/pages/test_page_usage.py +24 -20
  75. wagtail/admin/tests/pages/test_preview.py +69 -1
  76. wagtail/admin/tests/pages/test_revisions.py +40 -6
  77. wagtail/admin/tests/test_account_management.py +39 -1
  78. wagtail/admin/tests/test_audit_log.py +4 -2
  79. wagtail/admin/tests/test_block_preview.py +224 -0
  80. wagtail/admin/tests/test_edit_handlers.py +23 -6
  81. wagtail/admin/tests/test_page_chooser.py +50 -3
  82. wagtail/admin/tests/test_privacy.py +49 -26
  83. wagtail/admin/tests/test_site_summary.py +15 -10
  84. wagtail/admin/tests/test_templatetags.py +19 -0
  85. wagtail/admin/tests/test_userbar.py +82 -1
  86. wagtail/admin/tests/test_views_generic.py +27 -12
  87. wagtail/admin/tests/test_workflows.py +69 -0
  88. wagtail/admin/tests/tests.py +23 -4
  89. wagtail/admin/tests/ui/test_sidebar.py +1 -1
  90. wagtail/admin/tests/viewsets/test_model_viewset.py +15 -13
  91. wagtail/admin/ui/side_panels.py +7 -4
  92. wagtail/admin/urls/__init__.py +6 -0
  93. wagtail/admin/urls/pages.py +1 -1
  94. wagtail/admin/userbar.py +21 -1
  95. wagtail/admin/views/account.py +5 -0
  96. wagtail/admin/views/chooser.py +5 -1
  97. wagtail/admin/views/collections.py +0 -2
  98. wagtail/admin/views/generic/base.py +20 -10
  99. wagtail/admin/views/generic/history.py +0 -1
  100. wagtail/admin/views/generic/models.py +79 -21
  101. wagtail/admin/views/generic/preview.py +50 -1
  102. wagtail/admin/views/mixins.py +4 -2
  103. wagtail/admin/views/pages/bulk_actions/delete.py +11 -23
  104. wagtail/admin/views/pages/bulk_actions/page_bulk_action.py +17 -0
  105. wagtail/admin/views/pages/bulk_actions/publish.py +11 -31
  106. wagtail/admin/views/pages/bulk_actions/unpublish.py +11 -31
  107. wagtail/admin/views/pages/create.py +1 -0
  108. wagtail/admin/views/pages/edit.py +38 -30
  109. wagtail/admin/views/pages/revisions.py +43 -114
  110. wagtail/admin/views/pages/utils.py +0 -1
  111. wagtail/admin/views/tags.py +6 -2
  112. wagtail/admin/views/workflows.py +8 -6
  113. wagtail/admin/viewsets/model.py +0 -4
  114. wagtail/admin/viewsets/pages.py +0 -1
  115. wagtail/admin/widgets/tags.py +1 -0
  116. wagtail/api/v2/tests/test_documents.py +4 -2
  117. wagtail/api/v2/tests/test_images.py +4 -2
  118. wagtail/api/v2/tests/test_pages.py +8 -4
  119. wagtail/blocks/base.py +59 -1
  120. wagtail/blocks/field_block.py +6 -0
  121. wagtail/blocks/list_block.py +4 -0
  122. wagtail/blocks/static_block.py +3 -0
  123. wagtail/blocks/stream_block.py +5 -1
  124. wagtail/blocks/struct_block.py +6 -0
  125. wagtail/compat.py +16 -0
  126. wagtail/contrib/forms/forms.py +27 -7
  127. wagtail/contrib/forms/locale/en/LC_MESSAGES/django.po +2 -2
  128. wagtail/contrib/forms/locale/gl/LC_MESSAGES/django.mo +0 -0
  129. wagtail/contrib/forms/locale/gl/LC_MESSAGES/django.po +4 -4
  130. wagtail/contrib/forms/tests/test_models.py +7 -5
  131. wagtail/contrib/forms/tests/test_views.py +75 -0
  132. wagtail/contrib/frontend_cache/backends/cloudfront.py +1 -1
  133. wagtail/contrib/frontend_cache/tasks.py +83 -0
  134. wagtail/contrib/frontend_cache/tests.py +48 -33
  135. wagtail/contrib/frontend_cache/utils.py +2 -70
  136. wagtail/contrib/redirects/base_formats.py +2 -2
  137. wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.mo +0 -0
  138. wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.po +3 -0
  139. wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po +24 -37
  140. wagtail/contrib/redirects/templates/wagtailredirects/add.html +1 -24
  141. wagtail/contrib/redirects/templates/wagtailredirects/confirm_delete.html +3 -13
  142. wagtail/contrib/redirects/tests/test_redirects.py +122 -110
  143. wagtail/contrib/redirects/tests/test_signal_handlers.py +75 -69
  144. wagtail/contrib/redirects/urls.py +2 -2
  145. wagtail/contrib/redirects/views.py +35 -73
  146. wagtail/contrib/search_promotions/admin_urls.py +10 -3
  147. wagtail/contrib/search_promotions/forms.py +55 -26
  148. wagtail/contrib/search_promotions/locale/en/LC_MESSAGES/django.po +44 -54
  149. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/add.html +21 -31
  150. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/confirm_delete.html +3 -12
  151. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/edit.html +11 -34
  152. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotion_form.html +1 -0
  153. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotions_formset.js +2 -1
  154. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/index.html +0 -1
  155. wagtail/contrib/search_promotions/tests.py +814 -13
  156. wagtail/contrib/search_promotions/views/__init__.py +1 -0
  157. wagtail/contrib/search_promotions/views/reports.py +56 -0
  158. wagtail/contrib/search_promotions/views/settings.py +258 -0
  159. wagtail/contrib/search_promotions/wagtail_hooks.py +12 -1
  160. wagtail/contrib/settings/locale/ar/LC_MESSAGES/django.mo +0 -0
  161. wagtail/contrib/settings/locale/ar/LC_MESSAGES/django.po +6 -1
  162. wagtail/contrib/settings/locale/en/LC_MESSAGES/django.po +3 -3
  163. wagtail/contrib/settings/templates/wagtailsettings/edit.html +1 -5
  164. wagtail/contrib/settings/tests/generic/test_admin.py +2 -5
  165. wagtail/contrib/settings/tests/generic/test_register.py +1 -1
  166. wagtail/contrib/settings/tests/site_specific/test_admin.py +2 -5
  167. wagtail/contrib/settings/tests/site_specific/test_register.py +1 -1
  168. wagtail/contrib/settings/views.py +9 -23
  169. wagtail/contrib/simple_translation/locale/en/LC_MESSAGES/django.po +1 -1
  170. wagtail/contrib/styleguide/locale/en/LC_MESSAGES/django.po +1 -1
  171. wagtail/contrib/table_block/locale/en/LC_MESSAGES/django.po +1 -1
  172. wagtail/contrib/table_block/tests.py +4 -1
  173. wagtail/contrib/typed_table_block/blocks.py +3 -0
  174. wagtail/contrib/typed_table_block/locale/en/LC_MESSAGES/django.po +10 -10
  175. wagtail/contrib/typed_table_block/static/typed_table_block/js/typed_table_block.js +1 -1
  176. wagtail/contrib/typed_table_block/tests.py +33 -0
  177. wagtail/documents/locale/en/LC_MESSAGES/django.po +26 -26
  178. wagtail/documents/migrations/0011_add_choose_permissions.py +1 -0
  179. wagtail/documents/models.py +1 -0
  180. wagtail/documents/signal_handlers.py +6 -2
  181. wagtail/documents/static/wagtaildocs/js/add-multiple.js +1 -1
  182. wagtail/documents/templates/wagtaildocs/documents/edit.html +1 -3
  183. wagtail/documents/templates/wagtaildocs/multiple/add.html +7 -1
  184. wagtail/documents/tests/test_admin_views.py +74 -33
  185. wagtail/documents/tests/test_views.py +21 -12
  186. wagtail/documents/views/chooser.py +1 -0
  187. wagtail/documents/views/documents.py +1 -2
  188. wagtail/documents/views/multiple.py +0 -1
  189. wagtail/documents/views/serve.py +9 -2
  190. wagtail/documents/wagtail_hooks.py +6 -1
  191. wagtail/embeds/locale/en/LC_MESSAGES/django.po +1 -1
  192. wagtail/embeds/oembed_providers.py +0 -64
  193. wagtail/fields.py +3 -0
  194. wagtail/images/apps.py +2 -1
  195. wagtail/images/blocks.py +14 -2
  196. wagtail/images/forms.py +40 -3
  197. wagtail/images/locale/ar/LC_MESSAGES/django.mo +0 -0
  198. wagtail/images/locale/ar/LC_MESSAGES/django.po +4 -0
  199. wagtail/images/locale/en/LC_MESSAGES/django.po +49 -49
  200. wagtail/images/migrations/0023_add_choose_permissions.py +1 -0
  201. wagtail/images/rich_text/contentstate.py +1 -0
  202. wagtail/images/rich_text/editor_html.py +1 -0
  203. wagtail/images/signal_handlers.py +17 -10
  204. wagtail/images/static/wagtailimages/js/add-multiple.js +1 -1
  205. wagtail/images/static/wagtailimages/js/image-block.js +1 -1
  206. wagtail/images/static/wagtailimages/js/image-chooser-telepath.js +1 -1
  207. wagtail/images/static/wagtailimages/js/image-chooser.js +1 -1
  208. wagtail/images/static/wagtailimages/js/image-url-generator.js +1 -1
  209. wagtail/images/static/wagtailimages/js/vendor/jquery.fileupload-image.js +1 -1
  210. wagtail/images/tasks.py +18 -0
  211. wagtail/images/templates/wagtailimages/images/edit.html +1 -3
  212. wagtail/images/templates/wagtailimages/images/url_generator.html +1 -1
  213. wagtail/images/templates/wagtailimages/multiple/add.html +7 -2
  214. wagtail/images/templates/wagtailimages/widgets/image_chooser.html +1 -1
  215. wagtail/images/tests/test_admin_views.py +53 -29
  216. wagtail/images/tests/test_blocks.py +34 -2
  217. wagtail/images/tests/test_models.py +12 -10
  218. wagtail/images/tests/tests.py +10 -0
  219. wagtail/images/views/chooser.py +1 -0
  220. wagtail/images/views/images.py +1 -3
  221. wagtail/images/views/multiple.py +0 -1
  222. wagtail/images/views/serve.py +18 -2
  223. wagtail/images/widgets.py +3 -0
  224. wagtail/locale/en/LC_MESSAGES/django.po +228 -216
  225. wagtail/locales/locale/en/LC_MESSAGES/django.po +1 -1
  226. wagtail/management/commands/publish_scheduled.py +1 -1
  227. wagtail/migrations/0087_alter_grouppagepermission_unique_together_and_more.py +16 -8
  228. wagtail/models/__init__.py +300 -119
  229. wagtail/models/i18n.py +2 -2
  230. wagtail/models/panels.py +37 -0
  231. wagtail/models/sites.py +7 -6
  232. wagtail/permission_policies/pages.py +2 -2
  233. wagtail/project_template/project_name/settings/base.py +4 -0
  234. wagtail/project_template/requirements.txt +1 -1
  235. wagtail/query.py +145 -0
  236. wagtail/search/backends/database/mysql/mysql.py +25 -17
  237. wagtail/search/backends/database/postgres/postgres.py +44 -83
  238. wagtail/search/backends/database/sqlite/sqlite.py +25 -17
  239. wagtail/search/backends/elasticsearch7.py +4 -0
  240. wagtail/search/locale/en/LC_MESSAGES/django.po +1 -1
  241. wagtail/search/query.py +8 -2
  242. wagtail/search/signal_handlers.py +6 -9
  243. wagtail/search/tasks.py +10 -0
  244. wagtail/search/tests/test_elasticsearch7_backend.py +21 -0
  245. wagtail/search/tests/test_index_functions.py +10 -6
  246. wagtail/search/tests/test_postgres_backend.py +0 -14
  247. wagtail/signal_handlers.py +5 -20
  248. wagtail/sites/locale/en/LC_MESSAGES/django.po +1 -1
  249. wagtail/snippets/locale/en/LC_MESSAGES/django.po +3 -13
  250. wagtail/snippets/locale/sv/LC_MESSAGES/django.mo +0 -0
  251. wagtail/snippets/locale/sv/LC_MESSAGES/django.po +4 -3
  252. wagtail/snippets/tests/test_preview.py +5 -0
  253. wagtail/snippets/tests/test_snippets.py +100 -45
  254. wagtail/snippets/tests/test_usage.py +29 -24
  255. wagtail/snippets/tests/test_viewset.py +1 -1
  256. wagtail/snippets/views/snippets.py +0 -12
  257. wagtail/tasks.py +41 -0
  258. wagtail/templates/wagtailcore/shared/block_preview.html +29 -0
  259. wagtail/test/earlypage/__init__.py +0 -0
  260. wagtail/test/earlypage/migrations/0001_initial.py +37 -0
  261. wagtail/test/earlypage/migrations/__init__.py +0 -0
  262. wagtail/test/earlypage/models.py +14 -0
  263. wagtail/test/settings.py +3 -0
  264. wagtail/test/testapp/fixtures/test.json +7 -0
  265. wagtail/test/testapp/fixtures/test_specific.json +6 -3
  266. wagtail/test/testapp/models.py +58 -44
  267. wagtail/test/testapp/templates/tests/custom_block_preview.html +16 -0
  268. wagtail/test/testapp/templates/tests/static_block_preview.html +5 -0
  269. wagtail/test/testapp/wagtail_hooks.py +9 -0
  270. wagtail/tests/test_blocks.py +189 -2
  271. wagtail/tests/test_hooks.py +166 -1
  272. wagtail/tests/test_management_commands.py +54 -13
  273. wagtail/tests/test_page_allowed_http_methods.py +32 -0
  274. wagtail/tests/test_page_model.py +68 -0
  275. wagtail/tests/test_page_privacy.py +10 -0
  276. wagtail/tests/test_page_queryset.py +79 -0
  277. wagtail/tests/test_reference_index.py +84 -75
  278. wagtail/tests/test_streamfield.py +30 -0
  279. wagtail/tests/test_utils.py +61 -0
  280. wagtail/users/forms.py +2 -9
  281. wagtail/users/locale/en/LC_MESSAGES/django.po +17 -17
  282. wagtail/users/locale/nl/LC_MESSAGES/django.mo +0 -0
  283. wagtail/users/locale/nl/LC_MESSAGES/django.po +4 -3
  284. wagtail/users/templates/wagtailusers/groups/create.html +0 -5
  285. wagtail/users/templates/wagtailusers/groups/includes/page_permissions_form.html +1 -1
  286. wagtail/users/templates/wagtailusers/groups/includes/page_permissions_formset.html +6 -6
  287. wagtail/users/tests/test_admin_views.py +96 -4
  288. wagtail/users/tests/test_utils.py +76 -0
  289. wagtail/users/utils.py +43 -11
  290. wagtail/utils/setup.py +2 -2
  291. wagtail/utils/templates.py +26 -0
  292. wagtail/utils/widgets.py +1 -0
  293. wagtail/views.py +9 -1
  294. wagtail/wagtail_hooks.py +67 -29
  295. {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/METADATA +2 -2
  296. {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/RECORD +300 -287
  297. wagtail/admin/static/wagtailadmin/js/expanding-formset.js +0 -1
  298. wagtail/admin/static/wagtailadmin/js/vendor/rangy-core.js +0 -1
  299. wagtail/admin/static/wagtailadmin/js/vendor/uuidv4.min.js +0 -1
  300. wagtail/contrib/search_promotions/views.py +0 -323
  301. wagtail/images/static/wagtailimages/js/vendor/canvas-to-blob.min.js +0 -1
  302. wagtail/users/static/wagtailusers/js/group-form.js +0 -1
  303. wagtail/users/templates/wagtailusers/groups/includes/group_form_js.html +0 -3
  304. {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/LICENSE +0 -0
  305. {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/WHEEL +0 -0
  306. {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/entry_points.txt +0 -0
  307. {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/top_level.txt +0 -0
@@ -2,11 +2,11 @@ msgid ""
2
2
  msgstr ""
3
3
  "Content-Type: text/plain; charset=UTF-8\n"
4
4
 
5
- #: src/components/Sidebar/menu/SubMenuItem.tsx:121
5
+ #: src/components/Sidebar/menu/SubMenuItem.tsx:122
6
6
  msgid "(%(number)s new items in this menu)"
7
7
  msgstr ""
8
8
 
9
- #: src/components/Sidebar/menu/SubMenuItem.tsx:120
9
+ #: src/components/Sidebar/menu/SubMenuItem.tsx:121
10
10
  msgid "(1 new item in this menu)"
11
11
  msgstr ""
12
12
 
@@ -47,7 +47,7 @@ msgstr ""
47
47
  msgid "Are you sure?"
48
48
  msgstr ""
49
49
 
50
- #: src/entrypoints/admin/telepath/widgets.js:407
50
+ #: src/entrypoints/admin/telepath/widgets.js:411
51
51
  msgid "Blocks"
52
52
  msgstr ""
53
53
 
@@ -70,6 +70,7 @@ msgstr ""
70
70
  msgid "Character count:"
71
71
  msgstr ""
72
72
 
73
+ #: src/components/Sidebar/menu/SubMenuCloseButton.tsx:30
73
74
  #: src/entrypoints/admin/modal-workflow.js:56
74
75
  msgid "Close"
75
76
  msgstr ""
@@ -144,7 +145,7 @@ msgstr ""
144
145
  msgid "Horizontal line"
145
146
  msgstr ""
146
147
 
147
- #: src/components/ComboBox/ComboBox.tsx:9
148
+ #: src/components/ComboBox/ComboBox.tsx:10
148
149
  msgid "Insert a block"
149
150
  msgstr ""
150
151
 
@@ -168,7 +169,7 @@ msgstr ""
168
169
  msgid "More actions"
169
170
  msgstr ""
170
171
 
171
- #: src/components/ComboBox/ComboBox.tsx:11
172
+ #: src/components/ComboBox/ComboBox.tsx:12
172
173
  #: src/components/Draftail/index.js:241
173
174
  #: src/components/PageExplorer/PageExplorerPanel.tsx:84
174
175
  msgid "No results"
@@ -191,6 +192,10 @@ msgstr ""
191
192
  msgid "Pin toolbar"
192
193
  msgstr ""
193
194
 
195
+ #: src/components/ComboBox/ComboBox.tsx:13
196
+ msgid "Preview"
197
+ msgstr ""
198
+
194
199
  #: src/components/Draftail/EditorFallback/EditorFallback.js:96
195
200
  msgid "Reload saved content"
196
201
  msgstr ""
@@ -203,7 +208,7 @@ msgstr ""
203
208
  msgid "Reply"
204
209
  msgstr ""
205
210
 
206
- #: src/includes/chooserModal.js:51
211
+ #: src/includes/chooserModal.js:53
207
212
  msgid "Report this error to your website administrator with the following information:"
208
213
  msgstr ""
209
214
 
@@ -252,7 +257,7 @@ msgstr ""
252
257
  msgid "Search"
253
258
  msgstr ""
254
259
 
255
- #: src/components/ComboBox/ComboBox.tsx:10
260
+ #: src/components/ComboBox/ComboBox.tsx:11
256
261
  msgid "Search options…"
257
262
  msgstr ""
258
263
 
@@ -262,7 +267,7 @@ msgstr ""
262
267
 
263
268
  #: src/components/Draftail/sources/ModalWorkflowSource.js:63
264
269
  #: src/components/PageExplorer/PageExplorerPanel.tsx:112
265
- #: src/includes/chooserModal.js:61
270
+ #: src/includes/chooserModal.js:63
266
271
  msgid "Server Error"
267
272
  msgstr ""
268
273
 
@@ -274,7 +279,7 @@ msgstr ""
274
279
  msgid "Show latest content"
275
280
  msgstr ""
276
281
 
277
- #: src/entrypoints/admin/telepath/widgets.js:298
282
+ #: src/entrypoints/admin/telepath/widgets.js:303
278
283
  msgid "Split block"
279
284
  msgstr ""
280
285
 
@@ -282,19 +287,19 @@ msgstr ""
282
287
  msgid "The editor just crashed. Content has been reset to the last saved version."
283
288
  msgstr ""
284
289
 
285
- #: src/components/StreamField/blocks/ListBlock.js:196
286
- #: src/components/StreamField/blocks/StreamBlock.js:271
287
- #: src/components/StreamField/blocks/StreamBlock.js:295
290
+ #: src/components/StreamField/blocks/ListBlock.js:202
291
+ #: src/components/StreamField/blocks/StreamBlock.js:277
292
+ #: src/components/StreamField/blocks/StreamBlock.js:301
288
293
  msgid "The maximum number of items is %(max_num)d"
289
294
  msgstr ""
290
295
 
291
- #: src/components/StreamField/blocks/ListBlock.js:207
292
- #: src/components/StreamField/blocks/StreamBlock.js:279
293
- #: src/components/StreamField/blocks/StreamBlock.js:309
296
+ #: src/components/StreamField/blocks/ListBlock.js:213
297
+ #: src/components/StreamField/blocks/StreamBlock.js:285
298
+ #: src/components/StreamField/blocks/StreamBlock.js:315
294
299
  msgid "The minimum number of items is %(min_num)d"
295
300
  msgstr ""
296
301
 
297
- #: src/includes/chooserModal.js:21
302
+ #: src/includes/chooserModal.js:23
298
303
  msgid "This field is required."
299
304
  msgstr ""
300
305
 
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # Translators:
3
3
  # Amós Oviedo <amos.oviedo@gmail.com>, 2022
4
- # Loic Teixeira, 2024
4
+ # Loic Teixeira, 2022
5
5
  # X Bello <xbello@gmail.com>, 2024
6
6
  #
7
7
  msgid ""
@@ -200,16 +200,16 @@ msgstr "Partir bloque"
200
200
 
201
201
  msgid ""
202
202
  "The editor just crashed. Content has been reset to the last saved version."
203
- msgstr "O editor acaba de cascar. O contido volveu á ultima versión gardada."
203
+ msgstr "O editor acaba de caerse. O contido volveu á ultima versión gardada."
204
204
 
205
205
  msgid "The maximum number of items is %(max_num)d"
206
- msgstr "O máximo número de ítems é %(max_num)d"
206
+ msgstr "O máximo número de elementos é %(max_num)d"
207
207
 
208
208
  msgid "The minimum number of items is %(min_num)d"
209
- msgstr "O mínimo número de ítems é %(min_num)d"
209
+ msgstr "O mínimo número de elementos é %(min_num)d"
210
210
 
211
211
  msgid "This field is required."
212
- msgstr "Este campo é requirido."
212
+ msgstr "Este campo é requerido."
213
213
 
214
214
  msgid "Toggle side panel"
215
215
  msgstr "Permutar panel lateral"
@@ -1259,6 +1259,10 @@ msgstr[0] "Também excluirá %(translation_count)s tradução."
1259
1259
  msgstr[1] "Também excluirá %(translation_count)s traduções."
1260
1260
  msgstr[2] "Também excluirá %(translation_count)s traduções."
1261
1261
 
1262
+ #, python-format
1263
+ msgid "This action will delete total <b>%(total_pages)s</b> pages."
1264
+ msgstr "Esta ação irá apagar o total de <b>%(total_pages)s</b> páginas."
1265
+
1262
1266
  #, python-format
1263
1267
  msgid "Please type <b>%(wagtail_site_name)s</b> to confirm."
1264
1268
  msgstr "Por favor digite <b>%(wagtail_site_name)s</b> para confirmar."
@@ -1632,6 +1636,10 @@ msgstr "Sistema"
1632
1636
  msgid "Refresh"
1633
1637
  msgstr "Atualizar"
1634
1638
 
1639
+ #, python-format
1640
+ msgid "%(user_name)s has unsaved changes"
1641
+ msgstr "%(user_name)s tem alterações não salvas"
1642
+
1635
1643
  msgid "Currently viewing"
1636
1644
  msgstr "Visualizando atualmente"
1637
1645
 
@@ -2289,12 +2297,24 @@ msgstr "Use texto significativo para usuários de leitores de tela"
2289
2297
  msgid "Empty heading found"
2290
2298
  msgstr "Cabeçalho vazio encontrado"
2291
2299
 
2300
+ msgid "Incorrect heading hierarchy"
2301
+ msgstr "Hierarquia de títulos incorreta"
2302
+
2292
2303
  msgid "Avoid skipping levels"
2293
2304
  msgstr "Evite pular níveis"
2294
2305
 
2295
2306
  msgid "Link text is empty"
2296
2307
  msgstr "O texto do link está vazio"
2297
2308
 
2309
+ msgid "Use proper heading tags"
2310
+ msgstr "Use tags de título adequadas"
2311
+
2312
+ msgid "Image alt text has inappropriate pattern"
2313
+ msgstr "O texto alternativo da imagem tem um padrão inapropriado"
2314
+
2315
+ msgid "Use meaningful text"
2316
+ msgstr "Use texto significativo"
2317
+
2298
2318
  msgid "Profile"
2299
2319
  msgstr "Perfil"
2300
2320
 
@@ -2570,6 +2590,9 @@ msgstr ""
2570
2590
  msgid "Dashboard"
2571
2591
  msgstr "Painel"
2572
2592
 
2593
+ msgid "Search all pages…"
2594
+ msgstr "Pesquisar todas as páginas…"
2595
+
2573
2596
  msgid "Delete selected pages"
2574
2597
  msgstr "Excluir páginas selecionadas"
2575
2598
 
@@ -2928,12 +2951,18 @@ msgstr "Tipo de página/snippet"
2928
2951
  msgid "Page/Snippet Title"
2929
2952
  msgstr "Título da página/snippet"
2930
2953
 
2954
+ msgid "By task"
2955
+ msgstr "Por tarefa"
2956
+
2931
2957
  msgid "Workflow tasks"
2932
2958
  msgstr "Tarefas de fluxo de trabalho"
2933
2959
 
2934
2960
  msgid "Requested By"
2935
2961
  msgstr "Solicitado por"
2936
2962
 
2963
+ msgid "By workflow"
2964
+ msgstr "Por fluxo de trabalho"
2965
+
2937
2966
  msgid "Show disabled"
2938
2967
  msgstr "Mostrar desativado"
2939
2968
 
wagtail/admin/menu.py CHANGED
@@ -43,9 +43,6 @@ class MenuItem(metaclass=MediaDefiningClass):
43
43
  """
44
44
  return True
45
45
 
46
- def is_active(self, request):
47
- return request.path.startswith(str(self.url))
48
-
49
46
  def render_component(self, request):
50
47
  return LinkMenuItemComponent(
51
48
  self.name,
@@ -121,13 +118,6 @@ class Menu:
121
118
 
122
119
  return items
123
120
 
124
- def active_menu_items(self, request):
125
- return [
126
- item
127
- for item in self.menu_items_for_request(request)
128
- if item.is_active(request)
129
- ]
130
-
131
121
  @property
132
122
  def media(self):
133
123
  media = Media()
@@ -154,9 +144,6 @@ class SubmenuMenuItem(MenuItem):
154
144
  # show the submenu if one or more of its children is shown
155
145
  return bool(self.menu.menu_items_for_request(request))
156
146
 
157
- def is_active(self, request):
158
- return bool(self.menu.active_menu_items(request))
159
-
160
147
  def render_component(self, request):
161
148
  return SubMenuItemComponent(
162
149
  self.name,
@@ -57,8 +57,8 @@ class Panel:
57
57
  with the field list and other parameters collated from all panels in the structure.
58
58
  It then handles rendering that form as HTML.
59
59
 
60
- The following parameters can be used to customise how the panel is displayed.
61
- For more details, see :ref:`customising_panels`.
60
+ The following parameters can be used to customize how the panel is displayed.
61
+ For more details, see :ref:`customizing_panels`.
62
62
 
63
63
  :param heading: The heading text to display for the panel.
64
64
  :param classname: A CSS class name to add to the panel's HTML element.
@@ -71,7 +71,10 @@ class PanelGroup(Panel):
71
71
  return options
72
72
 
73
73
  def on_model_bound(self):
74
- self.children = [child.bind_to_model(self.model) for child in self.children]
74
+ from .model_utils import expand_panel_list
75
+
76
+ child_panels = expand_panel_list(self.model, self.children)
77
+ self.children = [child.bind_to_model(self.model) for child in child_panels]
75
78
 
76
79
  @cached_property
77
80
  def child_identifiers(self):
@@ -3,6 +3,7 @@ import functools
3
3
  from django import forms
4
4
  from django.forms.formsets import DELETION_FIELD_NAME, ORDERING_FIELD_NAME
5
5
  from django.utils.functional import cached_property
6
+ from django.utils.text import capfirst
6
7
 
7
8
  from wagtail.admin import compare
8
9
 
@@ -26,7 +27,7 @@ class InlinePanel(Panel):
26
27
  super().__init__(*args, **kwargs)
27
28
  self.relation_name = relation_name
28
29
  self.panels = panels
29
- self.heading = heading or label
30
+ self.heading = heading or label or capfirst(relation_name.replace("_", " "))
30
31
  self.label = label
31
32
  self.min_num = min_num
32
33
  self.max_num = max_num
@@ -77,6 +78,8 @@ class InlinePanel(Panel):
77
78
  def on_model_bound(self):
78
79
  manager = getattr(self.model, self.relation_name)
79
80
  self.db_field = manager.rel
81
+ if not self.label:
82
+ self.label = capfirst(self.db_field.related_model._meta.verbose_name)
80
83
 
81
84
  def classes(self):
82
85
  return super().classes() + ["w-panel--nested"]
@@ -150,7 +153,7 @@ class InlinePanel(Panel):
150
153
  compare.ChildRelationComparison,
151
154
  self.panel.db_field,
152
155
  field_comparisons,
153
- label=self.label,
156
+ label=self.heading,
154
157
  )
155
158
  ]
156
159
 
@@ -1,9 +1,13 @@
1
1
  import functools
2
2
 
3
+ from django.core.exceptions import ImproperlyConfigured
4
+ from django.db.models.fields.reverse_related import ManyToOneRel
3
5
  from django.forms.models import fields_for_model
4
6
 
5
7
  from wagtail.admin.forms.models import formfield_for_dbfield
8
+ from wagtail.models import PanelPlaceholder
6
9
 
10
+ from .base import Panel
7
11
  from .field_panel import FieldPanel
8
12
  from .group import ObjectList
9
13
 
@@ -47,3 +51,35 @@ def get_edit_handler(model):
47
51
  panel = ObjectList(panels)
48
52
 
49
53
  return panel.bind_to_model(model)
54
+
55
+
56
+ def expand_panel_list(model, panels):
57
+ """
58
+ Given a list which may be a mixture of Panel instances and strings (representing field/relation names),
59
+ expand it into a flat list of Panel instances
60
+ """
61
+ result = []
62
+ for panel in panels:
63
+ if isinstance(panel, Panel):
64
+ result.append(panel)
65
+
66
+ elif isinstance(panel, PanelPlaceholder):
67
+ if real_panel := panel.construct():
68
+ result.append(real_panel)
69
+
70
+ elif isinstance(panel, str):
71
+ field = model._meta.get_field(panel)
72
+ if isinstance(field, ManyToOneRel):
73
+ from .inline_panel import InlinePanel
74
+
75
+ result.append(InlinePanel(panel))
76
+ else:
77
+ result.append(FieldPanel(panel))
78
+
79
+ else:
80
+ raise ImproperlyConfigured(
81
+ "Invalid panel definition %r - expected Panel or string, got %r"
82
+ % (panel, type(panel))
83
+ )
84
+
85
+ return result
@@ -1,50 +1,12 @@
1
- from django.conf import settings
2
1
  from django.utils.translation import gettext_lazy
3
2
 
4
3
  from wagtail.admin.forms.pages import WagtailAdminPageForm
5
4
  from wagtail.models import Page
6
5
  from wagtail.utils.decorators import cached_classmethod
7
6
 
8
- from .comment_panel import CommentPanel
9
- from .field_panel import FieldPanel
10
- from .group import MultiFieldPanel, ObjectList, TabbedInterface
11
- from .publishing_panel import PublishingPanel
12
- from .title_field_panel import TitleFieldPanel
7
+ from .group import ObjectList, TabbedInterface
13
8
 
14
-
15
- def set_default_page_edit_handlers(cls):
16
- cls.content_panels = [
17
- TitleFieldPanel("title"),
18
- ]
19
-
20
- cls.promote_panels = [
21
- MultiFieldPanel(
22
- [
23
- FieldPanel("slug"),
24
- FieldPanel("seo_title"),
25
- FieldPanel("search_description"),
26
- ],
27
- gettext_lazy("For search engines"),
28
- ),
29
- MultiFieldPanel(
30
- [
31
- FieldPanel("show_in_menus"),
32
- ],
33
- gettext_lazy("For site menus"),
34
- ),
35
- ]
36
-
37
- cls.settings_panels = [
38
- PublishingPanel(),
39
- ]
40
-
41
- if getattr(settings, "WAGTAILADMIN_COMMENTS_ENABLED", True):
42
- cls.settings_panels.append(CommentPanel())
43
-
44
- cls.base_form_class = WagtailAdminPageForm
45
-
46
-
47
- set_default_page_edit_handlers(Page)
9
+ Page.base_form_class = WagtailAdminPageForm
48
10
 
49
11
 
50
12
  @cached_classmethod
@@ -5,7 +5,6 @@ from django.dispatch import receiver
5
5
  from wagtail.models import Page
6
6
 
7
7
  from .model_utils import get_edit_handler
8
- from .page_utils import set_default_page_edit_handlers
9
8
 
10
9
 
11
10
  @receiver(setting_changed)
@@ -14,7 +13,6 @@ def reset_edit_handler_cache(**kwargs):
14
13
  Clear page edit handler cache when global WAGTAILADMIN_COMMENTS_ENABLED settings are changed
15
14
  """
16
15
  if kwargs["setting"] == "WAGTAILADMIN_COMMENTS_ENABLED":
17
- set_default_page_edit_handlers(Page)
18
16
  for model in apps.get_models():
19
17
  if issubclass(model, Page):
20
18
  model.get_edit_handler.cache_clear()