[Zope3-checkins] CVS: Zope3/src/zope/products/pythonpage - browser.py:1.3 edit.pt:1.2

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Jan 31 09:02:10 EST 2004


Update of /cvs-repository/Zope3/src/zope/products/pythonpage
In directory cvs.zope.org:/tmp/cvs-serv9809/pythonpage

Modified Files:
	browser.py edit.pt 
Log Message:
I18n some of my custom code.


=== Zope3/src/zope/products/pythonpage/browser.py 1.2 => 1.3 ===
--- Zope3/src/zope/products/pythonpage/browser.py:1.2	Fri Jan 30 18:28:40 2004
+++ Zope3/src/zope/products/pythonpage/browser.py	Sat Jan 31 09:02:09 2004
@@ -16,6 +16,7 @@
 $Id$
 """
 from zope.app.browser.form.editview import EditView
+from zope.app.i18n import ZopeMessageIDFactory as _
 
 class PythonPageEval:
     """Evaluate the Python Page."""
@@ -40,7 +41,7 @@
             status = super(PythonPageEditView, self).update()
         except SyntaxError, err:
             self.syntaxError = err
-            status = u'A syntax error occured.'
+            status = _('A syntax error occured.')
             self.update_status = status
 
         return status


=== Zope3/src/zope/products/pythonpage/edit.pt 1.1 => 1.2 ===
--- Zope3/src/zope/products/pythonpage/edit.pt:1.1	Fri Jan 30 18:19:23 2004
+++ Zope3/src/zope/products/pythonpage/edit.pt	Sat Jan 31 09:02:09 2004
@@ -27,13 +27,16 @@
         <div class="message"
            tal:condition="view/syntaxError"
            tal:define="err view/syntaxError">
-          <h3>Syntax Error: 
-            <span tal:content="err/msg">invalid syntax</span>
+          <h3 i18n:translate="">Syntax Error: 
+            <span tal:content="err/msg" i18n:name="msg">invalid syntax</span>
           </h3>
-          <div>
-            File "<span tal:replace='err/filename'>filename</span>",
-            line <span tal:replace="err/lineno">10</span>,
-            offset <span tal:replace="err/offset">1</span>
+          <div i18n:translate="">
+            File 
+            "<span tal:replace="err/filename" i18n:name="filename">
+               filename
+            </span>",
+            line <span tal:replace="err/lineno" i18n:name="lineno">10</span>,
+            offset <span tal:replace="err/offset" i18n:name="offset">1</span>
           </div>
           <pre tal:content="python:err.text+'\n'+' '*err.offset+'^'">
              prin "foo"




More information about the Zope3-Checkins mailing list