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

Get the msgctxt for the map once

parent bc258aed
......@@ -40,6 +40,8 @@ KGmap *mapReader::parseMap(const QString &path)
const QDomElement &root = doc.documentElement();
if (root.tagName() == QLatin1String("map"))
{
const QByteArray ctxt = kgmap -> getFileName().toUtf8();
// Map name
kgmap -> setName( getElementString(QStringLiteral("name"), root, Mandatory) );
......@@ -82,7 +84,7 @@ KGmap *mapReader::parseMap(const QString &path)
}
else
{
kgmap->setCapitalToDivisionTitle(i18n("%1 by Capital", i18nc(kgmap->getFileName().toUtf8(), divisionKindName.toUtf8())));
kgmap->setCapitalToDivisionTitle(i18n("%1 by Capital", i18nc(ctxt, divisionKindName.toUtf8())));
}
title = getElementString(QStringLiteral("divisionToCapitalTitle"), root, Optional);
......@@ -92,7 +94,7 @@ KGmap *mapReader::parseMap(const QString &path)
}
else
{
kgmap->setDivisionToCapitalTitle(i18n("Capitals of %1", i18nc(kgmap->getFileName().toUtf8(), divisionKindName.toUtf8())));
kgmap->setDivisionToCapitalTitle(i18n("Capitals of %1", i18nc(ctxt, divisionKindName.toUtf8())));
}
......
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