[chronojump] Preferences translate graphs also affect to "contacts"



commit 5122a761de584418cf79607bac43319bde0d3815
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Jul 15 13:23:53 2014 +0200

    Preferences translate graphs also affect to "contacts"

 src/gui/chronojump.cs                     |    2 +
 src/gui/report.cs                         |    3 +-
 src/gui/stats.cs                          |    3 +-
 src/report.cs                             |   10 ++++++++-
 src/statType.cs                           |   15 +++++++++----
 src/stats/graphs/djIndex.cs               |   24 ++++++++++----------
 src/stats/graphs/djPower.cs               |   26 +++++++++++-----------
 src/stats/graphs/djQ.cs                   |   24 ++++++++++----------
 src/stats/graphs/fv.cs                    |   14 ++++++------
 src/stats/graphs/global.cs                |   18 ++++++++--------
 src/stats/graphs/jumpIndexes.cs           |    8 +++---
 src/stats/graphs/jumpSimpleSubtraction.cs |   16 +++++++-------
 src/stats/graphs/potency.cs               |   24 ++++++++++----------
 src/stats/graphs/rjAVGSD.cs               |   14 ++++++------
 src/stats/graphs/rjEvolution.cs           |    6 ++--
 src/stats/graphs/rjIndex.cs               |   22 ++++++++++----------
 src/stats/graphs/rjPotencyBosco.cs        |   32 ++++++++++++++--------------
 src/stats/graphs/runIntervallic.cs        |    6 ++--
 src/stats/graphs/runSimple.cs             |   16 +++++++-------
 src/stats/graphs/sjCmjAbk.cs              |   14 ++++++------
 src/stats/graphs/sjCmjAbkPlus.cs          |   16 +++++++-------
 src/stats/main.cs                         |   10 +++++++++
 22 files changed, 175 insertions(+), 148 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index ed8cebf..6f17d87 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -962,6 +962,7 @@ public partial class ChronoJumpWindow
                report.HeightPreferred = heightPreferred;
                report.WeightStatsPercent = weightPercentPreferred;
                report.Progversion = progVersion;
+               report.GraphTranslate = RGraphsTranslate;
 
 
                Log.WriteLine ( Catalog.GetString ("Preferences loaded") );
@@ -2947,6 +2948,7 @@ public partial class ChronoJumpWindow
                        report.PrefsDigitsNumber = prefsDigitsNumber;
                        report.HeightPreferred = heightPreferred;
                        report.WeightStatsPercent = weightPercentPreferred;
+                       report.GraphTranslate = RGraphsTranslate;
                        
                        
                        createTreeView_jumps (treeview_jumps);
diff --git a/src/gui/report.cs b/src/gui/report.cs
index 2afb568..046d500 100644
--- a/src/gui/report.cs
+++ b/src/gui/report.cs
@@ -326,7 +326,8 @@ public class ReportWindow {
                                                rj_evolution_mark_consecutives,
                                                graphROptions,
                                                true,   //graph
-                                               false  //always false in this class
+                                               false,  //always false in this class
+                                               report.GraphTranslate
                                                );
                                myStatType.ChooseStat();
                        }
diff --git a/src/gui/stats.cs b/src/gui/stats.cs
index 17b4ea3..ed78720 100644
--- a/src/gui/stats.cs
+++ b/src/gui/stats.cs
@@ -869,7 +869,8 @@ public partial class ChronoJumpWindow {
                                evolution_mark_consecutives,
                                graphROptions,
                                graph,
-                               toReport  //always false in this class
+                               toReport,  //always false in this class
+                               RGraphsTranslate
                                );
 
                //if we just made a graph, store is not made, 
diff --git a/src/report.cs b/src/report.cs
index f44598a..249b236 100644
--- a/src/report.cs
+++ b/src/report.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- *  Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ *  Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -41,6 +41,7 @@ public class Report : ExportSession
        public bool ShowIntervalRunsWithSubruns;
        public bool ShowReactionTimes;
        public bool ShowPulses;
+       private bool graphTranslate = true;
        
        bool toReport = true;
 
@@ -365,6 +366,7 @@ public class Report : ExportSession
                                        graphROptions,
                                        false,                  //graph
                                        toReport,
+                                       graphTranslate,
                                        writer,
                                        "",
                                        statCount
@@ -394,6 +396,7 @@ public class Report : ExportSession
                                        graphROptions,
                                        true,                   //graph
                                        toReport,
+                                       graphTranslate,
                                        writer,
                                        fileName,               //fileName for exporting there
                                        statCount
@@ -428,6 +431,11 @@ public class Report : ExportSession
        public string Progversion {
                set { progversion = value; }
        }
+
+       public bool GraphTranslate {
+               set { graphTranslate = value; }
+               get { return graphTranslate; }
+       }
        
        ~Report() {}
           
