1
Assuming my yml file is arranged that 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 controller the command:
I18n.t("alert_system.schedules.#{type.to_s.underscore} ")
I get the Translate Missing exception in response, knowing that the "type.to_s.underscore" command can return "Every", "on" and "each". But when running 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 shows the Translate Missing exception.
Even within the Developer the path is correct, why is the exception? , is it not possible to concatenate variables? , and on the console, because only the finished one in "on" shows error? , would be a special word?