Skip to content

Commit

Permalink
use "YES" instead of translated version in exported files
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Mlich authored and Jozef Mlich committed May 10, 2015
1 parent 58eb32c commit 65e32bc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 19 deletions.
10 changes: 5 additions & 5 deletions viewer/qml/viewer/PathConfiguration.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ ApplicationWindow {
color: "#ffffff"

property alias igcDirectory: igcDirectoryTextField.text
// property string igcDirectory_default: "file:///home/jmlich/workspace/tucek/testovaci_data/igcFiles"
property string igcDirectory_default: "file:///home/imlich/workspace/tucek/testovaci_data/igcFiles"
property string igcDirectory_default: "file:///home/jmlich/workspace/tucek/2015-kotvrdovice/vysledky/igcFiles"
// property string igcDirectory_default: "file:///home/imlich/workspace/tucek/testovaci_data/igcFiles"
// property string igcDirectory_default: "file:///"+ QStandardPathsApplicationFilePath + "/igcFiles"

property alias trackFile: trackFileTextField.text
property string trackFile_default: "file:///var/www/html/tucek2/2014-7-LKJH.json";
property string trackFile_default: "file:///home/jmlich/workspace/tucek/2015-kotvrdovice/2015-kotv2.json";
// property string trackFile_default: "file:///var/www/html/tucek2/2012-KOTV.json";
// property string trackFile_default: "file:///var/www/html/tucek2/2014-LKHK-50bodu.json";
// property string trackFile_default: "file:///"+ QStandardPathsApplicationFilePath + "/track.json";

property alias resultsFolder: resultsFolderTextField.text;
// property string resultsFolder_default: "file:///home/jmlich/workspace/tucek/testovaci_data/results"
property string resultsFolder_default: "file:///home/imlich/workspace/tucek/testovaci_data/results"
property string resultsFolder_default: "file:///home/jmlich/workspace/tucek/2015-kotvrdovice/vysledky/results"
// property string resultsFolder_default: "file:///home/imlich/workspace/tucek/testovaci_data/results"
// property string resultsFolder_default: "file:///"+ QStandardPathsApplicationFilePath +"/results";
// property string resultsFolder_default: "../../results"

Expand Down
46 changes: 32 additions & 14 deletions viewer/qml/viewer/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,34 @@ ApplicationWindow {
map.tracksSelectedTid = item.tid
}

itemDelegate: Item {
NativeText {
width: parent.width
anchors.margins: 4
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
elide: styleData.elideMode
text: getTextForRole(styleData.row, styleData.role, styleData.value);
color: styleData.textColor;

}
function getTextForRole(row, role, value) {
switch (role) {
case "hit":
case "sg_hit":
return value
//% "YES"
? qsTrId("hit-yes")
//% "NO"
: qsTrId("hit-no")

break;
default:
return value;
}
}
}

}
}

Expand Down Expand Up @@ -1214,18 +1242,8 @@ ApplicationWindow {
"radius": parseFloat(item.radius),
"angle": item.angle,
"time": item.time,
"hit": (item.hit
//% "YES"
? qsTrId("hit-yes")
//% "NO"
: qsTrId("hit-no")
),
"sg_hit": (item.sg_hit
//% "YES"
? qsTrId("sg-hit-yes")
//% "NO"
: qsTrId("sg-hit-no")
),
"hit": item.hit,
"sg_hit": item.sg_hit,
"speed": String(Math.round(speed)),
"altmax": String(Math.round(alt_max)),
"altmaxtime": String(alt_max_time),
Expand All @@ -1247,8 +1265,8 @@ ApplicationWindow {
wptScoreList.append(newData);
dataArr.push(newData)
str += "\"" + item.time + "\";";
str += "\"" + (item.hit ? qsTrId("hit-yes") : qsTrId("hit-no") )+ "\";";
str += "\"" + (item.sg_hit ? qsTrId("sg-hit-yes") : qsTrId("sg-hit-no") ) + "\";";
str += "\"" + (item.hit ? "YES" : "NO" )+ "\";";
str += "\"" + (item.sg_hit ? "YES" : "NO" ) + "\";";
str += "\"" + item.alt + "\";";
str += "\"" + speed + "\";";
//str += "\"" + alt_min + "\";";
Expand Down

0 comments on commit 65e32bc

Please sign in to comment.