Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions assets/JsTrans.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ Yii.translate.process = function (message, params, dictionary) {
var eval_expr = ex.split('n').join(num);

// if expression matches, set translation to current chunk
if (eval(eval_expr)) {
translation = msg;
break;
}
try {
if (eval(eval_expr)) {
translation = msg;
break;
}
} catch(ex) {}
}
}
}
Expand Down Expand Up @@ -85,4 +87,4 @@ Yii.t = function (category, message, params, language) {

// pass message and dictionary to translate function
return Yii.translate.process(message, params, dictionary);
}
}