[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/browser/ Fixes issue 283. I am not happy, but it works.

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Sep 28 11:46:35 EDT 2004


Log message for revision 27701:
  Fixes issue 283. I am not happy, but it works.
  


Changed:
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/browser/file_edit.pt
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/browser/i18nfile.py


-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/browser/file_edit.pt
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/browser/file_edit.pt	2004-09-28 10:17:53 UTC (rev 27700)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/browser/file_edit.pt	2004-09-28 15:46:34 UTC (rev 27701)
@@ -78,7 +78,7 @@
       <div class="label" i18n:translate="">Data</div>
       <div class="field">
         <textarea name="data" cols="70" rows="10"
-             tal:content="python:context.getData(request.get('language'))" />
+             tal:content="view/data" />
       </div>
     </div>
 

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/browser/i18nfile.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/browser/i18nfile.py	2004-09-28 10:17:53 UTC (rev 27700)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/i18nfile/browser/i18nfile.py	2004-09-28 15:46:34 UTC (rev 27701)
@@ -61,3 +61,11 @@
             self.context.contentType = contentType
         return self.request.response.redirect(self.request.URL[-1] +
                       "/editForm.html?language=%s" % quote(language, ''))
+
+    def data(self):
+        language = self.request.get('language')
+        # We have to decode it here, since we want to display the data. This
+        # does not seem the right thing to do, but it is the only fix I could
+        # think of without changing a lot of code. 
+        return self.context.getData(language).decode('UTF-8')
+        



More information about the Zope3-Checkins mailing list