cntrytwist wrote:
> If you find a string that does not get caught by the missing
> translation error, simply enclose the string inside as_()
> Example
> <%= link_to 'Done' ...
> Change to
> <%= link_to as_('done') ...
> Add the following to en.yml
> done: "Done"
>
I'm confused about how to properly use this:
I have this in my controller:
active_scaffold :servers do |config|
config.list.label = 'servers'
and this in my en.yml file:
en:
active_scaffold:
servers: "Servers"
That works fine.
If I try to use the "as_('servers')" syntax, as in:
active_scaffold :servers do |config|
config.list.label = as_('servers')
then I get the translation error "translation missing: en,
active_scaffold, Servers"
When should as_() be used? In general, what does as_() do? I've always
wondered.
Also, is there any concept in Rails >= 2.2 of not using locale files for
a given "default" locale (like "en"). That way, we would only have to
provide locale translations for the non-default locale?
Wes
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---