diff --git a/api/src/reportcreator_api/pentests/migrations/0059_alter_findingtemplatetranslation_language_and_more.py b/api/src/reportcreator_api/pentests/migrations/0059_alter_findingtemplatetranslation_language_and_more.py new file mode 100644 index 000000000..5ecf3a00d --- /dev/null +++ b/api/src/reportcreator_api/pentests/migrations/0059_alter_findingtemplatetranslation_language_and_more.py @@ -0,0 +1,44 @@ +# Generated by Django 5.1.1 on 2024-10-22 11:26 + +import reportcreator_api.pentests.models.common +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pentests', '0058_alter_collabclientinfo_user_projectnoteshareinfo'), + ] + + operations = [ + migrations.AlterField( + model_name='findingtemplatetranslation', + name='language', + field=models.CharField(choices=[('en-US', 'English (en-US)'), ('en-GB', 'English (en-GB)'), ('en-AU', 'English (en-AU)'), ('en-CA', 'English (en-CA)'), ('en-NZ', 'English (en-NZ)'), ('en-ZA', 'English (en-ZA)'), ('de-DE', 'German (de-DE)'), ('de-AT', 'German (de-AT)'), ('de-CH', 'German (de-CH)'), ('es-ES', 'Spanish (es-ES)'), ('fr-FR', 'French (fr-FR)'), ('fr-CA', 'French (fr-CA)'), ('fr-BE', 'French (fr-BE)'), ('fr-CH', 'French (fr-CH)'), ('pt-PT', 'Portuguese (pt-PT)'), ('pt-BR', 'Portuguese (pt-BR)'), ('it-IT', 'Italian (it-IT)'), ('nl-NL', 'Dutch (nl-NL)'), ('da-DK', 'Danish (da-DK)'), ('pl-PL', 'Polish (pl-PL)'), ('uk-UA', 'Ukrainian (uk-UA)'), ('ro-RO', 'Romanian (ro-RO)'), ('sk-SK', 'Slovak (sk-SK)'), ('sl-SI', 'Slovenian (sl-SI)'), ('el-GR', 'Greek (el-GR)'), ('sv-SE', 'Swedish (sv-SE)'), ('sq-AL', 'Albanian (sq-AL)'), ('bg-BG', 'Bulgarian (bg-BG)'), ('hr-HR', 'Croatian (hr-HR)'), ('cs-CZ', 'Czech (cs-CZ)'), ('et-EE', 'Estonian (et-EE)'), ('fi-FI', 'Finnish (fi-FI)'), ('hu-HU', 'Hungarian (hu-HU)'), ('lv-LV', 'Latvian (lv-LV)'), ('lt-LT', 'Lithuanian (lt-LT)'), ('mt-MT', 'Maltese (mt-MT)'), ('nb-NO', 'Norwegian (nb-NO)'), ('sr-SP', 'Serbian (sr-SP)'), ('tr-TR', 'Turkish (tr-TR)')], db_index=True, default=reportcreator_api.pentests.models.common.get_default_language, max_length=5), + ), + migrations.AlterField( + model_name='historicalfindingtemplatetranslation', + name='language', + field=models.CharField(choices=[('en-US', 'English (en-US)'), ('en-GB', 'English (en-GB)'), ('en-AU', 'English (en-AU)'), ('en-CA', 'English (en-CA)'), ('en-NZ', 'English (en-NZ)'), ('en-ZA', 'English (en-ZA)'), ('de-DE', 'German (de-DE)'), ('de-AT', 'German (de-AT)'), ('de-CH', 'German (de-CH)'), ('es-ES', 'Spanish (es-ES)'), ('fr-FR', 'French (fr-FR)'), ('fr-CA', 'French (fr-CA)'), ('fr-BE', 'French (fr-BE)'), ('fr-CH', 'French (fr-CH)'), ('pt-PT', 'Portuguese (pt-PT)'), ('pt-BR', 'Portuguese (pt-BR)'), ('it-IT', 'Italian (it-IT)'), ('nl-NL', 'Dutch (nl-NL)'), ('da-DK', 'Danish (da-DK)'), ('pl-PL', 'Polish (pl-PL)'), ('uk-UA', 'Ukrainian (uk-UA)'), ('ro-RO', 'Romanian (ro-RO)'), ('sk-SK', 'Slovak (sk-SK)'), ('sl-SI', 'Slovenian (sl-SI)'), ('el-GR', 'Greek (el-GR)'), ('sv-SE', 'Swedish (sv-SE)'), ('sq-AL', 'Albanian (sq-AL)'), ('bg-BG', 'Bulgarian (bg-BG)'), ('hr-HR', 'Croatian (hr-HR)'), ('cs-CZ', 'Czech (cs-CZ)'), ('et-EE', 'Estonian (et-EE)'), ('fi-FI', 'Finnish (fi-FI)'), ('hu-HU', 'Hungarian (hu-HU)'), ('lv-LV', 'Latvian (lv-LV)'), ('lt-LT', 'Lithuanian (lt-LT)'), ('mt-MT', 'Maltese (mt-MT)'), ('nb-NO', 'Norwegian (nb-NO)'), ('sr-SP', 'Serbian (sr-SP)'), ('tr-TR', 'Turkish (tr-TR)')], db_index=True, default=reportcreator_api.pentests.models.common.get_default_language, max_length=5), + ), + migrations.AlterField( + model_name='historicalpentestproject', + name='language', + field=models.CharField(choices=[('en-US', 'English (en-US)'), ('en-GB', 'English (en-GB)'), ('en-AU', 'English (en-AU)'), ('en-CA', 'English (en-CA)'), ('en-NZ', 'English (en-NZ)'), ('en-ZA', 'English (en-ZA)'), ('de-DE', 'German (de-DE)'), ('de-AT', 'German (de-AT)'), ('de-CH', 'German (de-CH)'), ('es-ES', 'Spanish (es-ES)'), ('fr-FR', 'French (fr-FR)'), ('fr-CA', 'French (fr-CA)'), ('fr-BE', 'French (fr-BE)'), ('fr-CH', 'French (fr-CH)'), ('pt-PT', 'Portuguese (pt-PT)'), ('pt-BR', 'Portuguese (pt-BR)'), ('it-IT', 'Italian (it-IT)'), ('nl-NL', 'Dutch (nl-NL)'), ('da-DK', 'Danish (da-DK)'), ('pl-PL', 'Polish (pl-PL)'), ('uk-UA', 'Ukrainian (uk-UA)'), ('ro-RO', 'Romanian (ro-RO)'), ('sk-SK', 'Slovak (sk-SK)'), ('sl-SI', 'Slovenian (sl-SI)'), ('el-GR', 'Greek (el-GR)'), ('sv-SE', 'Swedish (sv-SE)'), ('sq-AL', 'Albanian (sq-AL)'), ('bg-BG', 'Bulgarian (bg-BG)'), ('hr-HR', 'Croatian (hr-HR)'), ('cs-CZ', 'Czech (cs-CZ)'), ('et-EE', 'Estonian (et-EE)'), ('fi-FI', 'Finnish (fi-FI)'), ('hu-HU', 'Hungarian (hu-HU)'), ('lv-LV', 'Latvian (lv-LV)'), ('lt-LT', 'Lithuanian (lt-LT)'), ('mt-MT', 'Maltese (mt-MT)'), ('nb-NO', 'Norwegian (nb-NO)'), ('sr-SP', 'Serbian (sr-SP)'), ('tr-TR', 'Turkish (tr-TR)')], db_index=True, default=reportcreator_api.pentests.models.common.get_default_language, max_length=5), + ), + migrations.AlterField( + model_name='historicalprojecttype', + name='language', + field=models.CharField(choices=[('en-US', 'English (en-US)'), ('en-GB', 'English (en-GB)'), ('en-AU', 'English (en-AU)'), ('en-CA', 'English (en-CA)'), ('en-NZ', 'English (en-NZ)'), ('en-ZA', 'English (en-ZA)'), ('de-DE', 'German (de-DE)'), ('de-AT', 'German (de-AT)'), ('de-CH', 'German (de-CH)'), ('es-ES', 'Spanish (es-ES)'), ('fr-FR', 'French (fr-FR)'), ('fr-CA', 'French (fr-CA)'), ('fr-BE', 'French (fr-BE)'), ('fr-CH', 'French (fr-CH)'), ('pt-PT', 'Portuguese (pt-PT)'), ('pt-BR', 'Portuguese (pt-BR)'), ('it-IT', 'Italian (it-IT)'), ('nl-NL', 'Dutch (nl-NL)'), ('da-DK', 'Danish (da-DK)'), ('pl-PL', 'Polish (pl-PL)'), ('uk-UA', 'Ukrainian (uk-UA)'), ('ro-RO', 'Romanian (ro-RO)'), ('sk-SK', 'Slovak (sk-SK)'), ('sl-SI', 'Slovenian (sl-SI)'), ('el-GR', 'Greek (el-GR)'), ('sv-SE', 'Swedish (sv-SE)'), ('sq-AL', 'Albanian (sq-AL)'), ('bg-BG', 'Bulgarian (bg-BG)'), ('hr-HR', 'Croatian (hr-HR)'), ('cs-CZ', 'Czech (cs-CZ)'), ('et-EE', 'Estonian (et-EE)'), ('fi-FI', 'Finnish (fi-FI)'), ('hu-HU', 'Hungarian (hu-HU)'), ('lv-LV', 'Latvian (lv-LV)'), ('lt-LT', 'Lithuanian (lt-LT)'), ('mt-MT', 'Maltese (mt-MT)'), ('nb-NO', 'Norwegian (nb-NO)'), ('sr-SP', 'Serbian (sr-SP)'), ('tr-TR', 'Turkish (tr-TR)')], db_index=True, default=reportcreator_api.pentests.models.common.get_default_language, max_length=5), + ), + migrations.AlterField( + model_name='pentestproject', + name='language', + field=models.CharField(choices=[('en-US', 'English (en-US)'), ('en-GB', 'English (en-GB)'), ('en-AU', 'English (en-AU)'), ('en-CA', 'English (en-CA)'), ('en-NZ', 'English (en-NZ)'), ('en-ZA', 'English (en-ZA)'), ('de-DE', 'German (de-DE)'), ('de-AT', 'German (de-AT)'), ('de-CH', 'German (de-CH)'), ('es-ES', 'Spanish (es-ES)'), ('fr-FR', 'French (fr-FR)'), ('fr-CA', 'French (fr-CA)'), ('fr-BE', 'French (fr-BE)'), ('fr-CH', 'French (fr-CH)'), ('pt-PT', 'Portuguese (pt-PT)'), ('pt-BR', 'Portuguese (pt-BR)'), ('it-IT', 'Italian (it-IT)'), ('nl-NL', 'Dutch (nl-NL)'), ('da-DK', 'Danish (da-DK)'), ('pl-PL', 'Polish (pl-PL)'), ('uk-UA', 'Ukrainian (uk-UA)'), ('ro-RO', 'Romanian (ro-RO)'), ('sk-SK', 'Slovak (sk-SK)'), ('sl-SI', 'Slovenian (sl-SI)'), ('el-GR', 'Greek (el-GR)'), ('sv-SE', 'Swedish (sv-SE)'), ('sq-AL', 'Albanian (sq-AL)'), ('bg-BG', 'Bulgarian (bg-BG)'), ('hr-HR', 'Croatian (hr-HR)'), ('cs-CZ', 'Czech (cs-CZ)'), ('et-EE', 'Estonian (et-EE)'), ('fi-FI', 'Finnish (fi-FI)'), ('hu-HU', 'Hungarian (hu-HU)'), ('lv-LV', 'Latvian (lv-LV)'), ('lt-LT', 'Lithuanian (lt-LT)'), ('mt-MT', 'Maltese (mt-MT)'), ('nb-NO', 'Norwegian (nb-NO)'), ('sr-SP', 'Serbian (sr-SP)'), ('tr-TR', 'Turkish (tr-TR)')], db_index=True, default=reportcreator_api.pentests.models.common.get_default_language, max_length=5), + ), + migrations.AlterField( + model_name='projecttype', + name='language', + field=models.CharField(choices=[('en-US', 'English (en-US)'), ('en-GB', 'English (en-GB)'), ('en-AU', 'English (en-AU)'), ('en-CA', 'English (en-CA)'), ('en-NZ', 'English (en-NZ)'), ('en-ZA', 'English (en-ZA)'), ('de-DE', 'German (de-DE)'), ('de-AT', 'German (de-AT)'), ('de-CH', 'German (de-CH)'), ('es-ES', 'Spanish (es-ES)'), ('fr-FR', 'French (fr-FR)'), ('fr-CA', 'French (fr-CA)'), ('fr-BE', 'French (fr-BE)'), ('fr-CH', 'French (fr-CH)'), ('pt-PT', 'Portuguese (pt-PT)'), ('pt-BR', 'Portuguese (pt-BR)'), ('it-IT', 'Italian (it-IT)'), ('nl-NL', 'Dutch (nl-NL)'), ('da-DK', 'Danish (da-DK)'), ('pl-PL', 'Polish (pl-PL)'), ('uk-UA', 'Ukrainian (uk-UA)'), ('ro-RO', 'Romanian (ro-RO)'), ('sk-SK', 'Slovak (sk-SK)'), ('sl-SI', 'Slovenian (sl-SI)'), ('el-GR', 'Greek (el-GR)'), ('sv-SE', 'Swedish (sv-SE)'), ('sq-AL', 'Albanian (sq-AL)'), ('bg-BG', 'Bulgarian (bg-BG)'), ('hr-HR', 'Croatian (hr-HR)'), ('cs-CZ', 'Czech (cs-CZ)'), ('et-EE', 'Estonian (et-EE)'), ('fi-FI', 'Finnish (fi-FI)'), ('hu-HU', 'Hungarian (hu-HU)'), ('lv-LV', 'Latvian (lv-LV)'), ('lt-LT', 'Lithuanian (lt-LT)'), ('mt-MT', 'Maltese (mt-MT)'), ('nb-NO', 'Norwegian (nb-NO)'), ('sr-SP', 'Serbian (sr-SP)'), ('tr-TR', 'Turkish (tr-TR)')], db_index=True, default=reportcreator_api.pentests.models.common.get_default_language, max_length=5), + ), + ] diff --git a/api/src/reportcreator_api/pentests/models/common.py b/api/src/reportcreator_api/pentests/models/common.py index 973ac77e8..498dfecf1 100644 --- a/api/src/reportcreator_api/pentests/models/common.py +++ b/api/src/reportcreator_api/pentests/models/common.py @@ -154,6 +154,7 @@ class Language(models.TextChoices): ALBANIAN = 'sq-AL', False, 'Albanian (sq-AL)' BULGARIAN = 'bg-BG', False, 'Bulgarian (bg-BG)' CROATIAN = 'hr-HR', False, 'Croatian (hr-HR)' + CZECH = 'cs-CZ', False, 'Czech (cs-CZ)' ESTONIAN = 'et-EE', False, 'Estonian (et-EE)' FINNISH = 'fi-FI', False, 'Finnish (fi-FI)' HUNGARIAN = 'hu-HU', False, 'Hungarian (hu-HU)'