From d72f2c6cb99229453814291e87d973c8febe6b51 Mon Sep 17 00:00:00 2001 From: Abderrahmane Smimite Date: Sat, 11 May 2024 20:52:27 +0200 Subject: [PATCH] Fix unwanted translation on AutoCompleteSelect --- frontend/src/lib/components/Forms/AutocompleteSelect.svelte | 3 ++- frontend/src/lib/components/Forms/ModelForm.svelte | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/Forms/AutocompleteSelect.svelte b/frontend/src/lib/components/Forms/AutocompleteSelect.svelte index 271454898..c426a332d 100644 --- a/frontend/src/lib/components/Forms/AutocompleteSelect.svelte +++ b/frontend/src/lib/components/Forms/AutocompleteSelect.svelte @@ -12,6 +12,7 @@ export let nullable = false; export let hide = false; + export let translateOptions = true; const { value, errors, constraints } = formFieldProxy(form, field); @@ -88,7 +89,7 @@ {#if option.suggested} {option.label} (suggested) - {:else if localItems(languageTag())[toCamelCase(option.label)]} + {:else if translateOptions && localItems(languageTag())[toCamelCase(option.label)]} {localItems(languageTag())[toCamelCase(option.label)]} {:else} {option.label} diff --git a/frontend/src/lib/components/Forms/ModelForm.svelte b/frontend/src/lib/components/Forms/ModelForm.svelte index aaa5c6133..ba5ab88c1 100644 --- a/frontend/src/lib/components/Forms/ModelForm.svelte +++ b/frontend/src/lib/components/Forms/ModelForm.svelte @@ -350,6 +350,7 @@ {#if model.selectOptions['selected_implementation_groups'] && model.selectOptions['selected_implementation_groups'].length}