diff --git a/src/statType.cs b/src/statType.cs
index 27bf8b0..d2fa728 100644
--- a/src/statType.cs
+++ b/src/statType.cs
@@ -41,13 +41,14 @@ public class StatTypeStruct
        public GraphROptions GRO;
        
        public bool ToReport;
+       public bool GraphTranslate;
        
        public StatTypeStruct (string statisticApplyTo, 
                        ArrayList sendSelectedSessions, int prefsDigitsNumber, bool sex_active, 
                        int statsJumpsType, int limit, bool heightPreferred, bool weightStatsPercent, 
                        ArrayList markedRows, 
                        GraphROptions gRO,
-                       bool toReport)
+                       bool toReport, bool graphTranslate)
        {
                this.StatisticApplyTo = statisticApplyTo;
                this.SendSelectedSessions =  sendSelectedSessions;
@@ -60,6 +61,7 @@ public class StatTypeStruct
                this.MarkedRows = markedRows;
                this.GRO = gRO;
                this.ToReport = toReport;
+               this.GraphTranslate = graphTranslate;
        }
 }
 
@@ -76,6 +78,7 @@ public class StatType {
 
        bool graph;
        bool toReport;
+       bool graphTranslate;
        TextWriter writer;
        string fileName;
        int statCount; //optimal to create name of each graph on report: 1: 1.png; 2: 2.png
@@ -108,7 +111,7 @@ public class StatType {
                        ArrayList markedRows,  
                        int evolution_mark_consecutives, 
                        GraphROptions gRO,
-                       bool graph, bool toReport)
+                       bool graph, bool toReport, bool graphTranslate)
        {
                //some of this will disappear when we use myStatTypeStruct in all classes:
                this.statisticType = statisticType;
@@ -122,6 +125,7 @@ public class StatType {
                
                this.graph = graph;
                this.toReport = toReport;
+               this.graphTranslate = graphTranslate;
 
                myStatTypeStruct = new StatTypeStruct (
                                statisticApplyTo,
@@ -129,7 +133,7 @@ public class StatType {
                                statsJumpsType, limit, heightPreferred, weightStatsPercent, 
                                markedRows, 
                                gRO,
-                               toReport);
+                               toReport, graphTranslate);
 
                myStat = new Stat(); //create an instance of myStat
 
@@ -163,7 +167,7 @@ public class StatType {
                        ArrayList markedRows, 
                        int evolution_mark_consecutives, 
                        GraphROptions gRO,
-                       bool graph, bool toReport, TextWriter writer, string fileName,
+                       bool graph, bool toReport, bool graphTranslate, TextWriter writer, string fileName,
                        int statCount 
                        )
        {
@@ -177,6 +181,7 @@ public class StatType {
                
                this.graph = graph;
                this.toReport = toReport;
+               this.graphTranslate = graphTranslate;
                this.writer = writer;
                this.fileName = fileName;
                this.statCount = statCount;
@@ -187,7 +192,7 @@ public class StatType {
                                statsJumpsType, limit, heightPreferred, weightStatsPercent, 
                                markedRows, 
                                gRO,
-                               toReport);
+                               toReport, graphTranslate);
 
                myStat = new Stat(); //create and instance of myStat
        }
diff --git a/src/stats/graphs/djIndex.cs b/src/stats/graphs/djIndex.cs
index 35705af..0fb9399 100644
--- a/src/stats/graphs/djIndex.cs
+++ b/src/stats/graphs/djIndex.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ * Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -66,11 +66,11 @@ public class GraphDjIndex : StatDjIndex
                        serieTv = new GraphSerie();
                        serieFall = new GraphSerie();
                                
-                       serieIndex.Title = Catalog.GetString("Dj Index");
-                       serieHeight.Title = Catalog.GetString("Height");
-                       serieTc.Title = Catalog.GetString("TC");
-                       serieTv.Title = Catalog.GetString("TF");
-                       serieFall.Title = Catalog.GetString("Fall");
+                       serieIndex.Title = translateYesNo("Dj Index");
+                       serieHeight.Title = translateYesNo("Height");
+                       serieTc.Title = translateYesNo("TC");
+                       serieTv.Title = translateYesNo("TF");
+                       serieFall.Title = translateYesNo("Fall");
                        
                        serieIndex.IsLeftAxis = false;
                        serieHeight.IsLeftAxis = false;
@@ -79,18 +79,18 @@ public class GraphDjIndex : StatDjIndex
                        serieFall.IsLeftAxis = false;
 
                        CurrentGraphData.LabelLeft = 
-                               Catalog.GetString("TC") + "(s), " +
-                               Catalog.GetString("TF") + "(s)";
+                               translateYesNo("TC") + "(s), " +
+                               translateYesNo("TF") + "(s)";
                        CurrentGraphData.LabelRight = 
-                               Catalog.GetString("Index") + "(%), " +
-                               Catalog.GetString("Height") + "(cm), " +
-                               Catalog.GetString("Fall") + "(cm)";
+                               translateYesNo("Index") + "(%), " +
+                               translateYesNo("Height") + "(cm), " +
+                               translateYesNo("Fall") + "(cm)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Index") + "(%)";
+                       CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";
                        CurrentGraphData.LabelRight = "";
                }
        }
