more i18n in javascript
[coquelicot.git] / views / layout.haml
index 62848e0..0b16cc5 100644 (file)
     %script{ :type => 'text/javascript', :src => 'javascripts/jquery.lightBoxFu.js' }
     %script{ :type => 'text/javascript', :src => 'javascripts/jquery.uploadProgress.js' }
     :javascript
-      var generateRandomPassword = 'Generate random';
-      var generatingRandomPassword = 'Generating…';
+      var i18n = { generateRandomPassword: _('Generate random'),
+                   generatingRandomPassword: _('Generating…'),
+                   pleaseTryAgain: _('Please try again!'),
+                   error: _('Error: '),
+                   uploadStarting: _('Upload starting...'),
+                   uploading: _('Uploading: '),
+                   kb: _('kB'),
+                 };
     %script{ :type => 'text/javascript', :src => 'javascripts/coquelicot.js' }
   %body
     #container