LandscapeMgr.cpp   LandscapeMgr.cpp 
skipping to change at line 482 skipping to change at line 482
return result; return result;
} }
QString LandscapeMgr::getCurrentLandscapeName() const QString LandscapeMgr::getCurrentLandscapeName() const
{ {
return landscape->getName(); return landscape->getName();
} }
QString LandscapeMgr::getCurrentLandscapeHtmlDescription() const QString LandscapeMgr::getCurrentLandscapeHtmlDescription() const
{ {
SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
QString planetName = ssmgr->searchByEnglishName(landscape->getLocati
on().planetName)->getNameI18n();
QString desc = getDescription(); QString desc = getDescription();
desc+="<p>"; desc+="<p>";
desc+="<b>"+q_("Author: ")+"</b>"; desc+="<b>"+q_("Author: ")+"</b>";
desc+=landscape->getAuthorName(); desc+=landscape->getAuthorName();
desc+="<br>"; desc+="<br>";
desc+="<b>"+q_("Location: ")+"</b>"; desc+="<b>"+q_("Location: ")+"</b>";
if (landscape->getLocation().longitude>-500.0 && landscape->getLocat ion().latitude>-500.0) if (landscape->getLocation().longitude>-500.0 && landscape->getLocat ion().latitude>-500.0)
{ {
desc += StelUtils::radToDmsStrAdapt(landscape->getLocation() .longitude * M_PI/180.); desc += StelUtils::radToDmsStrAdapt(landscape->getLocation() .longitude * M_PI/180.);
desc += "/" + StelUtils::radToDmsStrAdapt(landscape->getLoca tion().latitude *M_PI/180.); desc += "/" + StelUtils::radToDmsStrAdapt(landscape->getLoca tion().latitude *M_PI/180.);
desc += QString(q_(", %1 m")).arg(landscape->getLocation().a ltitude); desc += QString(q_(", %1 m")).arg(landscape->getLocation().a ltitude);
if (planetName!="") QString planetName = landscape->getLocation().planetName;
if (!planetName.isEmpty())
{ {
desc += "<br><b>"+q_("Planet: ")+"</b>"+planetName; desc += "<br><b>"+q_("Planet: ")+"</b>"+ q_(planetNa me);
} }
desc += "<br><br>"; desc += "<br><br>";
} }
return desc; return desc;
} }
//! Set flag for displaying Cardinals Points //! Set flag for displaying Cardinals Points
void LandscapeMgr::setFlagCardinalsPoints(bool b) void LandscapeMgr::setFlagCardinalsPoints(bool b)
{ {
cardinalsPoints->setFlagShow(b); cardinalsPoints->setFlagShow(b);
skipping to change at line 962 skipping to change at line 961
{ {
//qDebug() << "name:" << file.baseName() << "size:" << file. size(); //qDebug() << "name:" << file.baseName() << "size:" << file. size();
landscapeSize += file.size(); landscapeSize += file.size();
} }
return landscapeSize; return landscapeSize;
} }
QString LandscapeMgr::getDescription() const QString LandscapeMgr::getDescription() const
{ {
QString lang = StelApp::getInstance().getLocaleMgr().getAppLanguage( QString lang = StelApp::getInstance().getLocaleMgr().getAppLanguage
); ();
if (!QString("pt_BR zh_CN zh_HK zh_TW").contains(lang))
{
lang = lang.split("_").at(0);
}
QString descriptionFile = StelFileMgr::findFile("landscapes/" + getC urrentLandscapeID(), StelFileMgr::Directory) + "/description." + lang + ".u tf8"; QString descriptionFile = StelFileMgr::findFile("landscapes/" + getC urrentLandscapeID(), StelFileMgr::Directory) + "/description." + lang + ".u tf8";
QString desc; QString desc;
if(QFileInfo(descriptionFile).exists()) if(QFileInfo(descriptionFile).exists())
{ {
QFile file(descriptionFile); QFile file(descriptionFile);
file.open(QIODevice::ReadOnly | QIODevice::Text); file.open(QIODevice::ReadOnly | QIODevice::Text);
QTextStream in(&file); QTextStream in(&file);
in.setCodec("UTF-8"); in.setCodec("UTF-8");
desc = in.readAll(); desc = in.readAll();
 End of changes. 4 change blocks. 
7 lines changed or deleted 9 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/