diff --git a/src/stats/graphs/djPower.cs b/src/stats/graphs/djPower.cs
index c51270e..cc669dd 100644
--- a/src/stats/graphs/djPower.cs
+++ b/src/stats/graphs/djPower.cs
@@ -68,12 +68,12 @@ public class GraphDjPower : StatDjPower
                        serieFall = new GraphSerie();
                        serieWeight = new GraphSerie();
                                
-                       serieIndex.Title = Catalog.GetString("Dj Index");
-                       serieHeight.Title = Catalog.GetString("Height");
-                       serieTc.Title = Catalog.GetString("TC");
-                       serieTv.Title = Catalog.GetString("TF");
-                       serieFall.Title = Catalog.GetString("Fall");
-                       serieWeight.Title = Catalog.GetString("Weight");
+                       serieIndex.Title = translateYesNo("Dj Index");
+                       serieHeight.Title = translateYesNo("Height");
+                       serieTc.Title = translateYesNo("TC");
+                       serieTv.Title = translateYesNo("TF");
+                       serieFall.Title = translateYesNo("Fall");
+                       serieWeight.Title = translateYesNo("Weight");
                        
                        serieIndex.IsLeftAxis = false;
                        serieHeight.IsLeftAxis = false;
@@ -83,19 +83,19 @@ public class GraphDjPower : StatDjPower
                        serieWeight.IsLeftAxis = false;
 
                        CurrentGraphData.LabelLeft = 
-                               Catalog.GetString("TC") + "(s), " +
-                               Catalog.GetString("TF") + "(s)";
+                               translateYesNo("TC") + "(s), " +
+                               translateYesNo("TF") + "(s)";
                        CurrentGraphData.LabelRight = 
-                               Catalog.GetString("Index") + "(%), " +
-                               Catalog.GetString("Height") + "(cm), " +
-                               Catalog.GetString("Fall") + "(cm), " +
-                               Catalog.GetString("Weight") + "(Kg)";
+                               translateYesNo("Index") + "(%), " +
+                               translateYesNo("Height") + "(cm), " +
+                               translateYesNo("Fall") + "(cm), " +
+                               translateYesNo("Weight") + "(Kg)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Power") + "(W)";
+                       CurrentGraphData.LabelLeft = translateYesNo("Power") + "(W)";
                        CurrentGraphData.LabelRight = "";
                }
        }
diff --git a/src/stats/graphs/djQ.cs b/src/stats/graphs/djQ.cs
index 1cc4f97..9f1abe5 100644
--- a/src/stats/graphs/djQ.cs
+++ b/src/stats/graphs/djQ.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ * Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -66,11 +66,11 @@ public class GraphDjQ : StatDjQ
                        serieTv = new GraphSerie();
                        serieFall = new GraphSerie();
                                
-                       serieIndex.Title = Catalog.GetString("Q Index");
-                       serieHeight.Title = Catalog.GetString("Height");
-                       serieTc.Title = Catalog.GetString("TC");
-                       serieTv.Title = Catalog.GetString("TF");
-                       serieFall.Title = Catalog.GetString("Fall");
+                       serieIndex.Title = translateYesNo("Q Index");
+                       serieHeight.Title = translateYesNo("Height");
+                       serieTc.Title = translateYesNo("TC");
+                       serieTv.Title = translateYesNo("TF");
+                       serieFall.Title = translateYesNo("Fall");
                        
                        serieIndex.IsLeftAxis = true;
                        serieHeight.IsLeftAxis = false;
@@ -79,18 +79,18 @@ public class GraphDjQ : StatDjQ
                        serieFall.IsLeftAxis = false;
 
                        CurrentGraphData.LabelLeft = 
-                               Catalog.GetString("TC") + "(s), " +
-                               Catalog.GetString("TF") + "(s)";
+                               translateYesNo("TC") + "(s), " +
+                               translateYesNo("TF") + "(s)";
                        CurrentGraphData.LabelRight = 
-                               Catalog.GetString("Index") + "(%), " +
-                               Catalog.GetString("Height") + "(cm), " +
-                               Catalog.GetString("Fall") + "(cm)";
+                               translateYesNo("Index") + "(%), " +
+                               translateYesNo("Height") + "(cm), " +
+                               translateYesNo("Fall") + "(cm)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Index") + "(%)";
+                       CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";
                        CurrentGraphData.LabelRight = "";
                }
        }
