}
Translation* GooglePlugin::getTranslationFor(QString key) {
- QList<Translation*> translations = searchWordList(key);
- if(translations.size()>0)
- return translations.at(0);
- else
- return new TranslationGoogle();
+ QList<Translation*> translations;
+ return translations<<(new TranslationGoogle(key,"",_infoNote,this));
}
QList<Translation*> GooglePlugin::searchWordList(QString word, int limit) {
}
result=translation;
for(int i=0; i<words.size();i++) {
- tesult+="<br/>";
+ result+="<br/>";
result+="<pos>"+partOfSpeach.at(i)+"</pos>:";
for(int j=0; j<words.at(i)->size();j++)
result+=words.at(i)->at(j)+", ";
+ result.remove(result.size()-2,2);
}
return result;
}
result+="bookmark=\"true\" >";
else
result+="bookmark=\"false\" >";
- result+=_dictionaryInfo+ "</info>"+_trans +"</dict>";
+ if(_trans!="")
+ result+=_dictionaryInfo+ "</info>"+_trans +"</dict>";
+ return
+ result+=_dictionaryInfo+ "</info>"+googlePlugin->searchWordList(_key) +"</dict>";
}
void TranslationGoogle::setKey(QString) {