mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 10:54:41 +08:00
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.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user