Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
KGeography
Commits
c43a3d61
Commit
c43a3d61
authored
Jun 07, 2020
by
Pino Toscano
Committed by
Albert Astals Cid
Jun 09, 2020
Browse files
Get the msgctxt for the map once
parent
bc258aed
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/mapparser.cpp
View file @
c43a3d61
...
...
@@ -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
())));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment