Wykres commitów

10670 Commity (7fd9a49e9cc1db834a80cf5192a57109b54d419b)

Autor SHA1 Wiadomość Data
Matt Westcott 7fd9a49e9c Fix combining locale/translation_of API filters with search (#6627)
Fixes #6626
2020-12-10 16:27:01 +00:00
Matt Westcott d249e60152 Release note for #6572 2020-12-09 16:27:46 +00:00
Andreas Morgenstern 85423cb100 Allows to mark the language names as translation strings (#6572)
* Force __str__ of Locale to be a string

* Put some translation proxies in to test settings

* Fixed import in wrong place

* Added test for gettext in LANGUAGES to the Locale model

Co-authored-by: Andreas M <am@zauberberg-medien.de>
2020-12-09 16:25:23 +00:00
Matt Westcott e45f188f6c version bump to 2.11.3 2020-12-08 16:03:37 +00:00
Matt Westcott 27758937a6 Additional release notes for #6559 2020-12-08 16:03:06 +00:00
Dan Braghis 3e24b5b398 Fix missing locale in the project template's homepage migration 2020-12-08 16:01:52 +00:00
Matt Westcott bf659bd4a9 revert to @allcaps's original approach to including robots.txt 2020-12-04 13:21:49 +00:00
Matt Westcott 7a777b4caa try a different approach for including custom robots.txt
Conflicts:
	docs/_html_extra/robots.txt
	docs/conf.py
2020-12-04 13:06:52 +00:00
Matt Westcott ecf3950426 update translators list 2020-11-17 15:57:48 +00:00
Matt Westcott 49f3e5be8e Generate new strings for translation 2020-11-17 15:41:01 +00:00
Matt Westcott 327a50f9cd Fetch new translations from Transifex 2020-11-17 15:34:34 +00:00
Matt Westcott 0d5839cce0 Fill in release date for 2.11.2 2020-11-17 15:21:00 +00:00
Cynthia Kiser 2fdb2e8aef Add custom oEmbed finders for Facebook and Instagram (#6550)
Move code from https://www.codista.com/en/blog/wagtail-instagram-new-oembed-api/ into core

Add custom oembed finder for Facebook

Apply suggestions from @originell's code review

Co-authored-by: Luis Nell <luis.nell@codista.com>

FIXUP More places to change the exception name (and a linter fix)

Extend Instagram/Facebook tests to check HTTP request

Add documentation for omitscript parameter
2020-11-17 15:06:53 +00:00
Matt Westcott 28146e0015 Allow deleting the default locale (#6553)
Fixes #6533
2020-11-17 11:28:31 +00:00
Matt Westcott 734199b06a Release note for #6544 2020-11-16 17:16:19 +00:00
Karl Hobley fabc2a5e73 Fetch all pages of translations 2020-11-16 17:16:19 +00:00
Karl Hobley 4115ced0ac 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:16:18 +00:00
Jérôme Lebleu 6c967dfb8e Fix header icon name in settings' edit view (#6554) 2020-11-16 15:03:14 +00:00
Matt Westcott 786b91440c 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:57 +00:00
Matt Westcott 19cf596af9 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:42 +00:00
Matt Westcott 9b0fd41e8b Version bump to 2.11.2 2020-11-13 17:13:18 +00:00
Karl Hobley a944e2d3ae 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:13:00 +00:00
Matt Westcott 0e7e15c410 Fill in release date for 2.11.1 2020-11-06 17:29:59 +00:00
Matt Westcott b38d724734 Fetch new translations from Transifex 2020-11-06 17:18:05 +00:00
Matt Westcott 34572e3129 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:58 +00:00
Matt Westcott 268663dea5 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:36:06 +00:00
Matt Westcott 8eef92ccb2 Fix erroneous mentions of python 3.5 in tutorial 2020-11-05 12:13:03 +00:00
Matt Westcott cfc0c5c808 Ditch all travis config except for elasticsearch 2 test 2020-11-05 12:08:32 +00:00
Matt Westcott 40b68d0738 add Github Actions config 2020-11-05 12:06:49 +00:00
Sævar Öfjörð Magnússon 3ec0d405ed Additional safeguard to check if a cached site is from an older version of Wagtail (#6515) 2020-11-04 12:26:02 +00:00
Matt Westcott f8701e0b80 Version bump to 2.11.1 2020-11-04 10:31:06 +00:00
Matt Westcott 627e2f92dd Add release notes section for 2.11.1 2020-11-04 10:27:55 +00:00
Naglis Jonaitis 9c6bae074f 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:50:12 +00:00
Matt Westcott d07ca931ee Version bump to 2.11 final 2020-11-02 15:05:35 +00:00
Matt Westcott 30102b24ff Fill in release date for 2.11 2020-11-02 15:04:52 +00:00
Karl Hobley 477b8e38f3 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:34:36 +00:00
Matt Westcott 65751bd746 More prominent note about wagtail-localize in i18n docs (#6506) 2020-11-02 13:39:55 +00:00
Matt Westcott 3dad7ac760 Fetch new translations from Transifex 2020-11-02 12:44:12 +00: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