mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:03:16 +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:
parent
1bcb5c4e21
commit
059a8a0ff5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user