Commit 97b87322 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Add mapsdatatranslation.cpp and remove the decision of the team wheter to only...

Add mapsdatatranslation.cpp and remove the decision of the team wheter to only translate name or translate the whole sentence, chusslove scripted translations should be used now if needed

svn path=/trunk/KDE/kdeedu/kgeography/; revision=663638
parent 64c3850b
......@@ -30,17 +30,8 @@ bool capitalDivisionAsker::nextBoxAskerQuestionHook(const QString &division, int
p_currentAnswer.setQuestion(i18nc(p_map -> getFileName().toUtf8(), p_capital.toUtf8()));
p_currentAnswer.setCorrectAnswer(i18nc(p_map -> getFileName().toUtf8(), division.toUtf8()));
QString sw = i18nc("There are two ways of dealing with the translation of \"%1 is the capital of...\". The first option simply replaces %1 with the translated name of the relevant city. If the grammar of your language allows this, choose this option by setting the translation of this message to 1, and leave untranslated the translations of \"%1 is the capital of...\" that have the placename embedded (or translate them as - if you wish to show the file as fully translated. The second option is to translate all messages in full - this is likely to be required in the case of highly-inflected languages like Russian. To choose this option, set the translation of this message to 0, and translate all the messages.", "0");
if (sw == "1")
{
QString capitalName = i18nc(p_map -> getFileName().toUtf8(), p_capital.toUtf8());
setQuestion(i18n("%1 is the capital of...", capitalName));
}
else
{
QString s = QString("%1 is the capital of...").arg(p_capital);
setQuestion(i18nc(p_map -> getFileName().toUtf8(), s.toUtf8()));
}
QString capitalName = i18nc(p_map -> getFileName().toUtf8(), p_capital.toUtf8());
setQuestion(i18n("%1 is the capital of...", capitalName));
p_rb[i] -> setText(i18nc(p_map -> getFileName().toUtf8(), division.toUtf8()));
b = true;
}
......
......@@ -27,17 +27,8 @@ bool divisionCapitalAsker::nextBoxAskerQuestionHook(const QString &division, int
bool b;
if (isAnswer)
{
QString sw = i18nc("There are two ways of dealing with the translation of \"The capital of %1 is...\". The first option simply replaces %1 with the translated name of the relevant region. If the grammar of your language allows this, choose this option by setting the translation of this message to 1, and leave untranslated the translations of \"The capital of %1 is...\" that have the placename embedded (or translate them as - if you wish to show the file as fully translated. The second option is to translate all messages in full - this is likely to be required in the case of highly-inflected languages like Russian. To choose this option, set the translation of this message to 0, and translate all the messages.", "0");
if (sw == "1")
{
QString divisionName = i18nc(p_map -> getFileName().toUtf8(), division.toUtf8());
setQuestion(i18n("The capital of %1 is...", divisionName));
}
else
{
QString s = QString("The capital of %1 is...").arg(division);
setQuestion(i18nc(p_map -> getFileName().toUtf8(), s.toUtf8()));
}
QString divisionName = i18nc(p_map -> getFileName().toUtf8(), division.toUtf8());
setQuestion(i18n("The capital of %1 is...", divisionName));
p_currentAnswer.setQuestion(i18nc(p_map -> getFileName().toUtf8(), division.toUtf8()));
p_capital = p_map -> getDivisionCapital(division);
p_currentAnswer.setCorrectAnswer(i18nc(p_map -> getFileName().toUtf8(), p_capital.toUtf8()));
......
......@@ -30,17 +30,8 @@ bool divisionFlagAsker::nextBoxAskerQuestionHook(const QString &division, int i,
p_rb[i] -> setIconSize(QSize(60, 40));
if (isAnswer)
{
QString sw = i18nc("There are two ways of dealing with the translation of \"The flag of %1 is...\". The first option simply replaces %1 with the translated name of the relevant region. If the grammar of your language allows this, choose this option by setting the translation of this message to 1, and leave untranslated the translations of \"The flag of %1 is...\" that have the placename embedded (or translate them as - if you wish to show the file as fully translated. The second option is to translate all messages in full - this is likely to be required in the case of highly-inflected languages like Russian. To choose this option, set the translation of this message to 0, and translate all the messages.", "0");
if (sw == "1")
{
QString divisionName = i18nc(p_map -> getFileName().toUtf8(), division.toUtf8());
setQuestion(i18n("The flag of %1 is...", divisionName));
}
else
{
QString s = QString("The flag of %1 is...").arg(division);
setQuestion(i18nc(p_map -> getFileName().toUtf8(), s.toUtf8()));
}
QString divisionName = i18nc(p_map -> getFileName().toUtf8(), division.toUtf8());
setQuestion(i18n("The flag of %1 is...", divisionName));
p_currentAnswer.setCorrectAnswer(icon.pixmap(QSize(60, 40)));
p_currentAnswer.setQuestion(i18nc(p_map -> getFileName().toUtf8(), division.toUtf8()));
}
......
......@@ -364,17 +364,8 @@ void kgeography::setMap(KGmap *m)
p_askFlagDivisions->setText(i18n("%1 by Flag", p_map->getDivisionsString()));
p_askDivisionFlags->setText(i18n("&Flags of %1", p_map->getDivisionsString()));
QString sw = i18nc("There are two ways of dealing with the translation of \"Current map: %1\". The first option simply replaces %1 with the translated name of the relevant region. If the grammar of your language allows this, choose this option by setting the translation of this message to 1, and leave untranslated the translations of \"Current map: %1\" that have the placename embedded (or translate them as - if you wish to show the file as fully translated. The second option is to translate all messages in full - this is likely to be required in the case of highly-inflected languages like Russian. To choose this option, set the translation of this message to 0, and translate all the messages.", "0");
if (sw == "1")
{
QString mapName = i18nc(p_map -> getFileName().toUtf8(), p_map -> getName().toUtf8());
p_currentMap -> setText(i18n("<qt>Current map:<br><b>%1<b></qt>", mapName));
}
else
{
QString s = QString("<qt>Current map:<br><b>%1</b></qt>").arg(p_map -> getName());
p_currentMap -> setText(i18nc(p_map -> getFileName().toUtf8(), s.toUtf8()));
}
QString mapName = i18nc(p_map -> getFileName().toUtf8(), p_map -> getName().toUtf8());
p_currentMap -> setText(i18n("<qt>Current map:<br><b>%1<b></qt>", mapName));
p_consult -> setEnabled(true);
p_askMap -> setEnabled(true);
p_askPlaceMap -> setEnabled(true);
......
......@@ -132,17 +132,8 @@ void mapAsker::handleMapClick(QRgb c, const QPoint &p)
void mapAsker::nextQuestionHook(const QString &division)
{
QString sw = i18nc("There are two ways of dealing with the translation of \"Please click on: %1\". The first option simply replaces %1 with the translated name of the relevant region/city. If the grammar of your language allows this, choose this option by setting the translation of this message to 1, and leave untranslated the translations of \"Please click on: %1\" that have the placename embedded (or translate them as - if you wish to show the file as fully translated. The second option is to translate all messages in full - this is likely to be required in the case of highly-inflected languages like Russian. To choose this option, set the translation of this message to 0, and translate all the messages.", "0");
if (sw == "1")
{
QString divisionName = i18nc(p_map -> getFileName().toUtf8(), division.toUtf8());
p_next -> setText(i18n("Please click on:\n%1", divisionName));
}
else
{
QString s = QString("Please click on:\n%1").arg(division);
p_next -> setText(i18nc(p_map -> getFileName().toUtf8(), s.toUtf8()));
}
QString divisionName = i18nc(p_map -> getFileName().toUtf8(), division.toUtf8());
p_next -> setText(i18n("Please click on:\n%1", divisionName));
p_currentAnswer.setQuestion(i18nc(p_map -> getFileName().toUtf8(), division.toUtf8()));
p_next -> show();
p_currentAnswer.setCorrectAnswer(p_map -> getColor(division));
......
This diff is collapsed.
......@@ -146,17 +146,8 @@ void placeAsker::handleMapClick(QRgb c, const QPoint &widgetPoint, const QPointF
void placeAsker::nextQuestionHook(const QString &division)
{
QString sw = i18nc("There are two ways of dealing with the translation of \"Please click on: %1\". The first option simply replaces %1 with the translated name of the relevant region/city. If the grammar of your language allows this, choose this option by setting the translation of this message to 1, and leave untranslated the translations of \"Please click on: %1\" that have the placename embedded (or translate them as - if you wish to show the file as fully translated. The second option is to translate all messages in full - this is likely to be required in the case of highly-inflected languages like Russian. To choose this option, set the translation of this message to 0, and translate all the messages.", "0");
if (sw == "1")
{
QString divisionName = i18nc(p_map -> getFileName().toUtf8(), division.toUtf8());
p_next -> setText(i18n("Please place in the map:\n%1", divisionName));
}
else
{
QString s = QString("Please place in the map:\n%1").arg(division);
p_next -> setText(i18nc(p_map -> getFile().toUtf8(), s.toUtf8()));
}
QString divisionName = i18nc(p_map -> getFileName().toUtf8(), division.toUtf8());
p_next -> setText(i18n("Please place in the map:\n%1", divisionName));
p_next -> show();
p_currentAnswer.setQuestion(i18nc(p_map -> getFile().toUtf8(), division.toUtf8()));
p_currentAnswer.setCorrectAnswer(p_map -> getColor(division));
......
......@@ -50,7 +50,6 @@ int main(int argc, char *argv[])
if (n.nodeName() == "name")
{
os << "i18nc(\"" << *it << "\", \"" << n.firstChild().nodeValue() << "\");\n";
os << "i18nc(\"" << *it << "\", \"<qt>Current map:<br><b>" << n.firstChild().nodeValue() << "</b></qt>\");\n";
}
else if (n.nodeName() == "division")
{
......@@ -60,22 +59,8 @@ int main(int argc, char *argv[])
n3 = n.namedItem("ignore");
if (n3.isNull() || (n3.firstChild().nodeValue() != "yes" && n3.firstChild().nodeValue() != "allowClickMode"))
{
os << "i18nc(\"" << *it << "\", \"The capital of " << n2.firstChild().nodeValue() << " is...\");\n";
os << "i18nc(\"" << *it << "\", \"Please click on:\\n" << n2.firstChild().nodeValue() << "\");\n";
n4 = n.namedItem("flag");
if (!n4.isNull())
{
os << "i18nc(\"" << *it << "\", \"The flag of " << n2.firstChild().nodeValue() << " is...\");\n";
}
n5 = n.namedItem("capital");
os << "i18nc(\"" << *it << "\", \"" << n5.firstChild().nodeValue() << "\");\n";
os << "i18nc(\"" << *it << "\", \"" << n5.firstChild().nodeValue() << " is the capital of...\");\n";
}
else if (n3.firstChild().nodeValue() == "allowClickMode")
{
os << "i18nc(\"" << *it << "\", \"Please click on:\\n" << n2.firstChild().nodeValue() << "\");\n";
}
}
}
......
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