From 14de2eab421e5df183e7cf61a76ad2172d8ff725 Mon Sep 17 00:00:00 2001 From: Jakob Schott <154420406+jakobsitory@users.noreply.github.com> Date: Thu, 31 Jul 2025 10:30:06 +0200 Subject: [PATCH] feat: 733 warn users when switching survey type (#6336) Co-authored-by: Johannes --- apps/web/locales/de-DE.json | 2 ++ apps/web/locales/en-US.json | 2 ++ apps/web/locales/fr-FR.json | 2 ++ apps/web/locales/pt-BR.json | 2 ++ apps/web/locales/pt-PT.json | 2 ++ apps/web/locales/zh-Hant-TW.json | 2 ++ .../survey/editor/components/how-to-send-card.tsx | 12 +++++++++++- .../surveys/link-surveys/personal-links.mdx | 4 ---- 8 files changed, 23 insertions(+), 5 deletions(-) diff --git a/apps/web/locales/de-DE.json b/apps/web/locales/de-DE.json index 2252b9471f..4f991c098a 100644 --- a/apps/web/locales/de-DE.json +++ b/apps/web/locales/de-DE.json @@ -1286,6 +1286,7 @@ "change_anyway": "Trotzdem ändern", "change_background": "Hintergrund ändern", "change_question_type": "Fragetyp ändern", + "change_survey_type": "Die Änderung des Umfragetypen kann vorhandenen Zugriff beeinträchtigen", "change_the_background_color_of_the_card": "Hintergrundfarbe der Karte ändern.", "change_the_background_color_of_the_input_fields": "Hintergrundfarbe der Eingabefelder ändern.", "change_the_background_to_a_color_image_or_animation": "Hintergrund zu einer Farbe, einem Bild oder einer Animation ändern.", @@ -1296,6 +1297,7 @@ "change_the_placement_of_this_survey": "Platzierung dieser Umfrage ändern.", "change_the_question_color_of_the_survey": "Fragefarbe der Umfrage ändern.", "changes_saved": "Änderungen gespeichert.", + "changing_survey_type_will_remove_existing_distribution_channels": "\"Das Ändern des Umfragetypen beeinflusst, wie er geteilt werden kann. Wenn Teilnehmer bereits Zugriffslinks für den aktuellen Typ haben, könnten sie das Zugriffsrecht nach dem Wechsel verlieren.\"", "character_limit_toggle_description": "Begrenzen Sie, wie kurz oder lang eine Antwort sein kann.", "character_limit_toggle_title": "Fügen Sie Zeichenbeschränkungen hinzu", "checkbox_label": "Checkbox-Beschriftung", diff --git a/apps/web/locales/en-US.json b/apps/web/locales/en-US.json index c38c9f128c..b14a809f22 100644 --- a/apps/web/locales/en-US.json +++ b/apps/web/locales/en-US.json @@ -1286,6 +1286,7 @@ "change_anyway": "Change anyway", "change_background": "Change background", "change_question_type": "Change question type", + "change_survey_type": "Switching survey type affects existing access", "change_the_background_color_of_the_card": "Change the background color of the card.", "change_the_background_color_of_the_input_fields": "Change the background color of the input fields.", "change_the_background_to_a_color_image_or_animation": "Change the background to a color, image or animation.", @@ -1296,6 +1297,7 @@ "change_the_placement_of_this_survey": "Change the placement of this survey.", "change_the_question_color_of_the_survey": "Change the question color of the survey.", "changes_saved": "Changes saved.", + "changing_survey_type_will_remove_existing_distribution_channels": "Changing the survey type will affect how it can be shared. If respondents already have access links for the current type, they may lose access after the switch.", "character_limit_toggle_description": "Limit how short or long an answer can be.", "character_limit_toggle_title": "Add character limits", "checkbox_label": "Checkbox Label", diff --git a/apps/web/locales/fr-FR.json b/apps/web/locales/fr-FR.json index 655aaa9d25..5df21a2331 100644 --- a/apps/web/locales/fr-FR.json +++ b/apps/web/locales/fr-FR.json @@ -1286,6 +1286,7 @@ "change_anyway": "Changer de toute façon", "change_background": "Changer l'arrière-plan", "change_question_type": "Changer le type de question", + "change_survey_type": "Le changement de type de sondage affecte l'accès existant", "change_the_background_color_of_the_card": "Changez la couleur de fond de la carte.", "change_the_background_color_of_the_input_fields": "Changez la couleur de fond des champs de saisie.", "change_the_background_to_a_color_image_or_animation": "Changez l'arrière-plan en une couleur, une image ou une animation.", @@ -1296,6 +1297,7 @@ "change_the_placement_of_this_survey": "Changez le placement de cette enquête.", "change_the_question_color_of_the_survey": "Changez la couleur des questions du sondage.", "changes_saved": "Modifications enregistrées.", + "changing_survey_type_will_remove_existing_distribution_channels": "Le changement du type de sondage affectera la façon dont il peut être partagé. Si les répondants ont déjà des liens d'accès pour le type actuel, ils peuvent perdre l'accès après le changement.", "character_limit_toggle_description": "Limitez la longueur des réponses.", "character_limit_toggle_title": "Ajouter des limites de caractères", "checkbox_label": "Étiquette de case à cocher", diff --git a/apps/web/locales/pt-BR.json b/apps/web/locales/pt-BR.json index 8b1902f793..9679b9a85e 100644 --- a/apps/web/locales/pt-BR.json +++ b/apps/web/locales/pt-BR.json @@ -1286,6 +1286,7 @@ "change_anyway": "Mudar mesmo assim", "change_background": "Mudar fundo", "change_question_type": "Mudar tipo de pergunta", + "change_survey_type": "Alterar o tipo de pesquisa afeta o acesso existente", "change_the_background_color_of_the_card": "Muda a cor de fundo do cartão.", "change_the_background_color_of_the_input_fields": "Mude a cor de fundo dos campos de entrada.", "change_the_background_to_a_color_image_or_animation": "Mude o fundo para uma cor, imagem ou animação.", @@ -1296,6 +1297,7 @@ "change_the_placement_of_this_survey": "Muda a posição dessa pesquisa.", "change_the_question_color_of_the_survey": "Muda a cor da pergunta da pesquisa.", "changes_saved": "Mudanças salvas.", + "changing_survey_type_will_remove_existing_distribution_channels": "Alterar o tipo de pesquisa afetará a forma como ela pode ser compartilhada. Se os respondentes já tiverem links de acesso para o tipo atual, podem perder o acesso após a mudança.", "character_limit_toggle_description": "Limite o quão curta ou longa uma resposta pode ser.", "character_limit_toggle_title": "Adicionar limites de caracteres", "checkbox_label": "Rótulo da Caixa de Seleção", diff --git a/apps/web/locales/pt-PT.json b/apps/web/locales/pt-PT.json index e39b993600..3358c9e22a 100644 --- a/apps/web/locales/pt-PT.json +++ b/apps/web/locales/pt-PT.json @@ -1286,6 +1286,7 @@ "change_anyway": "Alterar mesmo assim", "change_background": "Alterar fundo", "change_question_type": "Alterar tipo de pergunta", + "change_survey_type": "Alterar o tipo de inquérito afeta o acesso existente", "change_the_background_color_of_the_card": "Alterar a cor de fundo do cartão", "change_the_background_color_of_the_input_fields": "Alterar a cor de fundo dos campos de entrada", "change_the_background_to_a_color_image_or_animation": "Altere o fundo para uma cor, imagem ou animação", @@ -1296,6 +1297,7 @@ "change_the_placement_of_this_survey": "Alterar a colocação deste inquérito.", "change_the_question_color_of_the_survey": "Alterar a cor da pergunta do inquérito", "changes_saved": "Alterações guardadas.", + "changing_survey_type_will_remove_existing_distribution_channels": "Alterar o tipo de inquérito afetará como ele pode ser partilhado. Se os respondentes já tiverem links de acesso para o tipo atual, podem perder o acesso após a mudança.", "character_limit_toggle_description": "Limitar o quão curta ou longa uma resposta pode ser.", "character_limit_toggle_title": "Adicionar limites de caracteres", "checkbox_label": "Rótulo da Caixa de Seleção", diff --git a/apps/web/locales/zh-Hant-TW.json b/apps/web/locales/zh-Hant-TW.json index b324e9f773..14a2bb5ce6 100644 --- a/apps/web/locales/zh-Hant-TW.json +++ b/apps/web/locales/zh-Hant-TW.json @@ -1286,6 +1286,7 @@ "change_anyway": "仍然變更", "change_background": "變更背景", "change_question_type": "變更問題類型", + "change_survey_type": "切換問卷類型會影響現有訪問", "change_the_background_color_of_the_card": "變更卡片的背景顏色。", "change_the_background_color_of_the_input_fields": "變更輸入欄位的背景顏色。", "change_the_background_to_a_color_image_or_animation": "將背景變更為顏色、圖片或動畫。", @@ -1296,6 +1297,7 @@ "change_the_placement_of_this_survey": "變更此問卷的位置。", "change_the_question_color_of_the_survey": "變更問卷的問題顏色。", "changes_saved": "已儲存變更。", + "changing_survey_type_will_remove_existing_distribution_channels": "更改問卷類型會影響其共享方式。如果受訪者已擁有當前類型的存取連結,則在切換後可能會失去存取權限。", "character_limit_toggle_description": "限制答案的長度或短度。", "character_limit_toggle_title": "新增字元限制", "checkbox_label": "核取方塊標籤", diff --git a/apps/web/modules/survey/editor/components/how-to-send-card.tsx b/apps/web/modules/survey/editor/components/how-to-send-card.tsx index d2bb384639..a157ee399f 100644 --- a/apps/web/modules/survey/editor/components/how-to-send-card.tsx +++ b/apps/web/modules/survey/editor/components/how-to-send-card.tsx @@ -122,7 +122,17 @@ export const HowToSendCard = ({ localSurvey, setLocalSurvey, environment }: HowT
-
+
+ {localSurvey.status === "inProgress" && ( + + {t("environments.surveys.edit.change_survey_type")} + + {t( + "environments.surveys.edit.changing_survey_type_will_remove_existing_distribution_channels" + )} + + + )} - Personal Links are currently in beta and not yet available for all users. - - Personal Links are part of the [Enterprise Edition](/self-hosting/advanced/license).