diff --git a/src/stats/graphs/fv.cs b/src/stats/graphs/fv.cs
index a45e902..59c1728 100644
--- a/src/stats/graphs/fv.cs
+++ b/src/stats/graphs/fv.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ * Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -71,8 +71,8 @@ public class GraphFv : StatFv
                        serieJump2 = new GraphSerie();
                                
                        serieIndex.Title = indexType;
-                       serieJump1.Title = jump1 + " (" + Catalog.GetString("height") + ")";
-                       serieJump2.Title = jump2 + " (" + Catalog.GetString("height") + ")";
+                       serieJump1.Title = jump1 + " (" + translateYesNo("height") + ")";
+                       serieJump2.Title = jump2 + " (" + translateYesNo("height") + ")";
                        
                        serieIndex.IsLeftAxis = false;
                        serieJump1.IsLeftAxis = true;
@@ -80,15 +80,15 @@ public class GraphFv : StatFv
 
                        //this index is measured in height of CdG (not in tv)
                        CurrentGraphData.LabelLeft = 
-                               jump1 + " " + Catalog.GetString("Height") + "(cm), " + 
-                               jump2 + " " + Catalog.GetString("Height") + "(cm)";
-                       CurrentGraphData.LabelRight = Catalog.GetString("Index") + "(%)";
+                               jump1 + " " + translateYesNo("Height") + "(cm), " + 
+                               jump2 + " " + translateYesNo("Height") + "(cm)";
+                       CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Index") + "(%)";
+                       CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";
                        CurrentGraphData.LabelRight = "";
                }
        }
diff --git a/src/stats/graphs/global.cs b/src/stats/graphs/global.cs
index c7afe07..aab379c 100644
--- a/src/stats/graphs/global.cs
+++ b/src/stats/graphs/global.cs
@@ -63,34 +63,34 @@ public class GraphGlobal : StatGlobal
                        serieIndex = new GraphSerie();
                        serieTv = new GraphSerie();
        
-                       serieIndex.Title = Catalog.GetString("Value");
+                       serieIndex.Title = translateYesNo("Value");
                        if(heightPreferred) {
-                               serieTv.Title = Catalog.GetString("Height");
+                               serieTv.Title = translateYesNo("Height");
                        } else {
-                               serieTv.Title = Catalog.GetString("TF");
+                               serieTv.Title = translateYesNo("TF");
                        }
                        
                        serieIndex.IsLeftAxis = false;
                        serieTv.IsLeftAxis = true;
 
                        if(heightPreferred) {
-                               CurrentGraphData.LabelLeft = Catalog.GetString("Height") + "(cm)";
+                               CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)";
                        } else {
-                               CurrentGraphData.LabelLeft = Catalog.GetString("TF") + "(s)";
+                               CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)";
                        }
-                       CurrentGraphData.LabelRight = Catalog.GetString("Index") + "(%)";
+                       CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
                        if(heightPreferred) {
-                               CurrentGraphData.LabelLeft = Catalog.GetString("Height") + "(cm)";
+                               CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)";
                        } else {
-                               CurrentGraphData.LabelLeft = Catalog.GetString("TF") + "(s)";
+                               CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)";
                        }
                        //CurrentGraphData.LabelRight = "";
-                       CurrentGraphData.LabelRight = Catalog.GetString("Index") + "(%)";
+                       CurrentGraphData.LabelRight = translateYesNo("Index") + "(%)";
                }
        }
 
diff --git a/src/stats/graphs/jumpIndexes.cs b/src/stats/graphs/jumpIndexes.cs
index 4d25c81..1dae5c5 100644
--- a/src/stats/graphs/jumpIndexes.cs
+++ b/src/stats/graphs/jumpIndexes.cs
@@ -100,16 +100,16 @@ public class GraphJumpIndexes : StatJumpIndexes
                        serieJump1.IsLeftAxis = false;
                        serieJump2.IsLeftAxis = false;
 
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Index") + "(%)";
+                       CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";
                        CurrentGraphData.LabelRight =
-                               jump1 + " " + Catalog.GetString("TF") + "(s), " + 
-                               jump2 + " " + Catalog.GetString("TF") + "(s)";
+                               jump1 + " " + translateYesNo("TF") + "(s), " + 
+                               jump2 + " " + translateYesNo("TF") + "(s)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Index") + "(%)";
+                       CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";
                        CurrentGraphData.LabelRight = "";
                }
        }
diff --git a/src/stats/graphs/jumpSimpleSubtraction.cs b/src/stats/graphs/jumpSimpleSubtraction.cs
index 3e9ed0c..708176b 100644
--- a/src/stats/graphs/jumpSimpleSubtraction.cs
+++ b/src/stats/graphs/jumpSimpleSubtraction.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ * Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -47,8 +47,8 @@ public class GraphJumpSimpleSubtraction : StatJumpSimpleSubtraction
                test1 = applyTos[0];
                test2 = applyTos[1];
                
