El Tuesday 24 February 2009 16:54:35 Wes Gamble escribió:
> Sergio,
>
> Thoughts inline.
>
> Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
>
> wrote:
> > I use always translation in my webs, because they are for spanish people.
> > Currently labels method try to translate all, symbols and strings. I
> > think it's good for translated apps, but I'm not sure for only-english
> > apps. I have thought 3 options:
> >
> > 1. Change it to translate only symbols and leave strings as they are.
>
> I think this may be a bad idea because it's sort of overloading symbols
> to mean "translatable" as well.  I think that there should just be a
> global switch to disable translation, if possible.

After thinking it more, I agree, I dislike it, and it's confusing becuase 
rails translate symbols and strings.

>
> > 2. Add a global option to disable translation in as_ method
>
> Based on another email from you, doing this would only affect requests
> (since we are only to use as_ in requests, and not in regular display
> code).  So, this is the right approach, but I fear that it is incomplete.

as_ is used in views. I meant as_ method shouldn't be used in code which is 
run out of request flow, for example in active_scaffold block, which is run 
when class is loaded and locale may be unset. Currently it's used in views, 
helpers and controllers for flash messages.

I have thought more about it and we can't disable translation in as_ method, 
because default symbols must be translated, but we can use the string when 
translation is missing. I have used this approach.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

  • un... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
    • ... Wes Gamble
      • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.

Reply via email to