Added some extra replacements to the yandexTranslateToText() method.

This commit is contained in:
PhotonQyv 2017-09-09 09:51:03 +01:00
parent 55cdb41780
commit 618516df0c
1 changed files with 2 additions and 0 deletions

View File

@ -1004,6 +1004,8 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
JSONObject translationJson = new JSONObject(text);
JSONArray aJsonArray = translationJson.getJSONArray("text");
String aJsonString = aJsonArray.get(0).toString();
aJsonString = aJsonString.replaceAll("__q(\\d+) - __", "__t$1__");
aJsonString = aJsonString.replace("&", "&");
aJsonString = URLDecoder.decode(aJsonString, "UTF-8");
return aJsonString;
}