Partial(!) AskMrRobot translation
With this extension installed AskMrRobot.com will appear as if it has (parts of) its website translated into your language.
Simply install and browse to AskMrRobot.com, you will immediately see the effect.
Latest reviews
- (2014-11-07) Наталия Чумаченко: Очень мало переведено на русский, но достаточно для понимания. Актуал WoW 5.x
- (2014-09-02) Selma Shimono: Really good extension for people that don't play world of warcraft in english and wan't to improve the gear using mr. robot. (Excelente extensão para quem joga world of warcraft e quer melhorar a gear usando o mr. robot)
Latest issues
- (2014-09-02, v:0.3.3.1) Selma Shimono: Shopping List improved
Hi Mr Alexander My name is Selma Shimono, I'm a world of warcraft player who plays in portuguese. First of all I wan't to congralute you for the extension, It's a really good extension and really helps people that use Mr. Robot to improve gear. I'm writing to talk about something I use on the Mr. Robot and I've missed on the extension, the shopping list. I hope you don't mind but I've changed your code to include shopping list on the translated features, below is the code that I wrote: function translateAll() { // settings need to be read first if(options.language == undefined) return; if(options.useDictionary) { translateWithDictionary(); } if(options.fixLinks) { fixLinks(); } if(options.translateItemNames) { translateItems(); translateShoppingList(); } } function translateShoppingList() { $(".left-container .link-container, .right-container .link-container").each(function() { var THIS = $(this); translateMaterial(THIS); }); } function translateMaterial(linkContainer) { var labelMaterial = linkContainer.find(".label-material"); if(labelMaterial.attr("translated") != undefined) return; var href = linkContainer.attr("href"); if(href == undefined) return; var hrefArr = href.split("="); var hrefArr2 = hrefArr[0].split("/"); if((hrefArr.length < 2) || (hrefArr2[3] != 'item')) { return; } var storageKey = 'cache_' + options.language + '_item_' + hrefArr[1]; chrome.storage.local.get(null, function(response) { if(response[storageKey]) { var translated = response[storageKey].replace(/\\'/g, "'"); labelMaterial.html(translated); labelMaterial.attr("translated", options.language); } else { var translated = getWowHeadData(hrefArr[1]); if(translated != "wowhead error") { labelMaterial.html(translated); labelMaterial.attr("translated", options.language); } else { labelMaterial.html(translated); labelMaterial.attr("translated", "error_wowhead"); } } }); } function getWowHeadData(itemID) { var storageKey = 'cache_' + options.language + '_item_' + itemID; var linkUrl = "http://" + options.language + ".wowhead.com/item=" + itemID + "&power"; var translated = "wowhead error"; $.get(linkUrl, {}, function(data) { data = data.replace(/(\r\n|\n|\r)/gm, " "); var fetchJsonRegex = /name_.*?: '(.*?)',/; var match = fetchJsonRegex.exec(data); if(match != null) { translated = match[1]; translated = translated.replace(/\\'/g, "'"); } var obj = {}; obj[storageKey] = translated; chrome.storage.local.set(obj, function() { if(chrome.runtime.lastError != undefined) { alert("error caching " + storageKey + " => " + translated + " :: " + chrome.runtime.lastError.message); } }); }, 'text'); return translated; } I'd like to help on another things if you allow. Best Regards. Selma Shimono