Marked fields are sync or translatable#6875
Merged
TheoChevalier merged 5 commits intowagtail-localize-2021from Jun 21, 2021
Merged
Marked fields are sync or translatable#6875TheoChevalier merged 5 commits intowagtail-localize-2021from
TheoChevalier merged 5 commits intowagtail-localize-2021from
Conversation
KalobTaulien
commented
Jun 17, 2021
Comment on lines
+1
to
+2
| # TODO: REmove this and other translation.py files. | ||
| # They aren't needed but keep coming back when we merge master into our localization branch |
Contributor
Author
There was a problem hiding this comment.
Added this because it keeps coming back. It's not doing any harm being here, so I'm leaving this for "final cleanup" when localization gets merged into the master branch.
Comment on lines
+112
to
+114
| TranslatableField('name'), | ||
| TranslatableField('description'), | ||
| SynchronizedField('slug'), |
Contributor
Author
There was a problem hiding this comment.
Fields that aren't supposed to be translated at all are ignored.
TheoChevalier
requested changes
Jun 17, 2021
Contributor
TheoChevalier
left a comment
There was a problem hiding this comment.
Just a few missing fields in the petition snippets, but otherwise I think it’s good!
Comment on lines
+186
to
+197
| translatable_fields = [ | ||
| # This models fields | ||
| SynchronizedField('requires_country_code'), | ||
| SynchronizedField('requires_postal_code'), | ||
| TranslatableField('comment_requirements'), | ||
| TranslatableField('checkbox_1'), | ||
| TranslatableField('checkbox_2'), | ||
| TranslatableField('thank_you'), | ||
| # Fields from the CTA model | ||
| TranslatableField('header'), | ||
| TranslatableField('description'), | ||
| ] |
Contributor
There was a problem hiding this comment.
share_link, share_email, share_facebook & share_twitter all need to be added as Synchronized.
Pomax
pushed a commit
that referenced
this pull request
Jul 27, 2021
* Marked fields are sync or translatable * Oop * Flake8 * Add petition synchronized fields Co-authored-by: Théo Chevalier <theo.chevalier11@gmail.com>
Pomax
added a commit
that referenced
this pull request
Aug 10, 2021
rebase fixes fix the language picker by making sure 'next' is the right URL (#6780) allow authenticated users to hit the wagtail localize endpoints (#6778) * allow authenticated users to hit the wagtail localize endpoints Updated migrations (#6795) Enable pontoon integration for wagtail-localize (#6794) * add wagtail_localize_git * heroku ssh generation script rebase fixes Update settings.py Update settings.py Better 500 logging (#6836) * allow forced logging of stack traces to console for 500 errors * Update urls.py * Update urls.py blog fixes for the localize branch (#6840) * blog fixes for the localize branch * import * oh flake8, you joker Show locale in admin title (until a proper solution is released in Wagtail Core) (#6843) rebase fixes Redirect /pt to /pt-BR (#6854) only create the locale, rather than cloning all pages, when creating a synced locale (#6853) Campaign page translation fix (#6855) Permanent pt-BR redirect (#6856) Added localized URLs for every page through the FoundationMetadataPageMixin (#6849) * Added localized URLs for every page through the FoundationMetadataPageMixin * Cache sitemap * Localized sitemaps Make tests pass (#6872) * Flake8 * Sitemap.xml test fix Localization synching and creating management commands (#6866) * Localization synching and creating management commands * Don't lower strings; requires exact string matching now Allow banner pages to be further localized (#6876) Marked fields are sync or translatable (#6875) * Marked fields are sync or translatable * Oop * Flake8 * Add petition synchronized fields Co-authored-by: Théo Chevalier <theo.chevalier11@gmail.com> Fix makemessages command for Django >= 3.1 (#6907) Use localized wagtail-footnotes (#6913) Localize missing fields for YT pages (#6923) Translate article page titles (#6924) Translate What You Can Do title (#6925) address all acceptance criteria (#6930) rebase fixes update all homepage fragments to pull from localized content (#7067) * update all homepage fragments to pull from localized content * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/news_you_can_use.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/spotlight_posts.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> Fix all the localized properties (#7068) * update all homepage fragments to pull from localized content * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/news_you_can_use.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/spotlight_posts.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> * rest of the localized updates... I think * forgot to save a file Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> Translatable PNI fields (#7075) Translate 3 more PNI fields (#7081) Localized limks in Related products section (#7125) Localize PNI categories & products (#7124) Translate Host controls field (#7123) regenerating requirements.txt . migration renames migration fixes Override translatable fields for PNI home (#7146) Localize title field on Default pages (#7147) Bump wagtail-localize to 1.0rc3 (#7176) Category snippet localization (#7183) * category-snippet-localization * well then * Update network-api/networkapi/wagtailpages/templatetags/localization.py * update based on Karl's advice * some WIP removals * show correct categories on product pages, and relocalize urls to point to use the correct locale * let's not cache-clear Restore product filtering per language (#7208) Fix category fallthrough (#7212) * make missing categories fall through to the EN version * small docs update * ??? * oops * data-name should stay English
Pomax
added a commit
that referenced
this pull request
Aug 10, 2021
fix the language picker by making sure 'next' is the right URL (#6780) allow authenticated users to hit the wagtail localize endpoints (#6778) * allow authenticated users to hit the wagtail localize endpoints Updated migrations (#6795) Enable pontoon integration for wagtail-localize (#6794) * add wagtail_localize_git * heroku ssh generation script rebase fixes Update settings.py Update settings.py Better 500 logging (#6836) * allow forced logging of stack traces to console for 500 errors * Update urls.py * Update urls.py blog fixes for the localize branch (#6840) * blog fixes for the localize branch * import * oh flake8, you joker Show locale in admin title (until a proper solution is released in Wagtail Core) (#6843) rebase fixes Redirect /pt to /pt-BR (#6854) only create the locale, rather than cloning all pages, when creating a synced locale (#6853) Campaign page translation fix (#6855) Permanent pt-BR redirect (#6856) Added localized URLs for every page through the FoundationMetadataPageMixin (#6849) * Added localized URLs for every page through the FoundationMetadataPageMixin * Cache sitemap * Localized sitemaps Make tests pass (#6872) * Flake8 * Sitemap.xml test fix Localization synching and creating management commands (#6866) * Localization synching and creating management commands * Don't lower strings; requires exact string matching now Allow banner pages to be further localized (#6876) Marked fields are sync or translatable (#6875) * Marked fields are sync or translatable * Oop * Flake8 * Add petition synchronized fields Co-authored-by: Théo Chevalier <theo.chevalier11@gmail.com> Fix makemessages command for Django >= 3.1 (#6907) Use localized wagtail-footnotes (#6913) Localize missing fields for YT pages (#6923) Translate article page titles (#6924) Translate What You Can Do title (#6925) address all acceptance criteria (#6930) rebase fixes update all homepage fragments to pull from localized content (#7067) * update all homepage fragments to pull from localized content * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/news_you_can_use.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/spotlight_posts.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> Fix all the localized properties (#7068) * update all homepage fragments to pull from localized content * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/news_you_can_use.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/spotlight_posts.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> * rest of the localized updates... I think * forgot to save a file Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> Translatable PNI fields (#7075) Translate 3 more PNI fields (#7081) Localized limks in Related products section (#7125) Localize PNI categories & products (#7124) Translate Host controls field (#7123) regenerating requirements.txt . migration renames migration fixes Override translatable fields for PNI home (#7146) Localize title field on Default pages (#7147) Bump wagtail-localize to 1.0rc3 (#7176) Category snippet localization (#7183) * category-snippet-localization * well then * Update network-api/networkapi/wagtailpages/templatetags/localization.py * update based on Karl's advice * some WIP removals * show correct categories on product pages, and relocalize urls to point to use the correct locale * let's not cache-clear Restore product filtering per language (#7208) Fix category fallthrough (#7212) * make missing categories fall through to the EN version * small docs update * ??? * oops * data-name should stay English
Pomax
added a commit
that referenced
this pull request
Aug 11, 2021
fix the language picker by making sure 'next' is the right URL (#6780) allow authenticated users to hit the wagtail localize endpoints (#6778) * allow authenticated users to hit the wagtail localize endpoints Updated migrations (#6795) Enable pontoon integration for wagtail-localize (#6794) * add wagtail_localize_git * heroku ssh generation script rebase fixes Update settings.py Update settings.py Better 500 logging (#6836) * allow forced logging of stack traces to console for 500 errors * Update urls.py * Update urls.py blog fixes for the localize branch (#6840) * blog fixes for the localize branch * import * oh flake8, you joker Show locale in admin title (until a proper solution is released in Wagtail Core) (#6843) rebase fixes Redirect /pt to /pt-BR (#6854) only create the locale, rather than cloning all pages, when creating a synced locale (#6853) Campaign page translation fix (#6855) Permanent pt-BR redirect (#6856) Added localized URLs for every page through the FoundationMetadataPageMixin (#6849) * Added localized URLs for every page through the FoundationMetadataPageMixin * Cache sitemap * Localized sitemaps Make tests pass (#6872) * Flake8 * Sitemap.xml test fix Localization synching and creating management commands (#6866) * Localization synching and creating management commands * Don't lower strings; requires exact string matching now Allow banner pages to be further localized (#6876) Marked fields are sync or translatable (#6875) * Marked fields are sync or translatable * Oop * Flake8 * Add petition synchronized fields Co-authored-by: Théo Chevalier <theo.chevalier11@gmail.com> Fix makemessages command for Django >= 3.1 (#6907) Use localized wagtail-footnotes (#6913) Localize missing fields for YT pages (#6923) Translate article page titles (#6924) Translate What You Can Do title (#6925) address all acceptance criteria (#6930) rebase fixes update all homepage fragments to pull from localized content (#7067) * update all homepage fragments to pull from localized content * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/news_you_can_use.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/spotlight_posts.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> Fix all the localized properties (#7068) * update all homepage fragments to pull from localized content * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/news_you_can_use.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/spotlight_posts.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> * rest of the localized updates... I think * forgot to save a file Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> Translatable PNI fields (#7075) Translate 3 more PNI fields (#7081) Localized limks in Related products section (#7125) Localize PNI categories & products (#7124) Translate Host controls field (#7123) regenerating requirements.txt . migration renames migration fixes Override translatable fields for PNI home (#7146) Localize title field on Default pages (#7147) Bump wagtail-localize to 1.0rc3 (#7176) Category snippet localization (#7183) * category-snippet-localization * well then * Update network-api/networkapi/wagtailpages/templatetags/localization.py * update based on Karl's advice * some WIP removals * show correct categories on product pages, and relocalize urls to point to use the correct locale * let's not cache-clear Restore product filtering per language (#7208) Fix category fallthrough (#7212) * make missing categories fall through to the EN version * small docs update * ??? * oops * data-name should stay English Moved consts inside of functions to prevent runtime/migration conflicts (#7215) * Moved consts inside of functions to prevent runtime/migration conflicts * That's better
Pomax
added a commit
that referenced
this pull request
Aug 11, 2021
fix the language picker by making sure 'next' is the right URL (#6780) allow authenticated users to hit the wagtail localize endpoints (#6778) * allow authenticated users to hit the wagtail localize endpoints Updated migrations (#6795) Enable pontoon integration for wagtail-localize (#6794) * add wagtail_localize_git * heroku ssh generation script rebase fixes Update settings.py Update settings.py Better 500 logging (#6836) * allow forced logging of stack traces to console for 500 errors * Update urls.py * Update urls.py blog fixes for the localize branch (#6840) * blog fixes for the localize branch * import * oh flake8, you joker Show locale in admin title (until a proper solution is released in Wagtail Core) (#6843) rebase fixes Redirect /pt to /pt-BR (#6854) only create the locale, rather than cloning all pages, when creating a synced locale (#6853) Campaign page translation fix (#6855) Permanent pt-BR redirect (#6856) Added localized URLs for every page through the FoundationMetadataPageMixin (#6849) * Added localized URLs for every page through the FoundationMetadataPageMixin * Cache sitemap * Localized sitemaps Make tests pass (#6872) * Flake8 * Sitemap.xml test fix Localization synching and creating management commands (#6866) * Localization synching and creating management commands * Don't lower strings; requires exact string matching now Allow banner pages to be further localized (#6876) Marked fields are sync or translatable (#6875) * Marked fields are sync or translatable * Oop * Flake8 * Add petition synchronized fields Co-authored-by: Théo Chevalier <theo.chevalier11@gmail.com> Fix makemessages command for Django >= 3.1 (#6907) Use localized wagtail-footnotes (#6913) Localize missing fields for YT pages (#6923) Translate article page titles (#6924) Translate What You Can Do title (#6925) address all acceptance criteria (#6930) rebase fixes update all homepage fragments to pull from localized content (#7067) * update all homepage fragments to pull from localized content * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/news_you_can_use.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/spotlight_posts.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> Fix all the localized properties (#7068) * update all homepage fragments to pull from localized content * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/news_you_can_use.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> * Update network-api/networkapi/wagtailpages/templates/wagtailpages/fragments/spotlight_posts.html Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> * rest of the localized updates... I think * forgot to save a file Co-authored-by: Kalob Taulien <4743971+KalobTaulien@users.noreply.github.com> Translatable PNI fields (#7075) Translate 3 more PNI fields (#7081) Localized limks in Related products section (#7125) Localize PNI categories & products (#7124) Translate Host controls field (#7123) regenerating requirements.txt . migration renames migration fixes Override translatable fields for PNI home (#7146) Localize title field on Default pages (#7147) Bump wagtail-localize to 1.0rc3 (#7176) Category snippet localization (#7183) * category-snippet-localization * well then * Update network-api/networkapi/wagtailpages/templatetags/localization.py * update based on Karl's advice * some WIP removals * show correct categories on product pages, and relocalize urls to point to use the correct locale * let's not cache-clear Restore product filtering per language (#7208) Fix category fallthrough (#7212) * make missing categories fall through to the EN version * small docs update * ??? * oops * data-name should stay English Moved consts inside of functions to prevent runtime/migration conflicts (#7215) * Moved consts inside of functions to prevent runtime/migration conflicts * That's better rebase and flakefix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6867
Added snippet field translation support from this document
One thing to note is the CTA model is not translatable. But it's child classes are, so the fields from the CTA model get passed into the translatable_fields for Signup() and Petition()