On 4/7/06, Alexander Schremmer <[EMAIL PROTECTED]> wrote: > On Fri, 7 Apr 2006 10:07:26 -0400, Martin Blais wrote: > > > There are cases where you need N_() after initialization, so you need > > both, really. See the link I sent to Alex earlier (to the GNU manual > > example). > > On the page you were referring to, I cannot find a particular use case that > does not work with the idea sketched above.
Okie. Here's one example from actual code: class EventEdit(EventEditPages): def handle( self, ctxt ): ... # Render special activate/deactivate button. if ctxt.event.state == 'a': future_state = u's' actstr = N_('Deactivate') else: future_state = u'a' actstr = N_('Activate') values = {'state': future_state} rdrbutton = HoutFormRenderer(form__state_set, values) page.append(rdrbutton.render(submit=actstr)) HoutFormRenderer.render() expects non-translated strings, and it performs the gettext lookup itself (this is a general library-wide policy for all widget labels). (This is just one example. I have many other use cases like this.) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com