<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,10 +11,14 @@
       google.load(&quot;language&quot;, &quot;1&quot;);
 
       function getGoogleTranslation(id, text, from_language, to_language) {
+        text = text.replace(/\{\{/, '__').replace(/\}\}/, '__')
         google.language.translate(text, from_language, to_language, function(result) {
-        if (!result.error) { 
-            Form.Element.setValue(id, result.translation.unescapeHTML());
-            }
+          if (!result.error) { 
+            result_text = result.translation.unescapeHTML().gsub(/__(.+)__/, function(match){
+              return '{{' + match[1] + '}}';
+            });
+            Form.Element.setValue(id, result_text);
+          }
         });
 
     }</diff>
      <filename>views/layouts/translate.rhtml</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6203065377f229fb1b538040ed206731a2844412</id>
    </parent>
  </parents>
  <author>
    <name>KieranP</name>
    <email>kieran@katipo.co.nz</email>
  </author>
  <url>http://github.com/sermoa/translate/commit/2ceb99e29f8b149e0cf9c2c4bf0d6dc6585b3a5a</url>
  <id>2ceb99e29f8b149e0cf9c2c4bf0d6dc6585b3a5a</id>
  <committed-date>2009-05-27T21:37:34-07:00</committed-date>
  <authored-date>2009-05-27T21:37:34-07:00</authored-date>
  <message>When sending strings to google, if they contained variables, the string would get messed up. So escape it to something google doesn't edit, and reassemble the string when a response comes back from the request.</message>
  <tree>4b1f3e9baa43f405c36f59fde37c6f821330490a</tree>
  <committer>
    <name>KieranP</name>
    <email>kieran@katipo.co.nz</email>
  </committer>
</commit>
