0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
Commit Graph

10866 Commits

Author SHA1 Message Date
Matt Westcott
414571cc99 Release note for #6544 2020-11-16 17:15:32 +00:00
Karl Hobley
62ccde9c09 Fetch all pages of translations 2020-11-16 17:07:22 +00:00
Karl Hobley
41b0abc28c Fix performance issue in React explorer when there are many languages
Requesting translations to be nested with each page causes major
performance problems when there are many languages. Mozilla have 61
languages, each with a separate homepage that's a translation of the
others, so the response for this query contains details of 61 * 61 pages
for them.

This isn't actually required since we only need to know the translations
if the user navigates into a page, and the translations are requested
again anyway by the getPageTranslations function.
2020-11-16 17:07:22 +00:00
Jérôme Lebleu
f88e6f91ff Fix header icon name in settings' edit view (#6554) 2020-11-16 15:02:19 +00:00
Matt Westcott
236632d815
Handle get_supported_language_variant returning a language variant not in LANGUAGES (#6547)
* Handle get_supported_language_variant returning a language variant not in LANGUAGES

Fixes #6539

* Handle LANGUAGE_CODE that isn't in LANGUAGES

* Release note for #6547
2020-11-16 11:51:32 +00:00
Matt Westcott
a888d3383c Gracefully handle missing Locale records on Locale.get_active and .localized (#6549)
Fixes #6540
There are various code paths where Page.localized and similar can be called even when WAGTAIL_I18N_ENABLED is False, and since it's entirely likely that hand-rolled i18n mechanisms and ad-hoc configuration changes (e.g changing LANGUAGE_CODE) will break the Locale model's assumptions about how things are meant to work, we need to provide sensible fallback behaviour for when the current active locale, or the default locale as per LANGUAGE_CODE, does not have a corresponding Locale record:

* Locale.get_active() will fall back on the default LANGUAGE_CODE locale, or raise Locale.DoesNotExist if that one does not exist either;
* TranslatableMixin.localized (along with Page.localized and Page.localized_draft) will handle a missing Locale record by falling back on the default LANGUAGE_CODE locale, or failing that, returning self.
2020-11-16 10:31:01 +00:00
Karl Hobley
792a9d272b Fetch the depth field of page translations on the edit view
This field is used in the `.can_edit()` permission check
2020-11-13 17:14:22 +00:00
Coen van der Kamp
4702b6f14d Add custom robots.txt to docs 2020-11-12 16:35:05 +00:00
Matt Westcott
be45cee2aa Fill in release date for 2.11.1 2020-11-06 17:30:55 +00:00
Matt Westcott
c2e6c0f1aa Fetch new translations from Transifex 2020-11-06 17:17:54 +00:00
Matt Westcott
f378f48e14 Prevent errors on get_url_parts when a non-content-language locale is active (#6521)
Fixes #6510 and #6511

Catch the LookupError from get_supported_content_language_variant so that if the active language is not one that is recognised as a content language, the URL prefix will be left unchanged from the page's reported locale.

Additionally, skip the `translation.override` when WAGTAIL_I18N_ENABLED is false; this accounts for the fact that existing sites may have used alternative / custom i18n implementations involving i18n_patterns, and on these sites we can't rely on the page's locale field to be meaningful. That way, we restore the pre-2.11 behaviour: if the existing i18n code was using some kind of wrapper around the get_url_parts call, then that will work again; and if not, the URL will reflect the current active locale, which is no worse than before.
2020-11-06 17:04:18 +00:00
Thibaud Colas
37e9e1d54d
#6090 Document accessibility considerations (#6272)
Co-authored-by: Coen van der Kamp <coen@fourdigits.nl>
2020-11-06 15:38:00 +00:00
Thibaud Colas
063c7d8b44 Switch IE11 home warning message to show for all users regardless of role 2020-11-06 09:46:26 +00:00
Matt Westcott
3c984b9871 Avoid circular import between wagtail.admin.auth and custom user models (#6522)
Fixes #6518

If the models.py containing a custom user model directly or indirectly imports wagtail.admin.auth, this causes a circular dependency because wagtail.admin.auth attempts to import django.contrib.auth.views, which in turn depends on the custom user model. Fix this by moving the django.contrib.auth.views import inside reject_request.
2020-11-06 09:35:21 +00:00
Matt Westcott
ed1996cdbc Upgrade consideration note for dropping Elasticsearch 2 2020-11-05 12:04:12 +00:00
Matt Westcott
a6a70dff04 Refactor Elasticsearch backend classes to drop version 2 2020-11-05 12:04:12 +00:00
Matt Westcott
6e1e36256a Remove elasticsearch 2 support 2020-11-05 12:04:12 +00:00
Matt Westcott
4d6a41a83b Drop travis entirely 2020-11-05 12:04:12 +00:00
Matt Westcott
35a8255ded Ditch all travis config except for elasticsearch 2 test 2020-11-05 12:04:12 +00:00
Matt Westcott
ea9298bd71 add Github Actions config 2020-11-05 12:04:12 +00:00
Sævar Öfjörð Magnússon
a541510417 Additional safeguard to check if a cached site is from an older version of Wagtail (#6515) 2020-11-04 12:22:43 +00:00
Matt Westcott
14f1d8d59a Add release notes section for 2.11.1
Conflicts:
	CHANGELOG.txt
	docs/releases/index.rst
2020-11-04 10:45:15 +00:00
Naglis Jonaitis
74c692ba21 Fix ModelAdmin documentation example
The `get_extra_class_names_for_field_col` seems to have an `if` missing
and uses an undefined `balance`.
2020-11-03 13:49:18 +00:00
Matt Westcott
39f953eca3 Release note for Python 3.9 support (#6508) 2020-11-03 11:58:01 +00:00
Matt Westcott
9bec60624c Version bump mysqlclient for Django 3.1 compatibility 2020-11-02 18:40:58 +00:00
Matt Westcott
5bcfcdd315 Formalise support for Python 3.9 2020-11-02 17:29:58 +00:00
Matt Westcott
330f0dde15 Fill in release date for 2.11 2020-11-02 15:06:22 +00:00
Karl Hobley
12e8ee97bb
Check if new pages are site roots and clear the site_root_paths cache (#6507)
Previously, we were only doing this check for existing pages as there
was no way for a new page to be a site root.

But since internationalisation was implemented, new pages can be site
roots if they have a translation that is assigned in a `Site` record's
`root_page` field.

This commit removes a condition in `Page.save()` so `.is_site_root()` is
now called on new pages as well and the cache can get cleared if needed.
2020-11-02 14:31:00 +00:00
Matt Westcott
d56f8ea1c5
More prominent note about wagtail-localize in i18n docs (#6506) 2020-11-02 12:46:16 +00:00
Matt Westcott
f54f0942e0 Fetch new translations from Transifex 2020-11-02 12:45:05 +00:00
Karl Hobley
516150403b
Update 2.12.rst 2020-10-23 20:07:51 +01:00
Matt Westcott
4c66dc6197 Add back unidecode as a testing-only dependency 2020-10-23 18:57:32 +01:00
Matt Westcott
0e41104670 Rotate deprecation warnings 2020-10-23 18:33:06 +01:00
Matt Westcott
94f6b755b2 Version bump to start work on 2.12 2020-10-23 16:55:21 +01:00
Matt Westcott
e96f46c9e5 Version bump to 2.11rc1 2020-10-23 15:10:10 +01:00
Karl Hobley
d58f74f7bd
Implement locale selector in React page explorer (#6481) 2020-10-23 14:40:25 +01:00
Karl Hobley
6234023f39
Changelog / relase note for internationalisation (#6492)
* Changelog / relase note for internationalisation

* Apply suggestions from code review

Co-authored-by: Matt Westcott <matthew@torchbox.com>
2020-10-23 14:26:44 +01:00
Matt Westcott
73f1223a75 Generate new translation strings 2020-10-23 12:35:59 +01:00
Matt Westcott
cacc639688 Fetch new translations from Transifex 2020-10-23 12:32:12 +01:00
Loic Teixeira
6c9478c139 Rework headings hierarchy
Initial hierarchy:

- Available panel types
    - FieldPanel
    - StreamFieldPanel
    - MultiFieldPanel
    - InlinePanel
    - FieldRowPanel
    - HelpPanel
    - PageChooserPanel
    - ImageChooserPanel
    - FormSubmissionsPanel
    - DocumentChooserPanel
    - SnippetChooserPanel
        - Built-in Fields and Choosers
        - Field Customisation
    - Full-Width Input
    - Titles
    - Placeholder Text
    - Required Fields
    - Hiding Fields
        - Inline Panels and Model Clusters

Revised Hierarcy:

- Panel types
    - Built-in Fields and Choosers
        - FieldPanel
        - StreamFieldPanel
        - MultiFieldPanel
        - InlinePanel
        - FieldRowPanel
        - HelpPanel
        - PageChooserPanel
        - ImageChooserPanel
        - FormSubmissionsPanel
        - DocumentChooserPanel
        - SnippetChooserPanel
    - Field Customisation
        - Full-Width Input
        - Titles
        - Placeholder Text
        - Required Fields
        - Hiding Fields
    - Inline Panels and Model Clusters
2020-10-23 10:36:01 +01:00
Matt Westcott
ae7897c842 Refactor snippet create/edit headers to avoid duplication 2020-10-23 10:29:44 +01:00
Karl Hobley
bd70ecf318 Tweaks to internationalisation docs 2020-10-23 10:29:22 +01:00
Karl Hobley
123d9cef92 Add locale indication to the React page explorer 2020-10-23 09:09:52 +01:00
Karl Hobley
588deb93d3 Add locale selector to snippet create 2020-10-22 16:57:32 +01:00
Karl Hobley
e8e91fa1ac Add locale selector to snippet edit 2020-10-22 16:57:32 +01:00
Karl Hobley
6a84461dbc Add locale selector to snippet listing 2020-10-22 16:57:32 +01:00
Matt Westcott
7d92e3982f Fix steps for adding translations to an existin snippet
* Fix BootstrapTranslatableMixin to skip TranslatableModel's system check for the missing unique constraint
* Fix incorrect import for BootstrapTranslatableModel and use of `--empty` in final schema migration
* Clarify handling of Meta classes, the fact that you need to run makemigrations for step 1, and what to do for the non-nullable 'locale' prompt
2020-10-22 16:44:54 +01:00
LB Johnston
f6dce3d6df Update changelog entries for @samgans 2020-10-22 19:46:07 +10:00
Karl Hobley
f0ce1f4775 Replace pushPage/popPage with more flexible gotoPage method
- page explorer
2020-10-22 19:45:34 +10:00
Karl Hobley
76e8704c27 Fix docstring 2020-10-21 16:43:04 +01:00