Em Sexta-feira 24 Abril 2009, às 00:23:24, Álvaro Justen [Turicas] escreveu:
> On Thu, Apr 23, 2009 at 11:36 PM, mdipierro <[email protected]> wrote:
> > The translation works but the "admin" will not discover the
> > translation strings. It 1/2 works.
> > Let me sleep on this.
>
> I was thinking about this...
> If we add a string to translation every time a string is not matched,
> will cause an excessive overload or won't?
>
> in gluon/languages.py, class lazyT:
>
>     def __str__(self):
>         m = self.m
>         if self.t and self.t.has_key(m):
>             m = self.t[m]
>
> add:
>
>         else:
>             "code to add `m` to this app actual lang file"
>             self.t[m] = m
>
> This form add two new functionalitties:
> 1- Strings in all files will be handled;
> 2- "Mutable" strings can be translated too (strings that are generated
> in runtime, using database registries, user input etc.).

Interesting, we could test it to see if we have any overhead.

> Other thing I think that can be different: store strings as it are in
> lang files, don't store '*** string'. You can color lang page with red
> strings strings that its translation form are equal to.

Yup, im with Alvaro in this one.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to