Repository: liqd/a4-opin

Issue:
no translations of intro text of the page collection snippets (user manual)
its not possible to add translations to the intro text of the page collection snippets in wagtail. Can you add them?
![grafik](https://user-images.githubusercontent.com/24652917/36987151-f74bebbc-209b-11e8-805e-84998673738d.png)




Discussion:

Resolving patch:
diff --git a/home/migrations/0033_translate_intro.py b/home/migrations/0033_translate_intro.py
new file mode 100644
--- /dev/null
+++ b/home/migrations/0033_translate_intro.py
@@ -0,0 +1,66 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.9 on 2018-03-13 15:17
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('home', '0032_add_two_more_pages_to_page_collection'),
+    ]
+
+    operations = [
+        migrations.RenameField(
+            model_name='pagecollection',
+            old_name='intro_text',
+            new_name='intro_text_de',
+        ),
+        migrations.AddField(
+            model_name='pagecollection',
+            name='intro_text_da',
+            field=models.CharField(blank=True, max_length=250),
+        ),
+        migrations.AddField(
+            model_name='pagecollection',
+            name='intro_text_el',
+            field=models.CharField(blank=True, max_length=250),
+        ),
+        migrations.AddField(
+            model_name='pagecollection',
+            name='intro_text_en',
+            field=models.CharField(default='', max_length=250),
+            preserve_default=False,
+        ),
+        migrations.AddField(
+            model_name='pagecollection',
+            name='intro_text_fr',
+            field=models.CharField(blank=True, max_length=250),
+        ),
+        migrations.AddField(
+            model_name='pagecollection',
+            name='intro_text_it',
+            field=models.CharField(blank=True, max_length=250),
+        ),
+        migrations.AddField(
+            model_name='pagecollection',
+            name='intro_text_ka',
+            field=models.CharField(blank=True, max_length=250),
+        ),
+        migrations.AddField(
+            model_name='pagecollection',
+            name='intro_text_mk',
+            field=models.CharField(blank=True, max_length=250),
+        ),
+        migrations.AddField(
+            model_name='pagecollection',
+            name='intro_text_sl',
+            field=models.CharField(blank=True, max_length=250),
+        ),
+        migrations.AddField(
+            model_name='pagecollection',
+            name='intro_text_sv',
+            field=models.CharField(blank=True, max_length=250),
+        ),
+    ]
diff --git a/home/models/snippets.py b/home/models/snippets.py
--- a/home/models/snippets.py
+++ b/home/models/snippets.py
@@ -148,7 +148,11 @@ class PageCollection(translations.TranslatedModel):
         help_text='The Image that is shown on top of the page'
     )
 
-    intro_text = models.CharField(max_length=250, blank=True)
+    intro_text = translations.TranslatedField(
+        'intro_text',
+        models.CharField(max_length=250, blank=True),
+        overwrite_fallback={'blank': False}
+    )
 
     args = {
         'on_delete': models.SET_NULL,
@@ -184,7 +188,12 @@ class PageCollection(translations.TranslatedModel):
         ],
             heading="Title",
         ),
-        edit_handlers.FieldPanel('intro_text'),
+        edit_handlers.MultiFieldPanel([
+            edit_handlers.FieldPanel(
+                    'intro_text_{}'.format(lang_code)
+                ) for lang_code, lang in LANGUAGES
+                ],
+            heading='intro_text'),
         edit_handlers.MultiFieldPanel([
             edit_handlers.PageChooserPanel(
                 'page_{}'.format(x)


Test patch: