title: jQuery UI Dialog Buttons from variables
body: <p>I have variables holding the translated labels for buttons inside a jquery ui dialog.</p>
  
  <p>I cannot fill the button array key with the variable itself, and can't find any way to let it treat my variable just as string.</p>
  
  <pre><code>translations['ok'] = 'ok';
  translatinos['cancel'] = 'cancel';
  
  // not working
  jQuery('#foo').dialog({
      buttons:
      {
          translations['ok']: function() { alert('foo-ok'); },
          translations['cancel']: function() { alert('foo-cancel'); }
      }
  });
  
  // working
  jQuery('#bar').dialog({
      buttons:
      {
          "Ok": function() { alert('bar-ok'); },
          "Cancel": function() { alert('bar-cancel'); }
      }
  });
  </code></pre>
  
  <p>Is there any way to get this to work with variable array keys?</p>