[chronojump] Show/Edit exercises works ok now with predefined names translated
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Show/Edit exercises works ok now with predefined names translated
- Date: Mon, 15 Sep 2014 15:32:42 +0000 (UTC)
commit 22fd1f3bc47107ddd17cbd03cdd3c2a937b5fb84
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Sep 15 17:31:57 2014 +0200
Show/Edit exercises works ok now with predefined names translated
src/encoder.cs | 13 +++++++++++++
src/gui/encoder.cs | 6 +++++-
2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/src/encoder.cs b/src/encoder.cs
index d2f563d..102b502 100644
--- a/src/encoder.cs
+++ b/src/encoder.cs
@@ -685,6 +685,19 @@ public class EncoderExercise
this.speed1RM = speed1RM;
}
+ public bool IsPredefined() {
+ if(
+ name == "Bench press" ||
+ name == "Squat" ||
+ name == "Free" ||
+ name == "Jump" ||
+ name == "Inclinated plane" ||
+ name == "Inclinated plane BW" )
+ return true;
+ else
+ return false;
+ }
+
~EncoderExercise() {}
}
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 712ab75..fc608c4 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -3135,8 +3135,12 @@ public partial class ChronoJumpWindow
ArrayList a4 = new ArrayList();
ArrayList a5 = new ArrayList();
+ string exerciseName = ex.name;
+ if(ex.IsPredefined())
+ exerciseName = Catalog.GetString(ex.name);
+
//0 is the widgget to show; 1 is the editable; 2 id default value
- a1.Add(Constants.GenericWindowShow.ENTRY); a1.Add(true); a1.Add(ex.name);
+ a1.Add(Constants.GenericWindowShow.ENTRY); a1.Add(true); a1.Add(exerciseName);
bigArray.Add(a1);
a2.Add(Constants.GenericWindowShow.SPININT); a2.Add(true); a2.Add("");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]