Merge pull request #1375 from ponelat/fix/translator

Fix/translator
This commit is contained in:
Tony Tam
2015-07-22 17:59:24 -07:00
16 changed files with 249 additions and 66 deletions

View File

@@ -17,10 +17,11 @@ window.SwaggerTranslator = {
_words:[],
translate: function() {
translate: function(sel) {
var $this = this;
sel = sel || '[data-sw-translate]';
$('[data-sw-translate]').each(function() {
$(sel).each(function() {
$(this).html($this._tryTranslate($(this).html()));
$(this).val($this._tryTranslate($(this).val()));