-               columnsString[0] = "Jumper";
-               columnsString[1] = Catalog.GetString("ResultPercent");
+               columnsString[0] = translateYesNo("Jumper");
+               columnsString[1] = translateYesNo("ResultPercent");
                columnsString[2] = test1;
                columnsString[3] = test2;
                
@@ -72,7 +72,7 @@ public class GraphJumpSimpleSubtraction : StatJumpSimpleSubtraction
                        serieJump1 = new GraphSerie();
                        serieJump2 = new GraphSerie();
                                
-                       serieResultPercent.Title = Catalog.GetString("Result") + " %";
+                       serieResultPercent.Title = translateYesNo("Result") + " %";
                        serieJump1.Title = test1;
                        serieJump2.Title = test2;
                
@@ -80,16 +80,16 @@ public class GraphJumpSimpleSubtraction : StatJumpSimpleSubtraction
                        serieJump1.IsLeftAxis = false;
                        serieJump2.IsLeftAxis = false;
 
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Result") + " %"; 
+                       CurrentGraphData.LabelLeft = translateYesNo("Result") + " %"; 
                        CurrentGraphData.LabelRight = 
-                               test1 + " " + Catalog.GetString("TF") + "(s), " + 
-                               test2 + " " + Catalog.GetString("TF") + "(s)";
+                               test1 + " " + translateYesNo("TF") + "(s), " + 
+                               test2 + " " + translateYesNo("TF") + "(s)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Result") + " %";
+                       CurrentGraphData.LabelLeft = translateYesNo("Result") + " %";
                        CurrentGraphData.LabelRight = "";
                }
        }
diff --git a/src/stats/graphs/potency.cs b/src/stats/graphs/potency.cs
index 33b5f8b..ac59958 100644
--- a/src/stats/graphs/potency.cs
+++ b/src/stats/graphs/potency.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ * Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -58,7 +58,7 @@ public class GraphPotency : StatPotency
                        CurrentGraphData.GraphTitle = "";
                } else {
                        //CurrentGraphData.GraphTitle = this.ToString();
-                       CurrentGraphData.GraphTitle = Catalog.GetString("Peak Power");
+                       CurrentGraphData.GraphTitle = translateYesNo("Peak Power");
                }
                
                if(sessions.Count == 1) {
@@ -68,28 +68,28 @@ public class GraphPotency : StatPotency
                        serieExtraWeight = new GraphSerie();
                        serieHeight = new GraphSerie();
                                
-                       serieIndex.Title = Catalog.GetString("Peak Power");
-                       seriePersonWeight.Title = Catalog.GetString("Person's Weight");
-                       serieExtraWeight.Title = Catalog.GetString("Extra Weight") + " (Kg)";
-                       serieHeight.Title = Catalog.GetString("Height");
+                       serieIndex.Title = translateYesNo("Peak Power");
+                       seriePersonWeight.Title = translateYesNo("Person's Weight");
+                       serieExtraWeight.Title = translateYesNo("Extra Weight") + " (Kg)";
+                       serieHeight.Title = translateYesNo("Height");
                        
                        serieIndex.IsLeftAxis = true;
                        seriePersonWeight.IsLeftAxis = false;
                        serieExtraWeight.IsLeftAxis = false;
                        serieHeight.IsLeftAxis = false;
 
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Peak Power") + 
-                               "(" + Catalog.GetString("watts") + ")";
+                       CurrentGraphData.LabelLeft = translateYesNo("Peak Power") + 
+                               "(" + translateYesNo("watts") + ")";
                        CurrentGraphData.LabelRight = 
-                               Catalog.GetString("Weight") + "(kg), " + 
-                               Catalog.GetString("Height") + "(cm)";
+                               translateYesNo("Weight") + "(kg), " + 
+                               translateYesNo("Height") + "(cm)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Peak Power") + 
-                               "(" + Catalog.GetString("watts") + ")";
+                       CurrentGraphData.LabelLeft = translateYesNo("Peak Power") + 
+                               "(" + translateYesNo("watts") + ")";
                        CurrentGraphData.LabelRight = "";
                }
        }
diff --git a/src/stats/graphs/rjAVGSD.cs b/src/stats/graphs/rjAVGSD.cs
index 5c6b2c3..f6a7174 100644
--- a/src/stats/graphs/rjAVGSD.cs
+++ b/src/stats/graphs/rjAVGSD.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ * Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -66,18 +66,18 @@ public class GraphRjAVGSD : StatRjAVGSD
                serieSD = new GraphSerie();
                serieJumps = new GraphSerie();
 
