I really like this. Can you send me a patch? Massimo
On 23 Apr, 22:23, Álvaro Justen [Turicas] <[email protected]> wrote: > 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.). > > 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. > > -- > Álvaro Justen > Peta5 - Telecomunicações e Software Livre > 21 3021-6001 / 9898-0141 > http://www.peta5.com.br/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

