From 6c558963a1308de77c4f8c725cfe0f8a7814bb8d Mon Sep 17 00:00:00 2001 From: Andy Byers Date: Tue, 21 Jul 2026 14:03:02 +0100 Subject: [PATCH] fix: register custom_how_to_cite for translation (#4389) --- ..._article_custom_how_to_cite_cy_and_more.py | 76 +++++++++++++++++++ src/submission/translation.py | 2 +- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 src/submission/migrations/0090_article_custom_how_to_cite_cy_and_more.py diff --git a/src/submission/migrations/0090_article_custom_how_to_cite_cy_and_more.py b/src/submission/migrations/0090_article_custom_how_to_cite_cy_and_more.py new file mode 100644 index 0000000000..3c55af0ec5 --- /dev/null +++ b/src/submission/migrations/0090_article_custom_how_to_cite_cy_and_more.py @@ -0,0 +1,76 @@ +# Generated by Django 4.2.29 on 2026-07-21 12:56 + +import core.model_utils +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("submission", "0089_merge_20260226_1524"), + ] + + operations = [ + migrations.AddField( + model_name="article", + name="custom_how_to_cite_cy", + field=core.model_utils.JanewayBleachField( + blank=True, + help_text="Custom 'how to cite' text. To be used only if the block generated by Janeway is not suitable.", + null=True, + ), + ), + migrations.AddField( + model_name="article", + name="custom_how_to_cite_de", + field=core.model_utils.JanewayBleachField( + blank=True, + help_text="Custom 'how to cite' text. To be used only if the block generated by Janeway is not suitable.", + null=True, + ), + ), + migrations.AddField( + model_name="article", + name="custom_how_to_cite_en", + field=core.model_utils.JanewayBleachField( + blank=True, + help_text="Custom 'how to cite' text. To be used only if the block generated by Janeway is not suitable.", + null=True, + ), + ), + migrations.AddField( + model_name="article", + name="custom_how_to_cite_en_us", + field=core.model_utils.JanewayBleachField( + blank=True, + help_text="Custom 'how to cite' text. To be used only if the block generated by Janeway is not suitable.", + null=True, + ), + ), + migrations.AddField( + model_name="article", + name="custom_how_to_cite_es", + field=core.model_utils.JanewayBleachField( + blank=True, + help_text="Custom 'how to cite' text. To be used only if the block generated by Janeway is not suitable.", + null=True, + ), + ), + migrations.AddField( + model_name="article", + name="custom_how_to_cite_fr", + field=core.model_utils.JanewayBleachField( + blank=True, + help_text="Custom 'how to cite' text. To be used only if the block generated by Janeway is not suitable.", + null=True, + ), + ), + migrations.AddField( + model_name="article", + name="custom_how_to_cite_nl", + field=core.model_utils.JanewayBleachField( + blank=True, + help_text="Custom 'how to cite' text. To be used only if the block generated by Janeway is not suitable.", + null=True, + ), + ), + ] diff --git a/src/submission/translation.py b/src/submission/translation.py index cde10987f5..90bf419c08 100644 --- a/src/submission/translation.py +++ b/src/submission/translation.py @@ -12,7 +12,7 @@ class SectionTranslationOptions(TranslationOptions): @register(models.Article) class ArticleTranslationOptions(TranslationOptions): - fields = ("title", "abstract") + fields = ("title", "abstract", "custom_how_to_cite") @register(models.SubmissionConfiguration)