-               serieAVG.Title = Catalog.GetString("AVG");
-               serieSD.Title = Catalog.GetString("SD");
-               serieJumps.Title = Catalog.GetString("Jumps");
+               serieAVG.Title = translateYesNo("AVG");
+               serieSD.Title = translateYesNo("SD");
+               serieJumps.Title = translateYesNo("Jumps");
 
                serieAVG.IsLeftAxis = true;
                serieSD.IsLeftAxis = true;
                serieJumps.IsLeftAxis = false;
 
                CurrentGraphData.LabelLeft = 
-                       Catalog.GetString("AVG") + ", " +
-                       Catalog.GetString("SD");
-               CurrentGraphData.LabelRight = Catalog.GetString("Jumps");
+                       translateYesNo("AVG") + ", " +
+                       translateYesNo("SD");
+               CurrentGraphData.LabelRight = translateYesNo("Jumps");
 
                CurrentGraphData.IsRightAxisInteger = true;
        }
diff --git a/src/stats/graphs/rjEvolution.cs b/src/stats/graphs/rjEvolution.cs
index dca2707..34c4627 100644
--- a/src/stats/graphs/rjEvolution.cs
+++ b/src/stats/graphs/rjEvolution.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ * Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -72,9 +72,9 @@ public class GraphRjEvolution : StatRjEvolution
                }
                
                
-               CurrentGraphData.LabelLeft = Catalog.GetString("Time") + "(s)";
+               CurrentGraphData.LabelLeft = translateYesNo("Time") + "(s)";
                CurrentGraphData.LabelRight = "";
-               CurrentGraphData.LabelBottom = Catalog.GetString("Jumps");
+               CurrentGraphData.LabelBottom = translateYesNo("Jumps");
        }
 
        protected override void printData (string [] statValues) 
diff --git a/src/stats/graphs/rjIndex.cs b/src/stats/graphs/rjIndex.cs
index a8be01d..ee5d2ca 100644
--- a/src/stats/graphs/rjIndex.cs
+++ b/src/stats/graphs/rjIndex.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ * Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -56,7 +56,7 @@ public class GraphRjIndex : StatRjIndex
                        CurrentGraphData.GraphTitle = "";
                } else {
                        //CurrentGraphData.GraphTitle = this.ToString();
-                       CurrentGraphData.GraphTitle = Catalog.GetString("Average Index");
+                       CurrentGraphData.GraphTitle = translateYesNo("Average Index");
                }
                
                
@@ -67,10 +67,10 @@ public class GraphRjIndex : StatRjIndex
                        serieTv = new GraphSerie();
                        serieFall = new GraphSerie();
                                
-                       serieIndex.Title = Catalog.GetString("Index");
-                       serieTc.Title = Catalog.GetString("TC") + " (" + Catalog.GetString("AVG") + ")";
-                       serieTv.Title = Catalog.GetString("TF") + " (" + Catalog.GetString("AVG") + ")";
-                       serieFall.Title = Catalog.GetString("Fall");
+                       serieIndex.Title = translateYesNo("Index");
+                       serieTc.Title = translateYesNo("TC") + " (" + translateYesNo("AVG") + ")";
+                       serieTv.Title = translateYesNo("TF") + " (" + translateYesNo("AVG") + ")";
+                       serieFall.Title = translateYesNo("Fall");
                        
                        serieIndex.IsLeftAxis = false;
                        serieTc.IsLeftAxis = true;
@@ -78,17 +78,17 @@ public class GraphRjIndex : StatRjIndex
                        serieFall.IsLeftAxis = false;
 
                        CurrentGraphData.LabelLeft = 
-                               Catalog.GetString("TC") + "(s), " +
-                               Catalog.GetString("TF") + "(s)";
+                               translateYesNo("TC") + "(s), " +
+                               translateYesNo("TF") + "(s)";
                        CurrentGraphData.LabelRight = 
-                               Catalog.GetString("Index") + "(%), " +
-                               Catalog.GetString("Fall") + "(cm)";
+                               translateYesNo("Index") + "(%), " +
+                               translateYesNo("Fall") + "(cm)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Index") + "(%)";
+                       CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";
                        CurrentGraphData.LabelRight = "";
                }
 
diff --git a/src/stats/graphs/rjPotencyBosco.cs b/src/stats/graphs/rjPotencyBosco.cs
index ea09a4c..95c57df 100644
--- a/src/stats/graphs/rjPotencyBosco.cs
+++ b/src/stats/graphs/rjPotencyBosco.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ * Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -72,14 +72,14 @@ public class GraphRjPotencyBosco : StatRjPotencyBosco
                        serieTime = new GraphSerie();
                        serieFall = new GraphSerie();
                                
