Assuming my yml file is organized this way:
pt-BR:
alert_system:
schedules:
teste: 'ss'
every: 'Todo Dia:'
each: 'A Cada:'
each_day: 'A Cada #{dias} Dias'
on: 'Na data:'
When calling from within a decorator the command:
I18n.t("alert_system.schedules.#{type.to_s.underscore} ")
I get a response to the Translate missing exception, knowing that the "type.to_s.underscore" command can return "every", "on" and "each". However when running in the rails console the following commands
I18n.t("alert_system.schedules.on")
I18n.t("alert_system.schedules.every")
I18n.t("alert_system.schedules.each")
Only the first one presents the Translate Missing exception.
Even inside the decorator the path is correct, because the exception is presented ?, it is not possible to concatenate variables ?, and in the console, because only the one finished in "on" presents error ?, would it be a special word? >