Skip to content

Commit

Permalink
Merge pull request #4389 from open-formulieren/task/remove-missing-tr…
Browse files Browse the repository at this point in the history
…anslations-warning-for-components

Remove missing components' translations warning
  • Loading branch information
sergei-maertens authored Jun 14, 2024
2 parents a786320 + 00833b8 commit 3cdcbf5
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 575 deletions.
96 changes: 3 additions & 93 deletions src/openforms/forms/tests/e2e_tests/test_translation_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class TranslationWarningTests(E2ETestCase):
async def test_no_warning_with_full_translations(self):
async def test_no_warning_for_components_with_missing_translations(self):
@sync_to_async
def setUpTestData():
form = FormFactory.create(
Expand Down Expand Up @@ -39,8 +39,8 @@ def setUpTestData():
"label": "Some Field",
"openForms": {
"translations": {
"en": {"label": "Some EN Field"},
"nl": {"label": "Een NL Veld"},
"en": {"label": ""},
"nl": {"label": ""},
}
},
}
Expand Down Expand Up @@ -92,21 +92,6 @@ def setUpTestData():
generate_minimal_setup=True,
formstep__form_definition__name_nl="",
formstep__form_definition__name_en="",
formstep__form_definition__configuration={
"components": [
{
"type": "textfield",
"key": "someField",
"label": "Some Field",
"openForms": {
"translations": {
"en": {"label": ""},
"nl": {"label": ""},
}
},
}
],
},
translation_enabled=True,
)
ConfirmationEmailTemplateFactory.create(
Expand Down Expand Up @@ -167,21 +152,6 @@ def setUpTestData():
generate_minimal_setup=True,
formstep__form_definition__name_nl="Playwright test nl",
formstep__form_definition__name_en="Playwright test en",
formstep__form_definition__configuration={
"components": [
{
"type": "textfield",
"key": "someField",
"label": "Some Field",
"openForms": {
"translations": {
"en": {"label": "Some EN Field"},
"nl": {"label": "Een NL Veld"},
}
},
}
],
},
translation_enabled=True,
)
return form
Expand Down Expand Up @@ -227,21 +197,6 @@ def setUpTestData():
generate_minimal_setup=True,
formstep__form_definition__name_nl="Playwright test nl",
formstep__form_definition__name_en="Playwright test en",
formstep__form_definition__configuration={
"components": [
{
"type": "textfield",
"key": "someField",
"label": "Some Field",
"openForms": {
"translations": {
"en": {"label": "Some EN Field"},
"nl": {"label": "Een NL Veld"},
}
},
}
],
},
translation_enabled=True,
)
return form
Expand Down Expand Up @@ -297,21 +252,6 @@ def setUpTestData():
generate_minimal_setup=True,
formstep__form_definition__name_nl="Playwright test nl",
formstep__form_definition__name_en="Playwright test en",
formstep__form_definition__configuration={
"components": [
{
"type": "textfield",
"key": "someField",
"label": "Some Field",
"openForms": {
"translations": {
"en": {"label": "Some EN Field"},
"nl": {"label": "Een NL Veld"},
}
},
}
],
},
translation_enabled=True,
)
return form
Expand Down Expand Up @@ -354,21 +294,6 @@ def setUpTestData():
generate_minimal_setup=True,
formstep__form_definition__name_nl="Playwright test nl",
formstep__form_definition__name_en="Playwright test en",
formstep__form_definition__configuration={
"components": [
{
"type": "textfield",
"key": "someField",
"label": "Some Field",
"openForms": {
"translations": {
"en": {"label": "Some EN Field"},
"nl": {"label": "Een NL Veld"},
}
},
}
],
},
translation_enabled=True,
)
ConfirmationEmailTemplateFactory.create(
Expand Down Expand Up @@ -419,21 +344,6 @@ def setUpTestData():
generate_minimal_setup=True,
formstep__form_definition__name_nl="Playwright test nl",
formstep__form_definition__name_en="Playwright test en",
formstep__form_definition__configuration={
"components": [
{
"type": "textfield",
"key": "someField",
"label": "Some Field",
"openForms": {
"translations": {
"en": {"label": "Some EN Field"},
"nl": {"label": "Een NL Veld"},
}
},
}
],
},
translation_enabled=True,
)
ConfirmationEmailTemplateFactory.create(
Expand Down
70 changes: 0 additions & 70 deletions src/openforms/js/compiled-lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4479,12 +4479,6 @@
"value": "Partner 1"
}
],
"lvxPCk": [
{
"type": 0,
"value": "Component label"
}
],
"m20av3": [
{
"type": 0,
Expand All @@ -4503,12 +4497,6 @@
"value": "today"
}
],
"mL6vhw": [
{
"type": 0,
"value": "Component key"
}
],
"mMn7K3": [
{
"type": 0,
Expand Down Expand Up @@ -4689,48 +4677,6 @@
"value": "Whether to include the content of the confirmation page in the PDF."
}
],
"ooyhQ7": [
{
"type": 0,
"value": "Form has translation enabled, but is missing "
},
{
"children": [
{
"offset": 0,
"options": {
"one": {
"value": [
{
"type": 7
},
{
"type": 0,
"value": " component translation"
}
]
},
"other": {
"value": [
{
"type": 7
},
{
"type": 0,
"value": " component translations"
}
]
}
},
"pluralType": "cardinal",
"type": 6,
"value": "count"
}
],
"type": 8,
"value": "link"
}
],
"osSl3z": [
{
"type": 0,
Expand Down Expand Up @@ -4957,16 +4903,6 @@
"value": "Float"
}
],
"rTeZb4": [
{
"type": 0,
"value": "Form has translation enabled, but there are missing translations for the following Form Steps: "
},
{
"type": 1,
"value": "stepNames"
}
],
"rZfe8Z": [
{
"type": 0,
Expand Down Expand Up @@ -5245,12 +5181,6 @@
"value": "The content of the submission confirmation page. It can contain variables that will be templated from the submitted form data. If not specified, the global template will be used."
}
],
"vjHM9z": [
{
"type": 0,
"value": "Literal"
}
],
"vlY36U": [
{
"type": 0,
Expand Down
71 changes: 0 additions & 71 deletions src/openforms/js/compiled-lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -4484,12 +4484,6 @@
"value": "Partner 1"
}
],
"lvxPCk": [
{
"type": 0,
"value": "Componentlabel"
}
],
"m20av3": [
{
"type": 0,
Expand All @@ -4508,12 +4502,6 @@
"value": "vandaag"
}
],
"mL6vhw": [
{
"type": 0,
"value": "Componentsleutel"
}
],
"mMn7K3": [
{
"type": 0,
Expand Down Expand Up @@ -4694,49 +4682,6 @@
"value": "Vink aan om de inhoud toe te voegen aan de PDF die mensen op het eind kunnen downloaden."
}
],
"ooyhQ7": [
{
"type": 0,
"value": "Formuliervertalingen zijn ingeschakeld, maar er "
},
{
"children": [
{
"offset": 0,
"options": {
"one": {
"value": [
{
"type": 0,
"value": "ontbreekt een componentvertaling"
}
]
},
"other": {
"value": [
{
"type": 0,
"value": "ontbreken "
},
{
"type": 7
},
{
"type": 0,
"value": " componentvertalingen"
}
]
}
},
"pluralType": "cardinal",
"type": 6,
"value": "count"
}
],
"type": 8,
"value": "link"
}
],
"osSl3z": [
{
"type": 0,
Expand Down Expand Up @@ -4963,16 +4908,6 @@
"value": "Kommagetal (float)"
}
],
"rTeZb4": [
{
"type": 0,
"value": "Formuliervertalingen zijn ingeschakeld, maar er ontbreken vertalingen in de stappen: "
},
{
"type": 1,
"value": "stepNames"
}
],
"rZfe8Z": [
{
"type": 0,
Expand Down Expand Up @@ -5251,12 +5186,6 @@
"value": "De inhoud van bevestigingspagina na het versturen van de inzending. Dit sjabloon mag variabelen bevatten met inzendings-gegevens. Laat dit veld leeg om de standaardinstelling te gebruiken."
}
],
"vjHM9z": [
{
"type": 0,
"value": "Tekst"
}
],
"vlY36U": [
{
"type": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import ChangedFormDefinitionWarning from './ChangedFormDefinitionWarning';
import {FormContext} from './Context';
import LanguageTabs from './LanguageTabs';
import LogicWarning from './LogicWarning';
import MissingComponentTranslationsWarning from './MissingComponentTranslationsWarning';
import PluginWarning from './PluginWarning';
import useDetectConfigurationChanged from './useDetectConfigurationChanged';
import useDetectSimpleLogicErrors from './useDetectSimpleLogicErrors';
Expand Down Expand Up @@ -389,10 +388,6 @@ const FormStepDefinition = ({
</LanguageTabs>
</fieldset>

{translationEnabled ? (
<MissingComponentTranslationsWarning configuration={configuration} />
) : null}

<h2>Velden</h2>

<div className="formio-builder-wrapper">
Expand Down
Loading

0 comments on commit 3cdcbf5

Please sign in to comment.