-                       serieIndex.Title = Catalog.GetString("Index");
-                       serieTc.Title = Catalog.GetString("TC") + " (" + Catalog.GetString("AVG") + ")";
-                       serieTv.Title = Catalog.GetString("TF") + " (" + Catalog.GetString("AVG") + ")";
-                       //serieJumps.Title = Catalog.GetString("Jumps") + " *10";
-                       //serieTime.Title = Catalog.GetString("Time") + " *10";
-                       serieJumps.Title = Catalog.GetString("Jumps");
-                       serieTime.Title = Catalog.GetString("Time");
-                       serieFall.Title = Catalog.GetString("Fall");
+                       serieIndex.Title = translateYesNo("Index");
+                       serieTc.Title = translateYesNo("TC") + " (" + translateYesNo("AVG") + ")";
+                       serieTv.Title = translateYesNo("TF") + " (" + translateYesNo("AVG") + ")";
+                       //serieJumps.Title = translateYesNo("Jumps") + " *10";
+                       //serieTime.Title = translateYesNo("Time") + " *10";
+                       serieJumps.Title = translateYesNo("Jumps");
+                       serieTime.Title = translateYesNo("Time");
+                       serieFall.Title = translateYesNo("Fall");
                        
                        serieIndex.IsLeftAxis = false;
                        serieTc.IsLeftAxis = true;
@@ -89,19 +89,19 @@ public class GraphRjPotencyBosco : StatRjPotencyBosco
                        serieFall.IsLeftAxis = false;
 
                        CurrentGraphData.LabelLeft = 
-                               Catalog.GetString("TC") + "(s), " +
-                               Catalog.GetString("TF") + "(s)";
+                               translateYesNo("TC") + "(s), " +
+                               translateYesNo("TF") + "(s)";
                        CurrentGraphData.LabelRight = 
-                               Catalog.GetString("Index") + "(%), " +
-                               Catalog.GetString("Jumps") + ", " + 
-                               Catalog.GetString("Time") + "(s), " + 
-                               Catalog.GetString("Fall") + "(cm)";
+                               translateYesNo("Index") + "(%), " +
+                               translateYesNo("Jumps") + ", " + 
+                               translateYesNo("Time") + "(s), " + 
+                               translateYesNo("Fall") + "(cm)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Index") + "(%)";
+                       CurrentGraphData.LabelLeft = translateYesNo("Index") + "(%)";
                        CurrentGraphData.LabelRight = "";
                }
        }
diff --git a/src/stats/graphs/runIntervallic.cs b/src/stats/graphs/runIntervallic.cs
index aac4669..7f95f34 100644
--- a/src/stats/graphs/runIntervallic.cs
+++ b/src/stats/graphs/runIntervallic.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ * Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -72,9 +72,9 @@ public class GraphRunIntervallic : StatRunIntervallic
                }
                
                
-               CurrentGraphData.LabelLeft = Catalog.GetString("Speed") + "(m/s)";
+               CurrentGraphData.LabelLeft = translateYesNo("Speed") + "(m/s)";
                CurrentGraphData.LabelRight = "";
-               CurrentGraphData.LabelBottom = Catalog.GetString("Runs");
+               CurrentGraphData.LabelBottom = translateYesNo("Runs");
        }
 
        protected override void printData (string [] statValues) 
diff --git a/src/stats/graphs/runSimple.cs b/src/stats/graphs/runSimple.cs
index cf23aa2..7f822d8 100644
--- a/src/stats/graphs/runSimple.cs
+++ b/src/stats/graphs/runSimple.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ * Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -62,24 +62,24 @@ public class GraphRunSimple : StatRunSimple
                        serieDistance = new GraphSerie();
                        serieTime = new GraphSerie();
                                
-                       serieSpeed.Title = Catalog.GetString("Speed");
-                       serieDistance.Title = Catalog.GetString("Distance");
-                       serieTime.Title = Catalog.GetString("Time");;
+                       serieSpeed.Title = translateYesNo("Speed");
+                       serieDistance.Title = translateYesNo("Distance");
+                       serieTime.Title = translateYesNo("Time");;
                        
                        serieSpeed.IsLeftAxis = true;
                        serieDistance.IsLeftAxis = false;
                        serieTime.IsLeftAxis = false;
 
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Speed") + "(m/s)";
+                       CurrentGraphData.LabelLeft = translateYesNo("Speed") + "(m/s)";
                        CurrentGraphData.LabelRight = 
-                               Catalog.GetString("Distance") + "(m), " +
-                               Catalog.GetString("Time") + "(s)";
+                               translateYesNo("Distance") + "(m), " +
+                               translateYesNo("Time") + "(s)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
-                       CurrentGraphData.LabelLeft = Catalog.GetString("Speed") + "(s)";
+                       CurrentGraphData.LabelLeft = translateYesNo("Speed") + "(s)";
                        CurrentGraphData.LabelRight = "";
                }
        }
