From 059a8a0ff528d8ebb9209ab7f717ce81f5cd8d7a Mon Sep 17 00:00:00 2001 From: Ted Johansson Date: Wed, 14 Aug 2024 14:39:18 +0200 Subject: [PATCH] DEV: Generate correct i18n keys for wizard radio choices (#28370) If you wizard step has a dash in it, e.g. foo-bar, the wrong i18n key will be inferred for selects. This PR ensures the key is underscored. --- app/serializers/wizard_field_choice_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/serializers/wizard_field_choice_serializer.rb b/app/serializers/wizard_field_choice_serializer.rb index 38862540239..0a1fdf3e892 100644 --- a/app/serializers/wizard_field_choice_serializer.rb +++ b/app/serializers/wizard_field_choice_serializer.rb @@ -10,7 +10,7 @@ class WizardFieldChoiceSerializer < ApplicationSerializer def i18nkey field = object.field step = field.step - "wizard.step.#{step.id}.fields.#{field.id}.choices.#{id}" + "wizard.step.#{step.id}.fields.#{field.id}.choices.#{id}".underscore end def label