mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-04-27 08:24:44 +00:00
Strip code tag from Yandex reponse.
When getting a translation suggestion for a string that contains string replacements (like %(foo)s), Yandex wraps string replacements in annoying <code> tags, this commit strips those tags automatically.
This commit is contained in:
parent
710da65f04
commit
12490bae56
1 changed files with 1 additions and 1 deletions
|
|
@ -64,7 +64,7 @@ google.setOnLoadCallback(function() {
|
|||
dataType: 'jsonp',
|
||||
success: function(response) {
|
||||
if (response.code == 200) {
|
||||
trans.val(response.text[0].replace(/<br>/g, '\n').replace(/</g, '<').replace(/>/g, '>'));
|
||||
trans.val(response.text[0].replace(/<br>/g, '\n').replace(/<\/?code>/g, '').replace(/</g, '<').replace(/>/g, '>'));
|
||||
a.hide();
|
||||
} else {
|
||||
a.text(response);
|
||||
|
|
|
|||
Loading…
Reference in a new issue