diff --git a/src/stats/graphs/sjCmjAbk.cs b/src/stats/graphs/sjCmjAbk.cs
index ec78ebe..cb30fdb 100644
--- a/src/stats/graphs/sjCmjAbk.cs
+++ b/src/stats/graphs/sjCmjAbk.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Copyright (C) 2004-2009   Xavier de Blas <xaviblas gmail com> 
+ * Copyright (C) 2004-2014   Xavier de Blas <xaviblas gmail com> 
  */
 
 using System;
@@ -61,23 +61,23 @@ public class GraphSjCmjAbk : StatSjCmjAbk
                        serieTv = new GraphSerie();
                        serieHeight = new GraphSerie();
                                
-                       serieTv.Title = Catalog.GetString("TF");
-                       serieHeight.Title = Catalog.GetString("Height");
+                       serieTv.Title = translateYesNo("TF");
+                       serieHeight.Title = translateYesNo("Height");
                        
                        serieTv.IsLeftAxis = true;
                        serieHeight.IsLeftAxis = false;
 
-                       CurrentGraphData.LabelLeft = Catalog.GetString("TF") + "(s)";
-                       CurrentGraphData.LabelRight = Catalog.GetString("Height") + "(cm)";
+                       CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)";
+                       CurrentGraphData.LabelRight = translateYesNo("Height") + "(cm)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
                        if(heightPreferred) {
-                               CurrentGraphData.LabelLeft = Catalog.GetString("Height") + "(cm)";
+                               CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)";
                        } else {
-                               CurrentGraphData.LabelLeft = Catalog.GetString("TF") + "(s)";
+                               CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)";
                        }
                        CurrentGraphData.LabelRight = "";
                }
diff --git a/src/stats/graphs/sjCmjAbkPlus.cs b/src/stats/graphs/sjCmjAbkPlus.cs
index 71fbe8f..b31356c 100644
--- a/src/stats/graphs/sjCmjAbkPlus.cs
+++ b/src/stats/graphs/sjCmjAbkPlus.cs
@@ -63,33 +63,33 @@ public class GraphSjCmjAbkPlus : StatSjCmjAbkPlus
                        serieHeight = new GraphSerie();
                        serieWeight = new GraphSerie();
                                
-                       string weightName = Catalog.GetString("Extra weight");
+                       string weightName = translateYesNo("Extra weight");
                
                        if(weightPercentPreferred)
                                weightName += " %";
                        else
                                weightName += " Kg";
-                       serieTv.Title = Catalog.GetString("TF");
-                       serieHeight.Title = Catalog.GetString("Height");
+                       serieTv.Title = translateYesNo("TF");
+                       serieHeight.Title = translateYesNo("Height");
                        serieWeight.Title = weightName;
                        
                        serieTv.IsLeftAxis = true;
                        serieHeight.IsLeftAxis = false;
                        serieWeight.IsLeftAxis = false;
 
-                       CurrentGraphData.LabelLeft = Catalog.GetString("TF") + "(s)";
+                       CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)";
                        CurrentGraphData.LabelRight = 
-                               Catalog.GetString("Height") + "(cm), " +
-                               Catalog.GetString("Weight") + "(Kg)";
+                               translateYesNo("Height") + "(cm), " +
+                               translateYesNo("Weight") + "(Kg)";
                } else {
                        for(int i=0; i < sessions.Count ; i++) {
                                string [] stringFullResults = sessions[i].ToString().Split(new char[] {':'});
                                CurrentGraphData.XAxisNames.Add(stringFullResults[1].ToString());
                        }
                        if(heightPreferred) {
-                               CurrentGraphData.LabelLeft = Catalog.GetString("Height") + "(cm)";
+                               CurrentGraphData.LabelLeft = translateYesNo("Height") + "(cm)";
                        } else {
-                               CurrentGraphData.LabelLeft = Catalog.GetString("TF") + "(s)";
+                               CurrentGraphData.LabelLeft = translateYesNo("TF") + "(s)";
                        }
                        CurrentGraphData.LabelRight = "";
                }
diff --git a/src/stats/main.cs b/src/stats/main.cs
index 6d1b642..ee1200d 100644
--- a/src/stats/main.cs
+++ b/src/stats/main.cs
@@ -77,6 +77,8 @@ public class Stat
 
        protected bool toReport = false;
        protected string reportString;
+       
+       protected bool graphTranslate = true;
 
 
        //for toString() in every stat
@@ -119,6 +121,7 @@ public class Stat
                
                this.gRO = myStatTypeStruct.GRO;
                this.toReport = myStatTypeStruct.ToReport;
+               this.graphTranslate = myStatTypeStruct.GraphTranslate;
                
                this.treeview = treeview;
                
@@ -129,6 +132,13 @@ public class Stat
 
                personsWithData = new ArrayList();
        }
+
+       protected string translateYesNo(string str) {
+               if(graphTranslate)
+                       return Catalog.GetString(str);
+               else
+                       return str;
+       }
        
        void createCheckboxes(TreeView tv) 
        {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]