Open longsleep opened 9 years ago
Example response:
/* API response */ sl({"sl":{"auto":"Sprache erkennen","af":"Afrikaans","sq":"Albanisch","ar":"Arabisch","hy":"Armenisch","az":"Aserbaidschanisch","eu":"Baskisch","bn":"Bengalisch","bs":"Bosnisch","bg":"Bulgarisch","my":"Burmesisch","ceb":"Cebuano","ny":"Chichewa","zh-CN":"Chinesisch","da":"Dänisch","de":"Deutsch","en":"Englisch","eo":"Esperanto","et":"Estnisch","fi":"Finnisch","fr":"Französisch","gl":"Galizisch","ka":"Georgisch","el":"Griechisch","gu":"Gujarati","ht":"Haitianisch","ha":"Hausa","iw":"Hebräisch","hi":"Hindi","hmn":"Hmong","ig":"Igbo","id":"Indonesisch","ga":"Irisch","is":"Isländisch","it":"Italienisch","ja":"Japanisch","jw":"Javanesisch","yi":"Jiddisch","kn":"Kannada","kk":"Kasachisch","ca":"Katalanisch","km":"Khmer","ko":"Koreanisch","hr":"Kroatisch","lo":"Lao","la":"Lateinisch","lv":"Lettisch","lt":"Litauisch","ml":"Malabarisch","mg":"Malagasy","ms":"Malaysisch","mt":"Maltesisch","mi":"Maori","mr":"Marathisch","mk":"Mazedonisch","mn":"Mongolisch","ne":"Nepalesisch","nl":"Niederländisch","no":"Norwegisch","fa":"Persisch","pl":"Polnisch","pt":"Portugiesisch","pa":"Punjabi","ro":"Rumänisch","ru":"Russisch","sv":"Schwedisch","sr":"Serbisch","st":"Sesotho","si":"Singhalesisch","sk":"Slowakisch","sl":"Slowenisch","so":"Somali","es":"Spanisch","sw":"Suaheli","su":"Sundanesisch","tg":"Tadschikisch","tl":"Tagalog","ta":"Tamil","te":"Telugu","th":"Thailändisch","cs":"Tschechisch","tr":"Türkisch","uk":"Ukrainisch","hu":"Ungarisch","ur":"Urdu","uz":"Usbekisch","vi":"Vietnamesisch","cy":"Walisisch","be":"Weißrussisch","yo":"Yoruba","zu":"Zulu"},"tl":{"af":"Afrikaans","sq":"Albanisch","ar":"Arabisch","hy":"Armenisch","az":"Aserbaidschanisch","eu":"Baskisch","bn":"Bengalisch","bs":"Bosnisch","bg":"Bulgarisch","my":"Burmesisch","ceb":"Cebuano","ny":"Chichewa","zh-TW":"Chinesisch (traditionell)","zh-CN":"Chinesisch (vereinfacht)","da":"Dänisch","de":"Deutsch","en":"Englisch","eo":"Esperanto","et":"Estnisch","fi":"Finnisch","fr":"Französisch","gl":"Galizisch","ka":"Georgisch","el":"Griechisch","gu":"Gujarati","ht":"Haitianisch","ha":"Hausa","iw":"Hebräisch","hi":"Hindi","hmn":"Hmong","ig":"Igbo","id":"Indonesisch","ga":"Irisch","is":"Isländisch","it":"Italienisch","ja":"Japanisch","jw":"Javanesisch","yi":"Jiddisch","kn":"Kannada","kk":"Kasachisch","ca":"Katalanisch","km":"Khmer","ko":"Koreanisch","hr":"Kroatisch","lo":"Lao","la":"Lateinisch","lv":"Lettisch","lt":"Litauisch","ml":"Malabarisch","mg":"Malagasy","ms":"Malaysisch","mt":"Maltesisch","mi":"Maori","mr":"Marathisch","mk":"Mazedonisch","mn":"Mongolisch","ne":"Nepalesisch","nl":"Niederländisch","no":"Norwegisch","fa":"Persisch","pl":"Polnisch","pt":"Portugiesisch","pa":"Punjabi","ro":"Rumänisch","ru":"Russisch","sv":"Schwedisch","sr":"Serbisch","st":"Sesotho","si":"Singhalesisch","sk":"Slowakisch","sl":"Slowenisch","so":"Somali","es":"Spanisch","sw":"Suaheli","su":"Sundanesisch","tg":"Tadschikisch","tl":"Tagalog","ta":"Tamil","te":"Telugu","th":"Thailändisch","cs":"Tschechisch","tr":"Türkisch","uk":"Ukrainisch","hu":"Ungarisch","ur":"Urdu","uz":"Usbekisch","vi":"Vietnamesisch","cy":"Walisisch","be":"Weißrussisch","yo":"Yoruba","zu":"Zulu"},"al":{}})
Documented here: https://git.iridiumbrowser.de/cgit.cgi/iridium-browser/tree/components/translate/core/browser/translate_language_list.cc#n257
Patch to add trk prefix (check if trk:220
is really still unused):
--- a/components/translate/core/common/translate_util.cc
+++ b/components/translate/core/common/translate_util.cc
@@ -73,7 +73,7 @@ const LanguageCodePair kLanguageCodeChineseCompatiblePairs[] = {
{"zh-CN", "zh-SG"},
};
-const char kSecurityOrigin[] = "https://translate.googleapis.com/";
+const char kSecurityOrigin[] = "trk:220:https://translate.googleapis.com/";
void ToTranslateLanguageSynonym(std::string* language) {
for (size_t i = 0; i < arraysize(kLanguageCodeSimilitudes); ++i) {
The same request is triggered for the about page.
translator: fetching something from https://translate.googleapis.com/translate_a/l?client=chrome&cb=sl&hl=en&key=dummytoken&alpha=1 *\ URLRequest(https://translate.googleapis.com/translate_a/l?client=chrome&cb=sl&hl=en&key=dummytoken&alpha=1)
This request is missing trk prefix and thus does not trigger a warning. It happens when the settings get opened for the very first time.