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

Make KGmap::getCapitalToDivisionQuestionPattern() a KLocalizedString

This way the internal text and context are hidden within KGMap.
parent 562f5e44
...@@ -31,7 +31,7 @@ bool capitalDivisionAsker::nextBoxAskerQuestionHook(const QString &division, int ...@@ -31,7 +31,7 @@ bool capitalDivisionAsker::nextBoxAskerQuestionHook(const QString &division, int
p_currentAnswer.setQuestion(i18nc("@item:intable column Question, %1 is capital name", "%1", p_capital)); p_currentAnswer.setQuestion(i18nc("@item:intable column Question, %1 is capital name", "%1", p_capital));
p_currentAnswer.setCorrectAnswer(i18nc("@option:radio <City> is the capital of...", "%1", divisionName)); p_currentAnswer.setCorrectAnswer(i18nc("@option:radio <City> is the capital of...", "%1", divisionName));
setQuestion(i18nc("@title:group", p_map->getCapitalToDivisionQuestionPattern().toUtf8(), p_capital)); setQuestion(p_map->getCapitalToDivisionQuestionPattern().subs(p_capital).toString());
p_radioButtons[i] -> setText(i18nc("@option:radio <City> is the capital of...", "%1", divisionName)); p_radioButtons[i] -> setText(i18nc("@option:radio <City> is the capital of...", "%1", divisionName));
b = true; b = true;
} }
......
...@@ -115,9 +115,9 @@ QStringList KGmap::getDivisionFalseCapitals(const QString &divisionName) const ...@@ -115,9 +115,9 @@ QStringList KGmap::getDivisionFalseCapitals(const QString &divisionName) const
return getDivision(divisionName) -> getFalseCapitals(); return getDivision(divisionName) -> getFalseCapitals();
} }
QString KGmap::getCapitalToDivisionQuestionPattern() const KLocalizedString KGmap::getCapitalToDivisionQuestionPattern() const
{ {
return p_capitalToDivisionPattern; return ki18nc("@title:group", p_capitalToDivisionPattern.toUtf8());
} }
QString KGmap::getDivisionToCapitalQuestionPattern() const QString KGmap::getDivisionToCapitalQuestionPattern() const
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#ifndef MAP_H #ifndef MAP_H
#define MAP_H #define MAP_H
#include <klocalizedstring.h>
#include <qcolor.h> #include <qcolor.h>
#include <qmap.h> #include <qmap.h>
...@@ -51,7 +53,7 @@ class KGmap ...@@ -51,7 +53,7 @@ class KGmap
QColor getColor(const QString &s) const; QColor getColor(const QString &s) const;
QList<const division*> getIgnoredDivisions(division::askMode am) const; QList<const division*> getIgnoredDivisions(division::askMode am) const;
QList<const division*> getAllDivisionsOrdered() const; QList<const division*> getAllDivisionsOrdered() const;
QString getCapitalToDivisionQuestionPattern() const; KLocalizedString getCapitalToDivisionQuestionPattern() const;
QString getDivisionToCapitalQuestionPattern() const; QString getDivisionToCapitalQuestionPattern() const;
QString getCapitalToDivisionTitle() const; QString getCapitalToDivisionTitle() const;
QString getDivisionToCapitalTitle() const; QString getDivisionToCapitalTitle() const;
......
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