My apologies -- I had forgotten about T.M() -- thought you were proposing introducing it rather than just simply using it in this one context.
Anthony On Thursday, September 26, 2013 3:12:33 AM UTC-4, dbdeveloper wrote: > > First of all =T.M() is shorter then =MARKMIN(T()) :) > Second. You can assume then "M" in T.M() is "MARKMIN" or "MODIFIED" T() :) > Third. MARKMIN expression in T.M() is parsed only once. Then parsed cached > string is used multiple times. MARKMIN() in =MARKMIN(T()) will be executed > every time. > Four. T.M() message is marked in translation dictionary. Translator can > understand then this message is not a plain text but a MARKMIN text (see > picture) > Five. T.M() allow you to use another preprocessor (not only MARKMIN) to > parse message before caching (filter= and ftag= parameters in T.M() > function). > Six. T.M() avoid to split translated sentence into several parts as in > ajax_error_500 message was. It's very difficult to translate such split > sentences because on some languages we need to rearrange words and/or > change words' forms to make right translation. > > NOTE: [Update all languages] in Languages section in appadmin cannot > affect to T.M() because we cannot know what filter is used before > execution. So new T.M() translations appears in translation dictionary > AFTER appropriate T.M() CALLS ONLY! > > > > У ср, 2013-09-25 у 18:09 -0700, Anthony пише: > > Sorry, that wasn't clear. But why can't you just do: > > > > var ajax_error_500 = '{{=MARKMIN(T('An error occurred, please [[reload %s > ]] the page') % > URL(args=request.args, > vars=request.get_vars))}}' > > > Anthony > > On Wednesday, September 25, 2013 5:47:31 PM UTC-4, dbdeveloper wrote: > > T.M() uses MARKMIN (see docs in attachment). Using MARKMIN you can > create message with link, img, tables, bold, italic, colors and so on. > > Vlad > > У ср, 2013-09-25 у 07:20 -0700, Anthony пише: > > var ajax_error_500 = '{{=T.M('An error occur*r*ed, please [[reload > %s]] the page') % URL(args=request.args, vars=request.get_vars) }}' > > > > The original included an HTML <a> element. In your example above, does the > [[... %s]] notation indicate that an <a> element should be created? If so, > what if you want to include some attributes? What if you need a different > HTML element? > > > Anthony > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/ > <http://github.com/web2py/web2py>web2py<http://github.com/web2py/web2py>(Source > code) > - https://code.google.com/p/<https://code.google.com/p/web2py/issues/list> > web2py/issues/list <https://code.google.com/p/web2py/issues/list> (Report > Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+un...@googlegroups.com. > For more options, visit > https://groups.google.com/<https://groups.google.com/groups/opt_out> > groups/opt_out <https://groups.google.com/groups/opt_out>. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+un...@googlegroups.com <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.