Thanks for quick response, Massimo On 6月6日, 午前11:49, mdipierro <mdipie...@cs.depaul.edu> wrote: > I see what you are doing but I do not like the fact that this promotes > Tx to something special while that is a name that I made up as an > example. I do not like to introduce new symbols and functions in > web2py. What if instead we make a > > T(....,escape=False)? > > with escape=True by default? > > I can implement it easily.
Yes, that would be fine :-) Then, if I want to make lines for translation a bit shorter, I could use a lambda function in models Tx = lambda *a: T(*a, escape=False) right? or, would it be a bad practice? > Massimo -- Teru > > On Jun 5, 9:40 pm, suiato <homm...@gmail.com> wrote: > > > I changed the regular expression in gluon/languages.py as below, and > > "update all languages" now updates the strings in T() and Tx() :-) > > > PY_STRING_LITERAL_RE = r'(?<=[^\w]T)x?\((?P<name>'\ > > + r"[uU]?[rR]?(?:'''(?:[^']|'{1,2}(?!'))*''')|"\ > > + r"(?:'(?:[^'\\]|\\.)*')|" + r'(?:"""(?:[^"]|"{1,2}(?!")) > > *""")|'\ > > + r'(?:"(?:[^"\\]|\\.)*"))' > > > To follow naming convention in web2py, would it be better called TX() > > instead of Tx()? > > > -- > > Teru --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---