-
Notifications
You must be signed in to change notification settings - Fork 158
Snippet translations + translatable fields #6777
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
Merged
KalobTaulien
merged 42 commits into
wagtail-localize-2021
from
6708-snippet-translations
Jun 10, 2021
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
f4a1777
Removed modeltranslation and upgrade wagtail + django (#6743)
KalobTaulien 4a709d3
Added wagtail-localize as a package (nothing else) (#6762)
KalobTaulien 2cd723f
Bootstrapping the snippets
KalobTaulien ab5cc86
Pre-bootstrap migrations
KalobTaulien 675b301
Bootstrap migrations
KalobTaulien 2133339
Convert to TranslatableMixin
KalobTaulien e3f1ba9
TranslatableMixin migrations
KalobTaulien 5df9342
TranslationMixin migrations + I forgot a couple models in the previou…
KalobTaulien 7c5cb03
Additional migrations (merged into 0013)
KalobTaulien b29edcc
Translatable fields
KalobTaulien bba3b35
use the correct static tagset (#6775)
Pomax 8a59810
Merge branch 'wagtail-localize-2021' into 6708-snippet-translations
KalobTaulien 1fd679f
Typo
KalobTaulien 407e429
Update network-api/networkapi/wagtailpages/pagemodels/base.py
KalobTaulien 11a663d
Update network-api/networkapi/wagtailpages/pagemodels/campaigns.py
KalobTaulien 18b6ed7
Update network-api/networkapi/wagtailpages/pagemodels/dear_internet.py
KalobTaulien 66a5145
Update network-api/networkapi/wagtailpages/pagemodels/primary.py
KalobTaulien 6a5e828
Update network-api/networkapi/wagtailpages/pagemodels/index.py
KalobTaulien 916b89b
Update network-api/networkapi/wagtailpages/pagemodels/publications/ar…
KalobTaulien 4d7a9b5
Update network-api/networkapi/wagtailpages/pagemodels/products.py
KalobTaulien 538f1ba
Update network-api/networkapi/wagtailpages/pagemodels/publications/pu…
KalobTaulien ff7c89d
Minor adjustments
KalobTaulien a056f99
Field fixes
KalobTaulien 11be947
Don't support translating footnotes until wagtail-localize and wagtai…
KalobTaulien 622a061
Campaign page fields
KalobTaulien 105c851
More translation fields
KalobTaulien 344cec2
Issue refs
KalobTaulien 74f5daf
Oop
KalobTaulien 321db34
Homepage snippet and orderable support
KalobTaulien 7daf612
More snippet support
KalobTaulien 4081cee
More translations
KalobTaulien 7b2868e
Flake8
KalobTaulien 6096b4e
Migration cleanup
KalobTaulien 2d7d43e
Merge branch 'wagtail-localize-2021' into 6708-snippet-translations
KalobTaulien 06dcf28
Migration cleanup
KalobTaulien 67024e5
Migration already exists
KalobTaulien 3e3c245
More translation migrations
KalobTaulien 92637c3
So. many. translations
KalobTaulien aa02f3f
Merge branch 'wagtail-localize-2021' into 6708-snippet-translations
KalobTaulien 3c4719d
Wagtail 2.13. Needed for the 0062 wagtail core comment migration
KalobTaulien 5345110
Meta class migrations
KalobTaulien 0042084
Forgot to bootstrap the DonationModal (singular)
KalobTaulien File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
network-api/networkapi/highlights/migrations/0005_auto_20210531_1735.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Generated by Django 3.1.11 on 2021-05-31 17:35 | ||
|
|
||
| from django.db import migrations, models | ||
| import django.db.models.deletion | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('wagtailcore', '0062_comment_models_and_pagesubscription'), | ||
| ('highlights', '0004_remove_highlight_image'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name='highlight', | ||
| name='locale', | ||
| field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='wagtailcore.locale'), | ||
| ), | ||
| migrations.AddField( | ||
| model_name='highlight', | ||
| name='translation_key', | ||
| field=models.UUIDField(editable=False, null=True), | ||
| ), | ||
| ] |
15 changes: 15 additions & 0 deletions
15
network-api/networkapi/highlights/migrations/0006_bootstrap_migration.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Generated by Django 3.1.11 on 2021-05-31 17:18 | ||
|
|
||
| from django.db import migrations | ||
| from wagtail.core.models import BootstrapTranslatableModel | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('highlights', '0005_auto_20210531_1735'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| BootstrapTranslatableModel('highlights.Highlight'), | ||
| ] |
31 changes: 31 additions & 0 deletions
31
network-api/networkapi/highlights/migrations/0007_localize_migration.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Generated by Django 3.1.11 on 2021-05-31 18:02 | ||
|
|
||
| from django.db import migrations, models | ||
| import django.db.models.deletion | ||
| import uuid | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('wagtailcore', '0062_comment_models_and_pagesubscription'), | ||
| ('highlights', '0006_bootstrap_migration'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AlterField( | ||
| model_name='highlight', | ||
| name='locale', | ||
| field=models.ForeignKey(default=1, editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='wagtailcore.locale'), | ||
| preserve_default=False, | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='highlight', | ||
| name='translation_key', | ||
| field=models.UUIDField(default=uuid.uuid4, editable=False), | ||
| ), | ||
| migrations.AlterUniqueTogether( | ||
| name='highlight', | ||
| unique_together={('translation_key', 'locale')}, | ||
| ), | ||
| ] |
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
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
25 changes: 25 additions & 0 deletions
25
network-api/networkapi/news/migrations/0005_auto_20210531_1735.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Generated by Django 3.1.11 on 2021-05-31 17:35 | ||
|
|
||
| from django.db import migrations, models | ||
| import django.db.models.deletion | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('wagtailcore', '0062_comment_models_and_pagesubscription'), | ||
| ('news', '0004_remove_news_featured'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name='news', | ||
| name='locale', | ||
| field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='wagtailcore.locale'), | ||
| ), | ||
| migrations.AddField( | ||
| model_name='news', | ||
| name='translation_key', | ||
| field=models.UUIDField(editable=False, null=True), | ||
| ), | ||
| ] |
15 changes: 15 additions & 0 deletions
15
network-api/networkapi/news/migrations/0006_bootstrap_migration.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Generated by Django 3.1.11 on 2021-05-31 17:37 | ||
|
|
||
| from django.db import migrations | ||
| from wagtail.core.models import BootstrapTranslatableModel | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('news', '0005_auto_20210531_1735'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| BootstrapTranslatableModel('news.News') | ||
| ] |
31 changes: 31 additions & 0 deletions
31
network-api/networkapi/news/migrations/0007_localize_migration.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Generated by Django 3.1.11 on 2021-05-31 18:02 | ||
|
|
||
| from django.db import migrations, models | ||
| import django.db.models.deletion | ||
| import uuid | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('wagtailcore', '0062_comment_models_and_pagesubscription'), | ||
| ('news', '0006_bootstrap_migration'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AlterField( | ||
| model_name='news', | ||
| name='locale', | ||
| field=models.ForeignKey(default=1, editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='wagtailcore.locale'), | ||
| preserve_default=False, | ||
| ), | ||
| migrations.AlterField( | ||
| model_name='news', | ||
| name='translation_key', | ||
| field=models.UUIDField(default=uuid.uuid4, editable=False), | ||
| ), | ||
| migrations.AlterUniqueTogether( | ||
| name='news', | ||
| unique_together={('translation_key', 'locale')}, | ||
| ), | ||
| ] |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's check if this is actually necessary or not. If we don't need to mark the Meta class as translatable, that saves some migration work. (not much, but "not doing anything we don't need to do is worth not doing" =D)