TreeMap - multi-language enablement

... use translated Metadata terms for Tree Dimensions (via Special
Fields)
... store the Metadaten information in Home-Layout.XML in "EN/Original
Language" and convert back/forth as needed
... fixed an issue, that Rides for a Cell are not selected in case the
resp. Metadata field is empty
This commit is contained in:
Joern
2014-06-16 16:38:13 +02:00
parent 8bb09048e0
commit 81a59f7b7b
4 changed files with 54 additions and 17 deletions

View File

@@ -72,10 +72,10 @@ TreeMapPlot::setData(TMSettings *settings)
if (context->ishomefiltered && !context->homeFilters.contains(rideMetrics.getFileName())) continue;
double value = rideMetrics.getForSymbol(settings->symbol);
QString text1 = rideMetrics.getText(settings->field1, "(unknown)");
QString text2 = rideMetrics.getText(settings->field2, "(unknown)");
if (text1 == "") text1 = "(unknown)";
if (text2 == "") text2 = "(unknown)";
QString text1 = rideMetrics.getText(settings->field1, tr("(unknown)"));
QString text2 = rideMetrics.getText(settings->field2, tr("(unknown)"));
if (text1 == "") text1 = tr("(unknown)");
if (text2 == "") text2 = tr("(unknown)");
TreeMap *first = root->insert(text1, 0.0);
first->insert(text2, value);