Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locale components #6398

Closed
wants to merge 6 commits into from
Closed

Conversation

kaedroho
Copy link
Contributor

Locale components are extra models that you can register that add additional information to a Locale. The form for this model is displayed in the locale's UI.

For example, the following code will add a "flag" choice field to the locale form:

from wagtail.locales.views import register_locale_component

@register_locale_component
class LocaleFlag(models.Model):
    locale = models.OneToOneField(Locale)
    flag = models.CharField(choices=[...])

@squash-labs
Copy link

squash-labs bot commented Sep 23, 2020

Manage this branch in Squash

Test this branch here: https://kaedroholocaleui-components-1r8rh.squash.io

@kaedroho kaedroho added the component:i18n i18n for content created in Wagtail, not the admin UI itself label Sep 23, 2020
@kaedroho kaedroho force-pushed the localeui-components branch 3 times, most recently from 2f37257 to 7a53383 Compare September 29, 2020 10:19
@kaedroho kaedroho marked this pull request as ready for review October 8, 2020 18:10
@kaedroho
Copy link
Contributor Author

kaedroho commented Oct 8, 2020

I've rebased this on the docs branch and added some docs now. Ready for review!

@kaedroho kaedroho requested a review from gasman October 15, 2020 08:42
kaedroho added a commit to wagtail/wagtail-localize that referenced this pull request Nov 4, 2020
kaedroho added a commit to wagtail/wagtail-localize that referenced this pull request Nov 9, 2020
Base automatically changed from master to main March 3, 2021 17:08
@kaedroho
Copy link
Contributor Author

Abandoning this in favour of moving the entire locale sync feature to Wagtail core, this would allow it to be used with other translation plugins too.

There's a bunch of fixes that need to be made first though, these are documented in wagtail/wagtail-localize#386

@kaedroho kaedroho closed this Aug 24, 2021
@kaedroho kaedroho deleted the localeui-components branch August 24, 2021 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:i18n i18n for content created in Wagtail, not the admin UI itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant