Commit 33906032 authored by Pino Toscano's avatar Pino Toscano Committed by Albert Astals Cid
Browse files

Store KGmap::p_divisionsString as translated

All the users use it that way already, and its fallback was already
returned translated.
parent 23dbb7ca
......@@ -52,6 +52,6 @@ void divisionFlagAsker::setAnswerHook(int userSays)
QString divisionFlagAsker::getQuestionHook() const
{
QString divisionType = i18nc(p_map -> getFileName().toUtf8(), p_map->getDivisionsString().toUtf8());
QString divisionType = p_map->getDivisionsString();
return i18nc("@title", "Flag of %1", divisionType);
}
......@@ -75,6 +75,6 @@ void flagDivisionAsker::setAnswerHook(int userSays)
QString flagDivisionAsker::getQuestionHook() const
{
QString divisionType = i18nc(p_map -> getFileName().toUtf8(), p_map->getDivisionsString().toUtf8());
QString divisionType = p_map->getDivisionsString();
return i18nc("@title", "%1 by Flag", divisionType);
}
......@@ -417,7 +417,7 @@ void kgeography::setMap(KGmap *m)
p_showAuthor->setEnabled(m);
QString mapName = i18nc(p_map -> getFileName().toUtf8(), p_map -> getName().toUtf8());
QString divisionType = i18nc(p_map -> getFileName().toUtf8(), p_map->getDivisionsString().toUtf8());
QString divisionType = p_map->getDivisionsString();
p_askMap->setText(i18n("&Location of %1", divisionType));
p_askPlaceMap->setText(i18n("&Place %1 in the Map", divisionType));
......
......@@ -199,7 +199,7 @@ void mapAsker::nextQuestionHook(const QString &division)
QString mapAsker::getQuestionHook() const
{
QString divisionType = i18nc(p_map -> getFileName().toUtf8(), p_map->getDivisionsString().toUtf8());
QString divisionType = p_map->getDivisionsString();
return i18nc("@title", "%1 in Map", divisionType);
}
......
......@@ -53,7 +53,7 @@ KGmap *mapReader::parseMap(const QString &path)
// Divisions string
QString divisionKindName = getElementString(QStringLiteral("divisionsName"), root, Mandatory);
kgmap -> setDivisionsString(divisionKindName);
kgmap -> setDivisionsString(i18nc(ctxt, divisionKindName.toUtf8()));
QString pat = getElementString(QStringLiteral("capitalToDivisionPattern"), root, Optional);
if ( pat.contains('%') )
......@@ -84,7 +84,7 @@ KGmap *mapReader::parseMap(const QString &path)
}
else
{
kgmap->setCapitalToDivisionTitle(i18n("%1 by Capital", i18nc(ctxt, divisionKindName.toUtf8())));
kgmap->setCapitalToDivisionTitle(i18n("%1 by Capital", kgmap -> getDivisionsString()));
}
title = getElementString(QStringLiteral("divisionToCapitalTitle"), root, Optional);
......@@ -94,7 +94,7 @@ KGmap *mapReader::parseMap(const QString &path)
}
else
{
kgmap->setDivisionToCapitalTitle(i18n("Capitals of %1", i18nc(ctxt, divisionKindName.toUtf8())));
kgmap->setDivisionToCapitalTitle(i18n("Capitals of %1", kgmap -> getDivisionsString()));
}
......
......@@ -199,7 +199,7 @@ void placeAsker::nextQuestionHook(const QString &division)
QString placeAsker::getQuestionHook() const
{
QString divisionType = i18nc(p_map -> getFileName().toUtf8(), p_map->getDivisionsString().toUtf8());
QString divisionType = p_map->getDivisionsString();
return i18nc("@title", "Place %1 in Map", divisionType);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment