PDA

View Full Version : Solved Not translating after upgrade to 445



vforum
19-12-11, 21:34
hi

i think i upgraded as i should,



www.muscleadvice.com



if i manualy check Yes to microsft api in Providers availiability, the site seems to be working on translation, but at the end text disappears from the site

when in turn it off as in default setting, nothing happens , all text is shown as default english, no translation





i have

Microsoft Translation API Application ID

Microsoft Comercial Translation API key by Azure(BETA)

Apertium Translation API key (BETA)





Starting translation test for Google API v1
Test result: {"responseData": null, "responseDetails": "Suspected Terms of Service Abuse. Please see http://code.google.com/apis/errors", "responseStatus": 403}
Test error:
Connection time (ms): 544.037109375
****************************************************************--


Starting translation test for Microsoft translations API
Test result: "Welcome to"
Test error:
Connection time (ms): 241.44506835938

************************************************--
Starting test for Microsft Translation API by Azure

Full token:
{"error":"invalid_request","error_description":"ACS90011: The required field \u0027client_id\u0027 is missing. \r\nTrace ID: 8f792a77-961f-434a-b0d3-e855539085f0\r\nTimestamp: 2011-12-19 20:18:31Z"}

Test result: "ArgumentException: No bearer information found in the token : ID=3641.V2_Json.Translate.2F18948A"
Test error:
Connection time (ms): 111.84912109375

********************



any ideas?

r.dziadusz
20-12-11, 21:21
Hi
First, I'm deeple sorry becouse of wrong line in Microsoft Translation by Aure, please use this code to test it properly:


<?php
require_once('./global.php');

function get_token(){
global $vbulletin;
$obj_connection = curl_init();
$arr_query_bits = array (
'grant_type' => 'client_credentials',
'scope' => 'http://api.microsofttranslator.com',
'client_id' => $vbulletin->options['vbenterprisetranslator_Microsoft_key'],
'client_secret' => $vbulletin->options['vbenterprisetranslator_Microsoft_secret']
);
$str_query = http_build_query($arr_query_bits);

curl_setopt($obj_connection, CURLOPT_URL, 'https://datamarket.accesscontrol.windows.net/v2/OAuth2-13');
curl_setopt($obj_connection, CURLOPT_HEADER, 0);
curl_setopt($obj_connection, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($obj_connection, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($obj_connection, CURLOPT_POSTFIELDS, $str_query);
curl_setopt($obj_connection, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($obj_connection, CURLOPT_POST, TRUE);
print_r('Full token: </br>'.curl_exec($obj_connection).'</br></br>');
$token = json_decode (curl_exec($obj_connection));
curl_close($obj_connection);
return 'Authorization: Bearer '.$token->{'access_token'};
}

echo 'Starting test for Microsft Translation API by Azure<br/><br/>';
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, 'http://api.microsofttranslator.com/V2/Ajax.svc/Translate?&from=pl&to=en&text=Witaj!');
curl_setopt($connection, CURLOPT_HEADER, 0);
curl_setopt($connection, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($connection, CURLOPT_HTTPHEADER, array(get_token()));
$str_response = curl_exec($connection);
$time = microtime(true) * 1000;
$result = curl_exec($connection);
$time = microtime(true) * 1000 - $time;
echo 'Test result: '.$result."<br/>\n";
echo 'Test error: '.curl_error($connection)."<br/>\n";
curl_close($connection);
echo 'Connection time (ms): '.$time;


?>



Also there is no Google API v1 Translotion API right now - Google has closed it :(.

About your issue - I will be able to say more after the test. But right now, could you tell me if you are using cache/gust cache? Becouse vBET should use once translated pages when you are out od quota. Moreover please note that you can not use both Microsft (old) and Microsoft by Azure API -(even though test is ok) If you put keys to both of its, vBET will choose Microsoft Translation by Azure automatically - so please be shure you've created your Azure account properly: You did subscribe for translator and You did register you Aplication

vforum
20-12-11, 21:37
Starting test for Microsft Translation API by Azure

Full token:
{"error":"invalid_grant","error_description":"ACS50012: Authentication failed. ACS50026: Principal with name \u0027umDfC82Yt/9Xbg+ZeAioFsaEstNbx79LBQUUFY+zKW8=CW3Nms=\u0027 is not a known principal. \r\nTrace ID: 813ae94d-56c9-4fd0-ad50-1003f0c8af0c\r\nTimestamp: 2011-12-20 20:31:19Z"}

Test result: "ArgumentException: No bearer information found in the token : ID=3743.V2_Json.Translate.301E238A"
Test error:
Connection time (ms): 112.62622070312


************************---
i use guest cache, after upgrade i cleared all cache, since i was trying to figure out whats wrong


i will PM you admin login, thats the fastest way for you to check it

r.dziadusz
21-12-11, 18:19
PM received - There was one mistake in vBET settings: wrong value of Microsoft by Azure Key . I've repeired it and now its working. Please confirm it's ok

vforum
21-12-11, 23:05
menus are sometimes translated ,sometimes not, even bold sections of text in article but not main text in article

i think its broken, doesnt work as shouldl at all


for example

Trusted source for Bodybuilding information - Biceps Excersises (http://www.muscleadvice.com/de/section/bizeps-%C3%9Cbungen-158/)



Trusted source for Bodybuilding information - Standing Barbell Curls (http://www.muscleadvice.com/de/section/st%C3%A4ndigen-langhantelcurls-272/)

r.dziadusz
22-12-11, 16:02
I've opened url you gave me and and in my opinion works fine - all the text in translated please check it again.
If you did see "sometimes" untranslated tex it is possible: You've errase you cache so all text has to be translated again, which bring You to reaching your limits. Right now vBET when limits are reached will show you untranslated oryginal text instead of blank page there - read more (http://www.vbenterprisetranslator.com/forum/vbet4-troubleshooting/413-faq-2.html#post10869). So from time to time "partial translation" may appear - to learn more about "partial translation" please read this article (http://www.vbenterprisetranslator.com/forum/vbet4-troubleshooting/413-faq-2.html#post10969)

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translations by vB Enterprise Translator 4.10.1