[Pkg-running-devel] [pytrainer] 01/02: New upstream version 1.12.0
Christian Perrier
bubulle at moszumanska.debian.org
Sun Mar 11 10:04:24 UTC 2018
This is an automated email from the git hooks/post-receive script.
bubulle pushed a commit to branch master
in repository pytrainer.
commit b954bac20efb83b067eb6bc13b633ad22cbe3753
Author: Christian Perrier <bubulle at debian.org>
Date: Sun Mar 11 09:00:33 2018 +0100
New upstream version 1.12.0
---
.travis.yml | 14 +-
CHANGES | 99 ++
extensions/fixelevation/fixelevation.py | 2 +-
imports/file_garminfit.py | 7 +-
imports/file_garmintcxv1.py | 7 +-
imports/file_garmintcxv2.py | 26 +-
imports/file_garmintools.py | 7 +-
imports/file_gpxplus.py | 7 +-
imports/file_gpxplusNokia.py | 7 +-
locale/ca/LC_MESSAGES/pytrainer_ca.po | 465 +++++-----
locale/cs/LC_MESSAGES/pytrainer_cs.po | 465 +++++-----
locale/da/LC_MESSAGES/pytrainer_da.po | 467 +++++-----
locale/de/LC_MESSAGES/pytrainer_de.po | 459 +++++-----
locale/es/LC_MESSAGES/pytrainer_es.po | 459 +++++-----
locale/eu/LC_MESSAGES/pytrainer_eu.po | 467 +++++-----
locale/fr/LC_MESSAGES/pytrainer_fr.po | 459 +++++-----
locale/gl/LC_MESSAGES/pytrainer_gl.po | 459 +++++-----
locale/no/LC_MESSAGES/pytrainer_no.po | 463 +++++-----
locale/pl/LC_MESSAGES/pytrainer_pl.po | 465 +++++-----
locale/pt/LC_MESSAGES/pytrainer_pt.po | 465 +++++-----
locale/ru/LC_MESSAGES/pytrainer_ru.po | 467 +++++-----
locale/sv/LC_MESSAGES/pytrainer_sv.po | 465 +++++-----
plugins/garmin-fit/garmin-fit.py | 7 +-
plugins/garmin-gpx/garmingpx.py | 7 +-
plugins/garmin-hr-file/garminhrfile.py | 10 +-
plugins/garmin-hr/garminhr.py | 9 +-
plugins/garmin-tcxv2/garmin-tcxv2.py | 7 +-
plugins/garmintools/garmintools.py | 7 +-
plugins/garmintools_full/garmintools_full.py | 24 +-
pytrainer/__init__.py | 2 +-
pytrainer/athlete.py | 50 +-
pytrainer/core/activity.py | 227 +++--
pytrainer/core/equipment.py | 175 +---
pytrainer/core/sport.py | 210 ++---
pytrainer/extensions/googlemaps.py | 4 +-
pytrainer/extensions/osm.py | 6 +-
pytrainer/gui/equipment.py | 6 +-
pytrainer/gui/windowimportdata.py | 59 +-
pytrainer/gui/windowmain.py | 540 +++++------
pytrainer/gui/windowprofile.py | 9 +-
pytrainer/lib/ddbb.py | 266 ++----
pytrainer/lib/mysqlUtils.py | 193 ----
pytrainer/lib/sqliteUtils.py | 193 ----
pytrainer/lib/uc.py | 1 +
pytrainer/main.py | 48 +-
pytrainer/profile.py | 17 +
pytrainer/record.py | 994 +++++++++------------
pytrainer/stats.py | 58 +-
pytrainer/test/core/test_activity.py | 93 +-
pytrainer/test/core/test_equipment.py | 181 ++--
pytrainer/test/core/test_sport.py | 135 ++-
pytrainer/test/imports/test_garminfit.py | 17 +-
pytrainer/test/imports/test_garmintcxv2.py | 31 +-
pytrainer/test/lib/test_gpx.py | 5 -
pytrainer/test/lib/test_uc.py | 3 -
pytrainer/test/plugins/__init__.py | 0
pytrainer/test/plugins/test_garmin-tcxv2.py | 40 +
pytrainer/test/test_athlete.py | 10 +-
pytrainer/test/test_record.py | 98 ++
pytrainer/test/test_waypoint.py | 10 +-
pytrainer/timegraph.py | 24 +-
pytrainer/totalgraph.py | 18 +-
pytrainer/upgrade/versions/015_match_sqlalchemy.py | 148 +++
pytrainer/waypoint.py | 50 +-
setup.py | 2 +-
65 files changed, 4968 insertions(+), 5227 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index c7d6a97..820685d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,19 @@
sudo: required
language: python
+services:
+ - mysql
+ - postgresql
env:
- - TZ=Europe/Kaliningrad
+ - TZ=Europe/Kaliningrad PYTRAINER_ALCHEMYURL="sqlite://"
+ - TZ=Europe/Kaliningrad PYTRAINER_ALCHEMYURL="mysql://pytrainer@localhost/pytrainer"
+ - TZ=Europe/Kaliningrad PYTRAINER_ALCHEMYURL="postgresql://pytrainer@localhost/pytrainer"
before_install:
- - sudo apt-get install python-gtk2 python-glade2 python-lxml python-matplotlib
+ - sudo apt-get install --no-install-recommends python-gtk2 python-glade2 python-lxml python-matplotlib python-tornado
+ - mysql -e "CREATE USER 'pytrainer'@'localhost';"
+ - mysql -e "CREATE DATABASE pytrainer;"
+ - mysql -e "GRANT ALL PRIVILEGES ON pytrainer . * TO 'pytrainer'@'localhost';"
+ - createuser -U postgres pytrainer
+ - createdb -U postgres -O pytrainer pytrainer
python:
- "2.7"
script: "python setup.py test"
diff --git a/CHANGES b/CHANGES
index 36f6c43..c775bfa 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,104 @@
We have migrated to GitHub, for more details about changelog please see git log documentation (http://git-scm.com/docs/git-log). One simple approach: git log --oneline --stat --decorate <since>..<until>
+- pytrainer changes for 1.12.0:
+
+- Known issues:
+ Gtk outputs warnings about extra properties when loading the main window
+
+- Improvements:
+ 2a5877ac2ff9 Add support for Postgresql
+
+- Bugs fixed:
+ fb0e135657fa WindowMain: Move Osm and Googlemaps imports later
+ fe19bf5995d8 Waypoint: Fix invalid quoting in getwaypointInfo
+ 96501a642bea Fix typo in the osm extension (#104)
+
+- Internals:
+ 1d176c7724ac Convert plugins to sqlalchemy
+ 6d177a94b756 Add simple test case for the Garmin TCX v2 plugin
+ 94cf81f771c6 Convert import tools to sqlalchemy
+ 8f89e7f1746f Add import test case where activity exists in the db
+ 95a60568e3f6 Make import test database queries testable
+ ca15fca002ab Always add mysql charset setting
+ ef910fff869c Remove unused DDBB methods select_dict and parseByCellType
+ 748363f3f5dc Fixup WindowMain analytics query
+ 58072380d4e7 Remove now unused Record methods getSportId, getrecordList and getrecordPeriod
+ a1023628c17b Convert Record.getRecordDayList to use get_activities_period
+ 88bb17f62410 Add test for Record.getRecordDayList
+ 204438c8eca3 Convert graphs to sqlalchemy
+ b59bf03013cb Add get_all_activities method to the activity service
+ f56e9da0faf1 Convert actualize_yearview to use Activity and the new helper method
+ b532f2023908 Convert actualize_monthview to use Activity and the new helper method
+ 97d5335ca771 Convert actualize_weekview to use Activity and the new helper method
+ c5ec865304a1 Add a get_activities_period method to ActivityService
+ 888d7072282a Use the new get_activities_for_day method in main window actualize_dayview
+ d721bbc43bcf Add utility method to main window for calculating activity totals
+ 3b812970b3ec Use the new get_activities_for_day method in main window actualize_recordTreeView
+ 84d71e79ae98 Add a get_activities_for_day method to ActivityService
+ 6f6c6e2a95ec Convert main window lap data to sqlalchemy
+ c703edfc0b89 Use an Activity in main window actualize_recordTreeView
+ f8fb5fb4634d Add a duration property to Lap
+ 049a2f7bf2bf Also load lap data while fetching an Activity
+ a994a4220778 Enable running tests against Postgresql
+ 29b1a0a6e328 Remove the database utils and ddbbObject
+ 159e85c09ead DDBB: Convert default data importing to sqlalchemy
+ 94d976eac2fb Promote ddbb.select from the sqlobjects to ddbb itself
+ f7a381ef324e Use sqlalchemy to insert lap data
+ ab254aa5576e Simplify Record.getLaps to just get the laps
+ 29fc0d15f408 Make sure that Record.insertRecord always loads lap data
+ 227bd486b76f Add test for Record.getLaps
+ db8c4725415c Convert Record._formatRecordNew to Sqlalchemy
+ 88481e97a543 Add tests for Record methods insertRecord and updateRecord
+ 524384fb5ac6 Replace Record.get_record_equipment with Activity.equipment
+ 04a776f8a012 Remove the unused Record.getrecordInfo and Record.getrecordPeriodSport methods
+ be02b31344b9 Reindent record.py
+ 5b793b767c54 Skip tests that aren't supported on Mysql version 5.6
+ a9b7561cc3b8 Add mysqlclient to tests_require
+ d46d15db16ff Pre-truncate the lap distance in the test case
+ 5f848ce16617 Skip tests involving check constraints on Mysql
+ ccb0945acec5 Also accept OperationalError for some test cases
+ 806066c04092 Enable running tests against Mysql as well
+ 00ddb41fade9 Shorten equipment.description column to 100 chars
+ 850ed70963cd Add environment override for the test database url
+ 7617b2b878e7 Travis: Attempt to work around issues between new Tornado and old Ubuntu
+ a256a7d4e9d9 Activity: Import sqlalchemy InvalidRequestError
+ 3fdfcc70b05c Remove missed records.time users
+ 003791a8e9c3 Remove the gpx file when deleting an Activity
+ 75e941baa0a7 Call ActivityService.clear_pool between tests
+ 8d3ee3c4aa65 Add DDBB.drop_tables, and use it in the tests
+ 344e736b985b Move Sqlalchemy url generation from DDBB into Profile
+ b9704d763d6c Add database migration to match sqlalchemy generated db
+ c75318b69778 Remove the last users of the records time column
+ 45038284d355 Convert windowmain analytics to sqlalchemy
+ beecf0d18bdd Convert stats to sqlalchemy
+ 63253ae5b479 Convert csv import to sqlalchemy
+ 8e747ce22c31 Convert main window lap comment editing to sqlalchemy
+ 8c0328c8fb04 Add ActivityService.remove_activity_from_db method to replace Record.removeRecord
+ 8b223ee50e65 Rename ActivityService.remove_activity to remove_activity_from_pool
+ 812bf2e3d87e Convert tests to use sqlalchemy session api instead of ddbb.insert
+ 2522e98eada1 Convert EquipmentService.get_equipment_usage to sqlalchemy
+ 95ac0e622d62 Convert Activity to sqlalchemy
+ d31d4f90f536 EquipmentServiceTest: Specify a sport when inserting a record
+ 5edcb1085699 Convert Activity.time into a deprecated property
+ 4f36db9e37b5 Activity: Remove a couple of dependencies on Activity.pytrainer_main
+ 33049a5677ed Convert Athlete to sqlalchemy
+ e39e1fb91c5b Convert laps to sqlalchemy
+ bbceb33d60af Use Activity.duration instead of Activity.time
+ ccca87b9a760 Waypoint: remove commented out connect & disconnect
+ 340b87fb2a9f Waypoint: convert remove, update and add to sqlalchemy
+ 80d5f0abb6be Waypoint: rename Waypoint to WaypointService
+ 921f40d9a4c9 Modify Equipment tests to work with sqlalchemy
+ 56e8289775ea Convert Equipment to sqlalchemy
+ 1c4b18a1e43b When creating an Equipment object do type conversions immediately
+ 519cee8d3d73 Modify Sport tests to work with sqlalchemy
+ 25f0a79d9cc6 Convert Sport to sqlalchemy
+ 062788cb829d Add a sqlalchemy type for forcing columns to integers
+ ff74cb8f8ee9 Create sqlalchemy Session and declarative_base
+ 6647bcff8f15 Convert database backup functionality to sqlalchemy
+ 1ed3884be018 Use an sqlalchemy Engine instead of using DBAPI directly
+ 40edb1f9e655 Call commit when changing the database in mysqlUtils
+ 4be273e3af95 Directly import gettext in uc.py and profile.py
+
- pytrainer changes for 1.11.0:
- Known issues:
diff --git a/extensions/fixelevation/fixelevation.py b/extensions/fixelevation/fixelevation.py
index 66f3a7d..23fcfb9 100644
--- a/extensions/fixelevation/fixelevation.py
+++ b/extensions/fixelevation/fixelevation.py
@@ -120,7 +120,7 @@ class fixelevation:
pretty_print=False)
res_msg = "Elevation has been fixed."
#TODO Expire activity out of pool - so get updated info
- self.pytrainer_main.activitypool.remove_activity(aid)
+ self.pytrainer_main.activitypool.remove_activity_from_cache(aid)
else:
res_msg = "Elevation could not be fixed!"
diff --git a/imports/file_garminfit.py b/imports/file_garminfit.py
index 0505177..ee4a48d 100644
--- a/imports/file_garminfit.py
+++ b/imports/file_garminfit.py
@@ -8,6 +8,8 @@ import subprocess
from lxml import etree
from pytrainer.lib.date import getDateTime
from pytrainer.lib.xmlUtils import XMLParser
+from pytrainer.core.activity import Activity
+from sqlalchemy.orm import exc
class garminfit():
'''First approach to parse Garmin FIT files is to use perl scripts (http://pub.ks-and-ks.ne.jp/cycling/fit2tcx.shtml) from Kiyokazu SUTO (suto at ks-and-ks.ne.jp) to convert first to TCXv2 and then to GPX+ format.
@@ -137,8 +139,11 @@ class garminfit():
if startTime is not None:
logging.info("Checking if activity from %s exists in db" % startTime[0])
time = startTime[0].strftime("%Y-%m-%dT%H:%M:%SZ")
- if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)):
+ try:
+ self.parent.parent.ddbb.session.query(Activity).filter(Activity.date_time_utc == time).one()
result = True
+ except exc.NoResultFound:
+ pass
else:
logging.info("No start time provided, nothing to check")
logging.debug('<<')
diff --git a/imports/file_garmintcxv1.py b/imports/file_garmintcxv1.py
index 0b9c425..321f465 100644
--- a/imports/file_garmintcxv1.py
+++ b/imports/file_garmintcxv1.py
@@ -23,6 +23,8 @@ from lxml import etree
from pytrainer.lib.xmlUtils import XMLParser
from pytrainer.lib.date import getDateTime
+from pytrainer.core.activity import Activity
+from sqlalchemy.orm import exc
class garmintcxv1():
def __init__(self, parent = None, data_path = None):
@@ -117,9 +119,10 @@ class garmintcxv1():
if time is None:
return False
time = time[0].strftime("%Y-%m-%dT%H:%M:%SZ")
- if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)):
+ try:
+ self.parent.parent.ddbb.session.query(Activity).filter(Activity.date_time_utc == time).one()
return True
- else:
+ except exc.NoResultFound:
return False
def getStartTimeFromActivity(self, activity):
diff --git a/imports/file_garmintcxv2.py b/imports/file_garmintcxv2.py
index 04efd17..ce57dfb 100644
--- a/imports/file_garmintcxv2.py
+++ b/imports/file_garmintcxv2.py
@@ -22,6 +22,8 @@ import os
import traceback
from lxml import etree
from pytrainer.lib.date import getDateTime
+from pytrainer.core.activity import Activity
+from sqlalchemy.orm import exc
from pytrainer.lib.xmlUtils import XMLParser
@@ -139,21 +141,15 @@ class garmintcxv2():
def inDatabase(self, startTime):
#comparing date and start time (sport may have been changed in DB after import)
- logging.debug('>>')
- result = False
- if startTime is not None:
- logging.info("Checking if activity from %s exists in db" % startTime[0]) # 2012-10-14 10:02:42+00:00
- time = startTime[0].strftime("%Y-%m-%dT%H:%M:%SZ")
- # No parent provided when unit testing (EAFP approach)
- try:
- if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)):
- result = True
- except AttributeError:
- logging.error("No parent attribute in current instance (testing?), skipping db check")
- else:
- logging.info("No start time provided, nothing to check")
- logging.debug('<<')
- return result
+ if startTime is None:
+ return False
+ logging.info("Checking if activity from %s exists in db" % startTime[0]) # 2012-10-14 10:02:42+00:00
+ time = startTime[0].strftime("%Y-%m-%dT%H:%M:%SZ")
+ try:
+ self.parent.parent.ddbb.session.query(Activity).filter(Activity.date_time_utc == time).one()
+ return True
+ except exc.NoResultFound:
+ return False
def getSport(self, activity):
try:
diff --git a/imports/file_garmintools.py b/imports/file_garmintools.py
index fd774af..d7d3949 100644
--- a/imports/file_garmintools.py
+++ b/imports/file_garmintools.py
@@ -25,6 +25,8 @@ import os
import StringIO
from lxml import etree
from pytrainer.lib.date import getDateTime
+from pytrainer.core.activity import Activity
+from sqlalchemy.orm import exc
class garmintools():
def __init__(self, parent = None, data_path = None):
@@ -87,9 +89,10 @@ class garmintools():
if time is None:
return False
time = time[0].strftime("%Y-%m-%dT%H:%M:%SZ")
- if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)):
+ try:
+ self.parent.parent.ddbb.session.query(Activity).filter(Activity.date_time_utc == time).one()
return True
- else:
+ except exc.NoResultFound:
return False
def getDetails(self, tree, startTime):
diff --git a/imports/file_gpxplus.py b/imports/file_gpxplus.py
index f4c0084..2f3ce2f 100644
--- a/imports/file_gpxplus.py
+++ b/imports/file_gpxplus.py
@@ -22,6 +22,8 @@ import os
import traceback
from lxml import etree
from pytrainer.lib.date import getDateTime
+from pytrainer.core.activity import Activity
+from sqlalchemy.orm import exc
class gpxplus():
def __init__(self, parent = None, data_path = None):
@@ -81,9 +83,10 @@ class gpxplus():
if time is None:
return False
time = time[0].strftime("%Y-%m-%dT%H:%M:%SZ")
- if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)):
+ try:
+ self.parent.parent.ddbb.session.query(Activity).filter(Activity.date_time_utc == time).one()
return True
- else:
+ except exc.NoResultFound:
return False
def getDetails(self, tree, startTime):
diff --git a/imports/file_gpxplusNokia.py b/imports/file_gpxplusNokia.py
index 87acc8a..52328f1 100644
--- a/imports/file_gpxplusNokia.py
+++ b/imports/file_gpxplusNokia.py
@@ -22,6 +22,8 @@ import os
#import StringIO
from lxml import etree
from pytrainer.lib.date import getDateTime
+from pytrainer.core.activity import Activity
+from sqlalchemy.orm import exc
class gpxplusNokia():
def __init__(self, parent = None, data_path = None):
@@ -80,9 +82,10 @@ class gpxplusNokia():
if time is None:
return False
time = time[0].strftime("%Y-%m-%dT%H:%M:%SZ")
- if self.parent.parent.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)):
+ try:
+ self.parent.parent.ddbb.session.query(Activity).filter(Activity.date_time_utc == time).one()
return True
- else:
+ except exc.NoResultFound:
return False
def getDetails(self, tree, startTime):
diff --git a/locale/ca/LC_MESSAGES/pytrainer_ca.po b/locale/ca/LC_MESSAGES/pytrainer_ca.po
index c36c6eb..90ba8d2 100644
--- a/locale/ca/LC_MESSAGES/pytrainer_ca.po
+++ b/locale/ca/LC_MESSAGES/pytrainer_ca.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pytrainer_ca\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: 2006-10-23 11:49+0200\n"
"Last-Translator: Eloi Crespillo Itchart <eloi at ikuszen.com>\n"
"Language-Team: es_ES <es at li.org>\n"
@@ -42,7 +42,7 @@ msgid "Active"
msgstr ""
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr ""
@@ -249,8 +249,8 @@ msgid "<b>File delimiter</b>"
msgstr "<b>Temps:</b>"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Data"
@@ -279,8 +279,8 @@ msgstr ""
msgid "<b>File Column</b>"
msgstr "<b>Comentaris</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Títol"
@@ -310,10 +310,10 @@ msgid "Average Speed (km/h)"
msgstr "mitjana (km/h)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Esport"
@@ -334,7 +334,7 @@ msgid "Max Pace (min/km)"
msgstr ""
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
#, fuzzy
msgid "Comments"
msgstr "<b>Comentaris</b>"
@@ -366,7 +366,7 @@ msgstr ""
msgid "<b>Import from CSV</b>"
msgstr "<b>Llista d'esports:</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr "Nova Entrada"
@@ -486,8 +486,8 @@ msgstr ""
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -723,17 +723,17 @@ msgstr "Nom"
msgid "M.E.T."
msgstr ""
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
#, fuzzy
msgid "Extra Weight"
msgstr "Pes"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr ""
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr ""
@@ -779,7 +779,7 @@ msgstr ""
msgid "Percentages based method"
msgstr ""
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr ""
@@ -793,8 +793,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "<b>Pulsacions:</b>"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -839,17 +839,17 @@ msgstr ""
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Distancia"
@@ -857,9 +857,9 @@ msgstr "Distancia"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Temps"
@@ -936,21 +936,21 @@ msgid "Profile"
msgstr "Perfil"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr ""
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr ""
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr ""
@@ -1111,7 +1111,7 @@ msgstr "Km"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "km/h"
@@ -1139,7 +1139,7 @@ msgstr "<b>Pulsacions:</b>"
msgid " <b>Title:</b>"
msgstr "<b>Temps:</b>"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
msgid "Show graph display options"
msgstr ""
@@ -1274,8 +1274,8 @@ msgstr "<b>Mes:</b>"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "ppm"
@@ -1350,7 +1350,7 @@ msgstr "<b>Mitjana pulsacions:</b>"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr ""
@@ -1361,8 +1361,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Distància:</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
#, fuzzy
msgid "m"
msgstr "Km"
@@ -1539,22 +1539,6 @@ msgstr ""
msgid "Wordpress Extension Upload Complete"
msgstr ""
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr ""
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr ""
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr ""
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr ""
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr ""
@@ -1571,54 +1555,70 @@ msgstr ""
msgid "GPSBabel"
msgstr ""
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr ""
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr ""
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr ""
+
+#: imports/file_gpxplus.py:43
msgid "GPS eXchange file"
msgstr ""
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr ""
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr ""
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr ""
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr ""
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr ""
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr ""
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr ""
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr ""
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
#, fuzzy
msgid "rpm"
msgstr "ppm"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
msgid "Heart Rate zone"
msgstr ""
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr ""
@@ -1627,10 +1627,6 @@ msgstr ""
msgid "min"
msgstr ""
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr ""
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr ""
@@ -1639,6 +1635,10 @@ msgstr ""
msgid "rest"
msgstr ""
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr ""
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr ""
@@ -1652,17 +1652,17 @@ msgstr "Editar Registre"
msgid "Show graph in classic view"
msgstr "Mostrar en vista clàssica"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1672,250 +1672,275 @@ msgstr ""
msgid "OK"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
msgid "Disabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
msgid "GPS device found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
#, fuzzy
msgid "File"
msgstr "_Arxiu "
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Start Time"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Duration"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
msgid "Got file: "
msgstr ""
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, python-format
msgid "Column %d"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr ""
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+#, fuzzy
+msgid "Max"
+msgstr "Maig"
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+#, fuzzy
+msgid "Average"
+msgstr "mitjana (km/h)"
+
+#: pytrainer/gui/windowrecord.py:97
+#, fuzzy
+msgid "Ascent"
+msgstr "<b>Pulsacions:</b>"
+
+#: pytrainer/gui/windowrecord.py:98
+#, fuzzy
+msgid "Descent"
+msgstr "<b>Distància:</b>"
+
+#: pytrainer/gui/windowrecord.py:204
+#, fuzzy
+msgid "GPX File"
+msgstr "_Arxiu "
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr "id"
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr ""
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
msgid "Waypoint"
msgstr ""
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Pes"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr ""
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
#, fuzzy
msgid "Records"
msgstr "Editar Registre"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
msgid "Total duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
#, fuzzy
msgid "Total distance"
msgstr "Distancia"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
msgid "Max speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
msgid "Max duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
#, fuzzy
msgid "Max distance"
msgstr "Distancia"
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
msgid "Lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr ""
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr ""
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr ""
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr ""
@@ -1928,150 +1953,146 @@ msgstr ""
msgid "d"
msgstr "id"
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
msgid "Axis Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr ""
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr ""
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr ""
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr ""
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr ""
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr ""
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr ""
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-#, fuzzy
-msgid "Average"
-msgstr "mitjana (km/h)"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr ""
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr ""
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
#, fuzzy
msgid "Edit Entry"
msgstr "Nova Entrada"
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
#, fuzzy
msgid "Delete Entry"
msgstr "Nova Entrada"
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
#, fuzzy
msgid "<b>Date</b>"
msgstr "<b>Data:</b>"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
#, fuzzy
msgid "<b>Weight</b>"
msgstr "<b>Pulsacions:</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
#, fuzzy
msgid "<b>Body Fat</b>"
msgstr "<b>Pulsacions:</b>"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
msgid "<b>Resting Heart Rate</b>"
msgstr ""
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
#, fuzzy
msgid "<b>Max Heart Rate</b>"
msgstr "<b>Mitjana pulsacions:</b>"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr ""
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr ""
@@ -2083,34 +2104,14 @@ msgstr ""
msgid "Female"
msgstr ""
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr ""
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr ""
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-#, fuzzy
-msgid "Max"
-msgstr "Maig"
-
-#: pytrainer/gui/windowrecord.py:97
-#, fuzzy
-msgid "Ascent"
-msgstr "<b>Pulsacions:</b>"
-
-#: pytrainer/gui/windowrecord.py:98
-#, fuzzy
-msgid "Descent"
-msgstr "<b>Distància:</b>"
-
-#: pytrainer/gui/windowrecord.py:204
-#, fuzzy
-msgid "GPX File"
-msgstr "_Arxiu "
-
#: pytrainer/lib/gpx.py:128
#, fuzzy
msgid "No Name"
@@ -2149,33 +2150,33 @@ msgstr ""
msgid ">2 Hours"
msgstr ""
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "km"
msgstr "km/h"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "mi"
msgstr "Km"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "min/mi"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "ft"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr ""
@@ -2285,35 +2286,45 @@ msgstr "mitjanes mensuals"
msgid "Monthly Calories"
msgstr "calories mensuals"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr ""
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
#, fuzzy
msgid "Weight Control"
msgstr "Pes"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr ""
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr ""
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr ""
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr ""
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
msgid "pytrainer can't import data from your gpx file"
msgstr ""
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr ""
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2342,16 +2353,6 @@ msgstr ""
msgid "Annual Calories"
msgstr "Calories"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr ""
-
#, fuzzy
#~ msgid ""
#~ "Distance\n"
diff --git a/locale/cs/LC_MESSAGES/pytrainer_cs.po b/locale/cs/LC_MESSAGES/pytrainer_cs.po
index a3dbd01..f48fc33 100644
--- a/locale/cs/LC_MESSAGES/pytrainer_cs.po
+++ b/locale/cs/LC_MESSAGES/pytrainer_cs.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vud 1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: 2007-10-07 22:59+0100\n"
"Last-Translator: ZOiD <sp.pok at seznam.cz>\n"
"Language-Team: Czech <sp.pok at seznam.cz>\n"
@@ -42,7 +42,7 @@ msgid "Active"
msgstr "Aktivní"
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr ""
@@ -251,8 +251,8 @@ msgid "<b>File delimiter</b>"
msgstr "<b>Čas:</b>"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Datum"
@@ -280,8 +280,8 @@ msgstr ""
msgid "<b>File Column</b>"
msgstr "<b>Komentáře</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Název"
@@ -312,10 +312,10 @@ msgid "Average Speed (km/h)"
msgstr "Průměrná rychlost (km/h)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Sport"
@@ -337,7 +337,7 @@ msgid "Max Pace (min/km)"
msgstr ""
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
#, fuzzy
msgid "Comments"
msgstr "<b>Komentáře</b>"
@@ -369,7 +369,7 @@ msgstr ""
msgid "<b>Import from CSV</b>"
msgstr "<b>Seznam sportů</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr "Nový údaj"
@@ -490,8 +490,8 @@ msgstr ""
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -727,17 +727,17 @@ msgstr "Jméno"
msgid "M.E.T."
msgstr ""
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
#, fuzzy
msgid "Extra Weight"
msgstr "Váha"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr ""
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr ""
@@ -783,7 +783,7 @@ msgstr ""
msgid "Percentages based method"
msgstr ""
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr ""
@@ -797,8 +797,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "<b>Puls:</b>"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -843,17 +843,17 @@ msgstr ""
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Vzdálenost"
@@ -861,9 +861,9 @@ msgstr "Vzdálenost"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Čas"
@@ -939,21 +939,21 @@ msgid "Profile"
msgstr "Profil"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr ""
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr ""
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr ""
@@ -1113,7 +1113,7 @@ msgstr "km"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "km/h"
@@ -1140,7 +1140,7 @@ msgstr "<b>Puls:</b>"
msgid " <b>Title:</b>"
msgstr " <b>Název:</b>"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
#, fuzzy
msgid "Show graph display options"
msgstr "Zobrazit graf v klasickém zobrazení"
@@ -1276,8 +1276,8 @@ msgstr " <b>Měsíc:</b>"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "bpm"
@@ -1352,7 +1352,7 @@ msgstr "<b>Průměrný puls:</b>"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr ""
@@ -1363,8 +1363,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Název:</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
#, fuzzy
msgid "m"
msgstr "km"
@@ -1538,22 +1538,6 @@ msgstr ""
msgid "Wordpress Extension Upload Complete"
msgstr ""
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr ""
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr ""
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr ""
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr ""
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr ""
@@ -1570,55 +1554,71 @@ msgstr ""
msgid "GPSBabel"
msgstr ""
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr ""
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr ""
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr ""
+
+#: imports/file_gpxplus.py:43
#, fuzzy
msgid "GPS eXchange file"
msgstr "Soubor GPX"
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr ""
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr ""
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr ""
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr ""
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr ""
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr ""
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr ""
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr ""
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
#, fuzzy
msgid "rpm"
msgstr "bpm"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
msgid "Heart Rate zone"
msgstr ""
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr ""
@@ -1627,10 +1627,6 @@ msgstr ""
msgid "min"
msgstr ""
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr ""
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr ""
@@ -1639,6 +1635,10 @@ msgstr ""
msgid "rest"
msgstr ""
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr ""
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr ""
@@ -1651,17 +1651,17 @@ msgstr "Upravit záznam"
msgid "Show graph in classic view"
msgstr "Zobrazit graf v klasickém zobrazení"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1671,252 +1671,276 @@ msgstr "nastavení %s"
msgid "OK"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
msgid "Disabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
msgid "GPS device found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
#, fuzzy
msgid "File"
msgstr "_Soubor"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
#, fuzzy
msgid "Activities"
msgstr "Aktivní"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Start Time"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Duration"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr "Ok"
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
#, fuzzy
msgid "Got file: "
msgstr "Soubor GPX"
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, fuzzy, python-format
msgid "Column %d"
msgstr "Sloupce"
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr ""
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+#, fuzzy
+msgid "Max"
+msgstr "Květen"
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+msgid "Average"
+msgstr "Průměrná rychlost"
+
+#: pytrainer/gui/windowrecord.py:97
+#, fuzzy
+msgid "Ascent"
+msgstr "Výška (m)"
+
+#: pytrainer/gui/windowrecord.py:98
+#, fuzzy
+msgid "Descent"
+msgstr "<b>Vzdálenost:</b>"
+
+#: pytrainer/gui/windowrecord.py:204
+#, fuzzy
+msgid "GPX File"
+msgstr "Soubor GPX"
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr ""
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr ""
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
msgid "Waypoint"
msgstr "Waypoint"
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Váha"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr ""
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
#, fuzzy
msgid "Records"
msgstr "Záznam"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
msgid "Total duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
#, fuzzy
msgid "Total distance"
msgstr "Vzdálenost"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
msgid "Max speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
msgid "Max duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
#, fuzzy
msgid "Max distance"
msgstr "Vzdálenost"
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
msgid "Lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr ""
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr ""
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr ""
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr ""
@@ -1928,149 +1952,146 @@ msgstr ""
msgid "d"
msgstr ""
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
msgid "Axis Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr ""
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr ""
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr ""
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr ""
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr ""
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr ""
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr "Puls"
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-msgid "Average"
-msgstr "Průměrná rychlost"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr ""
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr ""
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
#, fuzzy
msgid "Edit Entry"
msgstr "Nový údaj"
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
#, fuzzy
msgid "Delete Entry"
msgstr "Nový údaj"
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
#, fuzzy
msgid "<b>Date</b>"
msgstr " <b>Datum:</b>"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
#, fuzzy
msgid "<b>Weight</b>"
msgstr "<b>Puls:</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
#, fuzzy
msgid "<b>Body Fat</b>"
msgstr "<b>Puls:</b>"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
msgid "<b>Resting Heart Rate</b>"
msgstr ""
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
#, fuzzy
msgid "<b>Max Heart Rate</b>"
msgstr "<b>Průměrný puls:</b>"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr ""
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr ""
@@ -2082,34 +2103,14 @@ msgstr ""
msgid "Female"
msgstr ""
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr ""
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr ""
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-#, fuzzy
-msgid "Max"
-msgstr "Květen"
-
-#: pytrainer/gui/windowrecord.py:97
-#, fuzzy
-msgid "Ascent"
-msgstr "Výška (m)"
-
-#: pytrainer/gui/windowrecord.py:98
-#, fuzzy
-msgid "Descent"
-msgstr "<b>Vzdálenost:</b>"
-
-#: pytrainer/gui/windowrecord.py:204
-#, fuzzy
-msgid "GPX File"
-msgstr "Soubor GPX"
-
#: pytrainer/lib/gpx.py:128
#, fuzzy
msgid "No Name"
@@ -2148,33 +2149,33 @@ msgstr ""
msgid ">2 Hours"
msgstr ""
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "km"
msgstr "km/h"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "mi"
msgstr "km"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "min/mi"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "ft"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr ""
@@ -2284,35 +2285,46 @@ msgstr "Průměrné rychlosti v jednotlivých měsících"
msgid "Monthly Calories"
msgstr "Kalorie v jednotlivých měsících"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr ""
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
#, fuzzy
msgid "Weight Control"
msgstr "Váha"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr ""
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr ""
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr ""
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+"Soubor gpx vypadá na záznam z několika dnů. Možná bude potřeba jej upravit."
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr ""
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
msgid "pytrainer can't import data from your gpx file"
msgstr ""
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr ""
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2341,17 +2353,6 @@ msgstr ""
msgid "Annual Calories"
msgstr "Kalorie"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-"Soubor gpx vypadá na záznam z několika dnů. Možná bude potřeba jej upravit."
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr ""
-
#~ msgid "Calendar"
#~ msgstr "Kalendář"
diff --git a/locale/da/LC_MESSAGES/pytrainer_da.po b/locale/da/LC_MESSAGES/pytrainer_da.po
index 20bd422..e62c044 100644
--- a/locale/da/LC_MESSAGES/pytrainer_da.po
+++ b/locale/da/LC_MESSAGES/pytrainer_da.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pytrainer_dk\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: 2007-12-20 21:02+0100\n"
"Last-Translator: Lars Olesen <olesen.lars at gmail.com>\n"
"Language-Team: Dansk\n"
@@ -42,7 +42,7 @@ msgid "Active"
msgstr "Aktiv"
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr ""
@@ -251,8 +251,8 @@ msgid "<b>File delimiter</b>"
msgstr "Tid"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Dato"
@@ -280,8 +280,8 @@ msgstr ""
msgid "<b>File Column</b>"
msgstr "<b>Kommentarer</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Titel"
@@ -312,10 +312,10 @@ msgid "Average Speed (km/h)"
msgstr "Gennemsnit (km/t)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Sport"
@@ -337,7 +337,7 @@ msgid "Max Pace (min/km)"
msgstr ""
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
#, fuzzy
msgid "Comments"
msgstr "<b>Kommentarer</b>"
@@ -369,7 +369,7 @@ msgstr ""
msgid "<b>Import from CSV</b>"
msgstr "<b>Liste over sportsgrene</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr "Nyt data sæt"
@@ -490,8 +490,8 @@ msgstr ""
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -728,17 +728,17 @@ msgstr "Navn"
msgid "M.E.T."
msgstr ""
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
#, fuzzy
msgid "Extra Weight"
msgstr "Vægt"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr ""
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr ""
@@ -784,7 +784,7 @@ msgstr ""
msgid "Percentages based method"
msgstr ""
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr ""
@@ -798,8 +798,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "Hjerteslag"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -844,17 +844,17 @@ msgstr ""
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Distance"
@@ -862,9 +862,9 @@ msgstr "Distance"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Tid"
@@ -941,21 +941,21 @@ msgid "Profile"
msgstr "Profil"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr ""
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr ""
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr ""
@@ -1115,7 +1115,7 @@ msgstr "Km"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "km/t"
@@ -1142,7 +1142,7 @@ msgstr "<b>Status:</b>"
msgid " <b>Title:</b>"
msgstr "Titel"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
#, fuzzy
msgid "Show graph display options"
msgstr "Vis graf i klassisk billede"
@@ -1279,8 +1279,8 @@ msgstr "Måned"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "puls"
@@ -1355,7 +1355,7 @@ msgstr "Hjerteslag"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr ""
@@ -1366,8 +1366,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Titel:</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
#, fuzzy
msgid "m"
msgstr "Km"
@@ -1541,22 +1541,6 @@ msgstr ""
msgid "Wordpress Extension Upload Complete"
msgstr ""
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr ""
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr ""
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr ""
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr ""
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr ""
@@ -1573,55 +1557,71 @@ msgstr ""
msgid "GPSBabel"
msgstr ""
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr ""
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr ""
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr ""
+
+#: imports/file_gpxplus.py:43
#, fuzzy
msgid "GPS eXchange file"
msgstr "GPX fil"
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr ""
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr ""
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr ""
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr ""
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr ""
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr ""
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr ""
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr ""
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
#, fuzzy
msgid "rpm"
msgstr "puls"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
msgid "Heart Rate zone"
msgstr ""
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr ""
@@ -1630,10 +1630,6 @@ msgstr ""
msgid "min"
msgstr ""
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr ""
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr "Track Navn"
@@ -1642,6 +1638,10 @@ msgstr "Track Navn"
msgid "rest"
msgstr ""
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr ""
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr ""
@@ -1654,17 +1654,17 @@ msgstr "Rediger data sæt"
msgid "Show graph in classic view"
msgstr "Vis graf i klassisk billede"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1674,252 +1674,276 @@ msgstr "%s settings"
msgid "OK"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
msgid "Disabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
msgid "GPS device found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
#, fuzzy
msgid "File"
msgstr "Fil"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
#, fuzzy
msgid "Activities"
msgstr "Aktiv"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Start Time"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Duration"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr "Ok"
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
#, fuzzy
msgid "Got file: "
msgstr "GPX fil"
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, fuzzy, python-format
msgid "Column %d"
msgstr "Kolonner"
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr ""
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+#, fuzzy
+msgid "Max"
+msgstr "Maj"
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+msgid "Average"
+msgstr "Gennemsnit"
+
+#: pytrainer/gui/windowrecord.py:97
+#, fuzzy
+msgid "Ascent"
+msgstr "Højde (m)"
+
+#: pytrainer/gui/windowrecord.py:98
+#, fuzzy
+msgid "Descent"
+msgstr "Distance"
+
+#: pytrainer/gui/windowrecord.py:204
+#, fuzzy
+msgid "GPX File"
+msgstr "GPX fil"
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr "id"
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr ""
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
msgid "Waypoint"
msgstr "Waypoint"
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Vægt"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr ""
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
#, fuzzy
msgid "Records"
msgstr "Data sæt"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
msgid "Total duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
#, fuzzy
msgid "Total distance"
msgstr "Distance"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
msgid "Max speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
msgid "Max duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
#, fuzzy
msgid "Max distance"
msgstr "Distance"
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
msgid "Lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr ""
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr ""
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr ""
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr ""
@@ -1932,149 +1956,146 @@ msgstr ""
msgid "d"
msgstr "id"
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
msgid "Axis Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr ""
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr ""
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr ""
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr ""
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr ""
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr ""
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr "Slag"
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-msgid "Average"
-msgstr "Gennemsnit"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr ""
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr ""
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
#, fuzzy
msgid "Edit Entry"
msgstr "Nyt data sæt"
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
#, fuzzy
msgid "Delete Entry"
msgstr "Nyt data sæt"
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
#, fuzzy
msgid "<b>Date</b>"
msgstr "Dato"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
#, fuzzy
msgid "<b>Weight</b>"
msgstr "<b>Titel:</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
#, fuzzy
msgid "<b>Body Fat</b>"
msgstr "Dato"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
msgid "<b>Resting Heart Rate</b>"
msgstr ""
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
#, fuzzy
msgid "<b>Max Heart Rate</b>"
msgstr "Hjerteslag"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr ""
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr ""
@@ -2086,34 +2107,14 @@ msgstr ""
msgid "Female"
msgstr ""
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr ""
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr ""
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-#, fuzzy
-msgid "Max"
-msgstr "Maj"
-
-#: pytrainer/gui/windowrecord.py:97
-#, fuzzy
-msgid "Ascent"
-msgstr "Højde (m)"
-
-#: pytrainer/gui/windowrecord.py:98
-#, fuzzy
-msgid "Descent"
-msgstr "Distance"
-
-#: pytrainer/gui/windowrecord.py:204
-#, fuzzy
-msgid "GPX File"
-msgstr "GPX fil"
-
#: pytrainer/lib/gpx.py:128
#, fuzzy
msgid "No Name"
@@ -2152,33 +2153,33 @@ msgstr ""
msgid ">2 Hours"
msgstr ""
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "km"
msgstr "km/t"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "mi"
msgstr "Km"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "min/mi"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "ft"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr ""
@@ -2288,35 +2289,47 @@ msgstr "Månedlige gennemsnit"
msgid "Monthly Calories"
msgstr "Kalorier pr. måned"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr ""
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
#, fuzzy
msgid "Weight Control"
msgstr "Vægt"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr ""
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr ""
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr ""
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+"gpx filen ser ud til at indeholde data sæt for flere dage. Måske bliver du "
+"nødt til at redigere din gpx fil."
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr ""
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
msgid "pytrainer can't import data from your gpx file"
msgstr ""
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr ""
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2345,18 +2358,6 @@ msgstr ""
msgid "Annual Calories"
msgstr "Kalorier"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-"gpx filen ser ud til at indeholde data sæt for flere dage. Måske bliver du "
-"nødt til at redigere din gpx fil."
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr ""
-
#~ msgid "Calendar"
#~ msgstr "Kalender"
diff --git a/locale/de/LC_MESSAGES/pytrainer_de.po b/locale/de/LC_MESSAGES/pytrainer_de.po
index 1d937fe..2d5458d 100644
--- a/locale/de/LC_MESSAGES/pytrainer_de.po
+++ b/locale/de/LC_MESSAGES/pytrainer_de.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pytrainer 1.10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: 2013-03-28 21:17+0100\n"
"Last-Translator: Wilfried Goesgens <dothebart at citadel.org>\n"
"Language-Team: American English <kde-i18n-doc at kde.org>\n"
@@ -41,7 +41,7 @@ msgid "Active"
msgstr "Aktiv"
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr "Notizen"
@@ -241,8 +241,8 @@ msgid "<b>File delimiter</b>"
msgstr "<b>Trennzeichen</b>"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Datum"
@@ -269,8 +269,8 @@ msgstr "<b>PyTrainer-Feld</b>"
msgid "<b>File Column</b>"
msgstr "<b>Spalte in Datei</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Titel"
@@ -297,10 +297,10 @@ msgid "Average Speed (km/h)"
msgstr "Durchschnittsgeschwindigkeit (km/h)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Sportart"
@@ -321,7 +321,7 @@ msgid "Max Pace (min/km)"
msgstr "Höchsttempo (min/km)"
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
msgid "Comments"
msgstr "Kommentare"
@@ -356,7 +356,7 @@ msgstr "Daten importieren"
msgid "<b>Import from CSV</b>"
msgstr "<b>CSV-Datei importieren</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr "Neuer Eintrag"
@@ -464,8 +464,8 @@ msgstr "Herzfrequenz:"
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -689,16 +689,16 @@ msgstr "Name"
msgid "M.E.T."
msgstr "M.E.T.:"
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
msgid "Extra Weight"
msgstr "Zusätzliches Gewicht:"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr "Höchsttempo:"
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr "Farbe"
@@ -746,7 +746,7 @@ msgstr ""
msgid "Percentages based method"
msgstr "Prozentbasierte Methode"
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr "Karvonen-Methode"
@@ -759,8 +759,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "<b>Herzfrequenzzonen</b>"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -813,17 +813,17 @@ msgstr "Startparameter"
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Strecke"
@@ -831,9 +831,9 @@ msgstr "Strecke"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Zeit"
@@ -911,21 +911,21 @@ msgid "Profile"
msgstr "Abschnittsprofil"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr "Geschwindigkeit"
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr "Tempo"
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr "Trittfrequenz"
@@ -1072,7 +1072,7 @@ msgstr "km"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "km/h"
@@ -1096,7 +1096,7 @@ msgstr "<b>Runden</b>"
msgid " <b>Title:</b>"
msgstr "<b>Titel:</b>"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
msgid "Show graph display options"
msgstr "Optionen zur Graphendarstellung anzeigen"
@@ -1223,8 +1223,8 @@ msgstr "<b>HF-Zone1:</b>"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "bpm"
@@ -1289,7 +1289,7 @@ msgstr "<b>Durchschn. Schläge:</b>"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr "min/km"
@@ -1299,8 +1299,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Gesamter An-/Abstieg:</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
msgid "m"
msgstr "m"
@@ -1466,22 +1466,6 @@ msgstr "Worpress-Erweiterung arbeitet"
msgid "Wordpress Extension Upload Complete"
msgstr "Wordpress-Erweiterung Hochladen abgeschlossen"
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr "Garmin Trainings-Center Datenbankdatei Version 1"
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr "Garmin Trainings-Center Datenbankdatei Version 2"
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr "Garmintools Dump-Datei"
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr "Nokia Export - GPS eXchange-Datei"
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr "Geodistanz kml-Datei Version 2.0"
@@ -1498,53 +1482,69 @@ msgstr "Garmintools"
msgid "GPSBabel"
msgstr "GPSBabel"
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr "Garmin Trainings-Center Datenbankdatei Version 1"
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr "Garmin Trainings-Center Datenbankdatei Version 2"
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr "Garmintools Dump-Datei"
+
+#: imports/file_gpxplus.py:43
msgid "GPS eXchange file"
msgstr "GPS-eXchange-Datei"
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr "Nokia Export - GPS eXchange-Datei"
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr "Tempo pro Runde"
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr "Zeit (Sekunden)"
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr "Geschwindigkeit pro Runde"
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr "Höhenlage"
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr "Berichtigte Höhenlage"
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr "Herzfrequenz (% des Maximums)"
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr "%"
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
msgid "rpm"
msgstr "u/min"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
msgid "Heart Rate zone"
msgstr "Herzfrequenz-Zone"
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr "h"
@@ -1553,10 +1553,6 @@ msgstr "h"
msgid "min"
msgstr "min"
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr "Athletendaten"
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr "Name der Strecke"
@@ -1565,6 +1561,10 @@ msgstr "Name der Strecke"
msgid "rest"
msgstr "Ruhe"
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr "Athletendaten"
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr "Verwendung"
@@ -1577,17 +1577,17 @@ msgstr "Eintrag bearbeiten"
msgid "Show graph in classic view"
msgstr "Graphen in klassischer Ansicht zeigen"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr "ausschalten"
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr "einschalten"
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1597,248 +1597,268 @@ msgstr "%s Einstellungen"
msgid "OK"
msgstr "OK"
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr "Keine Datei ausgewählt"
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr "Konfigurieren"
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
msgid "Disabled"
msgstr "abgeschaltet"
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr "eingeschaltet"
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr "Suche nach Werkzeugen"
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
msgid "GPS device found"
msgstr "GPS-Gerät gefunden"
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr "GPS-Gerät <b>nicht</b> gefunden"
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr "Dieses Hilfsprogramm wurde auf dem System nicht gefunden"
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr "Homepage"
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr "Suche nach Typ für: "
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "File"
msgstr "Datei"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr "Typ"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Activities"
msgstr "Aktivitäten"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Start Time"
msgstr "Startzeit"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Duration"
msgstr "Dauer"
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr "In Datenbank importiert"
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr "OK"
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr "Speicheroptionen"
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr "Optionen gespeichert"
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr "Eine Aktivität wird importiert"
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr "%d Aktivitäten werden importiert"
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr "Keine Aktivität wurde importiert"
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr "Eine Aktivität wurde importiert"
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr "%d Aktivitäten importiert"
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr "Die ausgewählte Aktivität war schon in der Datenbank"
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr "%d ausgewählte Aktivitäten waren schon in der Datenbank"
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr ""
"Wählen Sie eine (oder mehrere) Datei(en), um daraus Aktivitäten zu "
"importieren"
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr "Datei des Typs %s gefunden"
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr "In der Datenbank gefunden"
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr "Datei %s hat einen unbekannten oder nicht unterstützten Dateityp"
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
msgid "Got file: "
msgstr "Habe Datei: "
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, python-format
msgid "Column %d"
msgstr "Spalte %d"
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr "FEHLER: zumindest eine Datumsspalte muss definiert sein"
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr "Import beendet. %d Zeilen bearbeitet"
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+msgid "Max"
+msgstr "Maximale"
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+msgid "Average"
+msgstr "Durchschnitt"
+
+#: pytrainer/gui/windowrecord.py:97
+msgid "Ascent"
+msgstr "Anstieg"
+
+#: pytrainer/gui/windowrecord.py:98
+msgid "Descent"
+msgstr "Abstie:"
+
+#: pytrainer/gui/windowrecord.py:204
+msgid "GPX File"
+msgstr "GPX-Datei"
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr "ID"
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr "Start"
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr "⌀ HF"
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr "⌀ Geschwindigkeit"
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
msgid "Waypoint"
msgstr "Wegpunkt"
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Gewicht"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr "Körperfett %"
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr "Ruhe-Herzfrequenz"
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr "Höchste Herzfrequenz"
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
msgid "Records"
msgstr "Einträge"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
msgid "Total duration"
msgstr "Gesamtdauer"
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
msgid "Total distance"
msgstr "Gesamtstrecke"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr "Durchschnittsgeschwindigkeit"
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
msgid "Max speed"
msgstr "Höchste Geschwindigkeit"
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr "Durchschnittliche Herzfrequenz"
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
msgid "Max duration"
msgstr "Höchste Dauer"
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
msgid "Max distance"
msgstr "Längste Strecke"
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
msgid "Lap"
msgstr "Runde"
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr "Auslöser"
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr "Durchschnittstempo"
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr "Höchsttempo"
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr "Intensität"
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr "Rennen"
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr "Rang"
@@ -1850,143 +1870,140 @@ msgstr ""
msgid "d"
msgstr "d"
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr "Auf der X-Achse zeigen"
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr "Auf der Y1-Achse zeigen"
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr "Auf der Y2-Achse zeigen"
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
msgid "Axis Limits"
msgstr "Achsenbegrenzungen"
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr "Runden"
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr "Gitternetz links der Achse"
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr "Gitternetz rechts der Achse"
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr "X-Achsen-Gitternetz"
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr "Begrenzungen zurücksetzen"
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr "Begrenzungen setzen"
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr "Prozentuale Methode"
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr "800 m"
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr "1500 m"
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr "5 km"
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr "7 km"
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr "10 km"
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr "Halbmarathon"
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr "Marathon"
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr "100 km"
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr "Schläge"
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-msgid "Average"
-msgstr "Durchschnitt"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr "Graphenanzeige-Optionen verstecken"
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr "Runde"
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr "s"
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
msgid "Edit Entry"
msgstr "Eintrag bearbeiten"
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
msgid "Delete Entry"
msgstr "Eintrag löschen"
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr "Athleteneintrag erstellen"
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr "Athleteneintrag bearbeiten"
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
msgid "<b>Date</b>"
msgstr "<b>Datum</b>"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
msgid "<b>Weight</b>"
msgstr "<b>Gewicht</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
msgid "<b>Body Fat</b>"
msgstr "<b>Körperfett</b>"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
msgid "<b>Resting Heart Rate</b>"
msgstr "<b>Ruhe-Herzfrequenz</b>"
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
msgid "<b>Max Heart Rate</b>"
msgstr "<b>Höchste Herzfrequenz:</b>"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr "Diesen Datenbankeintrag löschen?"
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr "Sind Sie sicher?"
@@ -1998,30 +2015,14 @@ msgstr "Männlich"
msgid "Female"
msgstr "Weiblich"
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr "MET"
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr "Fehler beim Erstellen der Sportart"
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-msgid "Max"
-msgstr "Maximale"
-
-#: pytrainer/gui/windowrecord.py:97
-msgid "Ascent"
-msgstr "Anstieg"
-
-#: pytrainer/gui/windowrecord.py:98
-msgid "Descent"
-msgstr "Abstie:"
-
-#: pytrainer/gui/windowrecord.py:204
-msgid "GPX File"
-msgstr "GPX-Datei"
-
#: pytrainer/lib/gpx.py:128
msgid "No Name"
msgstr "Kein Name"
@@ -2058,31 +2059,31 @@ msgstr "ein bis zwei Stunden"
msgid ">2 Hours"
msgstr "über zwei Stunden"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km"
msgstr "km"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mi"
msgstr "min"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr "m/h"
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "min/mi"
msgstr "min/Meile"
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "ft"
msgstr "Fuß"
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr "kg"
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr "lb"
@@ -2177,34 +2178,46 @@ msgstr "Monats-Durchschnittsgeschwindigkeit"
msgid "Monthly Calories"
msgstr "Monatliche Kalorien"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr "Moderate Aktivität"
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
msgid "Weight Control"
msgstr "Gewichtskontrolle"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr "Sauerstoffabhängig"
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr "Sauerstoffunabhängig"
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr "VO2 MAX"
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+"Diese GPX-Datei scheint ein Eintrag über mehrere Tage zu sein. Vielleicht "
+"werden Sie Ihre GPX-Datei bearbeiten müssen."
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr "Dateien vor dem Import bearbeiten"
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
msgid "pytrainer can't import data from your gpx file"
msgstr "pytrainer kann keine Daten aus Ihrer GPX-Datei importieren"
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr "Diesen Wegpunkt löschen?"
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2231,18 +2244,6 @@ msgstr "Jährliche Durchschnittsgeschwindigkeit"
msgid "Annual Calories"
msgstr "Jährliche Kalorien"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-"Diese GPX-Datei scheint ein Eintrag über mehrere Tage zu sein. Vielleicht "
-"werden Sie Ihre GPX-Datei bearbeiten müssen."
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr "Diesen Wegpunkt löschen?"
-
#~ msgid "Calendar"
#~ msgstr "Kalender"
diff --git a/locale/es/LC_MESSAGES/pytrainer_es.po b/locale/es/LC_MESSAGES/pytrainer_es.po
index 3b6c4b0..916077c 100644
--- a/locale/es/LC_MESSAGES/pytrainer_es.po
+++ b/locale/es/LC_MESSAGES/pytrainer_es.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pytrainer 1.10\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: 2013-03-12 16:31+0100\n"
"Last-Translator: David Garcia Granda <dgranda at gmail.com>\n"
"Language-Team: Spanish <pytrainer-devel at lists.sourceforge.net>\n"
@@ -39,7 +39,7 @@ msgid "Active"
msgstr "Habilitado"
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr "Notas"
@@ -239,8 +239,8 @@ msgid "<b>File delimiter</b>"
msgstr "<b>Delimitador en el archivo</b>"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Fecha"
@@ -267,8 +267,8 @@ msgstr "<b>Campo en pytrainer</b>"
msgid "<b>File Column</b>"
msgstr "<b>Columna en el archivo</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Título"
@@ -295,10 +295,10 @@ msgid "Average Speed (km/h)"
msgstr "Velocidad media (km/h)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Deporte"
@@ -319,7 +319,7 @@ msgid "Max Pace (min/km)"
msgstr "Ritmo máximo(min/km)"
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
msgid "Comments"
msgstr "Comentarios"
@@ -354,7 +354,7 @@ msgstr "Importar datos"
msgid "<b>Import from CSV</b>"
msgstr "<b>Importar desde fichero CSV</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr "Nueva entrada"
@@ -462,8 +462,8 @@ msgstr "Pulsaciones:"
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -684,16 +684,16 @@ msgstr "Nombre"
msgid "M.E.T."
msgstr "M.E.T."
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
msgid "Extra Weight"
msgstr "Peso extra"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr "Ritmo más rápido"
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr "Color"
@@ -741,7 +741,7 @@ msgstr ""
msgid "Percentages based method"
msgstr "Basado en porcentajes"
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr "Karvonen"
@@ -754,8 +754,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "<b>Zonas de frecuencia cardiaca</b>"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -806,17 +806,17 @@ msgstr "Configuración inicio"
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Distancia"
@@ -824,9 +824,9 @@ msgstr "Distancia"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Tiempo"
@@ -904,21 +904,21 @@ msgid "Profile"
msgstr "Perfil de Etapa"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr "Velocidad"
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr "Ritmo"
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr "Cadence"
@@ -1065,7 +1065,7 @@ msgstr "km"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "km/h"
@@ -1089,7 +1089,7 @@ msgstr "<b>Vueltas</b>"
msgid " <b>Title:</b>"
msgstr "<b>Título:</b>"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
msgid "Show graph display options"
msgstr "Mostrar opciones del gráfico"
@@ -1216,8 +1216,8 @@ msgstr "<b>Recuperación:</b>"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "ppm"
@@ -1281,7 +1281,7 @@ msgstr "<b>Media pulsaciones:</b>"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr "min/km"
@@ -1291,8 +1291,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Desnivel pos/neg:</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
msgid "m"
msgstr "m"
@@ -1458,22 +1458,6 @@ msgstr "Procesando extensión Wordpress"
msgid "Wordpress Extension Upload Complete"
msgstr "Envío completo a Wordpress"
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr "Versión 1 del fichero Garmin training center database"
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr "Versión 2 del fichero Garmin training center database"
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr "Fichero de volcado de datos de Garmintools"
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr "Nokia Export - Fichero de intercambio GPS"
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr "Fichero kml v2.0"
@@ -1490,53 +1474,69 @@ msgstr "Garmintools"
msgid "GPSBabel"
msgstr "GPSBabel"
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr "Versión 1 del fichero Garmin training center database"
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr "Versión 2 del fichero Garmin training center database"
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr "Fichero de volcado de datos de Garmintools"
+
+#: imports/file_gpxplus.py:43
msgid "GPS eXchange file"
msgstr "Fichero de intercambio GPS"
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr "Nokia Export - Fichero de intercambio GPS"
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr "Ritmo por vuelta"
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr "Tiempo (segundos)"
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr "Velocidad por vuelta"
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr "Altura"
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr "Altura corregida"
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr "Frecuencia cardíaca (% del máx.)"
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr "%"
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
msgid "rpm"
msgstr "rpm"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
msgid "Heart Rate zone"
msgstr "Zona frecuencia cardiaca"
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr "h"
@@ -1545,10 +1545,6 @@ msgstr "h"
msgid "min"
msgstr "min"
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr "Datos del atleta"
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr "Nombre de la ruta"
@@ -1557,6 +1553,10 @@ msgstr "Nombre de la ruta"
msgid "rest"
msgstr "descanso"
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr "Datos del atleta"
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr "Uso"
@@ -1569,17 +1569,17 @@ msgstr "Editar entrada"
msgid "Show graph in classic view"
msgstr "Mostrar gráfico en vista clásica"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr "Deshabilitar"
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr "Habilitar"
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1589,246 +1589,266 @@ msgstr "%s opciones"
msgid "OK"
msgstr "Ok"
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr "Ningún fichero seleccionado"
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr "Configurar"
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
msgid "Disabled"
msgstr "Deshabilitado"
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr "Activo"
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr "Comprobando herramientas"
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
msgid "GPS device found"
msgstr "Dispositivos GPS encontrado"
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr "Dispositivo GPS <b>no</b> encontrado"
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr "No se ha encontrado esta herramienta en el sistema"
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr "Página de inicio"
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr "Comprobando tipo de fichero: "
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "File"
msgstr "Archivo"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr "Tipo"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Activities"
msgstr "Actividades"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Start Time"
msgstr "Hora de comienzo"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Duration"
msgstr "Duración"
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr "Importado a base de datos"
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr "Ok"
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr "Guardar configuración"
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr "Configuración guardada"
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr "Importando una actividad"
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr "Importando %d actividades"
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr "Ninguna actividad ha sido importada"
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr "Una actividad importada"
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr "Importadas %d actividades"
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr " La actividad seleccionada ya estaba presente en base de datos"
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr "%d actividades seleccionadas ya estaban presentes en base de datos"
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr "Seleccione fichero/s desde el/los que importar actividades"
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr "Tipo de fichero encontrado: %s"
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr "Encontrado en base de datos"
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr "Fichero %s desconocido o no compatible"
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
msgid "Got file: "
msgstr "Fichero:"
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, python-format
msgid "Column %d"
msgstr "Columna %d"
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr "Error: se debe definir al menos la columna de la fecha"
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr "Importación completa. %d filas procesadas"
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+msgid "Max"
+msgstr "Máx"
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+msgid "Average"
+msgstr "Media"
+
+#: pytrainer/gui/windowrecord.py:97
+msgid "Ascent"
+msgstr "Ascenso"
+
+#: pytrainer/gui/windowrecord.py:98
+msgid "Descent"
+msgstr "Descenso"
+
+#: pytrainer/gui/windowrecord.py:204
+msgid "GPX File"
+msgstr "Archivo GPX"
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr "id"
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr "Comienzo"
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr "⌀ FC"
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr "⌀ Velocidad"
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
msgid "Waypoint"
msgstr "Waypoint"
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Peso"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr "Grasa corporal %"
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr "FC en reposo"
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr "FC max"
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
msgid "Records"
msgstr "Registros"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
msgid "Total duration"
msgstr "Duración"
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
msgid "Total distance"
msgstr "Distancia"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr "Velocidad"
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
msgid "Max speed"
msgstr "Velocidad Máx."
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr "FC med"
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
msgid "Max duration"
msgstr "Duración"
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
msgid "Max distance"
msgstr "Distancia"
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
msgid "Lap"
msgstr "Vuelta"
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr "Activador"
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr "Ritmo"
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr "Pico ritmo"
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr "Intensidad"
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr "Carrera"
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr "Posición"
@@ -1840,143 +1860,140 @@ msgstr ""
msgid "d"
msgstr "d"
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr "Mostrar en eje X"
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr "Mostrar en eje Y1"
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr "Mostrar en eje Y2"
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
msgid "Axis Limits"
msgstr "Límites de ejes"
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr "Vueltas"
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr "Cuadrícula eje izquierdo"
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr "Cuadrícula eje derecho"
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr "Cuadrícula eje X"
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr "Borrar límites"
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr "Establecer límites"
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr "basado en porcentajes"
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr "800 m"
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr "1500 m"
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr "5 km"
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr "7 km"
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr "10 km"
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr "Media maratón"
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr "Maratón"
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr "100 km"
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr "Pulsaciones"
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-msgid "Average"
-msgstr "Media"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr "Ocultar configuración de visualización gráfica"
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr "vuelta"
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr "s"
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
msgid "Edit Entry"
msgstr "Editar entrada"
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
msgid "Delete Entry"
msgstr "Borrar entrada"
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr "Crear entrada de atleta"
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr "Editar atleta"
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
msgid "<b>Date</b>"
msgstr "<b>Fecha</b>"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
msgid "<b>Weight</b>"
msgstr "<b>Peso</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
msgid "<b>Body Fat</b>"
msgstr "<b>Grasa corporal</b>"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
msgid "<b>Resting Heart Rate</b>"
msgstr "<b>Pulsaciones en reposo</b>"
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
msgid "<b>Max Heart Rate</b>"
msgstr "<b>Pulsaciones máx</b>"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr "¿Borrar esta entrada de la base de datos?"
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr "¿Está seguro?"
@@ -1988,30 +2005,14 @@ msgstr "Varón"
msgid "Female"
msgstr "Mujer"
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr "M.E.T."
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr "Fallo en la creación de deporte"
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-msgid "Max"
-msgstr "Máx"
-
-#: pytrainer/gui/windowrecord.py:97
-msgid "Ascent"
-msgstr "Ascenso"
-
-#: pytrainer/gui/windowrecord.py:98
-msgid "Descent"
-msgstr "Descenso"
-
-#: pytrainer/gui/windowrecord.py:204
-msgid "GPX File"
-msgstr "Archivo GPX"
-
#: pytrainer/lib/gpx.py:128
msgid "No Name"
msgstr "Sin nombre"
@@ -2048,31 +2049,31 @@ msgstr "De 1 a 2 horas"
msgid ">2 Hours"
msgstr "> 2 horas"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km"
msgstr "km"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mi"
msgstr "milla"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr "mph"
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "min/mi"
msgstr "min/milla"
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "ft"
msgstr "pie"
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr "kg"
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr "lb"
@@ -2167,34 +2168,46 @@ msgstr "Medias mensuales"
msgid "Monthly Calories"
msgstr "Calorías mensuales"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr "Actividad moderada"
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
msgid "Weight Control"
msgstr "Control de peso"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr "Aeróbico"
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr "Anaeróbico"
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr "VO2 máximo"
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+"Parece que el archivo gpx contiene actividades de varios días. Probablemente "
+"necesites editarlo"
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr "Modificar detalles antes de importar"
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
msgid "pytrainer can't import data from your gpx file"
msgstr "pytrainer no puede importar datos de tu fichero gpx"
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr "¿Borrar este waypoint?"
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2221,18 +2234,6 @@ msgstr "Velocidad media anual"
msgid "Annual Calories"
msgstr "Calorías (kcal) en el año"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-"Parece que el archivo gpx contiene actividades de varios días. Probablemente "
-"necesites editarlo"
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr "¿Borrar este waypoint?"
-
#~ msgid "Calendar"
#~ msgstr "Calendario"
diff --git a/locale/eu/LC_MESSAGES/pytrainer_eu.po b/locale/eu/LC_MESSAGES/pytrainer_eu.po
index 5533b60..0fff4b4 100644
--- a/locale/eu/LC_MESSAGES/pytrainer_eu.po
+++ b/locale/eu/LC_MESSAGES/pytrainer_eu.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vud 1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: 2008-01-04 20:21+0100\n"
"Last-Translator: Jabier Santamaria <mendikote at gmail.com>\n"
"Language-Team: Basque\n"
@@ -39,7 +39,7 @@ msgid "Active"
msgstr "Aktiboa"
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr ""
@@ -248,8 +248,8 @@ msgid "<b>File delimiter</b>"
msgstr "<b>Denbora:</b>"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Data"
@@ -277,8 +277,8 @@ msgstr ""
msgid "<b>File Column</b>"
msgstr "<b>Komentarioa</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Titulua"
@@ -309,10 +309,10 @@ msgid "Average Speed (km/h)"
msgstr "Bataz bestekoa (km/h)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Kirola"
@@ -334,7 +334,7 @@ msgid "Max Pace (min/km)"
msgstr ""
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
#, fuzzy
msgid "Comments"
msgstr "<b>Komentarioa</b>"
@@ -366,7 +366,7 @@ msgstr ""
msgid "<b>Import from CSV</b>"
msgstr "<b>Kirolen zerrenda</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr "Sarrera berria"
@@ -487,8 +487,8 @@ msgstr ""
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -724,17 +724,17 @@ msgstr "Izena"
msgid "M.E.T."
msgstr ""
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
#, fuzzy
msgid "Extra Weight"
msgstr "Pisua"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr ""
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr ""
@@ -780,7 +780,7 @@ msgstr ""
msgid "Percentages based method"
msgstr ""
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr ""
@@ -794,8 +794,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "<b>Bataz besteko taupadak</b>"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -840,17 +840,17 @@ msgstr ""
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Distantzia"
@@ -858,9 +858,9 @@ msgstr "Distantzia"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Denbora"
@@ -937,21 +937,21 @@ msgid "Profile"
msgstr "Profila"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr ""
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr ""
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr ""
@@ -1111,7 +1111,7 @@ msgstr "km"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "km/h"
@@ -1138,7 +1138,7 @@ msgstr "<b>Egoera:</b>"
msgid " <b>Title:</b>"
msgstr "<b>Titulua:</b>"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
#, fuzzy
msgid "Show graph display options"
msgstr "Grafikoa ikuspegi klasikoan ikusi"
@@ -1275,8 +1275,8 @@ msgstr "<b>Hilabetea:</b>"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "bpm"
@@ -1351,7 +1351,7 @@ msgstr "<b>Bataz besteko taupadak</b>"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr ""
@@ -1362,8 +1362,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Titulua:</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
#, fuzzy
msgid "m"
msgstr "km"
@@ -1537,22 +1537,6 @@ msgstr ""
msgid "Wordpress Extension Upload Complete"
msgstr ""
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr ""
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr ""
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr ""
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr ""
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr ""
@@ -1569,55 +1553,71 @@ msgstr ""
msgid "GPSBabel"
msgstr ""
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr ""
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr ""
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr ""
+
+#: imports/file_gpxplus.py:43
#, fuzzy
msgid "GPS eXchange file"
msgstr "GPX fitxategia"
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr ""
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr ""
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr ""
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr ""
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr ""
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr ""
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr ""
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr ""
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
#, fuzzy
msgid "rpm"
msgstr "bpm"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
msgid "Heart Rate zone"
msgstr ""
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr ""
@@ -1626,10 +1626,6 @@ msgstr ""
msgid "min"
msgstr ""
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr ""
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr "Bidearen izena"
@@ -1638,6 +1634,10 @@ msgstr "Bidearen izena"
msgid "rest"
msgstr ""
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr ""
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr ""
@@ -1650,17 +1650,17 @@ msgstr "Erregistroa editatu"
msgid "Show graph in classic view"
msgstr "Grafikoa ikuspegi klasikoan ikusi"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1670,252 +1670,276 @@ msgstr "%s aukerak"
msgid "OK"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
msgid "Disabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
msgid "GPS device found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
#, fuzzy
msgid "File"
msgstr "Fitxategia"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
#, fuzzy
msgid "Activities"
msgstr "Aktiboa"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Start Time"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Duration"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr "Ok"
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
#, fuzzy
msgid "Got file: "
msgstr "GPX fitxategia"
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, fuzzy, python-format
msgid "Column %d"
msgstr "Zutabeak"
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr ""
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+#, fuzzy
+msgid "Max"
+msgstr "Maiatza"
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+msgid "Average"
+msgstr "Bataz bestekoa"
+
+#: pytrainer/gui/windowrecord.py:97
+#, fuzzy
+msgid "Ascent"
+msgstr "Altuera (m)"
+
+#: pytrainer/gui/windowrecord.py:98
+#, fuzzy
+msgid "Descent"
+msgstr "<b>Distantzia</b>"
+
+#: pytrainer/gui/windowrecord.py:204
+#, fuzzy
+msgid "GPX File"
+msgstr "GPX fitxategia"
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr "id"
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr ""
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
msgid "Waypoint"
msgstr "Waypoint"
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Pisua"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr ""
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
#, fuzzy
msgid "Records"
msgstr "Erregistroa"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
msgid "Total duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
#, fuzzy
msgid "Total distance"
msgstr "Distantzia"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
msgid "Max speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
msgid "Max duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
#, fuzzy
msgid "Max distance"
msgstr "Distantzia"
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
msgid "Lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr ""
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr ""
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr ""
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr ""
@@ -1928,149 +1952,146 @@ msgstr ""
msgid "d"
msgstr "id"
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
msgid "Axis Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr ""
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr ""
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr ""
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr ""
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr ""
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr ""
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr "Taupadak"
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-msgid "Average"
-msgstr "Bataz bestekoa"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr ""
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr ""
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
#, fuzzy
msgid "Edit Entry"
msgstr "Sarrera berria"
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
#, fuzzy
msgid "Delete Entry"
msgstr "Sarrera berria"
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
#, fuzzy
msgid "<b>Date</b>"
msgstr "<b>Data:</b>"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
#, fuzzy
msgid "<b>Weight</b>"
msgstr "<b>Titulua:</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
#, fuzzy
msgid "<b>Body Fat</b>"
msgstr "<b>Data:</b>"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
msgid "<b>Resting Heart Rate</b>"
msgstr ""
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
#, fuzzy
msgid "<b>Max Heart Rate</b>"
msgstr "<b>Bataz besteko taupadak</b>"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr ""
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr ""
@@ -2082,34 +2103,14 @@ msgstr ""
msgid "Female"
msgstr ""
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr ""
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr ""
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-#, fuzzy
-msgid "Max"
-msgstr "Maiatza"
-
-#: pytrainer/gui/windowrecord.py:97
-#, fuzzy
-msgid "Ascent"
-msgstr "Altuera (m)"
-
-#: pytrainer/gui/windowrecord.py:98
-#, fuzzy
-msgid "Descent"
-msgstr "<b>Distantzia</b>"
-
-#: pytrainer/gui/windowrecord.py:204
-#, fuzzy
-msgid "GPX File"
-msgstr "GPX fitxategia"
-
#: pytrainer/lib/gpx.py:128
#, fuzzy
msgid "No Name"
@@ -2148,33 +2149,33 @@ msgstr ""
msgid ">2 Hours"
msgstr ""
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "km"
msgstr "km/h"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "mi"
msgstr "km"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "min/mi"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "ft"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr ""
@@ -2284,35 +2285,47 @@ msgstr "minutuko bataz bestekoa"
msgid "Monthly Calories"
msgstr "hilabteko kaloriak"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr ""
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
#, fuzzy
msgid "Weight Control"
msgstr "Pisua"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr ""
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr ""
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr ""
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+"gpx fitxategia egun erregistro asko ditu. Agian zure gpx fitxategia editatu "
+"beharko duzu."
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr ""
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
msgid "pytrainer can't import data from your gpx file"
msgstr ""
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr ""
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2341,18 +2354,6 @@ msgstr ""
msgid "Annual Calories"
msgstr "Kaloriak"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-"gpx fitxategia egun erregistro asko ditu. Agian zure gpx fitxategia editatu "
-"beharko duzu."
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr ""
-
#~ msgid "Calendar"
#~ msgstr "Egutegia"
diff --git a/locale/fr/LC_MESSAGES/pytrainer_fr.po b/locale/fr/LC_MESSAGES/pytrainer_fr.po
index c732fa4..1dc09e1 100644
--- a/locale/fr/LC_MESSAGES/pytrainer_fr.po
+++ b/locale/fr/LC_MESSAGES/pytrainer_fr.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pytrainer_fr 1.9.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: 2013-03-29 07:25+0100\n"
"Last-Translator: Christian Perrier <bubulle at debian.org>\n"
"Language-Team: French <debian-l10n-french at lists.debian.org>\n"
@@ -45,7 +45,7 @@ msgid "Active"
msgstr "Actif"
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr "Notes"
@@ -245,8 +245,8 @@ msgid "<b>File delimiter</b>"
msgstr "<b>Délimiteur de champs</b>"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Date"
@@ -273,8 +273,8 @@ msgstr "<b>Champs pytrainer</b>"
msgid "<b>File Column</b>"
msgstr "<b>Colonne du fichier</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Titre"
@@ -301,10 +301,10 @@ msgid "Average Speed (km/h)"
msgstr "Vitesse moyenne (km/h)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Sport"
@@ -325,7 +325,7 @@ msgid "Max Pace (min/km)"
msgstr "Allure Max (min/km)"
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
msgid "Comments"
msgstr "Commentaires"
@@ -360,7 +360,7 @@ msgstr "Importer les données"
msgid "<b>Import from CSV</b>"
msgstr "<b>Importer à partir d'un fichier CSV</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr "Nouvelle entrée"
@@ -468,8 +468,8 @@ msgstr "Fréquence Cardiaque:"
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -692,16 +692,16 @@ msgstr "Nom"
msgid "M.E.T."
msgstr "M.E.T."
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
msgid "Extra Weight"
msgstr "Poids Additionnel"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr "Allure Maximale"
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr "Couleur"
@@ -749,7 +749,7 @@ msgstr ""
msgid "Percentages based method"
msgstr "Méthode basée sur des pourcentages"
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr "Méthode de Karvonen"
@@ -762,8 +762,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "<b>Zones Cardiaque:</b>"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -815,17 +815,17 @@ msgstr "Paramètres de démarrage"
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Distance"
@@ -833,9 +833,9 @@ msgstr "Distance"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Temps"
@@ -913,21 +913,21 @@ msgid "Profile"
msgstr "Profil de la sortie"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr "Vitesse"
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr "Allure"
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr "Rythme"
@@ -1074,7 +1074,7 @@ msgstr "km"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "km/h"
@@ -1098,7 +1098,7 @@ msgstr "<b>Tours</b>"
msgid " <b>Title:</b>"
msgstr " <b>Titre:</b>"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
msgid "Show graph display options"
msgstr "Montrer les réglages du graphe"
@@ -1225,8 +1225,8 @@ msgstr "<b>Zone FC1:</b>"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "bpm"
@@ -1292,7 +1292,7 @@ msgstr "<b>FC Moy:</b>"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr "min/km"
@@ -1302,8 +1302,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Dénivelé Total Pos/Neg:</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
msgid "m"
msgstr "m"
@@ -1469,22 +1469,6 @@ msgstr "Traitement de l'extension Wordpress"
msgid "Wordpress Extension Upload Complete"
msgstr "Chargement sur Wordpress effectué"
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr "Fichier de base de données Garmin training center version 1"
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr "Fichier de base de données Garmin training center version 2"
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr "Fichier de dump Garmin tools"
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr "Export Nokia- GPS eXchange file"
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr "Fichier Geodistance kml version 2.0"
@@ -1501,53 +1485,69 @@ msgstr "Garmintools"
msgid "GPSBabel"
msgstr "GPSBabel"
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr "Fichier de base de données Garmin training center version 1"
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr "Fichier de base de données Garmin training center version 2"
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr "Fichier de dump Garmin tools"
+
+#: imports/file_gpxplus.py:43
msgid "GPS eXchange file"
msgstr "Fichier de type GPX"
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr "Export Nokia- GPS eXchange file"
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr "Allure au tour"
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr "Durée (s)"
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr "Vitesse au tour"
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr "Altitude"
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr "Altitude corrigée"
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr "Fréquence Cardiaque (% du max)"
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr "%"
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
msgid "rpm"
msgstr "tpm"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
msgid "Heart Rate zone"
msgstr "Zone de Fréquence Cardiaque"
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr "h"
@@ -1556,10 +1556,6 @@ msgstr "h"
msgid "min"
msgstr "min"
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr "Données de l'athlète"
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr "Nom du Circuit"
@@ -1568,6 +1564,10 @@ msgstr "Nom du Circuit"
msgid "rest"
msgstr "repos"
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr "Données de l'athlète"
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr "Utilisation"
@@ -1580,17 +1580,17 @@ msgstr "Éditer un enregistrement"
msgid "Show graph in classic view"
msgstr "Montrer le graphe dans la vue classique"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr "Désactivé"
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr "Activé"
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1600,246 +1600,266 @@ msgstr "%s réglages"
msgid "OK"
msgstr "OK"
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr "Pas de fichier sélectionné"
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr "Configurer"
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
msgid "Disabled"
msgstr "Désactivé"
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr "Activé"
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr "Vérification des outils"
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
msgid "GPS device found"
msgstr "Périphérique GPS trouvé"
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr "Périphérique GPS <b>non</b> trouvé"
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr "Cet outil n'est pas installé sur votre système"
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr "Page d'accueil"
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr "Vérification du type de fichier pour : "
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "File"
msgstr "Fichier"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr "Type"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Activities"
msgstr "Activités"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Start Time"
msgstr "Heure de début"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Duration"
msgstr "Durée"
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr "Importé dans la base"
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr "Ok"
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr "Sauvegarde des options"
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr "Options sauvegardées"
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr "Importation d'une activité"
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr "Importation de %d activités"
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr "Aucune activité importée"
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr "Une activité importée"
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr "%d activités importées"
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr " Activité déjà présente dans la base de données"
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr " %s activités étaient déjà présentes dans la base de données"
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr "Choisir un fichier pour importer vos activités"
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr "Fichier trouvé de type: %s"
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr "Présent dans la base"
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr "Le fichier %s est inconnu ou d'un type non supporté"
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
msgid "Got file: "
msgstr "Fichier reçu : "
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, python-format
msgid "Column %d"
msgstr "Colonne %d"
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr "Erreur : au moins une colonne de date doit être définie"
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr "Importation terminée. %d lignes traitées"
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+msgid "Max"
+msgstr "Max"
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+msgid "Average"
+msgstr "Moyenne"
+
+#: pytrainer/gui/windowrecord.py:97
+msgid "Ascent"
+msgstr "Dénivelé Positif"
+
+#: pytrainer/gui/windowrecord.py:98
+msgid "Descent"
+msgstr "Dénivelé Négatif"
+
+#: pytrainer/gui/windowrecord.py:204
+msgid "GPX File"
+msgstr "Fichier GPX"
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr "id"
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr "Début"
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr "FC"
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr "Vitesse"
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
msgid "Waypoint"
msgstr "Point de Localisation"
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Poids"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr "% de Masse Grasse"
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr "Fréquence de repos"
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr "FC Max"
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
msgid "Records"
msgstr "Enregistrements"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
msgid "Total duration"
msgstr "Durée totale"
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
msgid "Total distance"
msgstr "Distance totale"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr "Vitesse moy"
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
msgid "Max speed"
msgstr "Vitesse max"
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr "FC moy"
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
msgid "Max duration"
msgstr "Durée max"
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
msgid "Max distance"
msgstr "Distance max"
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
msgid "Lap"
msgstr "Tour"
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr "Échantillonage"
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr "Allure moy"
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr "Allure max"
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr "Intensité"
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr "Course"
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr "Place"
@@ -1851,143 +1871,140 @@ msgstr ""
msgid "d"
msgstr "d"
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr "Montrer sur l'axe X"
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr "Montrer sur l'axe Y1"
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr "Montrer sur l'axe Y2"
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
msgid "Axis Limits"
msgstr "Limites des axes"
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr "Tours"
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr "Grille d'axe Gauche"
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr "Grille d'axe Droite"
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr "Grille d'axe X"
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr "Réinitialiser les limites"
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr "Fixer les limites"
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr "Méthode basée sur des pourcentages"
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr "800 m"
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr "1500 m"
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr "5K"
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr "7K"
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr "10K"
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr "Semi Marathon"
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr "Marathon"
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr "100K"
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr "Pulsations"
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-msgid "Average"
-msgstr "Moyenne"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr "Cacher les réglages du graphe "
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr "tour "
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr "s"
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
msgid "Edit Entry"
msgstr "Entrée Rapide"
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
msgid "Delete Entry"
msgstr "Détruire l'entrée"
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr "Créer une entrée Athlète"
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr "Éditer les données de l'athlète"
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
msgid "<b>Date</b>"
msgstr "<b>Date</b>"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
msgid "<b>Weight</b>"
msgstr "<b>Poids</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
msgid "<b>Body Fat</b>"
msgstr "<b>Masse grasse</b>"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
msgid "<b>Resting Heart Rate</b>"
msgstr "<b>Fréquence cardiaque de repos</b>"
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
msgid "<b>Max Heart Rate</b>"
msgstr "<b>Fréquence cardiaque max</b>"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr "Supprimer cette entrée de la Base de Données?"
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr "Êtes vous sûr?"
@@ -1999,30 +2016,14 @@ msgstr "Homme"
msgid "Female"
msgstr "Femme"
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr "MET"
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr "Erreur lors de création du sport"
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-msgid "Max"
-msgstr "Max"
-
-#: pytrainer/gui/windowrecord.py:97
-msgid "Ascent"
-msgstr "Dénivelé Positif"
-
-#: pytrainer/gui/windowrecord.py:98
-msgid "Descent"
-msgstr "Dénivelé Négatif"
-
-#: pytrainer/gui/windowrecord.py:204
-msgid "GPX File"
-msgstr "Fichier GPX"
-
#: pytrainer/lib/gpx.py:128
msgid "No Name"
msgstr "Sans Nom"
@@ -2059,31 +2060,31 @@ msgstr "1-2 heures"
msgid ">2 Hours"
msgstr ">2 heures"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km"
msgstr "km"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mi"
msgstr "miles"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr "mph"
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "min/mi"
msgstr "min/mile"
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "ft"
msgstr "pieds"
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr "kg"
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr "lb"
@@ -2178,34 +2179,46 @@ msgstr "Vitesse moyenne Mensuelle"
msgid "Monthly Calories"
msgstr "Calories Mensuelle"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr "Activité modérée"
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
msgid "Weight Control"
msgstr "Perte de poids"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr "Aérobie"
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr "Anaérobie"
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr "VO2 Max"
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+"Ce fichier GPX semble contenir plusieurs jours d'enregistrements. Vous "
+"devrez peut-être au préalable éditer celui-ci."
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr "Modifier les détails avant l'importation"
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
msgid "pytrainer can't import data from your gpx file"
msgstr "pytrainer ne peut pas importer de données depuis le fichier GPX"
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr "Détruire ce Point de Localisation"
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2232,18 +2245,6 @@ msgstr "Vitesse moyenne annuelle"
msgid "Annual Calories"
msgstr "Calories annuelles"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-"Ce fichier GPX semble contenir plusieurs jours d'enregistrements. Vous "
-"devrez peut-être au préalable éditer celui-ci."
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr "Détruire ce Point de Localisation"
-
#~ msgid "Calendar"
#~ msgstr "Calendrier"
diff --git a/locale/gl/LC_MESSAGES/pytrainer_gl.po b/locale/gl/LC_MESSAGES/pytrainer_gl.po
index 0c9b343..43ebe8d 100644
--- a/locale/gl/LC_MESSAGES/pytrainer_gl.po
+++ b/locale/gl/LC_MESSAGES/pytrainer_gl.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Pytrainer 1.10\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: 2013-03-12 17:17+0100\n"
"Last-Translator: Aníbal Garrido Hermo <khanyux at gmail.com>\n"
"Language-Team: Galician <proxecto at trasno.net>\n"
@@ -39,7 +39,7 @@ msgid "Active"
msgstr "Activo"
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr "Notas"
@@ -239,8 +239,8 @@ msgid "<b>File delimiter</b>"
msgstr "<b>Delimitador no ficheiro</b>"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Data"
@@ -267,8 +267,8 @@ msgstr "<b>Campo en PyTrainer</b>"
msgid "<b>File Column</b>"
msgstr "<b>Columna no ficheiro</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Título"
@@ -295,10 +295,10 @@ msgid "Average Speed (km/h)"
msgstr "Velocidade media (km/h)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Deporte"
@@ -319,7 +319,7 @@ msgid "Max Pace (min/km)"
msgstr "Ritmo máximo (min/km)"
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
msgid "Comments"
msgstr "Comentarios"
@@ -354,7 +354,7 @@ msgstr "Importar datos"
msgid "<b>Import from CSV</b>"
msgstr "<b>Importar dende un ficheiro CSV</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr "Nova entrada"
@@ -462,8 +462,8 @@ msgstr "Pulsacións:"
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -685,16 +685,16 @@ msgstr "Nome"
msgid "M.E.T."
msgstr "M.E.T."
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
msgid "Extra Weight"
msgstr "Peso extra"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr "Ritmo máximo"
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr "Cor"
@@ -742,7 +742,7 @@ msgstr ""
msgid "Percentages based method"
msgstr "Método baseado en porcentaxes"
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr "Método Karvonen"
@@ -755,8 +755,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "<b>Zonas de frecuencia cardíaca</b>"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -807,17 +807,17 @@ msgstr "Configuración de Inicio"
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Distancia"
@@ -825,9 +825,9 @@ msgstr "Distancia"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Tempo"
@@ -905,21 +905,21 @@ msgid "Profile"
msgstr "Perfil da etapa"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr "Velocidade"
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr "Ritmo"
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr "Cadencia"
@@ -1066,7 +1066,7 @@ msgstr "Km"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "km/h"
@@ -1090,7 +1090,7 @@ msgstr "<b>Voltas</b>"
msgid " <b>Title:</b>"
msgstr " <b>Título:</b>"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
msgid "Show graph display options"
msgstr "Amosa-las opcións do gráfico"
@@ -1217,8 +1217,8 @@ msgstr "<b>Recuperación:</b>"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "bpm"
@@ -1282,7 +1282,7 @@ msgstr "<b>Pulsacións media:</b>"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr "min/km"
@@ -1292,8 +1292,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Total asc/desc:</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
msgid "m"
msgstr "m"
@@ -1459,22 +1459,6 @@ msgstr "Procesando extensión de Wordpress"
msgid "Wordpress Extension Upload Complete"
msgstr "Envío completo a Wordpress"
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr "Versión 1 do ficheiro Garmin training center database"
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr "Versión 2 do ficheiro Garmin training center database"
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr "Ficheiro de volcado de datos de Garmintools"
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr "Exportar a Nokia - Ficheiro de intercambio GPS"
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr "Ficheiro kml versión 2.0"
@@ -1491,53 +1475,69 @@ msgstr "Garmintools"
msgid "GPSBabel"
msgstr "GPSBabel"
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr "Versión 1 do ficheiro Garmin training center database"
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr "Versión 2 do ficheiro Garmin training center database"
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr "Ficheiro de volcado de datos de Garmintools"
+
+#: imports/file_gpxplus.py:43
msgid "GPS eXchange file"
msgstr "Ficheiro de intercambio GPS"
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr "Exportar a Nokia - Ficheiro de intercambio GPS"
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr "Ritmo por volta"
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr "Tempo (segundos)"
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr "Velocidade por volta"
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr "Altura"
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr "Altura corrixida"
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr "Frecuencia cardíaca (% do máx)"
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr "%"
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
msgid "rpm"
msgstr "rpm"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
msgid "Heart Rate zone"
msgstr "Zona de frecuencia cardíaca"
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr "h"
@@ -1546,10 +1546,6 @@ msgstr "h"
msgid "min"
msgstr "min"
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr "Datos do atleta"
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr "Nome da ruta"
@@ -1558,6 +1554,10 @@ msgstr "Nome da ruta"
msgid "rest"
msgstr "descanso"
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr "Datos do atleta"
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr "Uso"
@@ -1570,17 +1570,17 @@ msgstr "Editar rexistro"
msgid "Show graph in classic view"
msgstr "Amosa-lo gráfico en vista clásica"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr "Deshabilitado"
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr "Habilitado"
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1590,246 +1590,266 @@ msgstr "%s opcións"
msgid "OK"
msgstr "Aceptar"
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr "Ningún ficheiro seleccionado"
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr "Configurar"
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
msgid "Disabled"
msgstr "Desactivado"
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr "Activo"
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr "Comprobando ferramentas"
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
msgid "GPS device found"
msgstr "Encontrouse un dispositivo GPS"
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr "Dispositivo GPS <b>non</b> encontrado"
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr "Non se encontrou esta ferramenta no sistema"
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr " Páxina de inicio"
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr "Comprobando o tipo de ficheiro para:"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "File"
msgstr "Ficheiro"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr "Tipo"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Activities"
msgstr "Actividades"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Start Time"
msgstr "Hora de comezo:"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Duration"
msgstr "Duración"
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr "Importado á base de datos"
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr "Aceptar"
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr "Gardar configuración"
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr "Configuración gardada"
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr "Importando unha actividade"
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr "Importando %d actividades"
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr "Non se importou ningunha actividade"
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr "Unha actividade importada"
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr "%d actividades importadas"
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr "A actividade seleccionada xa estaba presente na base de datos"
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr "%d actividades seleccionadas xa estaban presentes na base de datos"
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr "Seleccione ficheiro/s dende o/os que importar actividades"
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr "Tipo de ficheiro encontrado: %s"
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr "Encontrado na base de datos"
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr "Ficheiro %s descoñecido ou non soportado"
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
msgid "Got file: "
msgstr "Obter ficheiro:"
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, python-format
msgid "Column %d"
msgstr "Columna %d"
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr "ERRO: débese definir como mínimo a columna da data"
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr "Importación completa. %d filas procesadas"
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+msgid "Max"
+msgstr "Máx"
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+msgid "Average"
+msgstr "Media"
+
+#: pytrainer/gui/windowrecord.py:97
+msgid "Ascent"
+msgstr "Ascenso"
+
+#: pytrainer/gui/windowrecord.py:98
+msgid "Descent"
+msgstr "Descenso"
+
+#: pytrainer/gui/windowrecord.py:204
+msgid "GPX File"
+msgstr "Ficheiro GPX"
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr "id"
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr "Comezo"
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr "⌀ FC"
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr "⌀ Velocidade"
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
msgid "Waypoint"
msgstr "Waypoint"
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Peso"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr "Graxa corporal %"
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr "FC en repouso"
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr "Máx FC"
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
msgid "Records"
msgstr "Rexistro"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
msgid "Total duration"
msgstr "Todas as duracións"
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
msgid "Total distance"
msgstr "Distancia total"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr "Velocidade media"
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
msgid "Max speed"
msgstr "Velocidade máxima"
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr "FC media"
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
msgid "Max duration"
msgstr "Duración Máx"
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
msgid "Max distance"
msgstr "Distancia Máx"
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
msgid "Lap"
msgstr "Volta"
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr "Activador"
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr "Ritmo medio"
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr "Ritmo máximo"
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr "Intensidade"
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr "Carreira"
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr "Posición"
@@ -1841,143 +1861,140 @@ msgstr ""
msgid "d"
msgstr "d"
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr "Amosar no eixe X"
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr "Amosar no eixe Y1"
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr "Amosar no eixe Y2"
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
msgid "Axis Limits"
msgstr "Límites dos eixes"
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr "Voltas"
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr "Cuadrícula do eixe esquerdo"
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr "Cuadrícula do eixe dereito"
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr "Cuadrícula do eixe X"
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr "Restablecer límites"
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr "Establecer límites"
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr "Baseado en porcentaxes"
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr "800 m"
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr "1500 m"
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr "5K"
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr "7K"
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr "10K"
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr "Media maratón"
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr "Maratón"
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr "100K"
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr "Pulsacións"
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-msgid "Average"
-msgstr "Media"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr "Ocultar opcións de visualización gráfica"
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr "Volta"
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr "s"
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
msgid "Edit Entry"
msgstr "Editar entrada"
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
msgid "Delete Entry"
msgstr "Borrar entrada"
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr "Crear entrada de atleta"
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr "Editar entrada do atleta"
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
msgid "<b>Date</b>"
msgstr "<b>Data</b>"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
msgid "<b>Weight</b>"
msgstr " <b>Peso</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
msgid "<b>Body Fat</b>"
msgstr "<b>Graxa corporal</b>"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
msgid "<b>Resting Heart Rate</b>"
msgstr "<b>Pulsacións en repouso</b>"
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
msgid "<b>Max Heart Rate</b>"
msgstr "<b>Pulsacións máximas</b>"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr "Borrar esta entrada da base de datos?"
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr "Está seguro?"
@@ -1989,30 +2006,14 @@ msgstr "Home"
msgid "Female"
msgstr "Muller"
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr "MET"
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr "Ocorreu un erro ó crear o deporte"
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-msgid "Max"
-msgstr "Máx"
-
-#: pytrainer/gui/windowrecord.py:97
-msgid "Ascent"
-msgstr "Ascenso"
-
-#: pytrainer/gui/windowrecord.py:98
-msgid "Descent"
-msgstr "Descenso"
-
-#: pytrainer/gui/windowrecord.py:204
-msgid "GPX File"
-msgstr "Ficheiro GPX"
-
#: pytrainer/lib/gpx.py:128
msgid "No Name"
msgstr "Sen nome"
@@ -2049,31 +2050,31 @@ msgstr "1-2 horas"
msgid ">2 Hours"
msgstr ">2 horas"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km"
msgstr "km"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mi"
msgstr "milla"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr "mph"
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "min/mi"
msgstr "min/milla"
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "ft"
msgstr "pé"
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr "kg"
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr "lb"
@@ -2168,34 +2169,46 @@ msgstr "Velocidades medias mensuais"
msgid "Monthly Calories"
msgstr "Calorías mensuais"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr "Actividade moderada"
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
msgid "Weight Control"
msgstr "Control do peso"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr "Aeróbico"
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr "Anaeróbico"
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr "VO2 MAX"
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+"Parece que o ficheiro gpx contén actividades de varios días. Quizais "
+"precisaría editar o seu ficheiro gpx"
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr "Modificar detalles antes de importar"
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
msgid "pytrainer can't import data from your gpx file"
msgstr "pytrainer non pode importalos datos do seu ficheiro gpx"
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr "Borrar este waypoint?"
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2222,18 +2235,6 @@ msgstr "Velocidade media anual"
msgid "Annual Calories"
msgstr "Calorías anuais"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-"Parece que o ficheiro gpx contén actividades de varios días. Quizais "
-"precisaría editar o seu ficheiro gpx"
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr "Borrar este waypoint?"
-
#~ msgid "Calendar"
#~ msgstr "Calendario"
diff --git a/locale/no/LC_MESSAGES/pytrainer_no.po b/locale/no/LC_MESSAGES/pytrainer_no.po
index d639755..5eaeb62 100644
--- a/locale/no/LC_MESSAGES/pytrainer_no.po
+++ b/locale/no/LC_MESSAGES/pytrainer_no.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pytrainer 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: 2009-12-07 19:21+0100\n"
"Last-Translator: David García Granda <dgranda at gmail.com>\n"
"Language-Team: Norwegian <i18n-nb at lister.ping.uio.no>\n"
@@ -40,7 +40,7 @@ msgid "Active"
msgstr ""
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr ""
@@ -249,8 +249,8 @@ msgid "<b>File delimiter</b>"
msgstr "<b>Tid:</b>"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Dato"
@@ -278,8 +278,8 @@ msgstr ""
msgid "<b>File Column</b>"
msgstr "<b>Komentar</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Tittel"
@@ -310,10 +310,10 @@ msgid "Average Speed (km/h)"
msgstr "Snitt (Km/t)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Sport"
@@ -335,7 +335,7 @@ msgid "Max Pace (min/km)"
msgstr ""
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
#, fuzzy
msgid "Comments"
msgstr "<b>Komentar</b>"
@@ -367,7 +367,7 @@ msgstr ""
msgid "<b>Import from CSV</b>"
msgstr "<b>Sport liste</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr ""
@@ -486,8 +486,8 @@ msgstr ""
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -721,17 +721,17 @@ msgstr "Navn"
msgid "M.E.T."
msgstr ""
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
#, fuzzy
msgid "Extra Weight"
msgstr "Vekt"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr ""
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr ""
@@ -777,7 +777,7 @@ msgstr ""
msgid "Percentages based method"
msgstr ""
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr ""
@@ -791,8 +791,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "<b>Puls:</b>"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -837,17 +837,17 @@ msgstr ""
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Distanse"
@@ -855,9 +855,9 @@ msgstr "Distanse"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Tid"
@@ -933,21 +933,21 @@ msgid "Profile"
msgstr "Profil"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr ""
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr ""
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr ""
@@ -1104,7 +1104,7 @@ msgstr "Km"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "Km/t"
@@ -1132,7 +1132,7 @@ msgstr "<b>Puls:</b>"
msgid " <b>Title:</b>"
msgstr "<b>Tid:</b>"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
#, fuzzy
msgid "Show graph display options"
msgstr "Vis i klassisk visning"
@@ -1268,8 +1268,8 @@ msgstr "<b>Dato:</b>"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "ppm"
@@ -1345,7 +1345,7 @@ msgstr "<b>Puls gjennomsnitt</b>"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr ""
@@ -1356,8 +1356,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Tid:</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
#, fuzzy
msgid "m"
msgstr "Km"
@@ -1535,22 +1535,6 @@ msgstr ""
msgid "Wordpress Extension Upload Complete"
msgstr ""
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr ""
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr ""
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr ""
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr ""
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr ""
@@ -1567,55 +1551,71 @@ msgstr ""
msgid "GPSBabel"
msgstr ""
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr ""
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr ""
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr ""
+
+#: imports/file_gpxplus.py:43
#, fuzzy
msgid "GPS eXchange file"
msgstr "Profil"
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr ""
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr ""
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr ""
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr ""
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr ""
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr ""
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr ""
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr ""
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
#, fuzzy
msgid "rpm"
msgstr "ppm"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
msgid "Heart Rate zone"
msgstr ""
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr ""
@@ -1624,10 +1624,6 @@ msgstr ""
msgid "min"
msgstr ""
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr ""
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr ""
@@ -1636,6 +1632,10 @@ msgstr ""
msgid "rest"
msgstr ""
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr ""
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr ""
@@ -1648,17 +1648,17 @@ msgstr "Endre Notat"
msgid "Show graph in classic view"
msgstr "Vis i klassisk visning"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1668,252 +1668,276 @@ msgstr ""
msgid "OK"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
msgid "Disabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
msgid "GPS device found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
#, fuzzy
msgid "File"
msgstr "_Fil"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Start Time"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Duration"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
#, fuzzy
msgid "Got file: "
msgstr "Profil"
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, python-format
msgid "Column %d"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr ""
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+#, fuzzy
+msgid "Max"
+msgstr "Mai"
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+msgid "Average"
+msgstr "Snitt (Km/t)"
+
+#: pytrainer/gui/windowrecord.py:97
+#, fuzzy
+msgid "Ascent"
+msgstr "Alder"
+
+#: pytrainer/gui/windowrecord.py:98
+#, fuzzy
+msgid "Descent"
+msgstr "<b>Distanse</b>"
+
+#: pytrainer/gui/windowrecord.py:204
+#, fuzzy
+msgid "GPX File"
+msgstr "Profil"
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr "id"
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr ""
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
#, fuzzy
msgid "Waypoint"
msgstr "<b>Kalorier:</b>"
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Vekt"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr ""
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
#, fuzzy
msgid "Records"
msgstr "Endre Notat"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
msgid "Total duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
#, fuzzy
msgid "Total distance"
msgstr "Distanse"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
msgid "Max speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
msgid "Max duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
#, fuzzy
msgid "Max distance"
msgstr "Distanse"
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
msgid "Lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr ""
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr ""
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr ""
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr ""
@@ -1926,147 +1950,144 @@ msgstr ""
msgid "d"
msgstr "id"
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
msgid "Axis Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr ""
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr ""
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr ""
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr ""
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr ""
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr ""
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr ""
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-msgid "Average"
-msgstr "Snitt (Km/t)"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr ""
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr ""
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
msgid "Edit Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
msgid "Delete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
#, fuzzy
msgid "<b>Date</b>"
msgstr "<b>Dato:</b>"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
#, fuzzy
msgid "<b>Weight</b>"
msgstr "<b>Puls:</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
#, fuzzy
msgid "<b>Body Fat</b>"
msgstr "<b>Puls:</b>"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
msgid "<b>Resting Heart Rate</b>"
msgstr ""
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
#, fuzzy
msgid "<b>Max Heart Rate</b>"
msgstr "<b>Puls gjennomsnitt</b>"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr ""
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr ""
@@ -2078,34 +2099,14 @@ msgstr ""
msgid "Female"
msgstr ""
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr ""
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr ""
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-#, fuzzy
-msgid "Max"
-msgstr "Mai"
-
-#: pytrainer/gui/windowrecord.py:97
-#, fuzzy
-msgid "Ascent"
-msgstr "Alder"
-
-#: pytrainer/gui/windowrecord.py:98
-#, fuzzy
-msgid "Descent"
-msgstr "<b>Distanse</b>"
-
-#: pytrainer/gui/windowrecord.py:204
-#, fuzzy
-msgid "GPX File"
-msgstr "Profil"
-
#: pytrainer/lib/gpx.py:128
#, fuzzy
msgid "No Name"
@@ -2144,33 +2145,33 @@ msgstr ""
msgid ">2 Hours"
msgstr ""
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "km"
msgstr "Km/t"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "mi"
msgstr "Km"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "min/mi"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "ft"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr ""
@@ -2279,35 +2280,45 @@ msgstr "månedlig snitt"
msgid "Monthly Calories"
msgstr "månedlig kalorier"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr ""
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
#, fuzzy
msgid "Weight Control"
msgstr "Vekt"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr ""
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr ""
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr ""
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr ""
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
msgid "pytrainer can't import data from your gpx file"
msgstr ""
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr ""
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2336,16 +2347,6 @@ msgstr ""
msgid "Annual Calories"
msgstr "Kalorier"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr ""
-
#~ msgid "window1"
#~ msgstr "window1"
diff --git a/locale/pl/LC_MESSAGES/pytrainer_pl.po b/locale/pl/LC_MESSAGES/pytrainer_pl.po
index 7fe4d63..be20c48 100644
--- a/locale/pl/LC_MESSAGES/pytrainer_pl.po
+++ b/locale/pl/LC_MESSAGES/pytrainer_pl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pytrainer_pl\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Seweryn Kokot <skokot at o2.pl>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -39,7 +39,7 @@ msgid "Active"
msgstr ""
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr ""
@@ -246,8 +246,8 @@ msgid "<b>File delimiter</b>"
msgstr "<b>Czas:</b>"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Data"
@@ -276,8 +276,8 @@ msgstr ""
msgid "<b>File Column</b>"
msgstr "<b>Komentarz</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Tytuł"
@@ -307,10 +307,10 @@ msgid "Average Speed (km/h)"
msgstr "Średnia (km/h)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Sport"
@@ -331,7 +331,7 @@ msgid "Max Pace (min/km)"
msgstr ""
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
#, fuzzy
msgid "Comments"
msgstr "<b>Komentarz</b>"
@@ -363,7 +363,7 @@ msgstr ""
msgid "<b>Import from CSV</b>"
msgstr "<b>Lista dyscyplin</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr "Nowa pozycja"
@@ -483,8 +483,8 @@ msgstr ""
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -720,17 +720,17 @@ msgstr "Nazwa"
msgid "M.E.T."
msgstr ""
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
#, fuzzy
msgid "Extra Weight"
msgstr "Waga"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr ""
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr ""
@@ -776,7 +776,7 @@ msgstr ""
msgid "Percentages based method"
msgstr ""
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr ""
@@ -790,8 +790,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "<b>Puls:</b>"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -836,17 +836,17 @@ msgstr ""
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Dystans (km)"
@@ -854,9 +854,9 @@ msgstr "Dystans (km)"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Czas"
@@ -933,21 +933,21 @@ msgid "Profile"
msgstr "Profil"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr ""
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr ""
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr ""
@@ -1107,7 +1107,7 @@ msgstr "km"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "km/h"
@@ -1135,7 +1135,7 @@ msgstr "<b>Puls:</b>"
msgid " <b>Title:</b>"
msgstr "<b>Czas:</b>"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
msgid "Show graph display options"
msgstr ""
@@ -1270,8 +1270,8 @@ msgstr "<b>Miesiąc:</b>"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "bpm"
@@ -1346,7 +1346,7 @@ msgstr "<b>Średni puls:</b>"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr ""
@@ -1357,8 +1357,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Dystans:</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
#, fuzzy
msgid "m"
msgstr "km"
@@ -1535,22 +1535,6 @@ msgstr ""
msgid "Wordpress Extension Upload Complete"
msgstr ""
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr ""
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr ""
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr ""
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr ""
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr ""
@@ -1567,54 +1551,70 @@ msgstr ""
msgid "GPSBabel"
msgstr ""
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr ""
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr ""
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr ""
+
+#: imports/file_gpxplus.py:43
msgid "GPS eXchange file"
msgstr ""
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr ""
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr ""
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr ""
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr ""
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr ""
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr ""
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr ""
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr ""
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
#, fuzzy
msgid "rpm"
msgstr "bpm"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
msgid "Heart Rate zone"
msgstr ""
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr ""
@@ -1623,10 +1623,6 @@ msgstr ""
msgid "min"
msgstr ""
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr ""
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr ""
@@ -1635,6 +1631,10 @@ msgstr ""
msgid "rest"
msgstr ""
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr ""
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr ""
@@ -1648,17 +1648,17 @@ msgstr "Edytuj wiersz"
msgid "Show graph in classic view"
msgstr "Pokaż klasyczny wygląd"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1668,250 +1668,275 @@ msgstr ""
msgid "OK"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
msgid "Disabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
msgid "GPS device found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
#, fuzzy
msgid "File"
msgstr "_Plik"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Start Time"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Duration"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
msgid "Got file: "
msgstr ""
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, python-format
msgid "Column %d"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr ""
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+#, fuzzy
+msgid "Max"
+msgstr "Maj"
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+#, fuzzy
+msgid "Average"
+msgstr "Średnia (km/h)"
+
+#: pytrainer/gui/windowrecord.py:97
+#, fuzzy
+msgid "Ascent"
+msgstr "<b>Puls:</b>"
+
+#: pytrainer/gui/windowrecord.py:98
+#, fuzzy
+msgid "Descent"
+msgstr "<b>Dystans:</b>"
+
+#: pytrainer/gui/windowrecord.py:204
+#, fuzzy
+msgid "GPX File"
+msgstr "_Plik"
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr ""
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr ""
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
msgid "Waypoint"
msgstr ""
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Waga"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr ""
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
#, fuzzy
msgid "Records"
msgstr "Edytuj wiersz"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
msgid "Total duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
#, fuzzy
msgid "Total distance"
msgstr "Dystans (km)"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
msgid "Max speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
msgid "Max duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
#, fuzzy
msgid "Max distance"
msgstr "Dystans (km)"
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
msgid "Lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr ""
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr ""
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr ""
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr ""
@@ -1923,150 +1948,146 @@ msgstr ""
msgid "d"
msgstr ""
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
msgid "Axis Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr ""
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr ""
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr ""
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr ""
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr ""
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr ""
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr ""
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-#, fuzzy
-msgid "Average"
-msgstr "Średnia (km/h)"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr ""
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr ""
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
#, fuzzy
msgid "Edit Entry"
msgstr "Nowa pozycja"
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
#, fuzzy
msgid "Delete Entry"
msgstr "Nowa pozycja"
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
#, fuzzy
msgid "<b>Date</b>"
msgstr "<b>Data:</b>"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
#, fuzzy
msgid "<b>Weight</b>"
msgstr "<b>Puls:</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
#, fuzzy
msgid "<b>Body Fat</b>"
msgstr "<b>Puls:</b>"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
msgid "<b>Resting Heart Rate</b>"
msgstr ""
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
#, fuzzy
msgid "<b>Max Heart Rate</b>"
msgstr "<b>Średni puls:</b>"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr ""
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr ""
@@ -2078,34 +2099,14 @@ msgstr ""
msgid "Female"
msgstr ""
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr ""
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr ""
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-#, fuzzy
-msgid "Max"
-msgstr "Maj"
-
-#: pytrainer/gui/windowrecord.py:97
-#, fuzzy
-msgid "Ascent"
-msgstr "<b>Puls:</b>"
-
-#: pytrainer/gui/windowrecord.py:98
-#, fuzzy
-msgid "Descent"
-msgstr "<b>Dystans:</b>"
-
-#: pytrainer/gui/windowrecord.py:204
-#, fuzzy
-msgid "GPX File"
-msgstr "_Plik"
-
#: pytrainer/lib/gpx.py:128
#, fuzzy
msgid "No Name"
@@ -2144,33 +2145,33 @@ msgstr ""
msgid ">2 Hours"
msgstr ""
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "km"
msgstr "km/h"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "mi"
msgstr "km"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "min/mi"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "ft"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr ""
@@ -2280,35 +2281,45 @@ msgstr "miesięczna średnia"
msgid "Monthly Calories"
msgstr "miesięczne kalorie"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr ""
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
#, fuzzy
msgid "Weight Control"
msgstr "Waga"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr ""
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr ""
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr ""
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr ""
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
msgid "pytrainer can't import data from your gpx file"
msgstr ""
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr ""
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2337,16 +2348,6 @@ msgstr ""
msgid "Annual Calories"
msgstr "Kalorie"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr ""
-
#, fuzzy
#~ msgid ""
#~ "Distance\n"
diff --git a/locale/pt/LC_MESSAGES/pytrainer_pt.po b/locale/pt/LC_MESSAGES/pytrainer_pt.po
index d970b59..659eab6 100644
--- a/locale/pt/LC_MESSAGES/pytrainer_pt.po
+++ b/locale/pt/LC_MESSAGES/pytrainer_pt.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pytrainer 1.9.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: 2011-10-20 19:14+0100\n"
"Last-Translator: Pedro Ribeiro <p.m42.ribeiro at gmail.com>\n"
"Language-Team: Portuguese <traduz at debianpt.org>\n"
@@ -37,7 +37,7 @@ msgid "Active"
msgstr "Activo"
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr "Notas"
@@ -238,8 +238,8 @@ msgid "<b>File delimiter</b>"
msgstr "<b>Delimitador de campos no ficheiro</b>"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Data"
@@ -266,8 +266,8 @@ msgstr "<b>Campo do PyTrainer</b>"
msgid "<b>File Column</b>"
msgstr "<b>Coluna no Ficheiro</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Título"
@@ -294,10 +294,10 @@ msgid "Average Speed (km/h)"
msgstr "Vel Média (km/h)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Desporto"
@@ -318,7 +318,7 @@ msgid "Max Pace (min/km)"
msgstr "Ritmo Máximo (min/km)"
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
msgid "Comments"
msgstr "Comentários"
@@ -353,7 +353,7 @@ msgstr "Importar Dados"
msgid "<b>Import from CSV</b>"
msgstr "<b>Importar a partir do CSV</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr "Nova Entrada"
@@ -461,8 +461,8 @@ msgstr "Ritmo Cardíaco:"
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -685,16 +685,16 @@ msgstr "Nome"
msgid "M.E.T."
msgstr "M.E.T."
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
msgid "Extra Weight"
msgstr "Peso Extra"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr "Ritmo Máximo"
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr "Cor"
@@ -742,7 +742,7 @@ msgstr ""
msgid "Percentages based method"
msgstr "Método baseado em percentagens"
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr "Método de Karvonen"
@@ -755,8 +755,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "<b>Zonas de Ritmo Cardíaco</b>"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -808,17 +808,17 @@ msgstr "Parâmetros de Arranque"
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Distância"
@@ -826,9 +826,9 @@ msgstr "Distância"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Tempo"
@@ -906,21 +906,21 @@ msgid "Profile"
msgstr "Definir Perfil"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr "Velocidade"
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr "Ritmo"
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr "Cadência"
@@ -1067,7 +1067,7 @@ msgstr "Km"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "km/h"
@@ -1091,7 +1091,7 @@ msgstr "<b>Voltas</b>"
msgid " <b>Title:</b>"
msgstr "<b>Título:</b>"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
msgid "Show graph display options"
msgstr "Mostrar opções de gráficos"
@@ -1218,8 +1218,8 @@ msgstr "<b>Zona1 HR:</b>"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "ppm"
@@ -1285,7 +1285,7 @@ msgstr "<b>Média pulsação:</b>"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr "min/km"
@@ -1295,8 +1295,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Total Sub/Desc:</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
msgid "m"
msgstr "m"
@@ -1463,22 +1463,6 @@ msgstr "A processar Extensão Wordpress"
msgid "Wordpress Extension Upload Complete"
msgstr "Envio da Extensão Wordpress Completo"
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr "Ficheiro de base de dados do centro de treino Garmin, versão 1"
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr "Ficheiro de base de dados do centro de treino Garmin, versão 2"
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr "Ficheiro dump de Garmin tools"
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr "Nokia Export - ficheiro GPS eXchange"
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr "Ficheiro Geodistance kml versão 2.0"
@@ -1495,53 +1479,69 @@ msgstr "Garmintools"
msgid "GPSBabel"
msgstr "GPSBabel"
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr "Ficheiro de base de dados do centro de treino Garmin, versão 1"
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr "Ficheiro de base de dados do centro de treino Garmin, versão 2"
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr "Ficheiro dump de Garmin tools"
+
+#: imports/file_gpxplus.py:43
msgid "GPS eXchange file"
msgstr "Ficheiro GPS eXchange"
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr "Nokia Export - ficheiro GPS eXchange"
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr "Ritmo por Volta"
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr "Tempo (segundos)"
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr "Velocidade por Volta"
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr "Elevação"
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr "Elevação Corrigida"
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr "Ritmo Cardíaco (% do máx.)"
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr "%"
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
msgid "rpm"
msgstr "rpm"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
msgid "Heart Rate zone"
msgstr "Zona do Ritmo Cardíaco"
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr "h"
@@ -1550,10 +1550,6 @@ msgstr "h"
msgid "min"
msgstr "min"
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr "Dados de Atleta"
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr "Nome da Pista"
@@ -1562,6 +1558,10 @@ msgstr "Nome da Pista"
msgid "rest"
msgstr "repouso"
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr "Dados de Atleta"
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr "Utilização"
@@ -1574,17 +1574,17 @@ msgstr "Editar Registo"
msgid "Show graph in classic view"
msgstr "Mostrar gráfico na vista clássica"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr "Desligar"
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr "Ligar"
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1594,247 +1594,270 @@ msgstr "configurações %s"
msgid "OK"
msgstr "OK"
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr "Nenhum ficheiro seleccionado"
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr "Configurar"
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
msgid "Disabled"
msgstr "Desactivado"
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr "Activado"
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
msgid "GPS device found"
msgstr "Encontrado dispositivo GPS"
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr "<b>Não foi</b> encontrado dispositivo GPS"
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr "Esta ferramenta não foi encontrada no sistema"
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr " Homepage"
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "File"
msgstr "Ficheiro"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr "Tipo"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Activities"
msgstr "Actividades"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Start Time"
msgstr "Hora de Início"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Duration"
msgstr "Duração"
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr "Importado para a base de dados"
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr "Ok"
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr "Opções de gravação"
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr "Opções guardadas"
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr "A importar uma actividade"
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr "A importar %d actividades"
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr "Uma actividade importada"
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr "%d actividades importadas"
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr "Escolha um ficheiro (ou ficheiros) para fonte de actividades"
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr "Encontrado ficheiro do tipo: %s"
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr "Encontrado na base de dados"
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr "O ficheiro %s é de um tipo desconhecido ou não suportado"
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
#, fuzzy
msgid "Got file: "
msgstr "Ficheiro GPX:"
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, python-format
msgid "Column %d"
msgstr "Coluna %d"
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr ""
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+#, fuzzy
+msgid "Max"
+msgstr "Máx Bat. Card."
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+msgid "Average"
+msgstr "Média"
+
+#: pytrainer/gui/windowrecord.py:97
+#, fuzzy
+msgid "Ascent"
+msgstr "Subida:"
+
+#: pytrainer/gui/windowrecord.py:98
+#, fuzzy
+msgid "Descent"
+msgstr "Descida:"
+
+#: pytrainer/gui/windowrecord.py:204
+msgid "GPX File"
+msgstr "Ficheiro GPX"
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr "id"
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr "Início"
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr "⌀ Bat. Card."
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr "⌀ Vel."
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
msgid "Waypoint"
msgstr "Ponto de interesse"
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Peso"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr "% Gordura Corporal"
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr "Bat. Card. em Repouso"
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr "Máx Bat. Card."
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
msgid "Records"
msgstr "Registos"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
msgid "Total duration"
msgstr "Duração total"
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
msgid "Total distance"
msgstr "Distância total"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr "Vel. Média"
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
msgid "Max speed"
msgstr "Vel. Máx."
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr "Ritmo Card. Médio"
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
msgid "Max duration"
msgstr "Duração Máx."
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
msgid "Max distance"
msgstr "Distância Máx."
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
msgid "Lap"
msgstr "Volta"
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr "Gatilho"
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr "Ritmo Méd."
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr "Ritmo Máx."
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr "Intensidade"
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr "Corrida"
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr "Posição"
@@ -1846,143 +1869,140 @@ msgstr ""
msgid "d"
msgstr "d"
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr "Mostrar no eixo X"
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr "Mostrar no eixo Y1"
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr "Mostrar no eixo Y2"
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
msgid "Axis Limits"
msgstr "Limites do Eixo"
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr "Voltas"
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr "Grelha do Eixo Esquerdo"
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr "Grelha do Eixo Direito"
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr "Grelha do Eixo X"
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr "Repor Limites"
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr "Definir Limites"
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr "Método das percentagens"
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr "800 m"
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr "1500 m"
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr "5K"
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr "7K"
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr "10K"
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr "Meia maratona"
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr "Maratona"
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr "100K"
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr "Pulsações"
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-msgid "Average"
-msgstr "Média"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr "Esconder opções de visualização de gráficos"
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr "volta"
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr "s"
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
msgid "Edit Entry"
msgstr "Editar Registo"
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
msgid "Delete Entry"
msgstr "Apagar Registo"
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr "Criar Registo de Atleta"
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr "Editar Registo de Atleta"
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
msgid "<b>Date</b>"
msgstr "<b>Data</b>"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
msgid "<b>Weight</b>"
msgstr "<b>Peso</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
msgid "<b>Body Fat</b>"
msgstr "<b>Gordura Corporal</b>"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
msgid "<b>Resting Heart Rate</b>"
msgstr "<b>Ritmo Cardíaco em Repouso</b>"
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
msgid "<b>Max Heart Rate</b>"
msgstr "<b>Ritmo Cardíaco Máximo</b>"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr "Apagar este registo?"
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr "De certeza?"
@@ -1994,33 +2014,14 @@ msgstr "Masculino"
msgid "Female"
msgstr "Feminino"
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr "MET"
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr "Erro ao Criar Desporto"
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-#, fuzzy
-msgid "Max"
-msgstr "Máx Bat. Card."
-
-#: pytrainer/gui/windowrecord.py:97
-#, fuzzy
-msgid "Ascent"
-msgstr "Subida:"
-
-#: pytrainer/gui/windowrecord.py:98
-#, fuzzy
-msgid "Descent"
-msgstr "Descida:"
-
-#: pytrainer/gui/windowrecord.py:204
-msgid "GPX File"
-msgstr "Ficheiro GPX"
-
#: pytrainer/lib/gpx.py:128
msgid "No Name"
msgstr "Sem Nome"
@@ -2057,34 +2058,34 @@ msgstr "1-2 Horas"
msgid ">2 Hours"
msgstr ">2 Horas"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km"
msgstr "km"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "mi"
msgstr "min"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
#, fuzzy
msgid "min/mi"
msgstr "min/milha"
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
#, fuzzy
msgid "ft"
msgstr "pés"
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr "kg"
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr "lb"
@@ -2179,35 +2180,47 @@ msgstr "Velocidade Média Mensal"
msgid "Monthly Calories"
msgstr "Calorias Médias"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr "Actividade moderada"
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
msgid "Weight Control"
msgstr "Controlo de Peso"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr "Aeróbica"
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr "Anaeróbica"
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr "Máx VO2"
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+"O ficheiro gpx contém aparentemente registos de vários dias. Talvez seja "
+"necessário editar o ficheiro gpx"
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr "Modificar detalhes antes de importar"
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
#, fuzzy
msgid "pytrainer can't import data from your gpx file"
msgstr "O pyTrainer não pode importar dados do seu ficheiro gpx"
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr "Apagar este ponto?"
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2234,18 +2247,6 @@ msgstr "Velocidade Média Anual"
msgid "Annual Calories"
msgstr "Calorias Anuais"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-"O ficheiro gpx contém aparentemente registos de vários dias. Talvez seja "
-"necessário editar o ficheiro gpx"
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr "Apagar este ponto?"
-
#~ msgid "Calendar"
#~ msgstr "Calendário"
diff --git a/locale/ru/LC_MESSAGES/pytrainer_ru.po b/locale/ru/LC_MESSAGES/pytrainer_ru.po
index bd83345..2357bf0 100644
--- a/locale/ru/LC_MESSAGES/pytrainer_ru.po
+++ b/locale/ru/LC_MESSAGES/pytrainer_ru.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pytrainer 1.5\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: 2009-12-07 19:19+0100\n"
"Last-Translator: David García Granda <dgranda at gmail.com>\n"
"Language-Team: Russian <es at li.org>\n"
@@ -41,7 +41,7 @@ msgid "Active"
msgstr "Активно"
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr ""
@@ -247,8 +247,8 @@ msgid "<b>File delimiter</b>"
msgstr "<b>Удалить вид спорта</b>"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Дата"
@@ -277,8 +277,8 @@ msgstr "<b>Имя:</b>"
msgid "<b>File Column</b>"
msgstr "<b>Комментарии</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Название"
@@ -309,10 +309,10 @@ msgid "Average Speed (km/h)"
msgstr "Среднее (км/ч)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Вид спорта"
@@ -336,7 +336,7 @@ msgid "Max Pace (min/km)"
msgstr "Среднее (км/ч)"
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
#, fuzzy
msgid "Comments"
msgstr "<b>Комментарии</b>"
@@ -368,7 +368,7 @@ msgstr ""
msgid "<b>Import from CSV</b>"
msgstr "<b>Список видов спорта</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr "Новая запись"
@@ -494,8 +494,8 @@ msgstr "<b>Дата:</b>"
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -729,16 +729,16 @@ msgstr "Имя"
msgid "M.E.T."
msgstr ""
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
msgid "Extra Weight"
msgstr "Вес"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr ""
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr ""
@@ -784,7 +784,7 @@ msgstr ""
msgid "Percentages based method"
msgstr ""
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr ""
@@ -798,8 +798,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "<b>Ударов в среднем:</b>"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -844,17 +844,17 @@ msgstr ""
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Дистанция"
@@ -862,9 +862,9 @@ msgstr "Дистанция"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Время"
@@ -941,21 +941,21 @@ msgid "Profile"
msgstr "Профиль"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr ""
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr ""
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr ""
@@ -1110,7 +1110,7 @@ msgstr "км"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "км/ч"
@@ -1137,7 +1137,7 @@ msgstr "<b>Имя:</b>"
msgid " <b>Title:</b>"
msgstr "<b>Название</b>"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
#, fuzzy
msgid "Show graph display options"
msgstr "Показать график в классическом виде"
@@ -1274,8 +1274,8 @@ msgstr "<b>Месяц</b>"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "уд/мин"
@@ -1349,7 +1349,7 @@ msgstr "<b>Ударов в среднем:</b>"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr ""
@@ -1360,8 +1360,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Название</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
#, fuzzy
msgid "m"
msgstr "км"
@@ -1532,22 +1532,6 @@ msgstr ""
msgid "Wordpress Extension Upload Complete"
msgstr ""
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr ""
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr ""
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr ""
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr ""
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr ""
@@ -1564,56 +1548,72 @@ msgstr ""
msgid "GPSBabel"
msgstr ""
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr ""
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr ""
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr ""
+
+#: imports/file_gpxplus.py:43
#, fuzzy
msgid "GPS eXchange file"
msgstr "GPX файл"
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr ""
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr ""
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr ""
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr ""
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr ""
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr ""
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr ""
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr ""
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
#, fuzzy
msgid "rpm"
msgstr "уд/мин"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
#, fuzzy
msgid "Heart Rate zone"
msgstr "<b>Ударов в среднем:</b>"
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr ""
@@ -1622,10 +1622,6 @@ msgstr ""
msgid "min"
msgstr ""
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr ""
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr "Название Трека"
@@ -1634,6 +1630,10 @@ msgstr "Название Трека"
msgid "rest"
msgstr ""
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr ""
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr ""
@@ -1646,17 +1646,17 @@ msgstr "Править запись"
msgid "Show graph in classic view"
msgstr "Показать график в классическом виде"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr "Дистанция"
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr ""
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1666,256 +1666,280 @@ msgstr "%s настройки"
msgid "OK"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
#, fuzzy
msgid "Disabled"
msgstr "Дистанция"
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
#, fuzzy
msgid "GPS device found"
msgstr "Плагины устройств GPS"
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
#, fuzzy
msgid "File"
msgstr "_Файл"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
#, fuzzy
msgid "Activities"
msgstr "Активно"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
#, fuzzy
msgid "Start Time"
msgstr "время в день"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
#, fuzzy
msgid "Duration"
msgstr "<b>Описание</b>"
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr "Ok"
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
#, fuzzy
msgid "Got file: "
msgstr "GPX файл"
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, fuzzy, python-format
msgid "Column %d"
msgstr "Колонка"
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr ""
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+#, fuzzy
+msgid "Max"
+msgstr "Май"
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+msgid "Average"
+msgstr "Среднее"
+
+#: pytrainer/gui/windowrecord.py:97
+#, fuzzy
+msgid "Ascent"
+msgstr "<b>Дистанция:</b>"
+
+#: pytrainer/gui/windowrecord.py:98
+#, fuzzy
+msgid "Descent"
+msgstr "<b>Дистанция:</b>"
+
+#: pytrainer/gui/windowrecord.py:204
+#, fuzzy
+msgid "GPX File"
+msgstr "GPX файл"
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr "id"
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr ""
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
msgid "Waypoint"
msgstr "Маршрут"
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Вес"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr ""
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
#, fuzzy
msgid "Records"
msgstr "Запись"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
msgid "Total duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
#, fuzzy
msgid "Total distance"
msgstr "Дистанция"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
msgid "Max speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
msgid "Max duration"
msgstr ""
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
#, fuzzy
msgid "Max distance"
msgstr "Дистанция"
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
msgid "Lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr ""
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr ""
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr ""
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr ""
@@ -1928,150 +1952,147 @@ msgstr ""
msgid "d"
msgstr "id"
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
msgid "Axis Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr ""
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr ""
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr ""
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr ""
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr ""
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr ""
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr ""
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr ""
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr "Удары"
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-msgid "Average"
-msgstr "Среднее"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr ""
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr ""
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr ""
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
#, fuzzy
msgid "Edit Entry"
msgstr "Новая запись"
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
#, fuzzy
msgid "Delete Entry"
msgstr "Новая запись"
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
#, fuzzy
msgid "<b>Date</b>"
msgstr "<b>Дата:</b>"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
#, fuzzy
msgid "<b>Weight</b>"
msgstr "<b>Удалить вид спорта</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
#, fuzzy
msgid "<b>Body Fat</b>"
msgstr "<b>Дата:</b>"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
#, fuzzy
msgid "<b>Resting Heart Rate</b>"
msgstr "<b>Ударов в среднем:</b>"
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
#, fuzzy
msgid "<b>Max Heart Rate</b>"
msgstr "<b>Ударов в среднем:</b>"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr ""
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr ""
@@ -2083,34 +2104,14 @@ msgstr "Значение"
msgid "Female"
msgstr ""
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr ""
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr ""
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-#, fuzzy
-msgid "Max"
-msgstr "Май"
-
-#: pytrainer/gui/windowrecord.py:97
-#, fuzzy
-msgid "Ascent"
-msgstr "<b>Дистанция:</b>"
-
-#: pytrainer/gui/windowrecord.py:98
-#, fuzzy
-msgid "Descent"
-msgstr "<b>Дистанция:</b>"
-
-#: pytrainer/gui/windowrecord.py:204
-#, fuzzy
-msgid "GPX File"
-msgstr "GPX файл"
-
#: pytrainer/lib/gpx.py:128
msgid "No Name"
msgstr "Имя"
@@ -2148,33 +2149,33 @@ msgstr ""
msgid ">2 Hours"
msgstr ""
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "km"
msgstr "км/ч"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "mi"
msgstr "км"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "min/mi"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
msgid "ft"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr ""
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr ""
@@ -2281,35 +2282,47 @@ msgstr "среднее за месяц"
msgid "Monthly Calories"
msgstr "калории за месяц"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr ""
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
#, fuzzy
msgid "Weight Control"
msgstr "Вес"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr ""
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr ""
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr ""
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+"Кажется, GPX-файл содержит записи за несколько дней.Возможно, Вам придется "
+"редактировать Ваше GPX-файл"
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr ""
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
msgid "pytrainer can't import data from your gpx file"
msgstr ""
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr ""
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2339,18 +2352,6 @@ msgstr ""
msgid "Annual Calories"
msgstr "калории за день"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-"Кажется, GPX-файл содержит записи за несколько дней.Возможно, Вам придется "
-"редактировать Ваше GPX-файл"
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr ""
-
#~ msgid "Calendar"
#~ msgstr "Календарь"
diff --git a/locale/sv/LC_MESSAGES/pytrainer_sv.po b/locale/sv/LC_MESSAGES/pytrainer_sv.po
index 45264cd..1e6235b 100644
--- a/locale/sv/LC_MESSAGES/pytrainer_sv.po
+++ b/locale/sv/LC_MESSAGES/pytrainer_sv.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: pytrainer 1.8.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-10 08:54+0300\n"
+"POT-Creation-Date: 2018-02-24 09:15+0200\n"
"PO-Revision-Date: 2011-01-09 20:27+0100\n"
"Last-Translator: Per Medin <per.medin at gmail.com>\n"
"Language-Team: Swedish\n"
@@ -41,7 +41,7 @@ msgid "Active"
msgstr "Aktiv"
#: glade/equipment.ui:266 glade/equipment.ui:510
-#: pytrainer/gui/windowimportdata.py:328
+#: pytrainer/gui/windowimportdata.py:327
msgid "Notes"
msgstr "Anteckningar"
@@ -241,8 +241,8 @@ msgid "<b>File delimiter</b>"
msgstr "<b>Filavgränsare</b>"
#: glade/importdata.ui:1011 pytrainer/gui/dialogselecttrack.py:38
-#: pytrainer/gui/windowmain.py:104 pytrainer/gui/windowmain.py:119
-#: pytrainer/gui/windowmain.py:172 pytrainer/gui/windowmain.py:1486
+#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:174 pytrainer/gui/windowmain.py:1328
msgid "Date"
msgstr "Datum"
@@ -269,8 +269,8 @@ msgstr "<b>PyTrainer Fält</b>"
msgid "<b>File Column</b>"
msgstr "<b>Filkolumn</b>"
-#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:103
-#: pytrainer/gui/windowmain.py:1485
+#: glade/importdata.ui:1137 pytrainer/gui/windowmain.py:105
+#: pytrainer/gui/windowmain.py:1327
msgid "Title"
msgstr "Titel"
@@ -297,10 +297,10 @@ msgid "Average Speed (km/h)"
msgstr "Medelhastighet (km/h)"
#: glade/importdata.ui:1215 glade/pytrainer.ui:701
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowmain.py:98
-#: pytrainer/gui/windowmain.py:106 pytrainer/gui/windowmain.py:128
-#: pytrainer/gui/windowmain.py:1488 pytrainer/gui/windowprofile.py:63
-#: pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:130 pytrainer/gui/windowmain.py:1330
+#: pytrainer/gui/windowprofile.py:64
msgid "Sport"
msgstr "Träningsform"
@@ -321,7 +321,7 @@ msgid "Max Pace (min/km)"
msgstr "Maxtempo (min/km)"
#: glade/importdata.ui:1280 glade/newrecord.ui:1093
-#: pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:157
msgid "Comments"
msgstr "Kommentarer"
@@ -350,7 +350,7 @@ msgstr "Importera Data"
msgid "<b>Import from CSV</b>"
msgstr "<b>Importera från CSV fil</b>"
-#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:2145
+#: glade/newrecord.ui:36 pytrainer/gui/windowmain.py:1981
msgid "New Entry"
msgstr "Ny Inmatning"
@@ -458,8 +458,8 @@ msgstr "Puls:"
#: glade/newrecord.ui:914 glade/pytrainer.ui:114 glade/pytrainer.ui:139
#: glade/pytrainer.ui:161 glade/pytrainer.ui:186 glade/pytrainer.ui:364
#: glade/pytrainer.ui:389 glade/pytrainer.ui:411 glade/pytrainer.ui:436
-#: pytrainer/gui/windowmain.py:110 pytrainer/gui/windowmain.py:153
-#: pytrainer/gui/windowmain.py:1492 pytrainer/monthgraph.py:30
+#: pytrainer/gui/windowmain.py:112 pytrainer/gui/windowmain.py:155
+#: pytrainer/gui/windowmain.py:1334 pytrainer/monthgraph.py:30
#: pytrainer/weekgraph.py:29 pytrainer/yeargraph.py:30
#: pytrainer/totalgraph.py:28
msgid "Calories"
@@ -680,16 +680,16 @@ msgstr "Namn"
msgid "M.E.T."
msgstr ""
-#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1247 pytrainer/gui/windowprofile.py:64
msgid "Extra Weight"
msgstr "Extra vikt"
-#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1292 pytrainer/gui/windowprofile.py:64
msgid "Maximum Pace"
msgstr "Maxtempo"
-#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:177
-#: pytrainer/gui/windowprofile.py:63
+#: glade/profile.ui:1319 pytrainer/gui/windowmain.py:179
+#: pytrainer/gui/windowprofile.py:64
msgid "Color"
msgstr ""
@@ -737,7 +737,7 @@ msgstr ""
msgid "Percentages based method"
msgstr "Procentbaserad metod"
-#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:800
+#: glade/profile.ui:1669 pytrainer/gui/windowmain.py:799
msgid "Karvonen method"
msgstr "Karvonens metod"
@@ -750,8 +750,8 @@ msgid "<b>Heart Rate Zones</b>"
msgstr "<b>Pulszoner</b>"
#: glade/profile.ui:1745 glade/pytrainer.ui:273 glade/pytrainer.ui:304
-#: pytrainer/core/activity.py:468 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:480 pytrainer/core/activity.py:548
+#: pytrainer/core/activity.py:543 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:555 pytrainer/core/activity.py:623
#: pytrainer/daygraph.py:56 pytrainer/heartrategraph.py:36
#: pytrainer/recordgraph.py:140
msgid "Heart Rate"
@@ -796,17 +796,17 @@ msgstr "Startparametrar"
#: glade/pytrainer.ui:102 glade/pytrainer.ui:127 glade/pytrainer.ui:149
#: glade/pytrainer.ui:174 glade/pytrainer.ui:352 glade/pytrainer.ui:377
-#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:380
-#: pytrainer/core/activity.py:391 pytrainer/core/activity.py:431
-#: pytrainer/core/activity.py:442 pytrainer/core/activity.py:451
-#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:469
-#: pytrainer/core/activity.py:479 pytrainer/core/activity.py:488
-#: pytrainer/core/activity.py:547 pytrainer/extensions/googlemaps.py:134
-#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:328
-#: pytrainer/gui/windowmain.py:105 pytrainer/gui/windowmain.py:145
-#: pytrainer/gui/windowmain.py:163 pytrainer/gui/windowmain.py:173
-#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1487
+#: glade/pytrainer.ui:399 glade/pytrainer.ui:424 pytrainer/core/activity.py:455
+#: pytrainer/core/activity.py:466 pytrainer/core/activity.py:506
+#: pytrainer/core/activity.py:517 pytrainer/core/activity.py:526
+#: pytrainer/core/activity.py:535 pytrainer/core/activity.py:544
+#: pytrainer/core/activity.py:554 pytrainer/core/activity.py:563
+#: pytrainer/core/activity.py:622 pytrainer/extensions/googlemaps.py:134
+#: pytrainer/extensions/osm.py:107 pytrainer/gui/windowimportdata.py:327
#: pytrainer/gui/windowrecord.py:92 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:165 pytrainer/gui/windowmain.py:175
+#: pytrainer/gui/windowmain.py:578 pytrainer/gui/windowmain.py:1329
msgid "Distance"
msgstr "Distans"
@@ -814,9 +814,9 @@ msgstr "Distans"
#: glade/pytrainer.ui:177 glade/pytrainer.ui:355 glade/pytrainer.ui:380
#: glade/pytrainer.ui:402 glade/pytrainer.ui:427
#: pytrainer/extensions/googlemaps.py:134 pytrainer/extensions/osm.py:106
-#: pytrainer/gui/windowmain.py:107 pytrainer/gui/windowmain.py:146
-#: pytrainer/gui/windowmain.py:164 pytrainer/gui/windowmain.py:174
-#: pytrainer/gui/windowmain.py:580 pytrainer/gui/windowmain.py:1489
+#: pytrainer/gui/windowmain.py:109 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:166 pytrainer/gui/windowmain.py:176
+#: pytrainer/gui/windowmain.py:579 pytrainer/gui/windowmain.py:1331
msgid "Time"
msgstr "Tid"
@@ -892,21 +892,21 @@ msgid "Profile"
msgstr "Etappprofil"
#: glade/pytrainer.ui:267 glade/pytrainer.ui:298 glade/pytrainer.ui:320
-#: pytrainer/core/activity.py:392 pytrainer/core/activity.py:450
-#: pytrainer/core/activity.py:452 pytrainer/gui/windowmain.py:175
+#: pytrainer/core/activity.py:467 pytrainer/core/activity.py:525
+#: pytrainer/core/activity.py:527 pytrainer/gui/windowmain.py:177
#: pytrainer/recordgraph.py:136
msgid "Speed"
msgstr "Hastighet"
-#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:381
-#: pytrainer/core/activity.py:459 pytrainer/core/activity.py:461
-#: pytrainer/gui/windowmain.py:176 pytrainer/gui/windowrecord.py:96
+#: glade/pytrainer.ui:270 glade/pytrainer.ui:301 pytrainer/core/activity.py:456
+#: pytrainer/core/activity.py:534 pytrainer/core/activity.py:536
+#: pytrainer/gui/windowrecord.py:96 pytrainer/gui/windowmain.py:178
#: pytrainer/recordgraph.py:138
msgid "Pace"
msgstr "Tempo"
#: glade/pytrainer.ui:276 glade/pytrainer.ui:307 glade/pytrainer.ui:326
-#: pytrainer/core/activity.py:487 pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:562 pytrainer/core/activity.py:564
#: pytrainer/recordgraph.py:142
msgid "Cadence"
msgstr "Kadens"
@@ -1052,7 +1052,7 @@ msgstr "Km"
#: glade/pytrainer.ui:1255 glade/pytrainer.ui:3652 glade/pytrainer.ui:3685
#: glade/pytrainer.ui:4281 glade/pytrainer.ui:4374 glade/pytrainer.ui:4933
#: glade/pytrainer.ui:5026 glade/pytrainer.ui:5684 glade/pytrainer.ui:5700
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km/h"
msgstr "km/h"
@@ -1078,7 +1078,7 @@ msgstr "<b>Graf</b>"
msgid " <b>Title:</b>"
msgstr " <b>Runda:</b>"
-#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1711
+#: glade/pytrainer.ui:1552 pytrainer/gui/windowmain.py:1553
msgid "Show graph display options"
msgstr "Visa grafinställningar"
@@ -1206,8 +1206,8 @@ msgstr "<b>Pulszon 1:</b>"
#: glade/pytrainer.ui:2933 glade/pytrainer.ui:2948 glade/pytrainer.ui:3775
#: glade/pytrainer.ui:3869 glade/pytrainer.ui:4431 glade/pytrainer.ui:4509
#: glade/pytrainer.ui:5083 glade/pytrainer.ui:5161 glade/pytrainer.ui:5509
-#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:470
-#: pytrainer/core/activity.py:548
+#: glade/pytrainer.ui:5716 pytrainer/core/activity.py:545
+#: pytrainer/core/activity.py:623
msgid "bpm"
msgstr "slag/min"
@@ -1280,7 +1280,7 @@ msgstr "<b>Medelpuls:</b>"
#: glade/pytrainer.ui:3805 glade/pytrainer.ui:3837 glade/pytrainer.ui:4477
#: glade/pytrainer.ui:4493 glade/pytrainer.ui:5129 glade/pytrainer.ui:5145
-#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5781 glade/pytrainer.ui:5797 pytrainer/lib/uc.py:54
msgid "min/km"
msgstr "min/km"
@@ -1291,8 +1291,8 @@ msgid "<b>Total Asc/Desc:</b>"
msgstr "<b>Titel:</b>"
#: glade/pytrainer.ui:3971 glade/pytrainer.ui:4612 glade/pytrainer.ui:5264
-#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:2051
-#: pytrainer/gui/windowmain.py:2053 pytrainer/lib/uc.py:53
+#: glade/pytrainer.ui:5915 pytrainer/gui/windowmain.py:1887
+#: pytrainer/gui/windowmain.py:1889 pytrainer/lib/uc.py:54
msgid "m"
msgstr "m"
@@ -1461,22 +1461,6 @@ msgstr ""
msgid "Wordpress Extension Upload Complete"
msgstr ""
-#: imports/file_garmintcxv1.py:45
-msgid "Garmin training center database file version 1"
-msgstr ""
-
-#: imports/file_garmintcxv2.py:46
-msgid "Garmin training center database file version 2"
-msgstr ""
-
-#: imports/file_garmintools.py:44
-msgid "Garmin tools dump file"
-msgstr ""
-
-#: imports/file_gpxplusNokia.py:41
-msgid "Nokia Export - GPS eXchange file"
-msgstr ""
-
#: imports/file_kml20.py:45
msgid "Geodistance kml version 2.0 file"
msgstr ""
@@ -1493,53 +1477,69 @@ msgstr ""
msgid "GPSBabel"
msgstr ""
-#: imports/file_gpxplus.py:41
+#: imports/file_garmintcxv1.py:47
+msgid "Garmin training center database file version 1"
+msgstr ""
+
+#: imports/file_garmintcxv2.py:48
+msgid "Garmin training center database file version 2"
+msgstr ""
+
+#: imports/file_garmintools.py:46
+msgid "Garmin tools dump file"
+msgstr ""
+
+#: imports/file_gpxplus.py:43
msgid "GPS eXchange file"
msgstr ""
-#: pytrainer/core/activity.py:379
+#: imports/file_gpxplusNokia.py:43
+msgid "Nokia Export - GPS eXchange file"
+msgstr ""
+
+#: pytrainer/core/activity.py:454
msgid "Pace by Lap"
msgstr "Varvtid"
-#: pytrainer/core/activity.py:385 pytrainer/core/activity.py:396
-#: pytrainer/core/activity.py:436 pytrainer/core/activity.py:446
-#: pytrainer/core/activity.py:455 pytrainer/core/activity.py:464
-#: pytrainer/core/activity.py:473 pytrainer/core/activity.py:483
-#: pytrainer/core/activity.py:492 pytrainer/core/activity.py:552
+#: pytrainer/core/activity.py:460 pytrainer/core/activity.py:471
+#: pytrainer/core/activity.py:511 pytrainer/core/activity.py:521
+#: pytrainer/core/activity.py:530 pytrainer/core/activity.py:539
+#: pytrainer/core/activity.py:548 pytrainer/core/activity.py:558
+#: pytrainer/core/activity.py:567 pytrainer/core/activity.py:627
msgid "Time (seconds)"
msgstr "Tid (sekunder)"
-#: pytrainer/core/activity.py:390
+#: pytrainer/core/activity.py:465
msgid "Speed by Lap"
msgstr "Hastighet per varv"
-#: pytrainer/core/activity.py:430 pytrainer/core/activity.py:432
+#: pytrainer/core/activity.py:505 pytrainer/core/activity.py:507
msgid "Elevation"
msgstr "Höjd över havet"
-#: pytrainer/core/activity.py:441 pytrainer/core/activity.py:443
+#: pytrainer/core/activity.py:516 pytrainer/core/activity.py:518
msgid "Corrected Elevation"
msgstr "Korrigerad höjd över havet"
-#: pytrainer/core/activity.py:478
+#: pytrainer/core/activity.py:553
#, python-format
msgid "Heart Rate (% of max)"
msgstr "Puls (% of max)"
-#: pytrainer/core/activity.py:480
+#: pytrainer/core/activity.py:555
msgid "%"
msgstr "%"
-#: pytrainer/core/activity.py:489
+#: pytrainer/core/activity.py:564
msgid "rpm"
msgstr "varv per minut"
-#: pytrainer/core/activity.py:546
+#: pytrainer/core/activity.py:621
msgid "Heart Rate zone"
msgstr "Pulszon"
#: pytrainer/extensions/googlemaps.py:132 pytrainer/extensions/osm.py:104
-#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:2051
+#: pytrainer/gui/drawArea.py:165 pytrainer/gui/windowmain.py:1887
msgid "h"
msgstr "h"
@@ -1548,10 +1548,6 @@ msgstr "h"
msgid "min"
msgstr "min"
-#: pytrainer/gui/drawGraph.py:172
-msgid "Athlete Data"
-msgstr "Användar data"
-
#: pytrainer/gui/dialogselecttrack.py:38
msgid "Track Name"
msgstr ""
@@ -1560,6 +1556,10 @@ msgstr ""
msgid "rest"
msgstr "vila"
+#: pytrainer/gui/drawGraph.py:172
+msgid "Athlete Data"
+msgstr "Användar data"
+
#: pytrainer/gui/equipment.py:101
msgid "Usage"
msgstr ""
@@ -1572,17 +1572,17 @@ msgstr "Ändra post"
msgid "Show graph in classic view"
msgstr "Visa graf i klassisk vy"
-#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:546
+#: pytrainer/gui/windowextensions.py:67 pytrainer/gui/windowimportdata.py:545
#: pytrainer/gui/windowplugins.py:68 pytrainer/gui/windowplugins.py:92
msgid "Disable"
msgstr "Avaktivera"
-#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:547
+#: pytrainer/gui/windowextensions.py:69 pytrainer/gui/windowimportdata.py:546
#: pytrainer/gui/windowplugins.py:66 pytrainer/gui/windowplugins.py:93
msgid "Enable"
msgstr "Aktivera"
-#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:531
+#: pytrainer/gui/windowextensions.py:78 pytrainer/gui/windowimportdata.py:530
#: pytrainer/gui/windowplugins.py:77
#, python-format
msgid "%s settings"
@@ -1592,254 +1592,277 @@ msgstr "%s inställningar"
msgid "OK"
msgstr "OK"
-#: pytrainer/gui/windowimportdata.py:96
+#: pytrainer/gui/windowimportdata.py:95
msgid "No file selected"
msgstr "Ingen fil vald"
-#: pytrainer/gui/windowimportdata.py:141
+#: pytrainer/gui/windowimportdata.py:140
msgid "Configure"
msgstr "Konfigurera"
-#: pytrainer/gui/windowimportdata.py:147
+#: pytrainer/gui/windowimportdata.py:146
msgid "Disabled"
msgstr "Avaktiverad"
-#: pytrainer/gui/windowimportdata.py:149
+#: pytrainer/gui/windowimportdata.py:148
msgid "Enabled"
msgstr "Aktiverad"
-#: pytrainer/gui/windowimportdata.py:201
+#: pytrainer/gui/windowimportdata.py:200
msgid "Checking for tools"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:228
+#: pytrainer/gui/windowimportdata.py:227
msgid "GPS device found"
msgstr "GPS enhet hittad"
-#: pytrainer/gui/windowimportdata.py:231
+#: pytrainer/gui/windowimportdata.py:230
msgid "GPS device <b>not</b> found"
msgstr "GPS enhet <b>ej</b> hittad"
-#: pytrainer/gui/windowimportdata.py:238
+#: pytrainer/gui/windowimportdata.py:237
msgid "This tool was not found on the system"
msgstr "Detta verktyg hittades inte på systemet"
-#: pytrainer/gui/windowimportdata.py:240
+#: pytrainer/gui/windowimportdata.py:239
msgid " Homepage"
msgstr " Hemsida"
-#: pytrainer/gui/windowimportdata.py:260
+#: pytrainer/gui/windowimportdata.py:259
msgid "Checking file type for: "
msgstr ""
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "File"
msgstr "Fil"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Type"
msgstr "Typ"
-#: pytrainer/gui/windowimportdata.py:293
+#: pytrainer/gui/windowimportdata.py:292
msgid "Activities"
msgstr "Aktiviteter"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Start Time"
msgstr "Starttid"
-#: pytrainer/gui/windowimportdata.py:328 pytrainer/gui/windowrecord.py:204
+#: pytrainer/gui/windowimportdata.py:327 pytrainer/gui/windowrecord.py:204
msgid "Duration"
msgstr "Varaktighet"
-#: pytrainer/gui/windowimportdata.py:483
+#: pytrainer/gui/windowimportdata.py:482
msgid "Imported into database"
msgstr "Importerad till databas"
-#: pytrainer/gui/windowimportdata.py:554 pytrainer/gui/windowplugins.py:100
+#: pytrainer/gui/windowimportdata.py:553 pytrainer/gui/windowplugins.py:100
msgid "Ok"
msgstr "Ok"
-#: pytrainer/gui/windowimportdata.py:606
+#: pytrainer/gui/windowimportdata.py:605
msgid "Saving options"
msgstr "Sparar inställningar"
-#: pytrainer/gui/windowimportdata.py:608
+#: pytrainer/gui/windowimportdata.py:607
msgid "Options saved"
msgstr "Inställningar sparade"
-#: pytrainer/gui/windowimportdata.py:634
+#: pytrainer/gui/windowimportdata.py:633
msgid "Importing one activity"
msgstr "Importerar en aktivitet"
-#: pytrainer/gui/windowimportdata.py:636
+#: pytrainer/gui/windowimportdata.py:635
#, python-format
msgid "Importing %d activities"
msgstr "Importerar %d aktiviteter"
-#: pytrainer/gui/windowimportdata.py:644
+#: pytrainer/gui/windowimportdata.py:643
msgid "No activity has been imported"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:646
+#: pytrainer/gui/windowimportdata.py:645
msgid "Imported one activity"
msgstr "Importerade en aktivitet"
-#: pytrainer/gui/windowimportdata.py:648
+#: pytrainer/gui/windowimportdata.py:647
#, python-format
msgid "Imported %d activities"
msgstr "Importerade %d aktiviteter"
-#: pytrainer/gui/windowimportdata.py:652
+#: pytrainer/gui/windowimportdata.py:651
msgid " Activity selected was already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:654
+#: pytrainer/gui/windowimportdata.py:653
#, python-format
msgid " %d selected activities were already present in DB"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:662
+#: pytrainer/gui/windowimportdata.py:661
msgid "Choose a file (or files) to import activities from"
msgstr "Välj en eller flera filer att importera aktivitet(er) från"
-#: pytrainer/gui/windowimportdata.py:677
+#: pytrainer/gui/windowimportdata.py:676
#, python-format
msgid "Found file of type: %s"
msgstr "Hittade fil av typen: %s"
-#: pytrainer/gui/windowimportdata.py:702
+#: pytrainer/gui/windowimportdata.py:701
msgid "Found in database"
msgstr "Hittades i databasen"
-#: pytrainer/gui/windowimportdata.py:720
+#: pytrainer/gui/windowimportdata.py:719
#, python-format
msgid "File %s is of unknown or unsupported file type"
msgstr "Filen %s är av en okänd filtyp"
-#: pytrainer/gui/windowimportdata.py:757
+#: pytrainer/gui/windowimportdata.py:756
#, fuzzy
msgid "Got file: "
msgstr "GPX fil:"
-#: pytrainer/gui/windowimportdata.py:794
+#: pytrainer/gui/windowimportdata.py:793
#, python-format
msgid "Column %d"
msgstr "Kolumn %d"
-#: pytrainer/gui/windowimportdata.py:851
+#: pytrainer/gui/windowimportdata.py:850
msgid "ERROR: Must define at least a date column"
msgstr ""
-#: pytrainer/gui/windowimportdata.py:983
+#: pytrainer/gui/windowimportdata.py:982
#, python-format
msgid "Import completed. %d rows processed"
msgstr ""
-#: pytrainer/gui/windowmain.py:98 pytrainer/gui/windowmain.py:102
-#: pytrainer/gui/windowmain.py:115 pytrainer/gui/windowmain.py:118
-#: pytrainer/gui/windowmain.py:127 pytrainer/gui/windowmain.py:161
-#: pytrainer/gui/windowmain.py:170
+#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
+#, fuzzy
+msgid "Max"
+msgstr "Maxpuls"
+
+#: pytrainer/gui/windowrecord.py:94 pytrainer/gui/windowmain.py:1333
+msgid "Average"
+msgstr "Medel"
+
+#: pytrainer/gui/windowrecord.py:97
+#, fuzzy
+msgid "Ascent"
+msgstr "Stigning:"
+
+#: pytrainer/gui/windowrecord.py:98
+#, fuzzy
+msgid "Descent"
+msgstr "Sluttning:"
+
+#: pytrainer/gui/windowrecord.py:204
+msgid "GPX File"
+msgstr "GPX Fil"
+
+#: pytrainer/gui/windowmain.py:100 pytrainer/gui/windowmain.py:104
+#: pytrainer/gui/windowmain.py:117 pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:129 pytrainer/gui/windowmain.py:163
+#: pytrainer/gui/windowmain.py:172
msgid "id"
msgstr "id"
-#: pytrainer/gui/windowmain.py:98
+#: pytrainer/gui/windowmain.py:100
msgid "Start"
msgstr "Start"
-#: pytrainer/gui/windowmain.py:108
+#: pytrainer/gui/windowmain.py:110
msgid "⌀ HR"
msgstr "⌀ Puls"
-#: pytrainer/gui/windowmain.py:109
+#: pytrainer/gui/windowmain.py:111
msgid "⌀ Speed"
msgstr "⌀ Hastighet"
-#: pytrainer/gui/windowmain.py:115
+#: pytrainer/gui/windowmain.py:117
msgid "Waypoint"
msgstr "Koordinat"
-#: pytrainer/gui/windowmain.py:120
+#: pytrainer/gui/windowmain.py:122
msgid "Weight"
msgstr "Vikt"
-#: pytrainer/gui/windowmain.py:121
+#: pytrainer/gui/windowmain.py:123
msgid "Body Fat %"
msgstr "% Kroppsfett"
-#: pytrainer/gui/windowmain.py:122
+#: pytrainer/gui/windowmain.py:124
msgid "Resting HR"
msgstr "Vilopuls"
-#: pytrainer/gui/windowmain.py:123 pytrainer/gui/windowmain.py:135
-#: pytrainer/gui/windowmain.py:152
+#: pytrainer/gui/windowmain.py:125 pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:154
msgid "Max HR"
msgstr "Maxpuls"
-#: pytrainer/gui/windowmain.py:129
+#: pytrainer/gui/windowmain.py:131
#, fuzzy
msgid "Records"
msgstr "Pass"
-#: pytrainer/gui/windowmain.py:130
+#: pytrainer/gui/windowmain.py:132
#, fuzzy
msgid "Total duration"
msgstr "All varaktighet"
-#: pytrainer/gui/windowmain.py:131
+#: pytrainer/gui/windowmain.py:133
#, fuzzy
msgid "Total distance"
msgstr "Sträcka per månad"
-#: pytrainer/gui/windowmain.py:132 pytrainer/gui/windowmain.py:147
+#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:149
msgid "Avg speed"
msgstr ""
-#: pytrainer/gui/windowmain.py:133 pytrainer/gui/windowmain.py:148
+#: pytrainer/gui/windowmain.py:135 pytrainer/gui/windowmain.py:150
#, fuzzy
msgid "Max speed"
msgstr "Maxhastighet (km/h)"
-#: pytrainer/gui/windowmain.py:134 pytrainer/gui/windowmain.py:151
+#: pytrainer/gui/windowmain.py:136 pytrainer/gui/windowmain.py:153
msgid "Avg HR"
msgstr ""
-#: pytrainer/gui/windowmain.py:136
+#: pytrainer/gui/windowmain.py:138
#, fuzzy
msgid "Max duration"
msgstr "Varaktighet"
-#: pytrainer/gui/windowmain.py:137
+#: pytrainer/gui/windowmain.py:139
#, fuzzy
msgid "Max distance"
msgstr "Distans"
-#: pytrainer/gui/windowmain.py:143
+#: pytrainer/gui/windowmain.py:145
#, fuzzy
msgid "Lap"
msgstr "Varv"
-#: pytrainer/gui/windowmain.py:144
+#: pytrainer/gui/windowmain.py:146
msgid "Trigger"
msgstr ""
-#: pytrainer/gui/windowmain.py:149
+#: pytrainer/gui/windowmain.py:151
msgid "Avg pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:150
+#: pytrainer/gui/windowmain.py:152
msgid "Max pace"
msgstr ""
-#: pytrainer/gui/windowmain.py:154
+#: pytrainer/gui/windowmain.py:156
msgid "Intensity"
msgstr ""
-#: pytrainer/gui/windowmain.py:162
+#: pytrainer/gui/windowmain.py:164
msgid "Race"
msgstr ""
-#: pytrainer/gui/windowmain.py:171
+#: pytrainer/gui/windowmain.py:173
msgid "Rank"
msgstr ""
@@ -1852,149 +1875,146 @@ msgstr ""
msgid "d"
msgstr "id"
-#: pytrainer/gui/windowmain.py:569
+#: pytrainer/gui/windowmain.py:568
msgid "Show on X Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:570
+#: pytrainer/gui/windowmain.py:569
msgid "Show on Y1 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:571
+#: pytrainer/gui/windowmain.py:570
msgid "Show on Y2 Axis"
msgstr ""
-#: pytrainer/gui/windowmain.py:572
+#: pytrainer/gui/windowmain.py:571
#, fuzzy
msgid "Axis Limits"
msgstr "Återställ gränser"
-#: pytrainer/gui/windowmain.py:581
+#: pytrainer/gui/windowmain.py:580
msgid "Laps"
msgstr "Varv"
-#: pytrainer/gui/windowmain.py:582
+#: pytrainer/gui/windowmain.py:581
msgid "Left Axis Grid"
msgstr "Vänster axel skala"
-#: pytrainer/gui/windowmain.py:583
+#: pytrainer/gui/windowmain.py:582
msgid "Right Axis Grid"
msgstr "Höger axel skala"
-#: pytrainer/gui/windowmain.py:584
+#: pytrainer/gui/windowmain.py:583
msgid "X Axis Grid"
msgstr "X-axel skala"
-#: pytrainer/gui/windowmain.py:645
+#: pytrainer/gui/windowmain.py:644
msgid "Reset Limits"
msgstr "Återställ gränser"
-#: pytrainer/gui/windowmain.py:647
+#: pytrainer/gui/windowmain.py:646
msgid "Set Limits"
msgstr "Sätt gränser"
-#: pytrainer/gui/windowmain.py:802
+#: pytrainer/gui/windowmain.py:801
msgid "Percentages method"
msgstr "Procent"
-#: pytrainer/gui/windowmain.py:815
+#: pytrainer/gui/windowmain.py:814
msgid "800 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:816
+#: pytrainer/gui/windowmain.py:815
msgid "1500 m"
msgstr ""
-#: pytrainer/gui/windowmain.py:817
+#: pytrainer/gui/windowmain.py:816
msgid "5K"
msgstr ""
-#: pytrainer/gui/windowmain.py:818
+#: pytrainer/gui/windowmain.py:817
msgid "7K"
msgstr ""
-#: pytrainer/gui/windowmain.py:819
+#: pytrainer/gui/windowmain.py:818
msgid "10K"
msgstr ""
-#: pytrainer/gui/windowmain.py:820
+#: pytrainer/gui/windowmain.py:819
msgid "Half marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:821
+#: pytrainer/gui/windowmain.py:820
msgid "Marathon"
msgstr ""
-#: pytrainer/gui/windowmain.py:822
+#: pytrainer/gui/windowmain.py:821
msgid "100K"
msgstr ""
-#: pytrainer/gui/windowmain.py:1490 pytrainer/recordgraph.py:144
+#: pytrainer/gui/windowmain.py:1332 pytrainer/recordgraph.py:144
msgid "Beats"
msgstr "Puls"
-#: pytrainer/gui/windowmain.py:1491 pytrainer/gui/windowrecord.py:94
-msgid "Average"
-msgstr "Medel"
-
-#: pytrainer/gui/windowmain.py:1707
+#: pytrainer/gui/windowmain.py:1549
msgid "Hide graph display options"
msgstr "Dölj grafinställningar"
-#: pytrainer/gui/windowmain.py:2044
+#: pytrainer/gui/windowmain.py:1880
msgid "lap"
msgstr "varv"
-#: pytrainer/gui/windowmain.py:2051 pytrainer/gui/windowmain.py:2053
+#: pytrainer/gui/windowmain.py:1887 pytrainer/gui/windowmain.py:1889
msgid "s"
msgstr "s"
-#: pytrainer/gui/windowmain.py:2141 pytrainer/record.py:66
+#: pytrainer/gui/windowmain.py:1977 pytrainer/old_record.py:66
+#: pytrainer/record.py:65
msgid "Edit Entry"
msgstr "Ändra inmatning"
-#: pytrainer/gui/windowmain.py:2152
+#: pytrainer/gui/windowmain.py:1988
msgid "Delete Entry"
msgstr "Radera inmatning"
-#: pytrainer/gui/windowmain.py:2176
+#: pytrainer/gui/windowmain.py:2012
msgid "Create Athlete Entry"
msgstr "Skapa användar notering"
-#: pytrainer/gui/windowmain.py:2180
+#: pytrainer/gui/windowmain.py:2016
msgid "Edit Athlete Entry"
msgstr ""
-#: pytrainer/gui/windowmain.py:2193
+#: pytrainer/gui/windowmain.py:2029
#, fuzzy
msgid "<b>Date</b>"
msgstr "<b>Datum:</b>"
-#: pytrainer/gui/windowmain.py:2209
+#: pytrainer/gui/windowmain.py:2045
#, fuzzy
msgid "<b>Weight</b>"
msgstr "<b>Vecka:</b>"
-#: pytrainer/gui/windowmain.py:2217
+#: pytrainer/gui/windowmain.py:2053
#, fuzzy
msgid "<b>Body Fat</b>"
msgstr "<b>Puls:</b>"
-#: pytrainer/gui/windowmain.py:2225
+#: pytrainer/gui/windowmain.py:2061
#, fuzzy
msgid "<b>Resting Heart Rate</b>"
msgstr "<b>Hjärtfrekvens</b>"
-#: pytrainer/gui/windowmain.py:2233
+#: pytrainer/gui/windowmain.py:2069
#, fuzzy
msgid "<b>Max Heart Rate</b>"
msgstr "<b>Hjärtfrekvens</b>"
-#: pytrainer/gui/windowmain.py:2261 pytrainer/main.py:484
+#: pytrainer/gui/windowmain.py:2097 pytrainer/main.py:472
msgid "Delete this database entry?"
msgstr "Radera denna inmatning"
-#: pytrainer/gui/windowmain.py:2263
+#: pytrainer/gui/windowmain.py:2099
msgid "Are you sure?"
msgstr "Är du säker?"
@@ -2006,33 +2026,14 @@ msgstr "Man"
msgid "Female"
msgstr "Kvinna"
-#: pytrainer/gui/windowprofile.py:63
+#: pytrainer/gui/windowprofile.py:64
msgid "MET"
msgstr ""
-#: pytrainer/gui/windowprofile.py:319
+#: pytrainer/gui/windowprofile.py:320
msgid "Sport Creation Error"
msgstr ""
-#: pytrainer/gui/windowrecord.py:93 pytrainer/gui/windowrecord.py:95
-#, fuzzy
-msgid "Max"
-msgstr "Maxpuls"
-
-#: pytrainer/gui/windowrecord.py:97
-#, fuzzy
-msgid "Ascent"
-msgstr "Stigning:"
-
-#: pytrainer/gui/windowrecord.py:98
-#, fuzzy
-msgid "Descent"
-msgstr "Sluttning:"
-
-#: pytrainer/gui/windowrecord.py:204
-msgid "GPX File"
-msgstr "GPX Fil"
-
#: pytrainer/lib/gpx.py:128
msgid "No Name"
msgstr ""
@@ -2070,34 +2071,34 @@ msgstr ""
msgid ">2 Hours"
msgstr ""
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "km"
msgstr "km"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
#, fuzzy
msgid "mi"
msgstr "min"
-#: pytrainer/lib/uc.py:52
+#: pytrainer/lib/uc.py:53
msgid "mph"
msgstr ""
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
#, fuzzy
msgid "min/mi"
msgstr "min/mile"
-#: pytrainer/lib/uc.py:53
+#: pytrainer/lib/uc.py:54
#, fuzzy
msgid "ft"
msgstr "fot"
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "kg"
msgstr "kg"
-#: pytrainer/lib/uc.py:54
+#: pytrainer/lib/uc.py:55
msgid "lb"
msgstr "lb"
@@ -2192,35 +2193,47 @@ msgstr "Medelhastighet per månad"
msgid "Monthly Calories"
msgstr "Kalorier per månad"
-#: pytrainer/profile.py:139
+#: pytrainer/profile.py:156
msgid "Moderate activity"
msgstr "Mycket lätt träning"
-#: pytrainer/profile.py:140
+#: pytrainer/profile.py:157
msgid "Weight Control"
msgstr "Lätt träning"
-#: pytrainer/profile.py:141
+#: pytrainer/profile.py:158
msgid "Aerobic"
msgstr "Medelintensiv träning"
-#: pytrainer/profile.py:142
+#: pytrainer/profile.py:159
msgid "Anaerobic"
msgstr "Hård träning"
-#: pytrainer/profile.py:143
+#: pytrainer/profile.py:160
msgid "VO2 MAX"
msgstr "Högintensiv träning"
-#: pytrainer/record.py:55
+#: pytrainer/waypoint.py:97
+msgid ""
+"The gpx file seems to be a several days records. Perhaps you will need to "
+"edit your gpx file"
+msgstr ""
+"GPX-filen verkar inehålla data för flera dagar. Du kanske vill editera din "
+"GPX-fil"
+
+#: pytrainer/old_record.py:56 pytrainer/record.py:55
msgid "Modify details before importing"
msgstr ""
-#: pytrainer/record.py:532
+#: pytrainer/old_record.py:429 pytrainer/record.py:394
#, fuzzy
msgid "pytrainer can't import data from your gpx file"
msgstr "pyTrainer kan inte importera från din gpx-fil"
+#: pytrainer/main.py:488
+msgid "Delete this waypoint?"
+msgstr ""
+
#: pytrainer/totalgraph.py:24 pytrainer/totalgraph.py:25
#: pytrainer/totalgraph.py:26 pytrainer/totalgraph.py:27
#: pytrainer/totalgraph.py:28
@@ -2252,18 +2265,6 @@ msgstr "Medelhastighet per dag"
msgid "Annual Calories"
msgstr "Kalorier per dag"
-#: pytrainer/waypoint.py:88
-msgid ""
-"The gpx file seems to be a several days records. Perhaps you will need to "
-"edit your gpx file"
-msgstr ""
-"GPX-filen verkar inehålla data för flera dagar. Du kanske vill editera din "
-"GPX-fil"
-
-#: pytrainer/main.py:500
-msgid "Delete this waypoint?"
-msgstr ""
-
#~ msgid "Calendar"
#~ msgstr "Kalender"
diff --git a/plugins/garmin-fit/garmin-fit.py b/plugins/garmin-fit/garmin-fit.py
index 0e4c0c3..10c3c7e 100644
--- a/plugins/garmin-fit/garmin-fit.py
+++ b/plugins/garmin-fit/garmin-fit.py
@@ -6,6 +6,8 @@ import os
from lxml import etree
from pytrainer.lib.xmlUtils import XMLParser
from pytrainer.gui.dialogs import fileChooserDialog, guiFlush
+from pytrainer.core.activity import Activity
+from sqlalchemy.orm import exc
class garminFIT():
def __init__(self, parent = None, validate=False):
@@ -74,9 +76,10 @@ class garminFIT():
def inDatabase(self, activity):
#comparing date and start time (sport may have been changed in DB after import)
time = self.detailsFromTCX(activity)
- if self.pytrainer_main.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)):
+ try:
+ self.pytrainer_main.ddbb.session.query(Activity).filter(Activity.date_time_utc == time).one()
return True
- else:
+ except exc.NoResultFound:
return False
def getSport(self, activity):
diff --git a/plugins/garmin-gpx/garmingpx.py b/plugins/garmin-gpx/garmingpx.py
index 957d98d..d278690 100644
--- a/plugins/garmin-gpx/garmingpx.py
+++ b/plugins/garmin-gpx/garmingpx.py
@@ -25,6 +25,8 @@ import xml.etree.cElementTree
from pytrainer.gui.dialogs import fileChooserDialog, guiFlush
from pytrainer.lib.xmlUtils import XMLParser
+from pytrainer.core.activity import Activity
+from sqlalchemy.orm import exc
class garmingpx():
""" Plugin to import from a GPX file or files
@@ -90,9 +92,10 @@ class garmingpx():
only valid for GPX files with a single activity
"""
time = self.detailsFromGPX(filename)
- if self.pytrainer_main.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)):
+ try:
+ self.pytrainer_main.ddbb.session.query(Activity).filter(Activity.date_time_utc == time).one()
return True
- else:
+ except exc.NoResultFound:
return False
def getSport(self, filename):
diff --git a/plugins/garmin-hr-file/garminhrfile.py b/plugins/garmin-hr-file/garminhrfile.py
index a53ca06..68d8c4a 100644
--- a/plugins/garmin-hr-file/garminhrfile.py
+++ b/plugins/garmin-hr-file/garminhrfile.py
@@ -25,7 +25,8 @@ from lxml import etree
from pytrainer.lib.xmlUtils import XMLParser
from pytrainer.gui.dialogs import fileChooserDialog, guiFlush
-
+from pytrainer.core.activity import Activity
+from sqlalchemy.orm import exc
class garminhrfile():
""" Plugin to import from a Garmin Training Center (version 1) file (as outputed from gpsbabel)
@@ -103,11 +104,10 @@ class garminhrfile():
return False
else:
time = timeElement.text
- #comparing date and start time (sport may have been changed in DB after import)
- if self.pytrainer_main.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)):
- logging.debug("Not importing track for time %s" % (time))
+ try:
+ self.pytrainer_main.ddbb.session.query(Activity).filter(Activity.date_time_utc == time).one()
return False
- else:
+ except exc.NoResultFound:
return True
def getTracks(self, filename):
diff --git a/plugins/garmin-hr/garminhr.py b/plugins/garmin-hr/garminhr.py
index 5f81096..328ffd1 100644
--- a/plugins/garmin-hr/garminhr.py
+++ b/plugins/garmin-hr/garminhr.py
@@ -21,6 +21,8 @@ import os, sys
import logging
from lxml import etree
from pytrainer.lib.xmlUtils import XMLParser
+from pytrainer.core.activity import Activity
+from sqlalchemy.orm import exc
import commands
@@ -157,11 +159,10 @@ class garminhr():
return False
else:
time = timeElement.text
- #comparing date and start time (sport may have been changed in DB after import)
- if self.pytrainer_main.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)):
- logging.debug("Not importing track for time %s" % (time))
+ try:
+ self.pytrainer_main.ddbb.session.query(Activity).filter(Activity.date_time_utc == time).one()
return False
- else:
+ except exc.NoResultFound:
return True
def createGPXfile(self, gpxfile, track):
diff --git a/plugins/garmin-tcxv2/garmin-tcxv2.py b/plugins/garmin-tcxv2/garmin-tcxv2.py
index 7bf321e..02c4e13 100644
--- a/plugins/garmin-tcxv2/garmin-tcxv2.py
+++ b/plugins/garmin-tcxv2/garmin-tcxv2.py
@@ -22,6 +22,8 @@ import os
from lxml import etree
from pytrainer.lib.xmlUtils import XMLParser
from pytrainer.gui.dialogs import fileChooserDialog, guiFlush
+from pytrainer.core.activity import Activity
+from sqlalchemy.orm import exc
class garminTCXv2():
def __init__(self, parent = None, validate=False):
@@ -90,9 +92,10 @@ class garminTCXv2():
def inDatabase(self, activity):
#comparing date and start time (sport may have been changed in DB after import)
time = self.detailsFromTCX(activity)
- if self.pytrainer_main.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)):
+ try:
+ self.pytrainer_main.ddbb.session.query(Activity).filter(Activity.date_time_utc == time).one()
return True
- else:
+ except exc.NoResultFound:
return False
def getSport(self, activity):
diff --git a/plugins/garmintools/garmintools.py b/plugins/garmintools/garmintools.py
index a4c4783..85f9b9d 100644
--- a/plugins/garmintools/garmintools.py
+++ b/plugins/garmintools/garmintools.py
@@ -27,6 +27,8 @@ from lxml import etree
from pytrainer.lib.xmlUtils import XMLParser
from pytrainer.gui.dialogs import fileChooserDialog, guiFlush
+from pytrainer.core.activity import Activity
+from sqlalchemy.orm import exc
class garmintools():
def __init__(self, parent = None, validate=False):
@@ -94,9 +96,10 @@ class garmintools():
def inDatabase(self, tree):
#comparing date and start time (sport may have been changed in DB after import)
time = self.detailsFromFile(tree)
- if self.pytrainer_main.ddbb.select("records","*","date_time_utc=\"%s\"" % (time)):
+ try:
+ self.pytrainer_main.ddbb.session.query(Activity).filter(Activity.date_time_utc == time).one()
return True
- else:
+ except exc.NoResultFound:
return False
def getSport(self, tree):
diff --git a/plugins/garmintools_full/garmintools_full.py b/plugins/garmintools_full/garmintools_full.py
index 9ab49a9..f965139 100644
--- a/plugins/garmintools_full/garmintools_full.py
+++ b/plugins/garmintools_full/garmintools_full.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# -*- coding: iso-8859-1 -*-
+# -*- coding: utf-8 -*-
#Copyright (C) Fiz Vazquez vud1 at sindominio.net
@@ -33,6 +33,7 @@ from lxml import etree
from pytrainer.lib.xmlUtils import XMLParser
from datetime import date, timedelta, datetime
from dateutil.tz import * # for tzutc()
+from pytrainer.core.activity import Activity
class garmintools_full():
""" Plugin to import from a Garmin device using garmintools
@@ -94,7 +95,7 @@ class garmintools_full():
if len(selectedFiles) > 0:
logging.info("Dumping "+str(len(selectedFiles))+" binary files found")
dumpFiles = self.dumpBinaries(selectedFiles)
- self.listStringDBUTC = self.pytrainer_main.ddbb.select("records","date_time_utc")
+ self.listStringDBUTC = self.pytrainer_main.ddbb.session.query(Activity)
if self.maxGap > 0:
logging.info("Starting import. Comparison will be made with "+str(self.maxGap)+" seconds interval")
else:
@@ -214,16 +215,15 @@ class garmintools_full():
stringStartDate = stringStartUTC[0:10]
for entry in listStringStartUTC:
#logging.debug("start: "+str(startDatetime)+" | entry: "+str(entry)+" | gap: "+str(datetimePlusDelta))
- if entry[0] is not None:
- if str(entry[0]).startswith(stringStartDate):
- deltaGap = timedelta(seconds=gap)
- datetimeStartUTC = datetime.strptime(stringStartUTC,"%Y-%m-%dT%H:%M:%SZ")
- datetimeStartUTCDB = datetime.strptime(entry[0],"%Y-%m-%dT%H:%M:%SZ")
- datetimePlusDelta = datetimeStartUTC + deltaGap
- if datetimeStartUTC <= datetimeStartUTCDB and datetimeStartUTCDB <= datetimePlusDelta:
- found = True
- logging.debug("Found: "+str(stringStartUTC)+" <= "+str(entry[0])+" <= "+str(datetimePlusDelta))
- break
+ if entry.date_time_utc.startswith(stringStartDate):
+ deltaGap = timedelta(seconds=gap)
+ datetimeStartUTC = datetime.strptime(stringStartUTC,"%Y-%m-%dT%H:%M:%SZ")
+ datetimeStartUTCDB = datetime.strptime(entry.date_time_utc, "%Y-%m-%dT%H:%M:%SZ")
+ datetimePlusDelta = datetimeStartUTC + deltaGap
+ if datetimeStartUTC <= datetimeStartUTCDB and datetimeStartUTCDB <= datetimePlusDelta:
+ found = True
+ logging.debug("Found: "+str(stringStartUTC)+" <= "+entry.date_time_utc+" <= "+str(datetimePlusDelta))
+ break
else:
if (stringStartUTC,) in listStringStartUTC: # strange way to store results from DB
found = True
diff --git a/pytrainer/__init__.py b/pytrainer/__init__.py
index c01c368..9208e89 100644
--- a/pytrainer/__init__.py
+++ b/pytrainer/__init__.py
@@ -1,5 +1,5 @@
# Based on Django's approach -> http://code.djangoproject.com/svn/django/trunk/django/__init__.py
-VERSION = (1, 11, 0, 'final')
+VERSION = (1, 12, 0, 'final')
def get_version(version=None):
"""Derives a PEP386-compliant version number from VERSION.
diff --git a/pytrainer/athlete.py b/pytrainer/athlete.py
index d50718a..512ed00 100644
--- a/pytrainer/athlete.py
+++ b/pytrainer/athlete.py
@@ -20,10 +20,20 @@
import logging
import dateutil
-from pytrainer.lib.ddbb import DDBB
+from pytrainer.lib.ddbb import DeclarativeBase, ForcedInteger
+from sqlalchemy import Column, Float, Date, Integer
from pytrainer.lib.graphdata import GraphData
from pytrainer.lib.uc import UC
+class Athletestat(DeclarativeBase):
+ __tablename__ = 'athletestats'
+ bodyfat = Column(Float)
+ date = Column(Date)
+ id_athletestat = Column(Integer, primary_key=True)
+ maxhr = Column(ForcedInteger)
+ restinghr = Column(ForcedInteger)
+ weight = Column(Float)
+
class Athlete:
def __init__(self, data_path = None, parent = None):
self.parent = parent
@@ -47,15 +57,12 @@ class Athlete:
def get_athlete_stats(self):
logging.debug('>>')
- results = self.pytrainer_main.ddbb.select_dict("athletestats", ('id_athletestat', 'date', 'weight', 'bodyfat', 'restinghr', 'maxhr'), mod="order by date")
- #Remove None values
- for i, row in enumerate(results):
- for cell in results[i]:
- if results[i][cell] == None:
- results[i][cell] = ""
- logging.debug('Found %d athlete stats results' % len(results))
- logging.debug('<<')
- return results
+ ret = []
+ for stat in self.pytrainer_main.ddbb.session.query(Athletestat).order_by('date'):
+ d = dict(stat.__dict__)
+ d.pop('_sa_instance_state', None)
+ ret.append(d)
+ return ret
def get_athlete_data(self):
logging.debug('>>')
@@ -100,16 +107,19 @@ class Athlete:
def update_athlete_stats(self, id_athletestat, date, weight, bodyfat, restinghr, maxhr):
logging.debug('>>')
try:
- dateutil.parser.parse(date).date()
+ date = dateutil.parser.parse(date).date()
logging.debug("update_athlete_stats called with invalid date")
logging.debug('!<<')
except ValueError:
return
#Update DB
- data = {'date': date, 'weight': weight, 'bodyfat': bodyfat, 'restinghr': restinghr, 'maxhr': maxhr}
- condition = "id_athletestat=%d" % int(id_athletestat)
- self.pytrainer_main.ddbb.update_dict("athletestats",data, condition)
- #self.pytrainer_main.ddbb.update("athletestats",cells,values," id_athletestat=%d" %int(id_athletestat))
+ data = self.pytrainer_main.ddbb.session.query(Athletestat).filter(Athletestat.id_athletestat == id_athletestat).one()
+ data.date = date
+ data.weight = weight
+ data.bodyfat = bodyfat
+ data.restinghr = restinghr
+ data.maxhr = maxhr
+ self.pytrainer_main.ddbb.session.commit()
logging.debug('<<')
def insert_athlete_stats(self, date, weight, bodyfat, restinghr, maxhr):
@@ -120,17 +130,19 @@ class Athlete:
logging.debug('!<<')
return
try:
- dateutil.parser.parse(date).date()
+ date = dateutil.parser.parse(date).date()
except ValueError:
logging.debug("insert_athlete_stats called with invalid date")
logging.debug('!<<')
return
#Update DB
- data = {'date': date, 'weight': weight, 'bodyfat': bodyfat, 'restinghr': restinghr, 'maxhr': maxhr}
- self.pytrainer_main.ddbb.insert_dict("athletestats",data)
+ data = Athletestat(date=date, weight=weight, bodyfat=bodyfat, restinghr=restinghr, maxhr=maxhr)
+ self.pytrainer_main.ddbb.session.add(data)
+ self.pytrainer_main.ddbb.session.commit()
logging.debug('<<')
def delete_record(self, data):
logging.debug('>>')
- self.pytrainer_main.ddbb.delete("athletestats","id_athletestat=%d" % int(data))
+ self.pytrainer_main.ddbb.session.query(Athletestat).filter(Athletestat.id_athletestat == int(data)).delete()
+ self.pytrainer_main.ddbb.session.commit()
logging.debug('<<')
diff --git a/pytrainer/core/activity.py b/pytrainer/core/activity.py
index 0f8a2b0..ed4a68d 100644
--- a/pytrainer/core/activity.py
+++ b/pytrainer/core/activity.py
@@ -17,7 +17,7 @@
#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import logging
-import os
+import os, os.path
import dateutil.parser
from dateutil.tz import tzlocal
@@ -26,6 +26,42 @@ from pytrainer.lib.gpx import Gpx
from pytrainer.lib.graphdata import GraphData
from pytrainer.environment import Environment
from pytrainer.lib import uc
+from pytrainer.profile import Profile
+from pytrainer.lib.ddbb import DeclarativeBase, ForcedInteger, record_to_equipment
+from sqlalchemy import Column, Integer, Float, UnicodeText, Date, ForeignKey, String, Unicode, and_
+from sqlalchemy.orm import relationship, backref, reconstructor, deferred, joinedload
+from sqlalchemy.exc import InvalidRequestError
+
+class Lap(DeclarativeBase):
+ __tablename__ = 'laps'
+ avg_hr = Column(ForcedInteger)
+ calories = Column(ForcedInteger)
+ comments = Column(UnicodeText)
+ distance = Column(Float)
+ elapsed_time = Column(String(length=20))
+ end_lat = Column(Float)
+ end_lon = Column(Float)
+ id_lap = Column(Integer, primary_key=True)
+ intensity = Column(String(length=7))
+ lap_number = Column(ForcedInteger)
+ laptrigger = Column(String(length=9))
+ max_hr = Column(ForcedInteger)
+ max_speed = Column(Float)
+ record = Column(Integer, ForeignKey('records.id_record'), index=True, nullable=False)
+ start_lat = Column(Float)
+ start_lon = Column(Float)
+
+ @property
+ def duration(self):
+ return float(self.elapsed_time)
+
+class ActivityServiceException(Exception):
+
+ def __init__(self, value):
+ self.value = value
+
+ def __str__(self):
+ return repr(self.value)
class ActivityService(object):
'''
@@ -52,7 +88,7 @@ class ActivityService(object):
self.pool_queue = []
logging.debug("<<")
- def remove_activity(self, id):
+ def remove_activity_from_cache(self, id):
sid = str(id)
if sid in self.pool.keys():
logging.debug("Found activity in pool")
@@ -60,6 +96,9 @@ class ActivityService(object):
del self.pool[sid]
def get_activity(self, id):
+ if id is None:
+ logging.warning("Deprecated call to get_activity with None id")
+ return Activity()
sid = str(id)
if sid in self.pool.keys():
logging.debug("Found activity in pool")
@@ -68,7 +107,9 @@ class ActivityService(object):
self.pool_queue.append(sid)
else:
logging.debug("Activity NOT found in pool")
- self.pool[sid] = Activity(pytrainer_main=self.pytrainer_main, id=id)
+ self.pool[sid] = self.pytrainer_main.ddbb.session.query(Activity).options(
+ joinedload('sport'), joinedload('equipment'), joinedload('Laps')
+ ).filter(Activity.id == id).one()
self.pool_queue.append(sid)
if len(self.pool_queue) > self.max_size:
sid_to_remove = self.pool_queue.pop(0)
@@ -78,7 +119,49 @@ class ActivityService(object):
logging.debug("ActivityPool queue: %s" % str(self.pool_queue))
return self.pool[sid]
-class Activity:
+ def remove_activity_from_db(self, activity):
+ """Delete a stored Activity."""
+
+ if not activity.id:
+ raise ActivityServiceException("Cannot remove activity which has not been stored: '{0}'.".format(activity.name))
+ try:
+ self.remove_activity_from_cache(activity.id)
+ self.pytrainer_main.ddbb.session.delete(activity)
+ self.pytrainer_main.ddbb.session.commit()
+ if activity.gpx_file and os.path.isfile(activity.gpx_file):
+ os.remove(activity.gpx_file)
+ except InvalidRequestError:
+ raise ActivityServiceException("Activity id %s not found" % activity.id)
+ logging.debug("Deleted activity: %s", activity.title)
+
+ def get_activities_for_day(self, date, sport=None):
+ """Iterates the activities for a specific date, optionally restricted by Sport)"""
+ if not sport:
+ activities = self.pytrainer_main.ddbb.session.query(Activity).filter(Activity.date == date).options(joinedload('Laps'))
+ else:
+ activities = self.pytrainer_main.ddbb.session.query(Activity).filter(and_(Activity.date == date, Activity.sport == sport)).options(joinedload('Laps'))
+ for activity in activities:
+ sid = str(activity.id)
+ if sid in self.pool:
+ yield self.pool[sid]
+ else:
+ self.pool[sid] = activity
+ self.pool_queue.append(sid)
+ yield activity
+
+ def get_activities_period(self, date_range, sport=None):
+ """Iterate over activities for a specific time period, optionally restricted by Sport.
+Does not add them to the cache."""
+ if not sport:
+ return self.pytrainer_main.ddbb.session.query(Activity).filter(Activity.date.between(date_range.start_date, date_range.end_date))
+ else:
+ return self.pytrainer_main.ddbb.session.query(Activity).filter(and_(Activity.date.between(date_range.start_date, date_range.end_date), Activity.sport == sport))
+
+ def get_all_activities(self):
+ """Iterates over all activities ordered by date"""
+ return self.pytrainer_main.ddbb.session.query(Activity).order_by('date')
+
+class Activity(DeclarativeBase):
'''
Class that knows everything about a particular activity
@@ -127,21 +210,48 @@ class Activity:
lap_time - (graphdata)
pace_limit - (int) maximum pace that is valid for this activity
'''
- def __init__(self, pytrainer_main=None, id=None):
+ __tablename__ = 'records'
+ average = Column(Float)
+ beats = Column(Float)
+ calories = Column(ForcedInteger)
+ comments = Column(UnicodeText)
+ date = Column(Date)
+ date_time_local = Column(String(length=40))
+ date_time_utc = Column(String(length=40))
+ distance = Column(Float)
+ duration = Column(ForcedInteger)
+ gpslog = deferred(Column(String(length=200)))
+ id = Column("id_record", Integer, primary_key=True)
+ maxbeats = Column(Float)
+ maxpace = Column(Float)
+ maxspeed = Column(Float)
+ pace = Column(Float)
+ sport_id = Column("sport", Integer, ForeignKey('sports.id_sports'),
+ index=True, nullable=False)
+ title = Column(Unicode(length=200))
+ unegative = Column(Float)
+ upositive = Column(Float)
+
+ #relation definitions
+ sport = relationship("Sport", backref=backref("activities", order_by=date,
+ cascade='all, delete-orphan'))
+ equipment = relationship("Equipment", secondary=record_to_equipment,
+ backref=backref("activities", order_by=date))
+ Laps = relationship('Lap', backref=backref('activity'),
+ order_by='Lap.lap_number',
+ cascade='all, delete-orphan')
+
+ def __init__(self, **kwargs):
+ self._initialize()
+ super(Activity, self).__init__(**kwargs)
+
+ @reconstructor
+ def _initialize(self):
logging.debug(">>")
self.environment = Environment()
self.uc = uc.UC()
- self.id = id
- #It is an error to try to initialise with no id
- if self.id is None:
- return
- #It is an error to try to initialise with no reference to pytrainer_main
- if pytrainer_main is None:
- print("Error - must initialise with a reference to the main pytrainer class")
- return
- self.pytrainer_main = pytrainer_main
- self.laps = None
- self.has_data = False
+ self.profile = Profile()
+ self.has_data = True
self._distance_data = {}
self._time_data = {}
self._lap_time = None
@@ -149,7 +259,6 @@ class Activity:
self.time_pause = 0
self.pace_limit = None
self._gpx = None
- self._init_from_db()
self.x_axis = "distance"
self.x_limits = (None, None)
self.y1_limits = (None, None)
@@ -213,7 +322,7 @@ class Activity:
@property
def time_tuple(self):
- return second2time(self.time)
+ return second2time(self.duration)
@property
def date_time(self):
@@ -227,6 +336,16 @@ class Activity:
def starttime(self):
return self.date_time.strftime("%X")
+ @property
+ def laps(self):
+ logging.warning("Deprecated property Activity.laps called")
+ ret = []
+ for lap in self.Laps:
+ d = dict(lap.__dict__)
+ d.pop('_sa_instance_state', None)
+ ret.append(d)
+ return ret
+
def __str__(self):
return '''
tracks (%s)
@@ -274,7 +393,7 @@ tracks (%s)
''' % ('self.tracks', self.tracklist, self.laps, self.uc.us,
self.distance_data, self.time_data,
self.gpx_file, self.gpx, self.sport_name,
- self.sport_id, self.title, self.date, self.time, self.time_tuple, self.beats,
+ self.sport_id, self.title, self.date, self.duration, self.time_tuple, self.beats,
self.maxbeats, self.comments, self.calories, self.id, self.date_time_local,
self.date_time_utc, self.date_time, self.starttime, self.distance, self.average,
self.upositive, self.unegative, self.maxspeed, self.maxpace, self.pace, self.has_data,
@@ -307,59 +426,15 @@ tracks (%s)
return None
logging.debug("<<")
- def _init_from_db(self):
- '''
- Get activity information from the DB
- '''
- logging.debug(">>")
- #Get base information
- cols = ("sports.name","id_sports", "date","distance","time","beats","comments","duration",
- "average","calories","id_record","title","upositive","unegative",
- "maxspeed","maxpace","pace","maxbeats","date_time_utc","date_time_local", "sports.max_pace")
- # outer join on sport id to workaround bug where sport reference is null on records from GPX import
- db_result = self.pytrainer_main.ddbb.select("records left outer join sports on records.sport=sports.id_sports",
- ", ".join(cols),
- "id_record=\"%s\" " %self.id)
- if len(db_result) == 1:
- row = db_result[0]
- self.sport_name = row[cols.index('sports.name')]
- if self.sport_name == None:
- self.sport_name = ""
- self.sport_id = row[cols.index('id_sports')]
- self.pace_limit = row[cols.index('sports.max_pace')]
- if self.pace_limit == 0 or self.pace_limit == "":
- self.pace_limit = None
- self.title = row[cols.index('title')]
- if self.title is None:
- self.title = ""
- self.date = row[cols.index('date')]
- self.time = self._int(row[cols.index('time')])
- self.duration = self._int(row[cols.index('duration')])
- self.beats = self._int(row[cols.index('beats')])
- self.comments = row[cols.index('comments')]
- if self.comments is None:
- self.comments = ""
- self.calories = self._int(row[cols.index('calories')])
- self.maxbeats = self._int(row[cols.index('maxbeats')])
- self.date_time_local = row[cols.index('date_time_local')]
- self.date_time_utc = row[cols.index('date_time_utc')]
- self.distance = self._float(row[cols.index('distance')])
- if not self.distance and self.gpx:
- self.distance = self.gpx.total_dist
- self.average = self._float(row[cols.index('average')])
- self.upositive = self._float(row[cols.index('upositive')])
- self.unegative = self._float(row[cols.index('unegative')])
- self.maxspeed = self._float(row[cols.index('maxspeed')])
- self.maxpace = self._float(row[cols.index('maxpace')])
- self.pace = self._float(row[cols.index('pace')])
- self.has_data = True
- else:
- raise Exception("Error - multiple results from DB for id: %s" % self.id)
- #Get lap information
- self.laps = self.pytrainer_main.ddbb.select_dict("laps",
- ("id_lap", "record", "elapsed_time", "distance", "start_lat", "start_lon", "end_lat", "end_lon", "calories", "lap_number", "intensity", "avg_hr", "max_hr", "max_speed", "laptrigger", "comments"),
- "record=\"%s\"" % self.id)
- logging.debug("<<")
+ @property
+ def time(self):
+ logging.warning("Deprecated property Activity.time called")
+ return self.duration
+
+ @property
+ def sport_name(self):
+ logging.warning("Deprecated property Activity.sport_name called")
+ return self.sport.name
def _generate_per_lap_graphs(self):
'''Build lap based graphs...'''
@@ -474,7 +549,7 @@ tracks (%s)
self._time_data['hr'] = GraphData(title=title,xlabel=xlabel, ylabel=ylabel)
self._time_data['hr'].set_color('#00ff00', '#00ff00')
#Heartrate as %
- maxhr = self.pytrainer_main.profile.getMaxHR()
+ maxhr = self.profile.getMaxHR()
title = _("Heart Rate (% of max)")
xlabel = "%s (%s)" % (_('Distance'), self.uc.unit_distance)
ylabel = "%s (%s)" % (_('Heart Rate'), _('%'))
@@ -542,7 +617,7 @@ tracks (%s)
logging.debug("<<")
#Add Heartrate zones graphs
if 'hr' in self._distance_data:
- zones = self.pytrainer_main.profile.getZones()
+ zones = self.profile.getZones()
title = _("Heart Rate zone")
xlabel = "%s (%s)" % (_('Distance'), self.uc.unit_distance)
ylabel = "%s (%s)" % (_('Heart Rate'), _('bpm'))
@@ -606,9 +681,9 @@ tracks (%s)
elif param == 'calories':
return self.calories
elif param == 'time':
- if not self.time:
+ if not self.duration:
return ""
- _hour ,_min, _sec = second2time(self.time)
+ _hour ,_min, _sec = second2time(self.duration)
if _hour == 0:
return "%02d:%02d" % (_min, _sec)
else:
diff --git a/pytrainer/core/equipment.py b/pytrainer/core/equipment.py
index 2c239d6..cc3e77c 100644
--- a/pytrainer/core/equipment.py
+++ b/pytrainer/core/equipment.py
@@ -17,73 +17,32 @@
#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import logging
+from pytrainer.lib.ddbb import DeclarativeBase, ForcedInteger
+from sqlalchemy import Column, Boolean, UnicodeText, Integer, Unicode
+from sqlalchemy.orm import exc
+from sqlalchemy.exc import IntegrityError
+from pytrainer.core.activity import Activity
+from sqlalchemy.sql import func
-class Equipment(object):
-
+class Equipment(DeclarativeBase):
"""An equipment item that can be used during an activity, such as a pair of running shoes."""
-
- def __init__(self):
- self._id = None
+
+ __tablename__ = 'equipment'
+ active = Column(Boolean)
+ description = Column(Unicode(length=100), unique=True, index=True)
+ id = Column(Integer, primary_key=True)
+ life_expectancy = Column(ForcedInteger)
+ notes = Column(UnicodeText)
+ prior_usage = Column(ForcedInteger)
+
+ def __init__(self, **kwargs):
self.description = u""
self.active = True
self.life_expectancy = 0
self.prior_usage = 0
self.notes = u""
-
- def _get_id(self):
- return self._id
-
- def _set_id(self, id):
- self._id = int(id)
-
- id = property(_get_id, _set_id)
-
- def _get_description(self):
- return self._description
-
- def _set_description(self, description):
- if not isinstance(description, unicode):
- raise TypeError("Description must be unicode string, not {0}.".format(type(description).__name__))
- self._description = description
-
- description = property(_get_description, _set_description)
-
- def _get_active(self):
- return self._active
-
- def _set_active(self, active):
- if not isinstance(active, bool):
- raise TypeError("Active must be boolean, not {0}.".format(type(active).__name__))
- self._active = active
-
- active = property(_get_active, _set_active)
-
- def _get_life_expectancy(self):
- return self._life_expectancy
-
- def _set_life_expectancy(self, life_expectancy):
- self._life_expectancy = int(life_expectancy)
-
- life_expectancy = property(_get_life_expectancy, _set_life_expectancy)
-
- def _get_prior_usage(self):
- return self._prior_usage
-
- def _set_prior_usage(self, prior_usage):
- self._prior_usage = int(prior_usage)
-
- prior_usage = property(_get_prior_usage, _set_prior_usage)
-
- def _get_notes(self):
- return self._notes
-
- def _set_notes(self, notes):
- if not isinstance(notes, unicode):
- raise TypeError("Notes must be unicode string, not {0}.".format(type(notes).__name__))
- self._notes = notes
-
- notes = property(_get_notes, _set_notes)
-
+ super(Equipment, self).__init__(**kwargs)
+
def __eq__(self, o):
if isinstance(o, Equipment):
if self.id is not None and o.id is not None:
@@ -96,19 +55,6 @@ class Equipment(object):
else:
return object.__hash__(self)
-_TABLE_NAME = "equipment"
-
-_UPDATE_COLUMNS = "description,active,life_expectancy,prior_usage,notes"
-
-_ALL_COLUMNS = "id," + _UPDATE_COLUMNS
-
-def _create_row(equipment):
- return [equipment.description,
- 1 if equipment.active else 0,
- equipment.life_expectancy,
- equipment.prior_usage,
- equipment.notes]
-
class EquipmentServiceException(Exception):
def __init__(self, value):
@@ -126,91 +72,42 @@ class EquipmentService(object):
def get_all_equipment(self):
"""Get all equipment items."""
- return self._get_equipment(None)
+ return self._ddbb.session.query(Equipment).all()
def get_active_equipment(self):
"""Get all the active equipment items."""
- return self._get_equipment("active = 1")
-
- def _get_equipment(self, condition):
- logging.debug("Retrieving all equipment (condition: '{0}').".format(condition))
- resultSet = self._ddbb.select(_TABLE_NAME, _ALL_COLUMNS, condition)
- equipmentList = []
- for result in resultSet:
- equipmentList.append(self._create_equipment_item(result))
- return equipmentList
+ return self._ddbb.session.query(Equipment).filter(Equipment.active == True).all()
def get_equipment_item(self, item_id):
"""Get an individual equipment item by id.
If no item with the given id exists then None is returned.
"""
- resultSet = self._ddbb.select(_TABLE_NAME, _ALL_COLUMNS, "id = {0}".format(item_id))
- if len(resultSet) == 0:
+ try:
+ return self._ddbb.session.query(Equipment).filter(Equipment.id == item_id).one()
+ except exc.NoResultFound:
return None
- else:
- return self._create_equipment_item(resultSet[0])
-
- def _create_equipment_item(self, row):
- equipment = Equipment()
- (id, description, active, life_expectancy, prior_usage, notes) = row
- equipment.id = id
- equipment.description = unicode(description)
- equipment.active = bool(active)
- equipment.life_expectancy = life_expectancy
- equipment.prior_usage = prior_usage
- equipment.notes = unicode(notes)
- return equipment
def store_equipment(self, equipment):
"""Store a new or update an existing equipment item.
The stored object is returned."""
logging.debug("Storing equipment item.")
- item_id = None
- if equipment.id != None:
- item_id = self._update_equipment(equipment)
- else:
- item_id = self._store_new_equipment(equipment)
- return self.get_equipment_item(item_id)
-
- def _update_equipment(self, equipment):
- logging.debug("Updating existing equipment item.")
- self._assert_exists(equipment)
- self._assert_unique(equipment)
- self._ddbb.update(_TABLE_NAME, _UPDATE_COLUMNS, _create_row(equipment), "id = {0}".format(equipment.id))
- return equipment.id
-
- def _assert_exists(self, equipment):
- if self.get_equipment_item(equipment.id) == None:
- raise EquipmentServiceException("No equipment item exists with id '{0}'".format(equipment.id))
- logging.debug("Asserted item exists with id: '{0}'.".format(equipment.id))
-
- def _store_new_equipment(self, equipment):
- logging.debug("Storing new equipment item.")
- self._assert_unique(equipment)
- self._ddbb.insert(_TABLE_NAME, _UPDATE_COLUMNS, _create_row(equipment))
- return self._ddbb.select(_TABLE_NAME, "id", "description = \"{0}\"".format(equipment.description))[0][0]
-
- def _assert_unique(self, equipment):
- result = self._ddbb.select(_TABLE_NAME, "id", "description = \"{0}\"".format(equipment.description))
- if len(result) > 0:
- id = result[0][0]
- if id != equipment.id:
- raise EquipmentServiceException("An equipment item already exists with description '{0}'".format(equipment.description))
- logging.debug("Asserted description is unique: '{0}'.".format(equipment.description))
-
+ try:
+ self._ddbb.session.add(equipment)
+ self._ddbb.session.commit()
+ except IntegrityError:
+ raise EquipmentServiceException("An equipment item already exists with description '{0}'".format(equipment.description))
+ return equipment
+
def remove_equipment(self, equipment):
"""Remove an existing equipment item."""
logging.debug("Deleting equipment item with id: '{0}'".format(equipment.id))
- self._ddbb.delete("record_equipment", "equipment_id=\"{0}\"".format(equipment.id))
- self._ddbb.delete(_TABLE_NAME, "id=\"{0}\"".format(equipment.id))
+ self._ddbb.session.delete(equipment)
+ self._ddbb.session.commit()
def get_equipment_usage(self, equipment):
"""Get the total use of the given equipment."""
- result = self._ddbb.select("records inner join record_equipment "
- "on records.id_record = record_equipment.record_id",
- "sum(distance)",
- "record_equipment.equipment_id = {0}".format(equipment.id))
- usage = result[0][0]
- return (0 if usage == None else usage) + equipment.prior_usage
+ result = self._ddbb.session.query(func.sum(Activity.distance).label('sum')).filter(Activity.equipment.contains(equipment))
+ usage = result.scalar()
+ return (0 if usage == None else float(usage)) + equipment.prior_usage
diff --git a/pytrainer/core/sport.py b/pytrainer/core/sport.py
index b644249..0a5ea65 100644
--- a/pytrainer/core/sport.py
+++ b/pytrainer/core/sport.py
@@ -17,80 +17,40 @@
#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from pytrainer.util.color import Color, color_from_hex_string
+from pytrainer.lib.ddbb import DeclarativeBase, ForcedInteger
+from sqlalchemy import Column, Integer, Float, Unicode, CheckConstraint
+from sqlalchemy.orm.exc import NoResultFound
+from sqlalchemy.exc import InvalidRequestError, IntegrityError
+import sqlalchemy.types as types
import logging
-class Sport(object):
-
+class ColorType(types.TypeDecorator):
+ """Sqlalchemy type to convert between CHAR and the Color object"""
+ impl = types.CHAR
+
+ def process_bind_param(self, value, dialect):
+ return value.to_hex_string()
+
+ def process_result_value(self, value, dialect):
+ return color_from_hex_string(value)
+
+class Sport(DeclarativeBase):
"""A type of exercise. For example: "running" or "cycling"."""
-
- def __init__(self):
- self._id = None
+ __tablename__ = 'sports'
+ color = Column(ColorType(length=6), nullable=False)
+ id = Column('id_sports', Integer, primary_key=True, nullable=False)
+ max_pace = Column(ForcedInteger, CheckConstraint('max_pace>=0'))
+ met = Column(Float, CheckConstraint('met>=0'))
+ name = Column(Unicode(length=100), nullable=False, unique=True, index=True)
+ weight = Column(Float, CheckConstraint('weight>=0'), nullable=False)
+
+ def __init__(self, **kwargs):
self.name = u""
self.weight = 0.0
self.met = None
self.max_pace = None
self.color = Color(0x0000ff)
-
- def _get_id(self):
- return self._id
-
- def _set_id(self, id):
- self._id = int(id)
-
- id = property(_get_id, _set_id)
-
- def _get_name(self):
- return self._name
-
- def _set_name(self, name):
- if not isinstance(name, unicode):
- raise TypeError("Name must be unicode string, not {0}.".format(type(name).__name__))
- self._name = name
-
- name = property(_get_name, _set_name)
-
- def _get_weight(self):
- return self._weight
-
- def _set_weight(self, weight):
- weight_float = float(weight)
- if weight_float < 0:
- raise ValueError("Weight must not be negative.")
- self._weight = weight_float
-
- weight = property(_get_weight, _set_weight)
-
- def _get_met(self):
- return self._met
-
- def _set_met(self, met):
- met_float = float(met) if met is not None else None
- if met_float is not None and met_float < 0:
- raise ValueError("MET must not be negative.")
- self._met = met_float
-
- met = property(_get_met, _set_met)
-
- def _get_max_pace(self):
- return self._max_pace
-
- def _set_max_pace(self, max_pace):
- max_pace_int = int(max_pace) if max_pace is not None else None
- if max_pace_int is not None and max_pace_int < 0:
- raise ValueError("Max pace must not be negative.")
- self._max_pace = max_pace_int
-
- max_pace = property(_get_max_pace, _set_max_pace)
-
- def _get_color(self):
- return self._color
-
- def _set_color(self, color):
- if color is None:
- raise ValueError("Color must be valued.")
- self._color = color
-
- color = property(_get_color, _set_color)
+ super(Sport, self).__init__(**kwargs)
class SportServiceException(Exception):
@@ -100,16 +60,6 @@ class SportServiceException(Exception):
def __str__(self):
return repr(self.value)
-_TABLE = "sports"
-
-_ID_COLUMN = "id_sports"
-
-_NAME_COLUMN = "name"
-
-_UPDATE_COLUMNS = _NAME_COLUMN + ",weight,met,max_pace,color"
-
-_SELECT_COLUMNS = _ID_COLUMN + "," + _UPDATE_COLUMNS
-
class SportService(object):
"""Provides access to stored sports."""
@@ -117,110 +67,52 @@ class SportService(object):
def __init__(self, ddbb):
self._ddbb = ddbb
- def _create_sport(self, row):
- sport = Sport()
- sport.id = row[0]
- sport.name = unicode(row[1])
- sport.weight = row[2]
- sport.met = row[3]
- sport.max_pace = row[4]
- sport.color = color_from_hex_string(row[5])
- return sport
-
- def _create_row(self, sport):
- return [sport.name,
- sport.weight,
- sport.met,
- sport.max_pace,
- sport.color.to_hex_string()]
-
- def _create_id_where_clause(self, sport_id):
- return _ID_COLUMN + "=" + str(sport_id)
-
- def _create_name_where_clause(self, sport_name):
- return _NAME_COLUMN + "=\"{0}\"".format(sport_name)
-
def get_sport(self, sport_id):
"""Get the sport with the specified id.
If no sport with the given id exists then None is returned."""
if sport_id is None:
raise ValueError("Sport id cannot be None")
- resultSet = self._ddbb.select(_TABLE, _SELECT_COLUMNS, self._create_id_where_clause(sport_id))
- if len(resultSet) == 0:
+ try:
+ return self._ddbb.session.query(Sport).filter(Sport.id == sport_id).one()
+ except NoResultFound:
return None
- else:
- return self._create_sport(resultSet[0])
-
+
def get_sport_by_name(self, name):
"""Get the sport with the specified name.
If no sport with the given name exists then None is returned."""
if name is None:
raise ValueError("Sport name cannot be None")
- sport_id = self._get_sport_id_from_name(name)
- if sport_id is None:
+ try:
+ return self._ddbb.session.query(Sport).filter(Sport.name == name).one()
+ except NoResultFound:
return None
- return self.get_sport(sport_id)
-
- def _get_sport_id_from_name(self, name):
- result_set = self._ddbb.select(_TABLE, _ID_COLUMN, self._create_name_where_clause(name))
- if len(result_set) > 0:
- return result_set[0][0]
- return None
-
+
def get_all_sports(self):
"""Get all stored sports."""
- result_set = self._ddbb.select(_TABLE, _SELECT_COLUMNS)
- logging.debug("Retrieved all sports ({0} results).".format(len(result_set)))
- sports = []
- for row in result_set:
- sport = self._create_sport(row)
- sports.append(sport)
- return sports
-
+ return self._ddbb.session.query(Sport).all()
+
def store_sport(self, sport):
"""Store a new or update an existing sport.
-
- The stored object is returned."""
- if (sport.id is None):
- sport_id = self._store_new_sport(sport)
- else:
- sport_id = self._update_existing_sport(sport)
- return self.get_sport(sport_id)
-
- def _store_new_sport(self, sport):
- self._assert_unique(sport)
- self._ddbb.insert(_TABLE, _UPDATE_COLUMNS, self._create_row(sport))
- logging.debug("Stored new sport: '{0}'.".format(sport.name))
- return self._get_sport_id_from_name(sport.name)
-
- def _update_existing_sport(self, sport):
- self._assert_exists(sport)
- self._assert_unique(sport)
- self._ddbb.update(_TABLE, _UPDATE_COLUMNS, self._create_row(sport), self._create_id_where_clause(sport.id))
- logging.debug("Updated sport: '{0}'.".format(sport.name))
- return sport.id
-
- def _assert_unique(self, sport):
- id = self._get_sport_id_from_name(sport.name)
- if id is not None and id != sport.id:
- raise SportServiceException("A sport already exists with name '{0}'".format(sport.name))
- logging.debug("Asserted sport name is unique: '{0}'.".format(sport.name))
-
- def _assert_exists(self, sport):
- result_set = self._ddbb.select(_TABLE, _ID_COLUMN, self._create_id_where_clause(sport.id))
- if (result_set == []):
- raise SportServiceException("Sport does not exist with id: '{0}'.".format(sport.id))
- logging.debug("Asserted sport exists with id: '{0}'.".format(sport.id))
+ The stored object is returned."""
+ try:
+ self._ddbb.session.add(sport)
+ self._ddbb.session.commit()
+ except IntegrityError:
+ raise SportServiceException("")
+ return sport
+
def remove_sport(self, sport):
"""Delete a stored sport.
All records associated with the sport will also be deleted."""
- if (sport.id is None):
+ if not sport.id:
raise SportServiceException("Cannot remove sport which has not been stored: '{0}'.".format(sport.name))
- self._assert_exists(sport)
- self._ddbb.delete("records", "sport=" + str(sport.id))
- self._ddbb.delete(_TABLE, self._create_id_where_clause(sport.id))
- logging.debug("Deleted sport: '{0}'.".format(sport.name))
+ try:
+ self._ddbb.session.delete(sport)
+ self._ddbb.session.commit()
+ except InvalidRequestError:
+ raise SportServiceException("Sport id %s not found" % sport.id)
+ logging.debug("Deleted sport: %s", sport.name)
diff --git a/pytrainer/extensions/googlemaps.py b/pytrainer/extensions/googlemaps.py
index 0f1bdd3..ef10cde 100644
--- a/pytrainer/extensions/googlemaps.py
+++ b/pytrainer/extensions/googlemaps.py
@@ -127,8 +127,8 @@ class Googlemaps:
points = points.replace("\\","\\\\")
logging.debug("Using Google Maps version 3 API")
laps = activity.laps
- timeHours = int(activity.time) / 3600
- timeMin = (float(activity.time) / 3600.0 - timeHours) * 60
+ timeHours = activity.duration / 3600
+ timeMin = (float(activity.duration) / 3600.0 - timeHours) * 60
time = "%d%s %02d%s" % (timeHours, _("h"), timeMin, _("min"))
startinfo = "<div class='info_content'>%s: %s</div>" % (activity.sport_name, activity.title)
finishinfo = "<div class='info_content'>%s: %s<br>%s: %s%s</div>" % (_("Time"), time, _("Distance"), activity.distance, self.uc.unit_distance)
diff --git a/pytrainer/extensions/osm.py b/pytrainer/extensions/osm.py
index bb558e6..e5b4745 100644
--- a/pytrainer/extensions/osm.py
+++ b/pytrainer/extensions/osm.py
@@ -72,7 +72,7 @@ class Osm:
self.URLS[localfile]='file://' + cachedir + '/' + localfile;
logging.info("Using %s file " % (self.URLS[localfile]))
except Exception as e:
- loggin.error("(%s) Error while downloading %s to local cache, using default hosted file instaed." \
+ logging.error("(%s) Error while downloading %s to local cache, using default hosted file instead." \
% (str(e), self.URLS[localfile]))
logging.debug("<<")
@@ -99,8 +99,8 @@ class Osm:
points,levels = Points.encodePoints(pointlist)
points = points.replace("\\","\\\\")
laps = activity.laps
- timeHours = int(activity.time) / 3600
- timeMin = (float(activity.time) / 3600.0 - timeHours) * 60
+ timeHours = activity.duration / 3600
+ timeMin = (float(activity.duration) / 3600.0 - timeHours) * 60
time = "%d%s %02d%s" % (timeHours, _("h"), timeMin, _("min"))
startinfo = "<div class='info_content'>%s: %s</div>" % (activity.sport_name, activity.title)
finishinfo = "<div class='info_content'>%s: %s<br>%s: %s%s</div>" % (_("Time"), \
diff --git a/pytrainer/gui/equipment.py b/pytrainer/gui/equipment.py
index 0a0d5c4..e37f873 100644
--- a/pytrainer/gui/equipment.py
+++ b/pytrainer/gui/equipment.py
@@ -162,9 +162,9 @@ class EquipmentUi(gtk.HBox):
notes = notes_buffer.get_text(notes_buffer.get_start_iter(), notes_buffer.get_end_iter())
new_equipment = Equipment()
new_equipment.description = unicode(description)
- new_equipment.active = active
- new_equipment.life_expectancy = life_expectancy
- new_equipment.prior_usage = prior_usage
+ new_equipment.active = bool(active)
+ new_equipment.life_expectancy = int(life_expectancy)
+ new_equipment.prior_usage = int(prior_usage)
new_equipment.notes = unicode(notes)
self._equipment_store.add_equipment(new_equipment)
self.show_page_equipment_list()
diff --git a/pytrainer/gui/windowimportdata.py b/pytrainer/gui/windowimportdata.py
index a111353..1ff1647 100644
--- a/pytrainer/gui/windowimportdata.py
+++ b/pytrainer/gui/windowimportdata.py
@@ -5,16 +5,15 @@ from SimpleGladeApp import SimpleBuilderApp
import gtk
import gobject
import os, glob, sys
-import StringIO
import logging
import types
-from lxml import etree
import csv
import locale
from pytrainer.plugins import Plugins
from pytrainer.gui.dialogs import fileChooserDialog
from pytrainer.lib.date import getDateTime
+from pytrainer.core.activity import Activity
class WindowImportdata(SimpleBuilderApp):
def __init__(self, sport_service, data_path = None, parent=None, config=None, pytrainer_main=None):
@@ -866,23 +865,23 @@ class WindowImportdata(SimpleBuilderApp):
continue
if not row:
continue
- data = {}
+ data = Activity()
#Determine dates
_date = getDateTime(row[dateCol-1])
#year, month, day = date.split("-")
date = _date[1].strftime("%Y-%m-%d")
zuluDateTime = _date[0].strftime("%Y-%m-%dT%H:%M:%SZ")
localDateTime = str(_date[1])
- data['date'] = date
- data['date_time_utc'] = zuluDateTime
- data['date_time_local'] = localDateTime
+ data.date = _date[1].date()
+ data.date_time_utc = zuluDateTime
+ data.date_time_local = localDateTime
if distanceCol:
try:
- data['distance'] = locale.atof(row[distanceCol-1])
+ data.distance = locale.atof(row[distanceCol-1])
except:
- data['distance'] = 0
+ data.distance = 0
else:
- data['distance'] = 0
+ data.distance = 0
if durationCol:
#calculate duration in sec...
try:
@@ -905,80 +904,80 @@ class WindowImportdata(SimpleBuilderApp):
logging.debug("Could not determine duration for '%s'" % _duration)
durationSec = None
if durationSec is not None:
- data['duration'] = durationSec
- data['time'] = str(durationSec)
+ data.duration = durationSec
+ data.time = str(durationSec)
if titleCol:
try:
- data['title'] = row[titleCol-1]
+ data.title = row[titleCol-1]
except:
pass
if self.checkbCSVForceSport.get_active():
- sport_id = self.pytrainer_main.record.getSportId(self.comboCSVForceSport.get_active_text(),add=True)
- data['sport'] = sport_id
+ sport = self.pytrainer_main.record.getSport(self.comboCSVForceSport.get_active_text(),add=True)
+ data.sport = sport
elif sportCol:
#retrieving sport id (adding sport if it doesn't exist yet)
- sport_id = self.pytrainer_main.record.getSportId(row[sportCol-1],add=True)
- data['sport'] = sport_id
+ sport = self.pytrainer_main.record.getSport(row[sportCol-1],add=True)
+ data.sport = sport
else:
self.comboCSVForceSport.set_active(0)
- sport_id = self.pytrainer_main.record.getSportId(self.comboCSVForceSport.get_active_text(),add=True)
- data['sport'] = sport_id
+ sport = self.pytrainer_main.record.getSport(self.comboCSVForceSport.get_active_text(),add=True)
+ data.sport = sport
if avgspeedCol:
#
try:
- data['average'] = locale.atof(row[avgspeedCol-1])
+ data.average = locale.atof(row[avgspeedCol-1])
except:
pass
if maxspeedCol:
try:
- data['maxspeed'] = locale.atof(row[maxspeedCol-1])
+ data.maxspeed = locale.atof(row[maxspeedCol-1])
except:
pass
if calCol:
try:
- data['calories'] = locale.atoi(row[calCol-1])
+ data.calories = locale.atoi(row[calCol-1])
except:
pass
if accCol:
try:
- data['upositive'] = locale.atof(row[accCol-1])
+ data.upositive = locale.atof(row[accCol-1])
except:
pass
if desCol:
try:
- data['unegative'] = locale.atof(row[desCol-1])
+ data.unegative = locale.atof(row[desCol-1])
except:
pass
if hrCol:
try:
- data['beats'] = locale.atof(row[hrCol-1])
+ data.beats = locale.atof(row[hrCol-1])
except:
pass
if maxHRCol:
try:
- data['maxbeats'] = locale.atof(row[maxHRCol-1])
+ data.maxbeats = locale.atof(row[maxHRCol-1])
except:
pass
if paceCol:
try:
- data['pace'] = locale.atof(row[paceCol-1])
+ data.pace = locale.atof(row[paceCol-1])
except:
pass
if maxPaceCol:
try:
- data['maxpace'] = locale.atof(row[maxPaceCol-1])
+ data.maxpace = locale.atof(row[maxPaceCol-1])
except:
pass
if commentsCol:
try:
- data['comments'] = row[commentsCol--1]
+ data.comments = row[commentsCol--1]
except:
pass
#Insert into DB
- logging.debug("Data", data)
- self.pytrainer_main.ddbb.insert_dict('records', data)
+ self.pytrainer_main.ddbb.session.add(data)
+ self.pytrainer_main.ddbb.session.commit()
#Display message....
self.updateStatusbar(self.statusbarCSVImport, _("Import completed. %d rows processed") % i)
#Disable import button
diff --git a/pytrainer/gui/windowmain.py b/pytrainer/gui/windowmain.py
index bd56a33..d4d6581 100644
--- a/pytrainer/gui/windowmain.py
+++ b/pytrainer/gui/windowmain.py
@@ -46,6 +46,8 @@ from pytrainer.gui.drawGraph import DrawGraph
from pytrainer.gui.windowcalendar import WindowCalendar
from pytrainer.lib.listview import ListSearch
from pytrainer.lib.uc import UC
+from pytrainer.core.activity import Activity
+from sqlalchemy import and_
class Main(SimpleBuilderApp):
@@ -276,8 +278,6 @@ class Main(SimpleBuilderApp):
if not self.mapviewer and not self.mapviewer_fs and not self.waypointeditor:
try:
from pytrainer.extensions.mapviewer import MapViewer
- from pytrainer.extensions.googlemaps import Googlemaps
- from pytrainer.extensions.osm import Osm
from pytrainer.extensions.waypointeditor import WaypointEditor
self.mapviewer = MapViewer(self.data_path, pytrainer_main=self.parent, box=self.map_vbox)
self.mapviewer_fs = MapViewer(self.data_path, pytrainer_main=self.parent, box=self.map_vbox_old)
@@ -419,19 +419,18 @@ class Main(SimpleBuilderApp):
self.record_duration.set_text(activity.get_value_f('time', '%s'))
self.record_calories.set_text(activity.get_value_f('calories', "%0.0f"))
self.record_title.set_text(activity.title)
- hrun,mrun,srun = second2time(activity.time)
+ hrun,mrun,srun = second2time(activity.duration)
hpause,mpause,spause = second2time(activity.time_pause)
self.record_runrest.set_text("%02d:%02d:%02d / %02d:%02d:%02d" %(hrun,mrun,srun,hpause,mpause,spause))
buffer = self.record_comments.get_buffer()
start,end = buffer.get_bounds()
buffer.set_text(activity.comments)
- equipment = self.parent.record.get_record_equipment(activity.id)
- if len(equipment) > 0:
- equipment_text = ", ".join(map(lambda(item): item.description, equipment))
+ if len(activity.equipment) > 0:
+ equipment_text = ", ".join(map(lambda(item): item.description, activity.equipment))
self.label_record_equipment.set_text(equipment_text)
else:
self.label_record_equipment.set_markup("<i>None</i>")
- if len(activity.laps)>1:
+ if len(activity.Laps)>1:
store = gtk.ListStore(
gobject.TYPE_INT,
gtk.gdk.Pixbuf,
@@ -447,14 +446,14 @@ class Main(SimpleBuilderApp):
gobject.TYPE_STRING,
gobject.TYPE_STRING,
)
- for lap in activity.laps:
- t = lap['elapsed_time']
- m = lap['distance']
+ for lap in activity.Laps:
+ t = lap.duration
+ m = lap.distance
m = self.uc.speed(m)
s = m / float(t) * 3.6
- max_speed = lap['max_speed'] * 3.6
+ max_speed = lap.max_speed * 3.6
if s > 0:
pace = "%d:%02d" %((3600/s)/60,(3600/s)%60)
if max_speed >0:
@@ -471,11 +470,11 @@ class Main(SimpleBuilderApp):
'resting' : '#808080',
}
- pic = gtk.gdk.pixbuf_new_from_file(self.data_path+"glade/trigger_%s.png" % lap['laptrigger'])
+ pic = gtk.gdk.pixbuf_new_from_file(self.data_path+"glade/trigger_%s.png" % lap.laptrigger)
iter = store.append()
store.set(iter,
- 0, lap['lap_number']+1,
+ 0, lap.lap_number + 1,
1, pic,
2, m/1000,
3, str(int(float(t))),
@@ -483,11 +482,11 @@ class Main(SimpleBuilderApp):
5, max_speed,
6, pace,
7, max_pace,
- 8, lap['avg_hr'] if lap['avg_hr'] else 0,
- 9, lap['max_hr'] if lap['max_hr'] else 0,
- 10, lap['calories'],
- 11, color[lap['intensity']],
- 12, '' if not lap['comments'] else (lap['comments'] if len(lap['comments'])<40 else "%s..." % lap['comments'][:40]),
+ 8, lap.avg_hr if lap.avg_hr else 0,
+ 9, lap.max_hr if lap.max_hr else 0,
+ 10, lap.calories,
+ 11, color[lap.intensity],
+ 12, '' if not lap.comments else (lap.comments if len(lap.comments)<40 else "%s..." % lap.comments[:40]),
)
self.lapsTreeView.set_model(store)
self.lapsTreeView.set_rules_hint(True)
@@ -500,8 +499,8 @@ class Main(SimpleBuilderApp):
def edited_cb(cell, path, new_text, (liststore, activity)):
liststore[path][12] = new_text
- activity.laps[int(path)]['comments'] = new_text
- self.pytrainer_main.ddbb.update("laps", "comments", [new_text,], "record=%s and lap_number=%s" % (activity.id, path))
+ activity.Laps[int(path)].comments = new_text
+ self.pytrainer_main.ddbb.session.commit()
def show_tooltip(widget, x, y, keyboard_mode, tooltip, user_param1):
path = self.lapsTreeView.get_path_at_pos(x,y-20)
@@ -809,7 +808,7 @@ class Main(SimpleBuilderApp):
record_list = activity.tracks
def project(d,a):
- return int(a.time * (d / a.distance)**1.06)
+ return int(a.duration * (d / a.distance)**1.06)
DISTANCES = {
.8 : _("800 m"),
@@ -855,15 +854,15 @@ class Main(SimpleBuilderApp):
percentage = widget.get_value() / 100
else:
percentage = .05
- records = self.pytrainer_main.ddbb.select_dict("records", ["distance","time","id_record","date","average","pace"], "distance > %f AND distance < %f AND sport=%d order by average desc" % (activity.distance * (1-percentage), activity.distance * (1+percentage), activity.sport_id))
+ records = self.pytrainer_main.ddbb.session.query(Activity).filter(and_(Activity.distance.between(activity.distance * (1-percentage), activity.distance * (1+percentage)), Activity.sport == activity.sport)).all()
count = 1
for r in records:
- if r['average'] > activity.average:
+ if r.average > activity.average:
count += 1
import numpy
- speeds = [r['average'] for r in records]
+ speeds = [r.average for r in records]
self.label_ranking_range.set_text("%.2f - %.2f %s" % (self.uc.distance(activity.distance * (1-percentage)), self.uc.distance(activity.distance * (1+percentage)), self.uc.unit_distance))
self.label_ranking_rank.set_text("%s/%s" % (count, len(records)))
self.label_ranking_avg.set_text("%.2f %s" % (self.uc.speed(numpy.average(speeds)), self.uc.unit_speed))
@@ -897,11 +896,11 @@ class Main(SimpleBuilderApp):
iter,
0, i,
1, rank,
- 2, r['date'],
- 3, self.uc.distance(r['distance']),
- 4, str(r['time']),
- 5, r['average'],
- 6, r['pace'],
+ 2, r.date,
+ 3, self.uc.distance(r.distance),
+ 4, str(r.duration),
+ 5, r.average,
+ 6, r.pace,
7, '#3AA142' if rank==count else '#000000',
)
@@ -912,77 +911,44 @@ class Main(SimpleBuilderApp):
self.rankingTreeView.set_model(rank_store)
- def actualize_dayview(self,record_list=None, activity_list=None):
+ def actualize_dayview(self, date):
logging.debug(">>")
self.d_distance_unit.set_text(self.uc.unit_distance)
self.d_speed_unit.set_text(self.uc.unit_speed)
self.d_maxspeed_unit.set_text(self.uc.unit_speed)
self.d_pace_unit.set_text(self.uc.unit_pace)
self.d_maxpace_unit.set_text(self.uc.unit_pace)
+ if self.activeSport:
+ sport = self._sport_service.get_sport_by_name(self.activeSport)
+ else:
+ sport = None
+ activity_list = self.pytrainer_main.activitypool.get_activities_for_day(date, sport=sport)
- if len(record_list)>0:
- tbeats = 0
- distance = 0
- calories = 0
- timeinseconds = 0
- beats = 0
- maxbeats = 0
- maxspeed = 0
- average = 0
- maxpace = "0:00"
- pace = "0:00"
- totalascent = 0
- totaldescent = 0
- for record in record_list:
- distance += self.parseFloat(record[2])
- calories += self.parseFloat(record[7])
- timeinseconds += self.parseFloat(record[3])
- beats = self.parseFloat(record[4])
- totalascent += self.parseFloat(record[13])
- totaldescent += self.parseFloat(record[14])
- if float(beats)>0:
- tbeats += beats*(self.parseFloat(record[3])/60/60)
- if record[9] > maxspeed:
- maxspeed = self.parseFloat(record[9])
- if record[10] > maxbeats:
- maxbeats = self.parseFloat(record[10])
-
- distance = self.uc.distance(distance)
- maxspeed = self.uc.speed(maxspeed)
-
- if tbeats > 0 and timeinseconds > 0:
- tbeats = tbeats/(timeinseconds/60/60)
- if distance > 0 and timeinseconds > 0:
- average = distance/(timeinseconds/60/60)
- if maxspeed > 0:
- maxpace = "%d:%02d" %((3600/maxspeed)/60,(3600/maxspeed)%60)
- if average > 0:
- pace = "%d:%02d" %((3600/average)/60,(3600/average)%60)
-
+ tbeats, distance, calories, timeinseconds, beats, maxbeats, maxspeed, average, maxpace, pace, totalascent, totaldescent = self._totals_from_activities(activity_list)
+ if timeinseconds:
self.dayview.set_sensitive(1)
- self.day_distance.set_text("%0.2f" %distance)
- hour,min,sec = second2time(timeinseconds)
- self.day_hour.set_text("%d" %hour)
- self.day_minute.set_text("%02d" %min)
- self.day_second.set_text("%02d" %sec)
- if tbeats:
- self.day_beats.set_text("%0.0f" %tbeats)
- else:
- self.day_beats.set_text("")
- self.day_maxbeats.set_text("%0.0f" %maxbeats)
- if average:
- self.day_average.set_text("%0.2f" %average)
- else:
- self.day_average.set_text("")
- self.day_maxspeed.set_text("%0.2f" %maxspeed)
- self.day_pace.set_text("%s" %pace)
- self.day_maxpace.set_text("%s" %maxpace)
- self.day_ascdesc.set_text("%d/%d" %(int(totalascent),int(totaldescent)))
- self.day_calories.set_text("%0.0f" %calories)
- self.day_topic.set_text(str(record[1]))
-
else:
self.dayview.set_sensitive(0)
+ self.day_distance.set_text("%0.2f" %distance)
+ hour,min,sec = second2time(timeinseconds)
+ self.day_hour.set_text("%d" %hour)
+ self.day_minute.set_text("%02d" %min)
+ self.day_second.set_text("%02d" %sec)
+ if tbeats:
+ self.day_beats.set_text("%0.0f" %tbeats)
+ else:
+ self.day_beats.set_text("")
+ self.day_maxbeats.set_text("%0.0f" %maxbeats)
+ if average:
+ self.day_average.set_text("%0.2f" %average)
+ else:
+ self.day_average.set_text("")
+ self.day_maxspeed.set_text("%0.2f" %maxspeed)
+ self.day_pace.set_text("%s" %pace)
+ self.day_maxpace.set_text("%s" %maxpace)
+ self.day_ascdesc.set_text("%d/%d" %(int(totalascent),int(totaldescent)))
+ self.day_calories.set_text("%0.0f" %calories)
+ self.day_topic.set_text(str(date))
logging.debug("<<")
def actualize_daygraph(self,record_list):
@@ -1001,10 +967,12 @@ class Main(SimpleBuilderApp):
if self.radiobuttonOSM.get_active():
#Use OSM to draw map
logging.debug("Using OSM to draw map....")
+ from pytrainer.extensions.osm import Osm
htmlfile = Osm(data_path=self.data_path, waypoint=self.pytrainer_main.waypoint, pytrainer_main=self.parent).drawMap(activity, self.comboMapLineType.get_active())
elif self.radiobuttonGMap.get_active():
#Use Google to draw map
logging.debug("Using Google to draw map")
+ from pytrainer.extensions.googlemaps import Googlemaps
htmlfile = Googlemaps(data_path=self.data_path, waypoint=self.pytrainer_main.waypoint, pytrainer_main=self.parent).drawMap(activity, self.comboMapLineType.get_active())
else:
#Unknown map type...
@@ -1019,236 +987,110 @@ class Main(SimpleBuilderApp):
self.mapviewer.display_map(htmlfile=htmlfile)
logging.debug("<<")
- def actualize_weekview(self, record_list, date_range):
+ def actualize_weekview(self, date_range):
logging.debug(">>")
self.week_date.set_text("%s - %s (%d)" % (date_range.start_date.strftime("%a %d %b"), date_range.end_date.strftime("%a %d %b"), int(date_range.end_date.strftime("%V"))) )
- km = calories = time = average = beats = 0
- num_records = len(record_list)
- logging.info("Number of records selected week: "+str(num_records))
- time_in_min = 0
- tbeats = 0
- maxspeed = 0
- pace = "0:00"
- maxpace = "0:00"
- maxbeats = 0
- totalascent = 0
- totaldescent = 0
+ if self.activeSport:
+ sport = self._sport_service.get_sport_by_name(self.activeSport)
+ else:
+ sport = None
+ activity_list = self.pytrainer_main.activitypool.get_activities_period(date_range, sport=sport)
+ tbeats, distance, calories, timeinseconds, beats, maxbeats, maxspeed, average, maxpace, pace, totalascent, totaldescent = self._totals_from_activities(activity_list)
+ if timeinseconds:
+ self.weekview.set_sensitive(1)
+ else:
+ self.weekview.set_sensitive(0)
self.w_distance_unit.set_text(self.uc.unit_distance)
self.w_speed_unit.set_text(self.uc.unit_speed)
self.w_maxspeed_unit.set_text(self.uc.unit_speed)
self.w_pace_unit.set_text(self.uc.unit_pace)
self.w_maxpace_unit.set_text(self.uc.unit_pace)
-
- if num_records>0:
- for record in record_list:
- km += self.parseFloat(record[1])
- time += self.parseFloat(record[2])
- average += self.parseFloat(record[5])
- calories += self.parseFloat(record[6])
- beats = self.parseFloat(record[3])
- totalascent += self.parseFloat(record[10])
- totaldescent += self.parseFloat(record[11])
- if float(beats) > 0:
- time_in_min += time/60
- tbeats += beats*(time/60)
- if record[7] > maxspeed:
- maxspeed = self.parseFloat(record[7])
- if record[8] > maxbeats:
- maxbeats = self.parseFloat(record[8])
-
- km = self.uc.distance(km)
- maxspeed = self.uc.speed(maxspeed)
-
- if time_in_min > 0:
- tbeats = tbeats/time_in_min
- else:
- tbeats = 0
- if km > 0:
- average = (km/(time/3600))
- else:
- average = 0
-
- if maxspeed > 0:
- #maxpace = 60/maxspeed
- maxpace = "%d:%02d" %((3600/maxspeed)/60,(3600/maxspeed)%60)
- if average > 0:
- #pace = 60/average
- pace = "%d:%02d" %((3600/average)/60,(3600/average)%60)
-
- self.weeka_distance.set_text("%0.2f" %km)
- hour,min,sec = second2time(time)
- self.weeka_hour.set_text("%d" %hour)
- self.weeka_minute.set_text("%02d" %min)
- self.weeka_second.set_text("%02d" %sec)
- self.weeka_maxbeats.set_text("%0.0f" %(maxbeats))
- self.weeka_beats.set_text("%0.0f" %(tbeats))
- self.weeka_average.set_text("%0.2f" %average)
- self.weeka_maxspeed.set_text("%0.2f" %maxspeed)
- self.weeka_pace.set_text(pace)
- self.weeka_maxpace.set_text(maxpace)
- self.weeka_ascdesc.set_text("%d/%d" %(int(totalascent),int(totaldescent)))
- self.weeka_calories.set_text("%0.0f" %calories)
- self.weekview.set_sensitive(1)
- else:
- self.weekview.set_sensitive(0)
- self.drawareaweek.drawgraph(record_list, date_range.start_date)
+ self.weeka_distance.set_text("%0.2f" %distance)
+ hour,min,sec = second2time(timeinseconds)
+ self.weeka_hour.set_text("%d" %hour)
+ self.weeka_minute.set_text("%02d" %min)
+ self.weeka_second.set_text("%02d" %sec)
+ self.weeka_maxbeats.set_text("%0.0f" %(maxbeats))
+ self.weeka_beats.set_text("%0.0f" %(tbeats))
+ self.weeka_average.set_text("%0.2f" %average)
+ self.weeka_maxspeed.set_text("%0.2f" %maxspeed)
+ self.weeka_pace.set_text(pace)
+ self.weeka_maxpace.set_text(maxpace)
+ self.weeka_ascdesc.set_text("%d/%d" %(int(totalascent),int(totaldescent)))
+ self.weeka_calories.set_text("%0.0f" %calories)
+ self.weekview.set_sensitive(1)
+ self.drawareaweek.drawgraph(activity_list, date_range.start_date)
logging.debug("<<")
- def actualize_monthview(self,record_list, nameMonth):
+ def actualize_monthview(self, date_range, nameMonth, daysInMonth):
logging.debug(">>")
self.month_date.set_text(nameMonth)
- km = calories = time = average = beats = 0
- num_records = len(record_list)
- time_in_min = 0
- tbeats = 0
- maxspeed = 0
- pace = "0:00"
- maxpace = "0:00"
- maxbeats = 0
- totalascent = 0
- totaldescent = 0
+ if self.activeSport:
+ sport = self._sport_service.get_sport_by_name(self.activeSport)
+ else:
+ sport = None
+ activity_list = self.pytrainer_main.activitypool.get_activities_period(date_range, sport=sport)
+ tbeats, distance, calories, timeinseconds, beats, maxbeats, maxspeed, average, maxpace, pace, totalascent, totaldescent = self._totals_from_activities(activity_list)
+ if timeinseconds:
+ self.monthview.set_sensitive(1)
+ else:
+ self.monthview.set_sensitive(0)
self.m_distance_unit.set_text(self.uc.unit_distance)
self.m_speed_unit.set_text(self.uc.unit_speed)
self.m_maxspeed_unit.set_text(self.uc.unit_speed)
self.m_pace_unit.set_text(self.uc.unit_pace)
self.m_maxpace_unit.set_text(self.uc.unit_pace)
- if num_records>0:
- for record in record_list:
- km += self.parseFloat(record[1])
- time += self.parseFloat(record[2])
- average += self.parseFloat(record[5])
- calories += self.parseFloat(record[6])
- beats = self.parseFloat(record[3])
- totalascent += self.parseFloat(record[10])
- totaldescent += self.parseFloat(record[11])
- if float(beats) > 0:
- time_in_min += time/60
- tbeats += beats*(time/60)
- if record[7] > maxspeed:
- maxspeed = self.parseFloat(record[7])
- if record[8] > maxbeats:
- maxbeats = self.parseFloat(record[8])
-
- km = self.uc.distance(km)
- maxspeed = self.uc.speed(maxspeed)
-
- if time_in_min > 0:
- tbeats = tbeats/time_in_min
- else:
- tbeats = 0
- if km > 0 and time > 0: # time can be zero when a new year starts
- average = (km/(time/3600))
- else:
- average = 0
-
- if maxspeed > 0:
- #maxpace = 60/maxspeed
- maxpace = "%d:%02d" %((3600/maxspeed)/60,float(3600/maxspeed)%60)
- if average > 0:
- #pace = 60/average
- pace = "%d:%02d" %((3600/average)/60,float(3600/average)%60)
-
- self.montha_distance.set_text("%0.2f" %km)
- hour,min,sec = second2time(time)
- self.montha_hour.set_text("%d" %hour)
- self.montha_minute.set_text("%02d" %min)
- self.montha_second.set_text("%02d" %sec)
- self.montha_maxbeats.set_text("%0.0f" %(maxbeats))
- self.montha_beats.set_text("%0.0f" %(tbeats))
- self.montha_average.set_text("%0.2f" %average)
- self.montha_maxspeed.set_text("%0.2f" %maxspeed)
- self.montha_pace.set_text(pace)
- self.montha_maxpace.set_text(maxpace)
- self.montha_ascdesc.set_text("%d/%d" %(int(totalascent),int(totaldescent)))
- self.montha_calories.set_text("%0.0f" %calories)
- self.monthview.set_sensitive(1)
- else:
- self.monthview.set_sensitive(0)
- logging.debug("<<")
-
- def actualize_monthgraph(self,record_list, daysInMonth):
- logging.debug(">>")
- self.drawareamonth.drawgraph(record_list, daysInMonth)
+ self.montha_distance.set_text("%0.2f" %distance)
+ hour,min,sec = second2time(timeinseconds)
+ self.montha_hour.set_text("%d" %hour)
+ self.montha_minute.set_text("%02d" %min)
+ self.montha_second.set_text("%02d" %sec)
+ self.montha_maxbeats.set_text("%0.0f" %(maxbeats))
+ self.montha_beats.set_text("%0.0f" %(tbeats))
+ self.montha_average.set_text("%0.2f" %average)
+ self.montha_maxspeed.set_text("%0.2f" %maxspeed)
+ self.montha_pace.set_text(pace)
+ self.montha_maxpace.set_text(maxpace)
+ self.montha_ascdesc.set_text("%d/%d" %(int(totalascent),int(totaldescent)))
+ self.montha_calories.set_text("%0.0f" %calories)
+ self.drawareamonth.drawgraph(activity_list, daysInMonth)
logging.debug("<<")
- def actualize_yearview(self,record_list, year):
+ def actualize_yearview(self, date_range, year):
logging.debug(">>")
self.year_date.set_text("%d" %int(year))
- km = calories = time = average = beats = 0
- num_records = len(record_list)
- time_in_min = 0
- tbeats = 0
- maxspeed = 0
- pace = "0:00"
- maxpace = "0:00"
- maxbeats = 0
- totalascent = 0
- totaldescent = 0
+ if self.activeSport:
+ sport = self._sport_service.get_sport_by_name(self.activeSport)
+ else:
+ sport = None
+ activity_list = self.pytrainer_main.activitypool.get_activities_period(date_range, sport=sport)
+ tbeats, distance, calories, timeinseconds, beats, maxbeats, maxspeed, average, maxpace, pace, totalascent, totaldescent = self._totals_from_activities(activity_list)
+ if timeinseconds:
+ self.yearview.set_sensitive(1)
+ else:
+ self.yearview.set_sensitive(0)
+ self.drawareayear.drawgraph([])
self.y_distance_unit.set_text(self.uc.unit_distance)
self.y_speed_unit.set_text(self.uc.unit_speed)
self.y_maxspeed_unit.set_text(self.uc.unit_speed)
self.y_pace_unit.set_text(self.uc.unit_pace)
self.y_maxpace_unit.set_text(self.uc.unit_pace)
- if num_records>0:
- for record in record_list:
- km += self.parseFloat(record[1])
- time += self.parseFloat(record[2])
- average += self.parseFloat(record[5])
- calories += self.parseFloat(record[6])
- beats = self.parseFloat(record[3])
- totalascent += self.parseFloat(record[10])
- totaldescent += self.parseFloat(record[11])
- if float(beats) > 0:
- time_in_min += time/60
- tbeats += beats*(time/60)
- if record[7] > maxspeed:
- maxspeed = self.parseFloat(record[7])
- if record[8] > maxbeats:
- maxbeats = self.parseFloat(record[8])
-
- km = self.uc.distance(km)
- maxspeed = self.uc.speed(maxspeed)
-
- if time_in_min > 0:
- tbeats = tbeats/time_in_min
- else:
- tbeats = 0
- if km > 0:
- average = (km/(time/3600))
- else:
- average = 0
-
- if maxspeed > 0:
- #maxpace = 60/maxspeed
- maxpace = "%d:%02d" %((3600/maxspeed)/60,(3600/maxspeed)%60)
- if average > 0:
- #pace = 60/average
- pace = "%d:%02d" %((3600/average)/60,(3600/average)%60)
-
- self.yeara_distance.set_text("%0.2f" %km)
- hour,min,sec = second2time(time)
- self.yeara_hour.set_text("%d" %hour)
- self.yeara_minute.set_text("%02d" %min)
- self.yeara_second.set_text("%02d" %sec)
- self.yeara_beats.set_text("%0.0f" %tbeats)
- self.yeara_maxbeats.set_text("%0.0f" %(maxbeats))
- self.yeara_average.set_text("%0.2f" %average)
- self.yeara_maxspeed.set_text("%0.2f" %maxspeed)
- self.yeara_pace.set_text(pace)
- self.yeara_maxpace.set_text(maxpace)
- self.yeara_ascdesc.set_text("%d/%d " %(totalascent,totaldescent))
- self.yeara_calories.set_text("%0.0f" %calories)
- self.yearview.set_sensitive(1)
- else:
- self.yearview.set_sensitive(0)
- self.drawareayear.drawgraph([])
- logging.debug("<<")
-
- def actualize_yeargraph(self,record_list):
- logging.debug(">>")
- self.drawareayear.drawgraph(record_list)
+ self.yeara_distance.set_text("%0.2f" %distance)
+ hour,min,sec = second2time(timeinseconds)
+ self.yeara_hour.set_text("%d" %hour)
+ self.yeara_minute.set_text("%02d" %min)
+ self.yeara_second.set_text("%02d" %sec)
+ self.yeara_beats.set_text("%0.0f" %tbeats)
+ self.yeara_maxbeats.set_text("%0.0f" %(maxbeats))
+ self.yeara_average.set_text("%0.2f" %average)
+ self.yeara_maxspeed.set_text("%0.2f" %maxspeed)
+ self.yeara_pace.set_text(pace)
+ self.yeara_maxpace.set_text(maxpace)
+ self.yeara_ascdesc.set_text("%d/%d " %(totalascent,totaldescent))
+ self.yeara_calories.set_text("%0.0f" %calories)
+ self.drawareayear.drawgraph(activity_list)
logging.debug("<<")
def actualize_athleteview(self, athlete):
@@ -2007,7 +1849,7 @@ class Main(SimpleBuilderApp):
logging.debug("<<")
return False
- def actualize_recordTreeView(self, record_list):
+ def actualize_recordTreeView(self, date):
logging.debug(">>")
iterOne = False
store = gtk.TreeStore(
@@ -2016,51 +1858,45 @@ class Main(SimpleBuilderApp):
gobject.TYPE_STRING, #Sport
gobject.TYPE_STRING, #Distance
object)
- for i in record_list:
- #Get lap info
- #Could get an activity from the pool here, but is slow??
- id_record = i[8]
- laps = self.parent.record.getLaps(id_record)
+ if self.activeSport:
+ sport = self._sport_service.get_sport_by_name(self.activeSport)
+ else:
+ sport = None
+ for activity in self.pytrainer_main.activitypool.get_activities_for_day(date, sport=sport):
iter = store.append(None)
if not iterOne:
iterOne = iter
- dateTime = i[12]
- if dateTime is not None:
- localTime = dateutil.parser.parse(dateTime).strftime("%H:%M")
- else:
- localTime = ""
- dist = self.uc.distance(i[2])
+ localTime = activity.date_time.strftime("%H:%M")
+ dist = self.uc.distance(activity.distance)
distance = "%0.2f" % (float(dist) )
store.set (
iter,
- 0, int(i[8]),
- 1, str(localTime),
- 2, str(i[0]),
+ 0, activity.id,
+ 1, localTime,
+ 2, activity.sport.name,
3, str(distance) #Needs to be US pref aware....
)
- if laps is not None:
- for lap in laps:
- #"id_lap, record, elapsed_time, distance, start_lat, start_lon, end_lat, end_lon, calories, lap_number",
- lapNumber = "%s %02d" % ( _("lap"), int(lap[9])+1 )
- dist = self.uc.distance(lap[3])
- distance = "%0.2f" % (float(dist) / 1000.0)
- timeHours = int(float(lap[2]) / 3600)
- timeMin = int((float(lap[2]) / 3600.0 - timeHours) * 60)
- timeSec = float(lap[2]) - (timeHours * 3600) - (timeMin * 60)
- if timeHours > 0:
- duration = "%d%s%02d%s%02d%s" % (timeHours, _("h"), timeMin, _("m"), timeSec, _("s"))
- else:
- duration = "%2d%s%02d%s" % (timeMin, _("m"), timeSec, _("s"))
-
- child_iter = store.append(iter)
- store.set (
- child_iter,
- 0, int(i[8]),
- 1, lapNumber,
- 2, duration,
- 3, distance
- )
- store.set_sort_column_id(1, gtk.SORT_ASCENDING)
+ for lap in activity.Laps:
+ lapNumber = "%s %02d" % (_("lap"), lap.lap_number + 1)
+ dist = self.uc.distance(lap.distance)
+ distance = "%0.2f" % (float(dist) / 1000.0)
+ timeHours = int(lap.duration / 3600)
+ timeMin = int((lap.duration / 3600.0 - timeHours) * 60)
+ timeSec = lap.duration - (timeHours * 3600) - (timeMin * 60)
+ if timeHours > 0:
+ duration = "%d%s%02d%s%02d%s" % (timeHours, _("h"), timeMin, _("m"), timeSec, _("s"))
+ else:
+ duration = "%2d%s%02d%s" % (timeMin, _("m"), timeSec, _("s"))
+
+ child_iter = store.append(iter)
+ store.set (
+ child_iter,
+ 0, activity.id,
+ 1, lapNumber,
+ 2, duration,
+ 3, distance
+ )
+ store.set_sort_column_id(1, gtk.SORT_ASCENDING)
self.recordTreeView.set_model(store)
if iterOne:
self.recordTreeView.get_selection().select_iter(iterOne)
@@ -2077,7 +1913,7 @@ class Main(SimpleBuilderApp):
self.calendar.clear_marks()
#Mark each day that has activity
for i in record_list:
- self.calendar.mark_day(int(i))
+ self.calendar.mark_day(i)
#Turn on displaying of week numbers
display_options = self.calendar.get_display_options()
self.calendar.set_display_options(display_options|gtk.CALENDAR_SHOW_WEEK_NUMBERS)
@@ -2333,3 +2169,43 @@ class Main(SimpleBuilderApp):
def on_hrplotbutton_clicked(self,widget):
self.heartrate_vbox.show()
self.heartrate_vbox2.hide()
+
+ def _totals_from_activities(self, activity_list):
+ tbeats = 0
+ distance = 0
+ calories = 0
+ timeinseconds = 0
+ beats = 0
+ maxbeats = 0
+ maxspeed = 0
+ average = 0
+ maxpace = "0:00"
+ pace = "0:00"
+ totalascent = 0
+ totaldescent = 0
+ for activity in activity_list:
+ distance += activity.distance
+ calories += activity.calories
+ timeinseconds += activity.duration
+ beats = activity.beats
+ totalascent += activity.upositive
+ totaldescent += activity.unegative
+ if float(beats)>0:
+ tbeats += beats*(activity.duration/60/60)
+ if activity.maxspeed > maxspeed:
+ maxspeed = activity.maxspeed
+ if activity.maxbeats > maxbeats:
+ maxbeats = activity.maxbeats
+
+ distance = self.uc.distance(distance)
+ maxspeed = self.uc.speed(maxspeed)
+
+ if tbeats > 0 and timeinseconds > 0:
+ tbeats = tbeats/(timeinseconds/60/60)
+ if distance > 0 and timeinseconds > 0:
+ average = distance/(float(timeinseconds)/60/60)
+ if maxspeed > 0:
+ maxpace = "%d:%02d" %((3600/maxspeed)/60,(3600/maxspeed)%60)
+ if average > 0:
+ pace = "%d:%02d" %((3600/average)/60,(3600/average)%60)
+ return tbeats, distance, calories, timeinseconds, beats, maxbeats, maxspeed, average, maxpace, pace, totalascent, totaldescent
diff --git a/pytrainer/gui/windowprofile.py b/pytrainer/gui/windowprofile.py
index 817f32a..8bfec02 100644
--- a/pytrainer/gui/windowprofile.py
+++ b/pytrainer/gui/windowprofile.py
@@ -48,7 +48,8 @@ class WindowProfile(SimpleBuilderApp):
self.ddbb_type = {
0:"sqlite",
- 1:"mysql"
+ 1:"mysql",
+ 2:"postgresql",
}
#anhadimos las opciones al combobox gender
@@ -295,10 +296,10 @@ class WindowProfile(SimpleBuilderApp):
def on_prf_ddbb_changed(self,widget):
i = self.prf_ddbb.get_active_text()
- if i == "mysql":
- self._ddbb_value_active()
- else:
+ if i == "sqlite":
self._ddbb_value_deactive()
+ else:
+ self._ddbb_value_active()
def on_addsport_clicked(self,widget):
self.hidesportsteps()
diff --git a/pytrainer/lib/ddbb.py b/pytrainer/lib/ddbb.py
index ab8a954..c83d332 100644
--- a/pytrainer/lib/ddbb.py
+++ b/pytrainer/lib/ddbb.py
@@ -20,7 +20,25 @@
#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import logging
+import os
import dateutil
+from pytrainer.util.color import color_from_hex_string
+from sqlalchemy import create_engine
+from sqlalchemy.orm import sessionmaker
+from sqlalchemy.ext.declarative import declarative_base
+from sqlalchemy.types import TypeDecorator
+from sqlalchemy import Integer, Table, Column, ForeignKey
+
+DeclarativeBase = declarative_base()
+
+record_to_equipment = Table('record_equipment', DeclarativeBase.metadata,
+ Column('id', Integer, primary_key=True),
+ Column('equipment_id', Integer,
+ ForeignKey('equipment.id'),
+ index=True, nullable=False),
+ Column('record_id', Integer,
+ ForeignKey('records.id_record'),
+ index=True, nullable=False))
#Define the tables and their columns that should be in the database
#Obviously, this is not a list but a dict -> TODO: ammend name to avoid confusion!!!
@@ -100,204 +118,86 @@ tablesList = { "records":{ "id_record":"integer primary key autoincrement",
"equipment_id": "int",
}
}
-tablesDefaultData = { "sports": [
- ({ "name": u"Mountain Bike", "weight": 0.0, "color": "0000ff" } ),
- ({ "name": u"Bike", "weight": 0.0, "color": "00ff00"}),
- ({ "name": u"Run", "weight": 0.0, "color": "ffff00"})
-]}
-
class DDBB:
- def __init__(self, configuration):
- self.configuration = configuration
- self.ddbb_type = self.configuration.getValue("pytraining","prf_ddbb")
- if self.ddbb_type == "mysql": #TODO no longer supported?
- from mysqlUtils import Sql
+ def __init__(self, url=None):
+ """Initialize database connection, defaulting to SQLite in-memory
+if no url is provided"""
+ if url:
+ self.url = url
else:
- from sqliteUtils import Sql
+ if 'PYTRAINER_ALCHEMYURL' in os.environ:
+ self.url = os.environ['PYTRAINER_ALCHEMYURL']
+ else:
+ self.url = "sqlite://"
+ if self.url.startswith('mysql'):
+ self.url = '%s%s' % (self.url, '?charset=utf8')
+ self.engine = create_engine(self.url, logging_name='db')
+ logging.info("DDBB created with url %s", self.url)
- ddbb_host = self.configuration.getValue("pytraining","prf_ddbbhost")
- ddbb = self.configuration.getValue("pytraining","prf_ddbbname")
- ddbb_user = self.configuration.getValue("pytraining","prf_ddbbuser")
- ddbb_pass = self.configuration.getValue("pytraining","prf_ddbbpass")
- self.ddbbObject = Sql(ddbb_host,ddbb,ddbb_user,ddbb_pass,self.configuration)
-
def get_connection_url(self):
- return self.ddbbObject.get_connection_url()
+ return self.url
def connect(self):
- connection_ok, connection_msg = self.ddbbObject.connect()
- if not connection_ok:
- print "ERROR: Unable to connect to database"
- print connection_msg
- sys.exit(connection_ok)
+ Session = sessionmaker(bind=self.engine)
+ self.session = Session()
def disconnect(self):
- self.ddbbObject.disconnect()
+ self.session.close()
+ self.engine.dispose()
def select(self,table,cells,condition=None, mod=None):
- return self.ddbbObject.select(table,cells,condition,mod)
-
- def select_dict(self,table,cells,condition=None, mod=None):
- '''
- Function to query DB
- -- inputs
- ---- table - string tablename(s)
- ---- cells - list of cells to select
- ---- condition - string to fit SQL where clause or None
- ---- mod - string of select clause modifier, eg "order by date"
- -- returns
- ---- list of dicts with cells as keys
- '''
- logging.debug(">>")
- global tablesList
- return_value = []
- #Only query db if table and cells are supplied
- if table is not None and cells is not None:
- if table.find(',') != -1:
- #multiple tables in select
- #TODO fix so works....
- logging.info('TODO fix select_dict to work with multiple tables')
- cellString = ','.join(cells) #create cell list string
- results = self.ddbbObject.select(table,cellString,condition,mod)
- for result in results:
- dict = {}
- #Loop through cells and create dict of results
- for i, cell in enumerate(cells):
- #cell_type = tablesList[table][cell]
- dict[cell] = result[i]
- return_value.append(dict)
- elif table in tablesList:
- cellString = ','.join(cells) #create cell list string
- results = self.ddbbObject.select(table,cellString,condition,mod)
- for result in results:
- dict = {}
- #Loop through cells and create dict of results
- for i, cell in enumerate(cells):
- #check result is correct type
- if cell not in tablesList[table]:
- logging.error('select includes invalid cell (%s) for table %s' % (cell, table))
- else:
- cell_type = tablesList[table][cell]
- dict[cell] = self.parseByCellType(result[i], cell_type)
- return_value.append(dict)
- else:
- logging.error('select on invalid table name')
- logging.debug("<<")
- return return_value
-
- def parseByCellType(self, value, cell_type):
- '''
- Function to validate that value is of type cell_type
- '''
- #TODO need to check if multivalue cell type specified
- # eg integer primary key autoincrement
- #print "Checking if %s is of type %s" % (value, cell_type)
- if cell_type.startswith('float'):
- try:
- result = float(value)
- return result
- except Exception as e:
- #print "%s not float" % value
- return None
- elif cell_type.startswith('int'):
- try:
- result = int(value)
- return result
- except Exception as e:
- #print "%s not int" % value
- return None
- elif cell_type.startswith('text'):
- #Text so is OK??
- #TODO anytests required here??
- return value
- elif cell_type.startswith('varchar'):
- #Text so is OK??
- #TODO check length against spec?
- return value
- elif cell_type.startswith('char'):
- #Text so is OK??
- #TODO check length against spec?
- return value
- elif cell_type.startswith('date'):
- try:
- result = dateutil.parser.parse(value).date()
- return result
- except Exception as e:
- #print type(e)
- #print e
- #print "%s not date" % value
- return None
- print "Unknown datatype: (%s) for data (%s)" % (cell_type, value)
- return None
-
- def insert(self,table,cells,values):
- self.ddbbObject.insert(table,cells,values)
+ logging.warning("Deprecated call to ddbb.select")
+ sql = "select %s from %s" %(cells,table)
+ if condition is not None:
+ sql = "%s where %s" % (sql, condition)
+ if mod is not None:
+ sql = "%s %s" % (sql, mod)
+ return list(self.session.execute(sql))
- def insert_dict(self, table, data):
- logging.debug(">>")
- global tablesList
- if not table or not data or table not in tablesList:
- print "insert_dict called with invalid table or no data"
- logging.debug("!<<")
- return False
- cells = []
- values = []
- for cell in data:
- cell_type = tablesList[table][cell]
- cell_value = self.parseByCellType(data[cell], cell_type)
- if cell_value is not None:
- cells.append(cell)
- values.append(cell_value)
- #Create string of cell names for sql...
- #TODO fix sql objects so dont need to join...
- cells_string = ",".join(cells)
- self.ddbbObject.insert(table,cells_string,values)
- logging.debug("<<")
-
- def delete(self,table,condition):
- self.ddbbObject.delete(table,condition)
-
- def update(self,table,cells,value,condition):
- self.ddbbObject.update(table,cells,value,condition)
-
- def update_dict(self, table, data, condition):
- logging.debug(">>")
- global tablesList
- if not table or not data or table not in tablesList:
- print "update_dict called with invalid table or no data"
- logging.debug("!<<")
- return False
- cells = []
- values = []
- for cell in data:
- cell_type = tablesList[table][cell]
- cell_value = self.parseByCellType(data[cell], cell_type)
- if cell_value is not None:
- cells.append(cell)
- values.append(cell_value)
- #Create string of cell names for sql...
- #TODO fix sql objects so dont need to join...
- cells_string = ",".join(cells)
- self.ddbbObject.update(table,cells_string,values,condition)
- logging.debug("<<")
-
- def lastRecord(self,table):
- id = "id_" + table[:-1] #prune 's' of table name and pre-pend 'id_' to get id column
- sql = "select %s from %s order by %s Desc limit 0,1" %(id,table,id)
- ret_val = self.ddbbObject.freeExec(sql)
- return ret_val[0][0]
-
def create_tables(self, add_default=True):
"""Initialise the database schema from an empty database."""
logging.info("Creating database tables")
- for entry in tablesList:
- self.ddbbObject.createTableDefault(entry, tablesList[entry])
- if add_default and entry in tablesDefaultData:
- logging.debug("Adding default data to %s" % entry)
- for data_dict in tablesDefaultData[entry]:
- self.insert_dict(entry, data_dict)
+ from pytrainer.core.sport import Sport
+ from pytrainer.core.equipment import Equipment
+ from pytrainer.waypoint import Waypoint
+ from pytrainer.core.activity import Lap
+ from pytrainer.athlete import Athletestat
+ DeclarativeBase.metadata.create_all(self.engine)
+ if add_default:
+ for item in [Sport(name=u"Mountain Bike", weight=0.0, color=color_from_hex_string("0000ff")),
+ Sport(name=u"Bike", weight=0.0, color=color_from_hex_string("00ff00")),
+ Sport(name=u"Run", weight=0.0, color=color_from_hex_string("ffff00"))]:
+ self.session.add(item)
+ self.session.commit()
+
+ def drop_tables(self):
+ """Drop the database schema"""
+ DeclarativeBase.metadata.drop_all(self.engine)
def create_backup(self):
"""Create a backup of the current database."""
- self.ddbbObject.createDatabaseBackup()
+ import urlparse
+ scheme, netloc, path, params, query, fragment = urlparse.urlparse(self.url)
+ if scheme == 'sqlite':
+ import urllib
+ import datetime
+ import gzip
+ logging.info("Creating compressed copy of current DB")
+ logging.debug('Database path: %s', self.url)
+ path = urllib.url2pathname(path)
+ backup_path = '%s_%s.gz' % (path, datetime.datetime.now().strftime('%Y%m%d_%H%M'))
+ with open(path, 'rb') as orig_file:
+ with gzip.open(backup_path, 'wb') as backup_file:
+ backup_file.write(orig_file.read())
+ logging.info('Database backup successfully created')
+
+class ForcedInteger(TypeDecorator):
+ """Type to force values to int since sqlite doesn't do this"""
+ impl = Integer
+
+ def process_bind_param(self, value, dialect):
+ if value is None:
+ return None
+ else:
+ return int(value)
diff --git a/pytrainer/lib/mysqlUtils.py b/pytrainer/lib/mysqlUtils.py
deleted file mode 100644
index 7a6cc02..0000000
--- a/pytrainer/lib/mysqlUtils.py
+++ /dev/null
@@ -1,193 +0,0 @@
-# -*- coding: iso-8859-1 -*-
-
-#Copyright (C) Fiz Vazquez vud1 at sindominio.net
-# vud1 at grupoikusnet.com
-# Jakinbidea & Grupo Ikusnet Developer
-
-#This program is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public License
-#as published by the Free Software Foundation; either version 2
-#of the License, or (at your option) any later version.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
-
-#You should have received a copy of the GNU General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import _mysql_exceptions
-import MySQLdb
-import logging
-
-# Fixed some issues with MySql tables creation (email from Jonas Liljenfeldt)
-class Sql:
- def __init__(self,host=None, ddbb = None, user = None, password = None, configuration = None):
- self.ddbb_user = user
- self.ddbb_pass = password
- self.ddbb_host = host
- self.ddbb = ddbb
- self.db = None
-
- def get_connection_url(self):
- return "mysql://{user}:{passwd}@{host}/{db}".format(user=self.ddbb_user, passwd=self.ddbb_pass, host=self.ddbb_host, db=self.ddbb)
-
- def connect(self):
- #si devolvemos 1 ha ido todo con exito
- #con 0 es que no estaba la bbdd creada
- #con -1 imposible conectar a la maquina.
- try:
- self.db=MySQLdb.connect(
- host=self.ddbb_host,
- user=self.ddbb_user,
- passwd=self.ddbb_pass,
- db=self.ddbb)
- return (True, "OK")
- except _mysql_exceptions.OperationalError as e:
- error_no, error_description = e
- print "ERROR: An error occured while connecting to MySQL DB (%s) %s" % (error_no, error_description)
- if error_no == 1049:
- #Unknown DB - try to create?
- print "Unknown DB given, attempting to create a new DB"
- try:
- #Connect to DB without specifying the DB
- self.db=MySQLdb.connect(host=self.ddbb_host, user=self.ddbb_user, passwd=self.ddbb_pass)
- #Create DB
- self.createDDBB()
- #Reconnect to new DB
- self.db=MySQLdb.connect(host=self.ddbb_host, user=self.ddbb_user, passwd=self.ddbb_pass, db=self.ddbb)
- return (True, "OK")
- except Exception as e:
- #No good - so stop
- print type(e)
- print e
- logging.error("Unable to connect to MySQL DB")
- return (False, "Unable to connect to MySQL DB")
- except Exception as e:
- logging.error("Unable to connect to MySQL DB")
- print "ERROR: Unable to connect to MySQL DB"
- print type(e)
- print e
- return (False, "Unable to connect to MySQL DB")
-
- def disconnect(self):
- self.db.close()
-
- def createDDBB(self):
- self.db.query("create database %s" %self.ddbb)
-
- def getTableList(self):
- tables = []
- result = self.freeExec('show tables')
- for row in result:
- tables.append(row[0])
- return tables
-
- def createTableDefault(self,tableName,columns):
- '''
- Creates a new table in database given name and column name and data types. New in version 1.7.0
- args:
- tableName - string with name of the table
- columns - dictionary containing column names and data types coming from definition
- returns: none'''
- #print self, tableName, columns
- logging.debug('>>')
- logging.info('Creating '+str(tableName)+' table with default values')
- logging.debug('Columns definition: '+str(columns))
- cur = self.db.cursor()
- sql = 'CREATE TABLE %s (' %(tableName)
- for entry in columns:
- if columns[entry].find('autoincrement') != -1:
- logging.debug("have a autoincrement field")
- fieldtype = columns[entry].replace('autoincrement', 'auto_increment')
- sql += '%s %s,' %(entry,fieldtype)
- else:
- sql += '%s %s,' %(entry,columns[entry])
- # Removing trailing comma
- sql = sql.rstrip(',')
- sql = sql+");"
- logging.debug('SQL sentence: '+str(sql))
- #print sql
- cur.execute(sql)
- logging.debug('<<')
-
- def insert(self,table, cells, values):
- val = values
- count = 0
- string = ""
- for i in val:
- if count>0:
- string+=","
- string+="""\"%s\"""" %i
- count = count+1
- sql = '''insert into %s (%s) values (%s)''' %(table,cells,string)
- self.db.query(sql)
-
- def freeExec(self,sql):
- #self.db.query(sql)
- cur = self.db.cursor()
- cur.execute(sql)
- retorno = []
- for row in cur.fetchall():
- retorno.append(row)
- self.db.commit()
- return retorno
-
- def delete(self,table,condition):
- sql = "delete from %s where %s" %(table,condition)
- self.db.query(sql)
-
- def select(self,table,cells,condition, mod=None):
- if condition != None:
- self.db.query("""select %s from %s where %s""" %(cells,table,condition))
- else:
- self.db.query("""select %s from %s """ %(cells,table))
- r = self.db.store_result()
- retorno = []
- while 1==1:
- sublist = r.fetch_row()
- if len(sublist)>0:
- retorno.append(sublist[0])
- else:
- break
- return retorno
-
- def update (self,table,cells,values,condition):
- cells = cells.split(",")
- count = 0
- string = ""
- for val in values:
- if count>0:
- string+=","
- string += """%s="%s" """ %(cells[count],values[count])
- count = count+1
-
- string +=" where %s" %condition
- sql = "update %s set %s" %(table,string)
- self.db.query(sql)
-
- def retrieveTableInfo(self,tableName):
- cur = self.db.cursor()
- sql = "desc %s;" %tableName
- cur.execute(sql)
- tableInfo = []
- for row in cur:
- tableInfo.append(row)
- return tableInfo
- return
-
- def addColumn(self,tableName,columnName,dataType):
- if dataType.find('autoincrement') != -1:
- dataType = dataType.replace('autoincrement', 'auto_increment')
- sql = "alter table %s add %s %s" %(tableName,columnName,dataType)
- logging.debug("Trying SQL: %s" % sql)
- try:
- self.freeExec(sql)
- except:
- logging.error('Not able to add/change column '+columnName+' to table '+tableName)
- traceback.print_exc()
-
- def createDatabaseBackup(self):
- logging.info("Unable to create backup for MySQL DB")
diff --git a/pytrainer/lib/sqliteUtils.py b/pytrainer/lib/sqliteUtils.py
deleted file mode 100644
index 5aff2bb..0000000
--- a/pytrainer/lib/sqliteUtils.py
+++ /dev/null
@@ -1,193 +0,0 @@
-# -*- coding: iso-8859-1 -*-
-
-#Copyright (C) Fiz Vazquez vud1 at sindominio.net
-# vud1 at grupoikusnet.com
-# Jakinbidea & Grupo Ikusnet Developer
-
-#This program is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public License
-#as published by the Free Software Foundation; either version 2
-#of the License, or (at your option) any later version.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
-
-#You should have received a copy of the GNU General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import logging
-import sys, traceback, commands
-import datetime
-try:
- from sqlite3 import dbapi2 as sqlite
-except ImportError:
- logging.error('Not able to find sqlite2 module (new in python 2.5)')
- from pysqlite2 import dbapi2 as sqlite
- logging.info('Using pysqlite2 module to access DB. Think about upgrading to python 2.5!')
-
-class Sql:
- def __init__(self,host=None, ddbb = None, user = None, password = None, configuration = None):
- self.db = None
- if ddbb == 'memory':
- self.ddbb = ':memory:'
- self.url = 'sqlite://'
- else:
- confdir = configuration.confdir
- self.ddbb = "%s/pytrainer.ddbb" %confdir
- self.url = "sqlite:///" + self.ddbb
-
- def get_connection_url(self):
- return self.url
-
- def connect(self):
- #si devolvemos 1 ha ido todo con exito
- self.db = sqlite.connect(self.ddbb)
- return (True, "OK")
- #probamos si estan las tablas creadas, y sino.. las creamos
- '''try:
- self.select("records","id_record","1=1 limit 0,1")
- except:
- self.createTables()
- return 1'''
-
- def disconnect(self):
- self.db.close()
-
- def createDDBB(self):
- pass
-
- def getTableList(self):
- tmpList = self.select("sqlite_master","name", "type IN ('table','view') AND name NOT LIKE 'sqlite_%' ORDER BY name")
- # The instruction above returns a list of tuples, going for a simple list
- newList = []
- for entry in tmpList:
- newList.append(entry[0])
- return newList
-
- def createTableDefault(self,tableName,columns):
- '''22.11.2009 - dgranda
- Creates a new table in database given name and column name and data types. New in version 1.7.0
- args:
- tableName - string with name of the table
- columns - dictionary containing column names and data types coming from definition
- returns: none'''
- logging.debug('>>')
- logging.info('Creating '+str(tableName)+' table with default values')
- logging.debug('Columns definition: '+str(columns))
- cur = self.db.cursor()
- sql = 'CREATE TABLE %s (' %(tableName)
- for entry in columns:
- sql += '%s %s,' %(entry,columns[entry])
- # Removing trailing comma
- sql = sql.rstrip(',')
- sql = sql+");"
- logging.debug('SQL sentence: '+str(sql))
- cur.execute(sql)
- logging.debug('<<')
-
- def insert(self,table, cells, values):
- logging.debug('>>')
- cur = self.db.cursor()
- val = values
- count = 0
- string = ""
- for i in val:
- if count>0:
- string+=","
- string+= self._to_sql_value(i)
- count = count+1
- sql = "insert into %s (%s) values (%s)" %(table,cells,string)
- logging.debug('SQL sentence: '+str(sql))
- cur.execute(sql)
- self.db.commit()
- logging.debug('<<')
-
- def _to_sql_value(self, value):
- logging.debug('>>')
- logging.debug('Value: %s | type: %s ' %(value,type(value)))
- if value == None:
- return "null"
- elif type(value) in [str, unicode]:
- return "'%s'" % value
- elif type(value) == datetime.datetime:
- return value.strftime("'%Y-%m-%d %H:%M:%S%z'")
- elif type(value) == datetime.date:
- return value.strftime("'%Y-%m-%d'")
- else:
- return str(value)
- logging.debug('<<')
-
- def freeExec(self,sql):
- cur = self.db.cursor()
- cur.execute(sql)
- retorno = []
- for row in cur:
- retorno.append(row)
- self.db.commit()
- return retorno
-
- def delete(self,table,condition):
- cur = self.db.cursor()
- sql = "delete from %s where %s" %(table,condition)
- cur.execute(sql)
- self.db.commit()
-
- def update(self,table,cells,values, condition):
- cur = self.db.cursor()
- cells = cells.split(",")
- count = 0
- string = ""
- for val in values:
- if count>0:
- string+=","
- string += """%s=%s """ %(cells[count], self._to_sql_value(values[count]))
- count = count+1
-
- string +=" where %s" %condition
- sql = "update %s set %s" %(table,string)
- cur.execute(sql)
- self.db.commit()
-
- def select(self,table,cells,condition, mod=None):
- cur = self.db.cursor()
- sql = "select %s from %s" %(cells,table)
- if condition is not None:
- sql = "%s where %s" % (sql, condition)
- if mod is not None:
- sql = "%s %s" % (sql, mod)
- logging.debug('SQL sentence: %s' % sql)
- cur.execute(sql)
- retorno = []
- for row in cur:
- retorno.append(row)
- return retorno
-
- def retrieveTableInfo(self,tableName):
- cur = self.db.cursor()
- sql = "PRAGMA table_info(%s);" %tableName
- cur.execute(sql)
- tableInfo = []
- for row in cur:
- tableInfo.append(row)
- return tableInfo
-
- def addColumn(self,tableName,columnName,dataType):
- sql = "alter table %s add %s %s" %(tableName,columnName,dataType)
- logging.debug("Trying SQL: %s" % sql)
- try:
- self.freeExec(sql)
- except:
- logging.error('Not able to add/change column '+columnName+' to table '+tableName)
- traceback.print_exc()
-
-
- def createDatabaseBackup(self):
- logging.info("Creating compressed copy of current DB")
- logging.debug('Database path: '+str(self.ddbb))
- result = commands.getstatusoutput('gzip -c '+self.ddbb+' > '+self.ddbb+'_`date +%Y%m%d_%H%M`.gz')
- if result[0] != 0:
- raise Exception, "Copying current database does not work, error #"+str(result[0])
- logging.info('Database backup successfully created')
diff --git a/pytrainer/lib/uc.py b/pytrainer/lib/uc.py
index 18e76b8..ee34738 100644
--- a/pytrainer/lib/uc.py
+++ b/pytrainer/lib/uc.py
@@ -15,6 +15,7 @@
#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from pytrainer.lib.singleton import Singleton
+from gettext import gettext as _
def pace2float(pace_str):
if pace_str.count(':') != 1:
diff --git a/pytrainer/main.py b/pytrainer/main.py
index ebe33ea..fcaacbf 100644
--- a/pytrainer/main.py
+++ b/pytrainer/main.py
@@ -28,7 +28,7 @@ from pytrainer.util.date import DateRange
from upgrade.data import initialize_data
from environment import Environment
from record import Record
-from waypoint import Waypoint
+from waypoint import WaypointService
from extension import Extension
from importdata import Importdata
from plugins import Plugins
@@ -66,7 +66,7 @@ class pyTrainer:
self.profile.saveProfile()
self.uc = UC()
self.profilewindow = None
- self.ddbb = DDBB(self.profile)
+ self.ddbb = DDBB(self.profile.sqlalchemy_url)
logging.debug('connecting to DDBB')
self.ddbb.connect()
@@ -81,7 +81,7 @@ class pyTrainer:
logging.debug('Loading athlete service...')
self.athlete = Athlete(data_path, self)
logging.debug('Loading stats service...')
- self.stats = Stats(self._sport_service, self)
+ self.stats = Stats(self)
logging.debug('Initializing activity pool...')
pool_size = self.profile.getIntValue("pytraining","activitypool_size", default=1)
self.activitypool = ActivityService(self, size=pool_size)
@@ -95,7 +95,7 @@ class pyTrainer:
self.selectInitialDate()
logging.debug('Loading waypoint service...')
- self.waypoint = Waypoint(data_path,self)
+ self.waypoint = WaypointService(data_path, self)
logging.debug('Loading extension service...')
self.extension = Extension(data_path, self)
logging.debug('Loading plugins service...')
@@ -154,6 +154,7 @@ class pyTrainer:
'''Set level of information written to log'''
logging.debug("Setting logger to level: "+ str(level))
logging.getLogger('').setLevel(level)
+ logging.getLogger('sqlalchemy.engine').setLevel(level)
def quit(self):
logging.debug('--')
@@ -269,35 +270,20 @@ class pyTrainer:
self.refreshRecordGraphView("analytics")
elif view=="day":
logging.debug('day view')
- sport = self.windowmain.activeSport
- sport_id = self.record.getSportId(sport)
- record_list = self.record.getrecordList(date_selected, sport_id)
- self.windowmain.actualize_dayview(record_list=record_list)
- #selected,iter = self.windowmain.recordTreeView.get_selection().get_selected()
+ self.windowmain.actualize_dayview(date_selected)
elif view=="week":
logging.debug('week view')
date_range = DateRange.for_week_containing(date_selected)
- sport = self.windowmain.activeSport
- sport_id = self.record.getSportId(sport)
- record_list = self.record.getrecordPeriod(date_range, sport_id)
- self.windowmain.actualize_weekview(record_list, date_range)
+ self.windowmain.actualize_weekview(date_range)
elif view=="month":
logging.debug('month view')
date_range = DateRange.for_month_containing(date_selected)
- sport = self.windowmain.activeSport
- sport_id = self.record.getSportId(sport)
- record_list = self.record.getrecordPeriod(date_range, sport_id)
nameMonth, daysInMonth = getNameMonth(date_selected)
- self.windowmain.actualize_monthview(record_list, nameMonth)
- self.windowmain.actualize_monthgraph(record_list, daysInMonth)
+ self.windowmain.actualize_monthview(date_range, nameMonth, daysInMonth)
elif view=="year":
logging.debug('year view')
date_range = DateRange.for_year_containing(date_selected)
- sport = self.windowmain.activeSport
- sport_id = self.record.getSportId(sport)
- record_list = self.record.getrecordPeriod(date_range, sport_id)
- self.windowmain.actualize_yearview(record_list, date_selected.year)
- self.windowmain.actualize_yeargraph(record_list)
+ self.windowmain.actualize_yearview(date_range, date_selected.year)
elif view=="listview":
logging.debug('list view')
self.refreshListView()
@@ -360,12 +346,13 @@ class pyTrainer:
logging.debug('>>')
#Refresh list records
date = self.date.getDate()
- sport = self.windowmain.activeSport
- id_sport = self.record.getSportId(sport)
- record_ids = self.record.getrecordList(date, id_sport)
- self.windowmain.actualize_recordTreeView(record_ids)
+ if self.windowmain.activeSport:
+ sport = self._sport_service.get_sport_by_name(self.windowmain.activeSport)
+ else:
+ sport = None
+ self.windowmain.actualize_recordTreeView(date)
#Mark the monthly calendar to show which days have activity?
- record_list = self.record.getRecordDayList(date, id_sport)
+ record_list = self.record.getRecordDayList(date, sport)
self.windowmain.actualize_calendar(record_list)
logging.debug('<<')
@@ -378,7 +365,7 @@ class pyTrainer:
def refreshStatsView(self):
logging.debug('>>')
self.stats.refresh()
- self.windowmain.actualize_statsview(self.stats, self.record.getAllRecordList())
+ self.windowmain.actualize_statsview(self.stats, self.activitypool.get_all_activities())
logging.debug('<<')
def refreshListView(self,condition=None):
@@ -479,7 +466,8 @@ class pyTrainer:
def removeRecord(self, id_record, confirm = False, view=None):
logging.debug('>>')
if confirm:
- self.record.removeRecord(id_record)
+ activity = self.activitypool.get_activity(id_record)
+ self.activitypool.remove_activity_from_db(activity)
else:
msg = _("Delete this database entry?")
params = [id_record,True]
diff --git a/pytrainer/profile.py b/pytrainer/profile.py
index fea3791..be210b4 100644
--- a/pytrainer/profile.py
+++ b/pytrainer/profile.py
@@ -20,6 +20,7 @@
import os, stat
import logging
from StringIO import StringIO
+from gettext import gettext as _
from lxml import etree
from environment import Environment
@@ -93,6 +94,22 @@ class Profile(Singleton):
def plugindir(self):
return self.environment.plugin_dir
+ @property
+ def sqlalchemy_url(self):
+ ddbb_type = self.getValue("pytraining","prf_ddbb")
+ ddbb_host = self.getValue("pytraining","prf_ddbbhost")
+ ddbb = self.getValue("pytraining","prf_ddbbname")
+ ddbb_user = self.getValue("pytraining","prf_ddbbuser")
+ ddbb_pass = self.getValue("pytraining","prf_ddbbpass")
+ if ddbb_type == "sqlite":
+ return "sqlite:///%s/pytrainer.ddbb" % self.confdir
+ else:
+ return "{type}://{user}:{passwd}@{host}/{db}".format(type=ddbb_type,
+ user=ddbb_user,
+ passwd=ddbb_pass,
+ host=ddbb_host,
+ db=ddbb)
+
def refreshConfiguration(self):
logging.debug(">>")
self.configuration = self._parse_config_file(self.config_file)
diff --git a/pytrainer/record.py b/pytrainer/record.py
index 057934a..35f9cc7 100644
--- a/pytrainer/record.py
+++ b/pytrainer/record.py
@@ -20,577 +20,439 @@
import os
import shutil
import logging
-import traceback
from gui.windowrecord import WindowRecord
from gui.dialogselecttrack import DialogSelectTrack
-from lib.xmlUtils import XMLParser
from lib.date import Date, time2second
from lib.gpx import Gpx
-from pytrainer.core.equipment import EquipmentService
+from pytrainer.core.equipment import EquipmentService, Equipment
from pytrainer.core.sport import Sport
+from pytrainer.core.activity import Activity, Lap
+from pytrainer.util.date import DateRange
class Record:
- def __init__(self, sport_service, data_path = None, parent = None):
- logging.debug('>>')
- self._sport_service = sport_service
- self.parent = parent
- self.pytrainer_main = parent
- self._equipment_service = EquipmentService(self.pytrainer_main.ddbb)
- self.data_path = data_path
- logging.debug('setting date...')
- self.date = Date()
- logging.debug('<<')
-
- def newRecord(self, date, title=None, distance=None, time=None, upositive=None, unegative=None, bpm=None, calories=None, comment=None):
- logging.debug('>>')
- sports = self._sport_service.get_all_sports()
- self.recordwindow = WindowRecord(self._equipment_service, self.data_path, sports, self, self.format_date(date), title, distance, time, upositive, unegative, bpm, calories, comment)
- self.recordwindow.run()
- logging.debug('<<')
-
- def newMultiRecord(self, activities):
- logging.debug('>>')
- sports = self._sport_service.get_all_sports()
- self.recordwindow = WindowRecord(self._equipment_service, self.data_path, sports, parent=self, windowTitle=_("Modify details before importing"))
- self.recordwindow.populateMultiWindow(activities)
- self.recordwindow.run()
- return self.recordwindow.getActivityData()
- logging.debug('<<')
-
- def editRecord(self,id_record):
- logging.debug('>>')
- activity = self.pytrainer_main.activitypool.get_activity(id_record)
- record_equipment = self.get_record_equipment(id_record)
- sports = self._sport_service.get_all_sports()
- self.recordwindow = WindowRecord(self._equipment_service, self.data_path, sports, self, None, windowTitle=_("Edit Entry"), equipment=record_equipment)
- self.recordwindow.setValuesFromActivity(activity)
- logging.debug('launching window')
- self.recordwindow.run()
- self.pytrainer_main.refreshMainSportList()
- logging.debug('<<')
-
- def removeRecord(self,id_record):
- logging.debug('>>')
- record = self.pytrainer_main.ddbb.delete("records", "id_record=\"%s\"" %id_record)
- laps = self.pytrainer_main.ddbb.delete("laps", "record=\"%s\"" %id_record)
- logging.debug('removed record '+str(id_record)+' (and associated laps) from DB')
- gpxfile = self.pytrainer_main.profile.gpxdir+"/%d.gpx"%int(id_record)
- if os.path.isfile(gpxfile):
- os.remove(gpxfile)
- logging.debug('removed gpxfile '+gpxfile)
- logging.debug('<<')
-
- def pace_to_float(self, value):
- '''Take a mm:ss or mm.ss and return float'''
- try:
- value = float(value)
- except:
- if ":" in value: # 'mm:ss' found
- mins, sec = value.split(":")
- value = float(mins + "." + "%02d" %round(int(sec)*5/3))
- elif "," in value:
- value = float(value.replace(',','.'))
- else:
- logging.error("Wrong value provided: %s" %value)
- value = None
- return value
-
- def pace_from_float(self, value, fromDB=False):
- '''Helper to generate mm:ss from float representation mm.ss (or mm,ss?)'''
- #Check that value supplied is a float
- try:
- _value = "%0.2f" % float(value)
- except ValueError:
- _value = str(value)
- if fromDB: # paces in DB are stored in mixed format -> 4:30 as 4.3 (NOT as 4.5 aka 'decimal')
- pace = _value
- else:
- mins, sec_dec = _value.split(".")
- pace = mins + ":" + "%02d" %round(int(sec_dec)*3/5)
- return pace
-
- def _formatRecordNew (self, list_options):
- """20.07.2008 - dgranda
- New records handle date_time_utc field which is transparent when updating, so logic method has been splitted
- args: list with keys and values without valid format
- returns: keys and values matching DB schema"""
- logging.debug('>>')
- time = time2second(list_options["rcd_time"])
- average = self.parseFloatRecord(list_options["rcd_average"])
- keys= "date,sport,distance,time,beats,comments,average,calories,title,upositive,unegative,maxspeed,maxpace,pace,maxbeats,date_time_utc,date_time_local, duration"
- if (list_options["rcd_beats"] == ""):
- list_options["rcd_beats"] = 0
-
- #retrieving sport id (adding sport if it doesn't exist yet)
- sport_id = self.getSportId(list_options["rcd_sport"],add=True)
-
- values= (
- list_options["rcd_date"],
- sport_id,
- self.parseFloatRecord(list_options["rcd_distance"]),
- time,
- self.parseFloatRecord(list_options["rcd_beats"]),
- list_options["rcd_comments"],
- average,
- self.parseFloatRecord(list_options["rcd_calories"]),
- list_options["rcd_title"],
- self.parseFloatRecord(list_options["rcd_upositive"]),
- self.parseFloatRecord(list_options["rcd_unegative"]),
- self.parseFloatRecord(list_options["rcd_maxvel"]),
- self.pace_to_float(list_options["rcd_maxpace"]),
- self.pace_to_float(list_options["rcd_pace"]),
- self.parseFloatRecord(list_options["rcd_maxbeats"]),
- list_options["date_time_utc"],
- list_options["date_time_local"],
- time,
- )
- logging.debug('<<')
- return keys,values
-
- def insertRecord(self, list_options, laps=None, equipment=None):
- logging.debug('>>')
- #Create entry for activity in records table
- if list_options is None:
- logging.info('No data provided, abort adding entry')
- return None
- logging.debug('list_options: '+str(list_options))
- cells,values = self._formatRecordNew(list_options)
- self.pytrainer_main.ddbb.insert("records",cells,values)
- logging.debug('DB updated: '+str(cells)+' | '+str(values))
- id_record = self.pytrainer_main.ddbb.lastRecord("records")
- #Create entry(s) for activity in laps table
- if laps is not None:
- for lap in laps:
- lap['record'] = id_record #Add reference to entry in record table
- lap_keys = ", ".join(map(str, lap.keys()))
- lap_values = lap.values()
- self.insertLaps(lap_keys,lap.values())
- if equipment is not None:
- for equipment_id in equipment:
- self._insert_record_equipment(id_record, equipment_id)
- gpxOrig = list_options["rcd_gpxfile"]
- if os.path.isfile(gpxOrig):
- gpxDest = self.pytrainer_main.profile.gpxdir
- gpxNew = gpxDest+"/%d.gpx"%id_record
- #Leave original file in place...
- #shutil.move(gpxOrig, gpxNew)
- #logging.debug('Moving '+gpxOrig+' to '+gpxNew)
- shutil.copy(gpxOrig, gpxNew)
- logging.debug('Copying '+gpxOrig+' to '+gpxNew)
- #self.parent.refreshListRecords()
- logging.debug('<<')
- return self.pytrainer_main.ddbb.lastRecord("records")
-
- def insertNewRecord(self, gpxOrig, entry): #TODO consolidate with insertRecord
- """29.03.2008 - dgranda
- Moves GPX file to store destination and updates database
- args: path to source GPX file"""
- logging.debug('--')
- (list_options, gpx_laps) = self.summaryFromGPX(gpxOrig, entry)
- if list_options is None:
- return None
- return self.insertRecord(list_options, laps=gpx_laps)
-
- def lapsFromGPX(self, gpx):
- logging.debug('>>')
- laps = []
- gpxLaps = gpx.getLaps()
- for lap in gpxLaps:
- lap_number = gpxLaps.index(lap)
- tmp_lap = {}
- tmp_lap['record'] = ""
- tmp_lap['lap_number'] = lap_number
- tmp_lap['elapsed_time'] = lap[0]
- tmp_lap['distance'] = lap[4]
- tmp_lap['start_lat'] = lap[5]
- tmp_lap['start_lon'] = lap[6]
- tmp_lap['end_lat'] = lap[1]
- tmp_lap['end_lon'] = lap[2]
- tmp_lap['calories'] = lap[3]
- tmp_lap['intensity'] = lap[7]
- tmp_lap['avg_hr'] = lap[8]
- tmp_lap['max_hr'] = lap[9]
- tmp_lap['max_speed'] = lap[10]
- tmp_lap['laptrigger'] = lap[11]
- tmp_lap['comments'] = ""
- laps.append(tmp_lap)
- logging.debug('<<')
- return laps
-
- def hrFromLaps(self, laps):
- logging.debug('>>')
- lap_avg_hr = 0
- lap_max_hr = 0
- total_duration = 0
- ponderate_hr = 0;
- for lap in laps:
- if (lap['max_hr'] is None):
- lap['max_hr'] = 0
- if (lap['avg_hr'] is None):
- lap['avg_hr'] = 0
- if int(lap['max_hr']) > lap_max_hr:
- lap_max_hr = int(lap['max_hr'])
- total_duration = total_duration + float(lap['elapsed_time'])
- ponderate_hr = ponderate_hr + float(lap['elapsed_time'])*int(lap['avg_hr'])
- logging.debug("Lap number: %s | Duration: %s | Average hr: %s | Maximum hr: %s" % (lap['lap_number'], lap['elapsed_time'], lap['avg_hr'], lap['max_hr']))
- lap_avg_hr = int(round(ponderate_hr/total_duration)) # ceil?, floor?, round?
- logging.debug('<<')
- return lap_avg_hr, lap_max_hr
-
- def summaryFromGPX(self, gpxOrig, entry):
- """29.03.2008 - dgranda
- Retrieves info which will be stored in DB from GPX file
- args: path to source GPX file
- returns: list with fields and values, list of laps
- """
- logging.debug('>>')
- gpx = Gpx(self.data_path,gpxOrig)
- distance, time, maxspeed, maxheartrate = gpx.getMaxValues()
- #if time == 0: #invalid record
- # print "Invalid record"
- # return (None, None)
- upositive,unegative = gpx.getUnevenness()
- if time > 0:
- speed = distance*3600/time
- time_hhmmss = [time//3600,(time/60)%60,time%60]
- else:
- speed = 0
- time_hhmmss = [0,0,0]
- summaryRecord = {}
- summaryRecord['rcd_gpxfile'] = gpxOrig
- summaryRecord['rcd_sport'] = entry[0]
- summaryRecord['rcd_date'] = gpx.getDate()
- summaryRecord['rcd_calories'] = gpx.getCalories()
- summaryRecord['rcd_comments'] = ''
- summaryRecord['rcd_title'] = ''
- summaryRecord['rcd_time'] = time_hhmmss #ToDo: makes no sense to work with arrays
- summaryRecord['rcd_distance'] = "%0.2f" %distance
- if speed == 0:
- summaryRecord['rcd_pace'] = "0"
- else:
- summaryRecord['rcd_pace'] = "%d.%02d" %((3600/speed)/60,(3600/speed)%60)
- if maxspeed == 0:
- summaryRecord['rcd_maxpace'] = "0"
- else:
- summaryRecord['rcd_maxpace'] = "%d.%02d" %((3600/maxspeed)/60,(3600/maxspeed)%60)
- summaryRecord['rcd_average'] = speed
- summaryRecord['rcd_maxvel'] = maxspeed
- summaryRecord['rcd_beats'] = gpx.getHeartRateAverage()
- summaryRecord['rcd_maxbeats'] = maxheartrate
- summaryRecord['rcd_upositive'] = upositive
- summaryRecord['rcd_unegative'] = unegative
- if entry[1]=="": # coming from new track dialog (file opening) #TODO This if-else needs checking
- summaryRecord['date_time_utc'], summaryRecord['date_time_local'] = gpx.getStartTimeFromGPX(gpxOrig) #
- else: # coming from GPS device #
- summaryRecord['date_time_utc'] = entry[1] #
- summaryRecord['date_time_local'] = entry[1] #
- print "#TODO fix record summaryRecord local and utc time..." #
- logging.debug('summary: '+str(summaryRecord))
- laps = self.lapsFromGPX(gpx)
- # Heartrate data can't be retrieved if no trackpoints present, calculating from lap info
- lap_avg_hr, lap_max_hr = self.hrFromLaps(laps)
- logging.debug("HR data from laps. Average: %s | Maximum hr: %s" % (lap_avg_hr, lap_max_hr))
- if int(summaryRecord['rcd_beats']) > 0:
- logging.debug("Average heartbeat - Summary: %s | Laps: %s" % (summaryRecord['rcd_beats'], lap_avg_hr))
- else:
- logging.debug("No average heartbeat found, setting value (%s) from laps", lap_avg_hr)
- summaryRecord['rcd_beats'] = lap_avg_hr
- if int(summaryRecord['rcd_maxbeats']) > 0:
- logging.debug("Max heartbeat - Summary: %s | Laps: %s" % (summaryRecord['rcd_maxbeats'], lap_max_hr))
- else:
- logging.debug("No max heartbeat found, setting value (%s) from laps", lap_max_hr)
- summaryRecord['rcd_maxbeats'] = lap_max_hr
- logging.debug('<<')
- return summaryRecord, laps
-
- def updateRecord(self, list_options, id_record, equipment=None): # ToDo: update only fields that can change if GPX file is present
- logging.debug('>>')
- #Remove activity from pool so data is updated
- self.pytrainer_main.activitypool.remove_activity(id_record)
- gpxfile = self.pytrainer_main.profile.gpxdir+"/%d.gpx"%int(id_record)
- gpxOrig = list_options["rcd_gpxfile"]
- if os.path.isfile(gpxOrig):
- if gpxfile != gpxOrig:
- shutil.copy2(gpxOrig, gpxfile)
- else:
- if (list_options["rcd_gpxfile"]==""):
- logging.debug('Activity not based in GPX file') # ein?
- logging.debug('Updating bbdd')
- cells,values = self._formatRecordNew(list_options)
- self.pytrainer_main.ddbb.update("records",cells,values," id_record=%d" %int(id_record))
- if equipment is not None:
- self._update_record_equipment(id_record, equipment)
- self.pytrainer_main.refreshListView()
- logging.debug('<<')
-
- def parseFloatRecord(self,string):
- logging.debug('--')
- if string != "":
- try:
- return float(string.replace(",",","))
- except:
- return float(string)
- else:
- return 0
-
- def getrecordInfo(self,id_record):
- logging.debug('--')
- if id_record is None or id_record == "":
- return []
- return self.pytrainer_main.ddbb.select("records,sports",
- "sports.name,date,distance,time,beats,comments,average,calories,id_record,title,upositive,unegative,maxspeed,maxpace,pace,maxbeats,date_time_utc,date_time_local",
- "id_record=\"%s\" and records.sport=sports.id_sports" %id_record)
-
- def format_date(self, date):
- return date.strftime("%Y-%m-%d")
-
- def getrecordList(self,date, id_sport=None):
- logging.debug('--')
- if not id_sport:
- # outer join on sport id to workaround bug where sport reference is null on records from GPX import
- return self.pytrainer_main.ddbb.select("records left outer join sports on records.sport=sports.id_sports",
- "sports.name,date,distance,time,beats,comments,average,calories,id_record,maxspeed,maxbeats,date_time_utc,date_time_local,upositive,unegative",
- "date=\"%s\" " %self.format_date(date))
- else:
- return self.pytrainer_main.ddbb.select("records,sports",
- "sports.name,date,distance,time,beats,comments,average,calories,id_record,maxspeed,maxbeats,date_time_utc,date_time_local,upositive,unegative",
- "date=\"%s\" and sports.id_sports=\"%s\" and records.sport=sports.id_sports" %(self.format_date(date),id_sport))
-
- def getLaps(self, id_record):
- logging.debug('--')
- laps = self.pytrainer_main.ddbb.select("laps",
- "id_lap, record, elapsed_time, distance, start_lat, start_lon, end_lat, end_lon, calories, lap_number, intensity, max_speed, avg_hr, max_hr, laptrigger, comments",
- "record=\"%s\"" % id_record)
- if laps is None or laps == []: #No laps stored - update DB
- logging.debug("No laps in DB for record %d" % id_record)
- #print ("No laps in DB for record %d" % id_record)
- gpx_dest = self.pytrainer_main.profile.gpxdir
- gpxfile = gpx_dest+"/%d.gpx"%id_record
- gpx = Gpx(self.data_path,gpxfile)
- laps = self.lapsFromGPX(gpx)
- if laps is not None:
- for lap in laps:
- lap['record'] = id_record #Add reference to entry in record table
- lap_keys = ", ".join(map(str, lap.keys()))
- lap_values = lap.values()
- self.insertLaps(lap_keys,lap.values())
- #Try to get lap info again #TODO? refactor
- laps = self.pytrainer_main.ddbb.select("laps",
- "id_lap, record, elapsed_time, distance, start_lat, start_lon, end_lat, end_lon, calories, lap_number, intensity, max_speed, avg_hr, max_hr, laptrigger, comments",
- "record=\"%s\"" % id_record)
- return laps
-
- def insertLaps(self, cells, values):
- logging.debug('--')
- logging.debug("Adding lap information: " + ", ".join(map(str, values)))
- self.pytrainer_main.ddbb.insert("laps",cells,values)
-
- def _insert_record_equipment(self, record_id, equipment_id):
- self.pytrainer_main.ddbb.insert("record_equipment", "record_id, equipment_id", [record_id, equipment_id])
-
- def _update_record_equipment(self, record_id, equipment_ids):
- self.pytrainer_main.ddbb.delete("record_equipment", "record_id={0}".format(record_id))
- for id in equipment_ids:
- self._insert_record_equipment(record_id, id)
-
- def get_record_equipment(self, record_id):
- record_equipment = []
- results = self.pytrainer_main.ddbb.select("record_equipment", "equipment_id", "record_id={0}".format(record_id))
- for row in results:
- id = row[0]
- equipment_item = self._equipment_service.get_equipment_item(id)
- record_equipment.append(equipment_item)
- return record_equipment
-
- def getrecordPeriod(self, date_range, sport=None):
- #TODO This is essentially the same as getrecordPeriodSport (except date ranges) - need to look at merging the two
- date_ini = self.format_date(date_range.start_date)
- date_end = self.format_date(date_range.end_date)
- tables = "records,sports"
- if not sport:
- condition = "date>=\"%s\" and date<=\"%s\" and records.sport=sports.id_sports" %(date_ini,date_end)
- else:
- condition = "date>=\"%s\" and date<=\"%s\" and records.sport=sports.id_sports and sports.id_sports=\"%s\"" %(date_ini,date_end, sport)
-
- return self.pytrainer_main.ddbb.select(tables,"date,distance,time,beats,comments,average,calories,maxspeed,maxbeats, sports.name,upositive,unegative", condition)
-
- def getrecordPeriodSport(self,date_ini, date_end,sport):
- if not sport:
- tables = "records"
- condition = "date>\"%s\" and date<\"%s\"" %(date_ini,date_end)
- else :
- tables = "records,sports"
- condition = "date>\"%s\" and date<\"%s\" and records.sport=sports.id_sports and sports.id_sports=\"%s\"" %(date_ini,date_end,sport)
-
- return self.pytrainer_main.ddbb.select(tables,
- "date,distance,time,beats,comments,average,calories,maxspeed,maxbeats,upositive,unegative",
- condition)
-
- def _get_sport(self, sport_name):
- return self._sport_service.get_sport_by_name(sport_name)
-
- def getSportMet(self,sport_name):
- """Deprecated: use sport.met"""
- logging.debug('--')
- return self._get_sport(sport_name).met
-
- def getSportWeight(self,sport_name):
- """Deprecated: use sport.weight"""
- logging.debug('--')
- return self._get_sport(sport_name).weight
-
- def getSportId(self, sport_name, add=None):
- """Deprecated: use sport_service.get_sport_by_name()
-
- Get the id of a sport by name, optionally adding a new sport if
- none exists with the given name.
- arguments:
- sport_name: sport's name to get id for
- add: whether the sport should be added if not found
- returns: id for sport with given name or None"""
- if sport_name is None:
- return None
- sport = self._get_sport(sport_name)
- if sport is None:
- logging.debug("No sport with name: '%s'", str(sport_name))
- if add is not None:
- logging.debug("Adding sport '%s'", str(sport_name))
- new_sport = Sport()
- new_sport.name = unicode(sport_name)
- sport = self._sport_service.store_sport(new_sport)
- return None if sport is None else sport.id
-
- def getLastRecordDateString(self, sport_id = None):
- """
- Retrieve date (string format) of last record stored in DB. It may select per sport
- """
- logging.debug("--")
- #select date from records order by date desc limit 1;
- query_cond = None
- if sport_id is not None:
- query_cond = "sport = %s" % sport_id
- result = self.pytrainer_main.ddbb.select("records", "date", query_cond, "order by date desc limit 1")
- # It returns a list of tuples, so we take first element of list (tuple) and then select first element
- return result[0][0]
-
- def getAllrecord(self):
- """
- Retrieve all record data (no lap nor equipment) stored in database. Initially intended for csv export
- arguments:
- returns: list of data sorted by date desc"""
- logging.debug('--')
- return self.pytrainer_main.ddbb.select("records,sports", "date_time_local,title,sports.name,distance,duration,average,maxspeed,pace,maxpace,beats,maxbeats,calories,upositive,unegative,comments",
- "sports.id_sports = records.sport","order by date_time_local asc")
-
- def getAllRecordList(self):
- logging.debug('--')
- return self.pytrainer_main.ddbb.select("records,sports",
- "date,distance,average,title,sports.name,id_record,time,beats,calories",
- "sports.id_sports = records.sport order by date desc")
-
- def getRecordListByCondition(self,condition):
- logging.debug('>>')
- if condition is None:
- return self.getAllRecordList()
- else:
- logging.debug("condition: %s" % condition)
- return self.pytrainer_main.ddbb.select("records,sports",
- "date,distance,average,title,sports.name,id_record,time,beats,calories",
- "sports.id_sports = records.sport and %s order by date desc" %condition)
-
- def getRecordDayList(self,date, id_sport=None):
- logging.debug('>>')
- logging.debug('Retrieving data for ' + str(date))
- # Why is looking for all days of the same month?
- if not id_sport:
- records = self.pytrainer_main.ddbb.select("records","date","date LIKE '" +str(date.year)+"-"+date.strftime("%m")+"-%'")
- else:
- records = self.pytrainer_main.ddbb.select("records","date","date LIKE \"%d-%0.2d-%%\" and sport=\"%s\"" %(date.year,date.month,id_sport))
- logging.debug('Found '+str(len(records))+' entries')
- day_list = []
- for i in records:
- record = str(i[0]).split("-")
- logging.debug('date:'+str(i[0]))
- day_list.append(record[2])
- logging.debug('<<')
- return day_list
-
- def actualize_fromgpx(self,gpxfile): #TODO remove? - should never have multiple tracks per GPX file
- logging.debug('>>')
- logging.debug('loading file: '+gpxfile)
- gpx = Gpx(self.data_path,gpxfile)
- tracks = gpx.getTrackRoutes()
-
- if len(tracks) == 1:
- logging.debug('Just 1 track')
- self._actualize_fromgpx(gpx)
- elif len(tracks) > 1:
- logging.debug('Found '+str(len(tracks))+' tracks')
- self._select_trkfromgpx(gpxfile,tracks)
- else:
- msg = _("pytrainer can't import data from your gpx file")
- from gui.warning import Warning
- warning = Warning(self.data_path)
- warning.set_text(msg)
- warning.run()
- logging.debug('<<')
-
- def _actualize_fromgpx(self, gpx):
- logging.debug('>>')
- distance, time, maxspeed, maxheartrate = gpx.getMaxValues()
- upositive,unegative = gpx.getUnevenness()
- heartrate = gpx.getHeartRateAverage()
- date = gpx.getDate()
- calories = gpx.getCalories()
- start_time = gpx.getStart_time()
-
- self.recordwindow.rcd_date.set_text(date)
- self.recordwindow.rcd_starttime.set_text(start_time)
- self.recordwindow.rcd_upositive.set_text(str(upositive))
- self.recordwindow.rcd_unegative.set_text(str(unegative))
- self.recordwindow.rcd_beats.set_text(str(heartrate))
- self.recordwindow.rcd_calories.set_text(str(calories))
- self.recordwindow.set_distance(distance)
- self.recordwindow.set_maxspeed(maxspeed)
- self.recordwindow.set_maxhr(maxheartrate)
- self.recordwindow.set_recordtime(time/60.0/60.0)
- self.recordwindow.on_calcavs_clicked(None)
- self.recordwindow.on_calccalories_clicked(None)
- self.recordwindow.rcd_maxpace.set_text("%d.%02d" %((3600/maxspeed)/60,(3600/maxspeed)%60))
- logging.debug('<<')
-
- def __actualize_fromgpx(self, gpxfile, name=None):
- logging.debug('>>')
- gpx = Gpx(self.data_path,gpxfile,name)
- self._actualize_fromgpx(gpx)
- logging.debug('<<')
-
- def _select_trkfromgpx(self,gpxfile,tracks): #TODO remove? - should never have multiple tracks per GPX file
- logging.debug('>>')
- logging.debug('Track dialog '+ self.data_path +'|'+ gpxfile)
- selectrckdialog = DialogSelectTrack(self.data_path, tracks,self.__actualize_fromgpx, gpxfile)
- logging.debug('Launching window...')
- selectrckdialog.run()
- logging.debug('<<')
-
- def importFromGPX(self, gpxFile, sport):
- """
- Add a record from a valid pytrainer type GPX file
- """
- logging.debug('>>')
- entry_id = None
- if not os.path.isfile(gpxFile):
- logging.error("Invalid file: " +gpxFile)
- else:
- logging.info('Retrieving data from '+gpxFile)
- if not sport:
- sport = "import"
- entry = [sport,""]
- entry_id = self.insertNewRecord(gpxFile, entry)
- if entry_id is None:
- logging.error("Entry not created for file %s" % gpxFile)
- else:
- logging.info("Entry %d has been added" % entry_id)
- logging.debug('<<')
- return entry_id
+ def __init__(self, sport_service, data_path = None, parent = None):
+ logging.debug('>>')
+ self._sport_service = sport_service
+ self.parent = parent
+ self.pytrainer_main = parent
+ self._equipment_service = EquipmentService(self.pytrainer_main.ddbb)
+ self.data_path = data_path
+ logging.debug('setting date...')
+ self.date = Date()
+ logging.debug('<<')
+
+ def newRecord(self, date, title=None, distance=None, time=None, upositive=None, unegative=None, bpm=None, calories=None, comment=None):
+ logging.debug('>>')
+ sports = self._sport_service.get_all_sports()
+ self.recordwindow = WindowRecord(self._equipment_service, self.data_path, sports, self, self.format_date(date), title, distance, time, upositive, unegative, bpm, calories, comment)
+ self.recordwindow.run()
+ logging.debug('<<')
+
+ def newMultiRecord(self, activities):
+ logging.debug('>>')
+ sports = self._sport_service.get_all_sports()
+ self.recordwindow = WindowRecord(self._equipment_service, self.data_path, sports, parent=self, windowTitle=_("Modify details before importing"))
+ self.recordwindow.populateMultiWindow(activities)
+ self.recordwindow.run()
+ return self.recordwindow.getActivityData()
+ logging.debug('<<')
+
+ def editRecord(self,id_record):
+ logging.debug('>>')
+ activity = self.pytrainer_main.activitypool.get_activity(id_record)
+ sports = self._sport_service.get_all_sports()
+ self.recordwindow = WindowRecord(self._equipment_service, self.data_path, sports, self, None, windowTitle=_("Edit Entry"), equipment=activity.equipment)
+ self.recordwindow.setValuesFromActivity(activity)
+ logging.debug('launching window')
+ self.recordwindow.run()
+ self.pytrainer_main.refreshMainSportList()
+ logging.debug('<<')
+
+ def pace_to_float(self, value):
+ '''Take a mm:ss or mm.ss and return float'''
+ try:
+ value = float(value)
+ except:
+ if ":" in value: # 'mm:ss' found
+ mins, sec = value.split(":")
+ value = float(mins + "." + "%02d" %round(int(sec)*5/3))
+ elif "," in value:
+ value = float(value.replace(',','.'))
+ else:
+ logging.error("Wrong value provided: %s" %value)
+ value = None
+ return value
+
+ def pace_from_float(self, value, fromDB=False):
+ '''Helper to generate mm:ss from float representation mm.ss (or mm,ss?)'''
+ #Check that value supplied is a float
+ try:
+ _value = "%0.2f" % float(value)
+ except ValueError:
+ _value = str(value)
+ if fromDB: # paces in DB are stored in mixed format -> 4:30 as 4.3 (NOT as 4.5 aka 'decimal')
+ pace = _value
+ else:
+ mins, sec_dec = _value.split(".")
+ pace = mins + ":" + "%02d" %round(int(sec_dec)*3/5)
+ return pace
+
+ def _formatRecordNew(self, list_options, record):
+ """20.07.2008 - dgranda
+ New records handle date_time_utc field which is transparent when updating, so logic method has been splitted
+ args: list with keys and values without valid format
+ returns: keys and values matching DB schema"""
+ logging.debug('>>')
+ if (list_options["rcd_beats"] == ""):
+ list_options["rcd_beats"] = 0
+
+ #retrieving sport (adding sport if it doesn't exist yet)
+ sport = self._get_sport(list_options["rcd_sport"])
+ if not sport:
+ sport = Sport(name=list_options["rcd_sport"])
+ record.title = unicode(list_options["rcd_title"])
+ record.beats = self.parseFloatRecord(list_options["rcd_beats"])
+ record.pace = self.pace_to_float(list_options["rcd_pace"])
+ record.maxbeats = self.parseFloatRecord(list_options["rcd_maxbeats"])
+ record.distance = self.parseFloatRecord(list_options["rcd_distance"])
+ record.average = self.parseFloatRecord(list_options["rcd_average"])
+ record.calories = self.parseFloatRecord(list_options["rcd_calories"])
+ record.comments = unicode(list_options["rcd_comments"])
+ record.date = list_options["date_time_local"].date()
+ record.unegative = self.parseFloatRecord(list_options["rcd_unegative"])
+ record.upositive = self.parseFloatRecord(list_options["rcd_upositive"])
+ record.maxspeed = self.parseFloatRecord(list_options["rcd_maxvel"])
+ record.maxpace = self.pace_to_float(list_options["rcd_maxpace"])
+ record.date_time_utc = list_options["date_time_utc"]
+ record.duration = time2second(list_options["rcd_time"])
+ record.date_time_local = list_options["date_time_local"].strftime("%Y-%m-%d %H:%M:%S%z")
+ record.sport = sport
+ return record
+
+ def insertRecord(self, list_options, laps=None, equipment=None):
+ logging.debug('>>')
+ #Create entry for activity in records table
+ if list_options is None:
+ logging.info('No data provided, abort adding entry')
+ return None
+ logging.debug('list_options: '+str(list_options))
+ record = self._formatRecordNew(list_options, Activity())
+ self.pytrainer_main.ddbb.session.add(record)
+ id_record = record.id
+ gpxOrig = list_options["rcd_gpxfile"]
+ # Load laps from gpx if not provided by the caller
+ if laps is None and os.path.isfile(gpxOrig):
+ gpx = Gpx(self.data_path, gpxOrig)
+ laps = self.lapsFromGPX(gpx)
+ #Create entry(s) for activity in laps table
+ if laps is not None:
+ for lap in laps:
+ new_lap = Lap(**lap)
+ record.Laps.append(new_lap)
+ if equipment:
+ record.equipment = self.pytrainer_main.ddbb.session.query(Equipment).filter(Equipment.id.in_(equipment)).all()
+ self.pytrainer_main.ddbb.session.commit()
+ if os.path.isfile(gpxOrig):
+ gpxDest = self.pytrainer_main.profile.gpxdir
+ gpxNew = gpxDest+"/%d.gpx"%id_record
+ #Leave original file in place...
+ #shutil.move(gpxOrig, gpxNew)
+ #logging.debug('Moving '+gpxOrig+' to '+gpxNew)
+ shutil.copy(gpxOrig, gpxNew)
+ logging.debug('Copying '+gpxOrig+' to '+gpxNew)
+ logging.debug('<<')
+ return record.id
+
+ def insertNewRecord(self, gpxOrig, entry): #TODO consolidate with insertRecord
+ """29.03.2008 - dgranda
+ Moves GPX file to store destination and updates database
+ args: path to source GPX file"""
+ logging.debug('--')
+ (list_options, gpx_laps) = self.summaryFromGPX(gpxOrig, entry)
+ if list_options is None:
+ return None
+ return self.insertRecord(list_options, laps=gpx_laps)
+
+ def lapsFromGPX(self, gpx):
+ logging.debug('>>')
+ laps = []
+ gpxLaps = gpx.getLaps()
+ for lap in gpxLaps:
+ lap_number = gpxLaps.index(lap)
+ tmp_lap = {}
+ tmp_lap['record'] = ""
+ tmp_lap['lap_number'] = lap_number
+ tmp_lap['elapsed_time'] = lap[0]
+ tmp_lap['distance'] = lap[4]
+ tmp_lap['start_lat'] = lap[5]
+ tmp_lap['start_lon'] = lap[6]
+ tmp_lap['end_lat'] = lap[1]
+ tmp_lap['end_lon'] = lap[2]
+ tmp_lap['calories'] = lap[3]
+ tmp_lap['intensity'] = lap[7]
+ tmp_lap['avg_hr'] = lap[8]
+ tmp_lap['max_hr'] = lap[9]
+ tmp_lap['max_speed'] = lap[10]
+ tmp_lap['laptrigger'] = lap[11]
+ tmp_lap['comments'] = ""
+ laps.append(tmp_lap)
+ logging.debug('<<')
+ return laps
+
+ def hrFromLaps(self, laps):
+ logging.debug('>>')
+ lap_avg_hr = 0
+ lap_max_hr = 0
+ total_duration = 0
+ ponderate_hr = 0;
+ for lap in laps:
+ if (lap['max_hr'] is None):
+ lap['max_hr'] = 0
+ if (lap['avg_hr'] is None):
+ lap['avg_hr'] = 0
+ if int(lap['max_hr']) > lap_max_hr:
+ lap_max_hr = int(lap['max_hr'])
+ total_duration = total_duration + float(lap['elapsed_time'])
+ ponderate_hr = ponderate_hr + float(lap['elapsed_time'])*int(lap['avg_hr'])
+ logging.debug("Lap number: %s | Duration: %s | Average hr: %s | Maximum hr: %s" % (lap['lap_number'], lap['elapsed_time'], lap['avg_hr'], lap['max_hr']))
+ lap_avg_hr = int(round(ponderate_hr/total_duration)) # ceil?, floor?, round?
+ logging.debug('<<')
+ return lap_avg_hr, lap_max_hr
+
+ def summaryFromGPX(self, gpxOrig, entry):
+ """29.03.2008 - dgranda
+ Retrieves info which will be stored in DB from GPX file
+ args: path to source GPX file
+ returns: list with fields and values, list of laps
+ """
+ logging.debug('>>')
+ gpx = Gpx(self.data_path,gpxOrig)
+ distance, time, maxspeed, maxheartrate = gpx.getMaxValues()
+ #if time == 0: #invalid record
+ # print "Invalid record"
+ # return (None, None)
+ upositive,unegative = gpx.getUnevenness()
+ if time > 0:
+ speed = distance*3600/time
+ time_hhmmss = [time//3600,(time/60)%60,time%60]
+ else:
+ speed = 0
+ time_hhmmss = [0,0,0]
+ summaryRecord = {}
+ summaryRecord['rcd_gpxfile'] = gpxOrig
+ summaryRecord['rcd_sport'] = entry[0]
+ summaryRecord['rcd_date'] = gpx.getDate()
+ summaryRecord['rcd_calories'] = gpx.getCalories()
+ summaryRecord['rcd_comments'] = ''
+ summaryRecord['rcd_title'] = ''
+ summaryRecord['rcd_time'] = time_hhmmss #ToDo: makes no sense to work with arrays
+ summaryRecord['rcd_distance'] = "%0.2f" %distance
+ if speed == 0:
+ summaryRecord['rcd_pace'] = "0"
+ else:
+ summaryRecord['rcd_pace'] = "%d.%02d" %((3600/speed)/60,(3600/speed)%60)
+ if maxspeed == 0:
+ summaryRecord['rcd_maxpace'] = "0"
+ else:
+ summaryRecord['rcd_maxpace'] = "%d.%02d" %((3600/maxspeed)/60,(3600/maxspeed)%60)
+ summaryRecord['rcd_average'] = speed
+ summaryRecord['rcd_maxvel'] = maxspeed
+ summaryRecord['rcd_beats'] = gpx.getHeartRateAverage()
+ summaryRecord['rcd_maxbeats'] = maxheartrate
+ summaryRecord['rcd_upositive'] = upositive
+ summaryRecord['rcd_unegative'] = unegative
+ if entry[1]=="": # coming from new track dialog (file opening) #TODO This if-else needs checking
+ summaryRecord['date_time_utc'], summaryRecord['date_time_local'] = gpx.getStartTimeFromGPX(gpxOrig) #
+ else: # coming from GPS device #
+ summaryRecord['date_time_utc'] = entry[1] #
+ summaryRecord['date_time_local'] = entry[1] #
+ print "#TODO fix record summaryRecord local and utc time..." #
+ logging.debug('summary: '+str(summaryRecord))
+ laps = self.lapsFromGPX(gpx)
+ # Heartrate data can't be retrieved if no trackpoints present, calculating from lap info
+ lap_avg_hr, lap_max_hr = self.hrFromLaps(laps)
+ logging.debug("HR data from laps. Average: %s | Maximum hr: %s" % (lap_avg_hr, lap_max_hr))
+ if int(summaryRecord['rcd_beats']) > 0:
+ logging.debug("Average heartbeat - Summary: %s | Laps: %s" % (summaryRecord['rcd_beats'], lap_avg_hr))
+ else:
+ logging.debug("No average heartbeat found, setting value (%s) from laps", lap_avg_hr)
+ summaryRecord['rcd_beats'] = lap_avg_hr
+ if int(summaryRecord['rcd_maxbeats']) > 0:
+ logging.debug("Max heartbeat - Summary: %s | Laps: %s" % (summaryRecord['rcd_maxbeats'], lap_max_hr))
+ else:
+ logging.debug("No max heartbeat found, setting value (%s) from laps", lap_max_hr)
+ summaryRecord['rcd_maxbeats'] = lap_max_hr
+ logging.debug('<<')
+ return summaryRecord, laps
+
+ def updateRecord(self, list_options, id_record, equipment=None): # ToDo: update only fields that can change if GPX file is present
+ logging.debug('>>')
+ logging.debug('list_options: '+str(list_options))
+ # No need to remove from the pool, sqlalchemy keeps things in sync
+ record = self.pytrainer_main.activitypool.get_activity(id_record)
+ gpxfile = self.pytrainer_main.profile.gpxdir+"/%d.gpx"%int(record.id)
+ gpxOrig = list_options["rcd_gpxfile"]
+ if os.path.isfile(gpxOrig):
+ if gpxfile != gpxOrig:
+ shutil.copy2(gpxOrig, gpxfile)
+ else:
+ if (list_options["rcd_gpxfile"]==""):
+ logging.debug('Activity not based in GPX file') # ein?
+ logging.debug('Updating bbdd')
+ self._formatRecordNew(list_options, record)
+ if equipment:
+ record.equipment = self.pytrainer_main.ddbb.session.query(Equipment).filter(Equipment.id.in_(equipment)).all()
+ self.pytrainer_main.ddbb.session.commit()
+ self.pytrainer_main.refreshListView()
+ logging.debug('<<')
+
+ def parseFloatRecord(self,string):
+ logging.debug('--')
+ if string != "":
+ try:
+ return float(string.replace(",",","))
+ except:
+ return float(string)
+ else:
+ return 0
+
+ def format_date(self, date):
+ return date.strftime("%Y-%m-%d")
+
+ def _get_sport(self, sport_name):
+ return self._sport_service.get_sport_by_name(sport_name)
+
+ def getSportMet(self,sport_name):
+ """Deprecated: use sport.met"""
+ logging.debug('--')
+ return self._get_sport(sport_name).met
+
+ def getSportWeight(self,sport_name):
+ """Deprecated: use sport.weight"""
+ logging.debug('--')
+ return self._get_sport(sport_name).weight
+
+ def getLastRecordDateString(self, sport_id = None):
+ """
+ Retrieve date (string format) of last record stored in DB. It may select per sport
+ """
+ logging.debug("--")
+ #select date from records order by date desc limit 1;
+ query_cond = None
+ if sport_id is not None:
+ query_cond = "sport = %s" % sport_id
+ result = self.pytrainer_main.ddbb.select("records", "date", query_cond, "order by date desc limit 1")
+ # It returns a list of tuples, so we take first element of list (tuple) and then select first element
+ return result[0][0]
+
+ def getAllrecord(self):
+ """
+ Retrieve all record data (no lap nor equipment) stored in database. Initially intended for csv export
+ arguments:
+ returns: list of data sorted by date desc"""
+ logging.debug('--')
+ return self.pytrainer_main.ddbb.select("records,sports", "date_time_local,title,sports.name,distance,duration,average,maxspeed,pace,maxpace,beats,maxbeats,calories,upositive,unegative,comments",
+ "sports.id_sports = records.sport","order by date_time_local asc")
+
+ def getAllRecordList(self):
+ logging.debug('--')
+ return self.pytrainer_main.ddbb.select("records,sports",
+ "date,distance,average,title,sports.name,id_record,duration,beats,calories",
+ "sports.id_sports = records.sport order by date desc")
+
+ def getRecordListByCondition(self,condition):
+ logging.debug('>>')
+ if condition is None:
+ return self.getAllRecordList()
+ else:
+ logging.debug("condition: %s" % condition)
+ return self.pytrainer_main.ddbb.select("records,sports",
+ "date,distance,average,title,sports.name,id_record,duration,beats,calories",
+ "sports.id_sports = records.sport and %s order by date desc" %condition)
+
+ def getRecordDayList(self, date, sport=None):
+ logging.debug('>>')
+ logging.debug('Retrieving data for ' + str(date))
+ date_range = DateRange.for_month_containing(date)
+ for activity in self.pytrainer_main.activitypool.get_activities_period(date_range, sport=sport):
+ yield activity.date.day
+
+ def actualize_fromgpx(self,gpxfile): #TODO remove? - should never have multiple tracks per GPX file
+ logging.debug('>>')
+ logging.debug('loading file: '+gpxfile)
+ gpx = Gpx(self.data_path,gpxfile)
+ tracks = gpx.getTrackRoutes()
+
+ if len(tracks) == 1:
+ logging.debug('Just 1 track')
+ self._actualize_fromgpx(gpx)
+ elif len(tracks) > 1:
+ logging.debug('Found '+str(len(tracks))+' tracks')
+ self._select_trkfromgpx(gpxfile,tracks)
+ else:
+ msg = _("pytrainer can't import data from your gpx file")
+ from gui.warning import Warning
+ warning = Warning(self.data_path)
+ warning.set_text(msg)
+ warning.run()
+ logging.debug('<<')
+
+ def _actualize_fromgpx(self, gpx):
+ logging.debug('>>')
+ distance, time, maxspeed, maxheartrate = gpx.getMaxValues()
+ upositive,unegative = gpx.getUnevenness()
+ heartrate = gpx.getHeartRateAverage()
+ date = gpx.getDate()
+ calories = gpx.getCalories()
+ start_time = gpx.getStart_time()
+
+ self.recordwindow.rcd_date.set_text(date)
+ self.recordwindow.rcd_starttime.set_text(start_time)
+ self.recordwindow.rcd_upositive.set_text(str(upositive))
+ self.recordwindow.rcd_unegative.set_text(str(unegative))
+ self.recordwindow.rcd_beats.set_text(str(heartrate))
+ self.recordwindow.rcd_calories.set_text(str(calories))
+ self.recordwindow.set_distance(distance)
+ self.recordwindow.set_maxspeed(maxspeed)
+ self.recordwindow.set_maxhr(maxheartrate)
+ self.recordwindow.set_recordtime(time/60.0/60.0)
+ self.recordwindow.on_calcavs_clicked(None)
+ self.recordwindow.on_calccalories_clicked(None)
+ self.recordwindow.rcd_maxpace.set_text("%d.%02d" %((3600/maxspeed)/60,(3600/maxspeed)%60))
+ logging.debug('<<')
+
+ def __actualize_fromgpx(self, gpxfile, name=None):
+ logging.debug('>>')
+ gpx = Gpx(self.data_path,gpxfile,name)
+ self._actualize_fromgpx(gpx)
+ logging.debug('<<')
+
+ def _select_trkfromgpx(self,gpxfile,tracks): #TODO remove? - should never have multiple tracks per GPX file
+ logging.debug('>>')
+ logging.debug('Track dialog '+ self.data_path +'|'+ gpxfile)
+ selectrckdialog = DialogSelectTrack(self.data_path, tracks,self.__actualize_fromgpx, gpxfile)
+ logging.debug('Launching window...')
+ selectrckdialog.run()
+ logging.debug('<<')
+
+ def importFromGPX(self, gpxFile, sport):
+ """
+ Add a record from a valid pytrainer type GPX file
+ """
+ logging.debug('>>')
+ entry_id = None
+ if not os.path.isfile(gpxFile):
+ logging.error("Invalid file: " +gpxFile)
+ else:
+ logging.info('Retrieving data from '+gpxFile)
+ if not sport:
+ sport = "import"
+ entry = [sport,""]
+ entry_id = self.insertNewRecord(gpxFile, entry)
+ if entry_id is None:
+ logging.error("Entry not created for file %s" % gpxFile)
+ else:
+ logging.info("Entry %d has been added" % entry_id)
+ logging.debug('<<')
+ return entry_id
diff --git a/pytrainer/stats.py b/pytrainer/stats.py
index a8f98a5..6d2fce5 100644
--- a/pytrainer/stats.py
+++ b/pytrainer/stats.py
@@ -17,11 +17,11 @@
#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import logging
+from pytrainer.core.activity import Activity
class Stats:
- def __init__(self, sport_service, parent = None):
+ def __init__(self, parent = None):
logging.debug('>>')
- self._sport_service = sport_service
self.pytrainer_main = parent
logging.debug('<<')
@@ -41,43 +41,39 @@ class Stats:
for f in fields:
data[f] = 0
-
- results = self.pytrainer_main.ddbb.select_dict("records", ('id_record', 'date', 'sport', 'distance', 'duration', 'maxbeats', 'maxspeed', 'maxpace', 'average','pace','beats'))
- for r in results:
- if r['sport'] is None or r['sport'] is 0:
- # temporary fix to ignore corrupt records caused by GPX import bug
- continue
- if r['sport'] not in data['sports']:
- sport = self._sport_service.get_sport(r['sport'])
- data['sports'][r['sport']] = {'name': sport.name, 'count': 0}
+
+ for r in self.pytrainer_main.ddbb.session.query(Activity):
+ if r.sport not in data['sports']:
+ data['sports'][r.sport] = {'name': r.sport.name, 'count': 0}
for f in fields:
- data['sports'][r['sport']][f] = 0
- data['sports'][r['sport']]['total_'+f] = 0
- data['sports'][r['sport']]['count'] += 1
+ data['sports'][r.sport][f] = 0
+ data['sports'][r.sport]['total_'+f] = 0
+ data['sports'][r.sport]['count'] += 1
for f in fields:
- data['sports'][r['sport']][f] = max(data['sports'][r['sport']][f], r[f])
- if r[f] is not None:
- data['sports'][r['sport']]['total_'+f] += r[f]
- data[f] = max(data[f], r[f])
+ field = getattr(r, f)
+ data['sports'][r.sport][f] = max(data['sports'][r.sport][f], field)
+ if field is not None:
+ data['sports'][r.sport]['total_'+f] += field
+ data[f] = max(data[f], field)
else:
logging.info('Skipping null values')
- if 'avg_hr' not in data['sports'][r['sport']]:
- data['sports'][r['sport']]['avg_hr'] = [0, 0]
- if r['beats']:
- data['sports'][r['sport']]['avg_hr'][0] += 1
- data['sports'][r['sport']]['avg_hr'][1] += r['beats']
+ if 'avg_hr' not in data['sports'][r.sport]:
+ data['sports'][r.sport]['avg_hr'] = [0, 0]
+ if r.beats:
+ data['sports'][r.sport]['avg_hr'][0] += 1
+ data['sports'][r.sport]['avg_hr'][1] += r.beats
- data['total_duration'] += r['duration']
- data['total_distance'] += r['distance']
+ data['total_duration'] += r.duration
+ data['total_distance'] += r.distance
- if not r['maxspeed'] and r['duration']:
- data['sports'][r['sport']]['maxspeed'] = max(data['sports'][r['sport']]['maxspeed'], r['distance'] / r['duration'] * 3600)
+ if not r.maxspeed and r.duration:
+ data['sports'][r.sport]['maxspeed'] = max(data['sports'][r.sport]['maxspeed'], r.distance / r.duration * 3600)
- if not 'start_date' in data: data['start_date'] = r['date']
- data['start_date'] = min(data['start_date'], r['date'])
- if not 'end_date' in data: data['end_date'] = r['date']
- data['end_date'] = max(data['end_date'], r['date'])
+ if not 'start_date' in data: data['start_date'] = r.date
+ data['start_date'] = min(data['start_date'], r.date)
+ if not 'end_date' in data: data['end_date'] = r.date
+ data['end_date'] = max(data['end_date'], r.date)
for s in data['sports']:
if data['sports'][s]['avg_hr'][0]:
diff --git a/pytrainer/test/core/test_activity.py b/pytrainer/test/core/test_activity.py
index e073c57..1653e48 100644
--- a/pytrainer/test/core/test_activity.py
+++ b/pytrainer/test/core/test_activity.py
@@ -15,25 +15,21 @@
#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import unittest
-from datetime import datetime
+import datetime
from mock import Mock
from dateutil.tz import tzoffset
+from sqlalchemy.orm.exc import NoResultFound
-# Gettext needs to be initialized before UC is imported (via profile)
-import pytrainer.lib.localization
-pytrainer.lib.localization.initialize_gettext("../../locale")
-
-from pytrainer.lib.ddbb import DDBB
+from pytrainer.lib.ddbb import DDBB, DeclarativeBase
from pytrainer.profile import Profile
from pytrainer.lib.uc import UC
from pytrainer.core.activity import ActivityService
+from pytrainer.util.date import DateRange
class ActivityTest(unittest.TestCase):
def setUp(self):
- profile = Mock()
- profile.getValue = Mock(return_value='memory')
- self.ddbb = DDBB(profile)
+ self.ddbb = DDBB()
main = Mock()
main.ddbb = self.ddbb
main.profile = Profile()
@@ -42,19 +38,46 @@ class ActivityTest(unittest.TestCase):
self.uc = UC()
self.uc.set_us(False)
self.service = ActivityService(pytrainer_main=main)
- self.ddbb.insert('records', 'distance,maxspeed,maxpace,title,upositive,average,date_time_local,calories,date_time_utc,comments,pace,unegative,duration,beats,time,date,sport,maxbeats', (46.18, 44.6695617695, 1.2, 'test activity', 553.05993673, 22.3882142185, '2016-07-24 12:58:23+0300', 1462, '2016-07-24T09:58:23Z', 'test comment', 2.4, 564.08076273, 7426, 115.0, '7426', '2016-07-24', 1, 120.0))
- self.ddbb.insert('laps', 'distance,lap_number,calories,avg_hr,elapsed_time,record,intensity,laptrigger,max_hr', (46181.9107740694, 0, 1462, 136, 7426.0, 1, 'active', 'manual', 173))
+ records_table = DeclarativeBase.metadata.tables['records']
+ self.ddbb.session.execute(records_table.insert({'distance': 46.18,
+ 'maxspeed': 44.6695617695,
+ 'maxpace': 1.2,
+ 'title': u'test activity',
+ 'unegative': 564.08076273,
+ 'upositive': 553.05993673,
+ 'average': 22.3882142185,
+ 'date_time_local': u'2016-07-24 12:58:23+0300',
+ 'calories': 1462,
+ 'beats': 115.0,
+ 'comments': u'test comment',
+ 'pace': 2.4,
+ 'date_time_utc': u'2016-07-24T09:58:23Z',
+ 'date': datetime.date(2016, 7, 24),
+ 'duration': 7426,
+ 'sport': 1,
+ 'maxbeats': 120.0}))
+ laps_table = DeclarativeBase.metadata.tables['laps']
+ self.ddbb.session.execute(laps_table.insert({'distance': 46181.9,
+ 'lap_number': 0,
+ 'calories': 1462,
+ 'elapsed_time': u'7426.0',
+ 'record': 1,
+ 'intensity': u'active',
+ 'avg_hr': 136,
+ 'max_hr': 173,
+ 'laptrigger': u'manual'}))
self.activity = self.service.get_activity(1)
def tearDown(self):
- self.service = None
+ self.service.clear_pool()
self.ddbb.disconnect()
- self.ddbb = None
+ self.ddbb.drop_tables()
self.uc.set_us(False)
def test_activity_date_time(self):
- self.assertEquals(self.activity.date_time, datetime(2016, 7, 24, 12, 58, 23,
- tzinfo=tzoffset(None, 10800)))
+ self.assertEquals(self.activity.date_time, datetime.datetime(2016, 7, 24,
+ 12, 58, 23,
+ tzinfo=tzoffset(None, 10800)))
def test_activity_distance(self):
self.assertEquals(self.activity.distance, 46.18)
@@ -62,10 +85,10 @@ class ActivityTest(unittest.TestCase):
def test_activity_sport_name(self):
self.assertEquals(self.activity.sport_name, 'Mountain Bike')
- def test_activity_time(self):
- self.assertEquals(self.activity.time, 7426)
-
def test_activity_duration(self):
+ self.assertEquals(self.activity.duration, 7426)
+
+ def test_activity_time(self):
self.assertEquals(self.activity.time, self.activity.duration)
def test_activity_starttime(self):
@@ -75,7 +98,18 @@ class ActivityTest(unittest.TestCase):
self.assertEquals(self.activity.time_tuple, (2, 3, 46))
def test_activity_lap(self):
- self.assertEquals(self.activity.laps[0], {'distance': 46181.9107741, 'end_lon': None, 'lap_number': 0, 'start_lon': None, 'id_lap': 1, 'calories': 1462, 'comments': None, 'laptrigger': u'manual', 'elapsed_time': u'7426.0', 'record': 1, 'intensity': u'active', 'avg_hr': 136, 'max_hr': 173, 'end_lat': None, 'start_lat': None, 'max_speed': None})
+ self.maxDiff = None
+ self.assertEquals(self.activity.laps[0], {'distance': 46181.9, 'end_lon': None, 'lap_number': 0, 'start_lon': None, 'id_lap': 1, 'calories': 1462, 'comments': None, 'laptrigger': u'manual', 'elapsed_time': u'7426.0', 'record': 1, 'intensity': u'active', 'avg_hr': 136, 'max_hr': 173, 'end_lat': None, 'start_lat': None, 'max_speed': None})
+ lap = self.activity.Laps[0]
+ self.assertEquals(lap.distance, 46181.9)
+ self.assertEquals(lap.duration, 7426.0)
+ self.assertEquals(lap.calories, 1462)
+ self.assertEquals(lap.avg_hr, 136)
+ self.assertEquals(lap.max_hr, 173)
+ self.assertEquals(lap.activity, self.activity)
+ self.assertEquals(lap.lap_number, 0)
+ self.assertEquals(lap.intensity, u'active')
+ self.assertEquals(lap.laptrigger, u'manual')
def test_activity_get_value_f(self):
self.assertEquals(self.activity.get_value_f('distance', "%0.2f"), '46.18')
@@ -103,3 +137,24 @@ class ActivityTest(unittest.TestCase):
def test_activity_service_null(self):
none_activity = self.service.get_activity(None)
self.assertIsNone(none_activity.id)
+
+ def test_activity_remove(self):
+ self.service.remove_activity_from_db(self.activity)
+ try:
+ self.service.get_activity(1)
+ except NoResultFound:
+ pass
+ else:
+ self.fail()
+
+ def test_activities_for_day(self):
+ activity = list(self.service.get_activities_for_day(datetime.date(2016, 7, 24)))[0]
+ self.assertEquals(self.activity, activity)
+
+ def test_activities_period(self):
+ activity = list(self.service.get_activities_period(DateRange.for_week_containing(datetime.date(2016, 7, 24))))[0]
+ self.assertEquals(self.activity, activity)
+
+ def test_all_activities(self):
+ activity = list(self.service.get_all_activities())[0]
+ self.assertEquals(self.activity, activity)
diff --git a/pytrainer/test/core/test_equipment.py b/pytrainer/test/core/test_equipment.py
index 542cafe..f085553 100644
--- a/pytrainer/test/core/test_equipment.py
+++ b/pytrainer/test/core/test_equipment.py
@@ -20,15 +20,19 @@ import unittest
import mock
from pytrainer.core.equipment import Equipment, EquipmentService,\
EquipmentServiceException
-from pytrainer.lib.ddbb import DDBB
+from pytrainer.lib.ddbb import DDBB, DeclarativeBase
+from sqlalchemy.exc import StatementError, IntegrityError, ProgrammingError, OperationalError, DataError
class EquipmentTest(unittest.TestCase):
def setUp(self):
- pass
+ self.ddbb = DDBB()
+ self.ddbb.connect()
+ self.ddbb.create_tables()
def tearDown(self):
- pass
+ self.ddbb.disconnect()
+ self.ddbb.drop_tables()
def test_id_defaults_to_none(self):
equipment = Equipment()
@@ -42,13 +46,19 @@ class EquipmentTest(unittest.TestCase):
def test_id_set_to_numeric_string(self):
equipment = Equipment()
equipment.id = "3"
+ self.ddbb.session.add(equipment)
+ self.ddbb.session.commit()
self.assertEquals(3, equipment.id)
def test_id_set_to_non_numeric_string(self):
+ if self.ddbb.engine.name == 'mysql':
+ self.skipTest('Not supported on Mysql 5.6')
equipment = Equipment()
+ equipment.id = "test"
try:
- equipment.id = "test"
- except(ValueError):
+ self.ddbb.session.add(equipment)
+ self.ddbb.session.flush()
+ except (IntegrityError, OperationalError, DataError):
pass
else:
self.fail("Should not be able to set equipment id to non numeric value.")
@@ -57,11 +67,15 @@ class EquipmentTest(unittest.TestCase):
equipment = Equipment()
self.assertEquals(u"", equipment.description)
- def test_description_set_to_string(self):
+ def test_description_set_to_non_unicode_string(self):
+ if self.ddbb.engine.name == 'mysql':
+ self.skipTest('Not supported on Mysql 5.6')
equipment = Equipment()
+ equipment.description = "100$ Shoes" + chr(255)
try:
- equipment.description = "100$ Shoes"
- except(TypeError):
+ self.ddbb.session.add(equipment)
+ self.ddbb.session.flush()
+ except (ProgrammingError, DataError, OperationalError):
pass
else:
self.fail("Should not be able to set description to non unicode string value.")
@@ -73,12 +87,10 @@ class EquipmentTest(unittest.TestCase):
def test_description_set_to_non_string(self):
equipment = Equipment()
- try:
- equipment.description = 42
- except(TypeError):
- pass
- else:
- self.fail("Should not be able to set description to non string value.")
+ equipment.description = 42
+ self.ddbb.session.add(equipment)
+ self.ddbb.session.commit()
+ self.assertEquals(u"42", equipment.description)
def test_active_defaults_to_true(self):
equipment = Equipment()
@@ -91,13 +103,14 @@ class EquipmentTest(unittest.TestCase):
def test_active_set_to_non_boolean(self):
equipment = Equipment()
+ equipment.active = "test"
+ self.ddbb.session.add(equipment)
try:
- equipment.active = "test"
- except(TypeError):
+ self.ddbb.session.commit()
+ self.assertTrue(equipment.active)
+ except StatementError:
pass
- else:
- self.fail("Should not be able to set active to non-boolean value.")
-
+
def test_life_expectancy_defaults_to_zero(self):
equipment = Equipment()
self.assertEqual(0, equipment.life_expectancy)
@@ -110,13 +123,17 @@ class EquipmentTest(unittest.TestCase):
def test_life_expectancy_set_to_numeric_string(self):
equipment = Equipment()
equipment.life_expectancy = "3"
+ self.ddbb.session.add(equipment)
+ self.ddbb.session.commit()
self.assertEquals(3, equipment.life_expectancy)
def test_life_expectancy_set_to_non_numeric_string(self):
equipment = Equipment()
+ equipment.life_expectancy = "test"
try:
- equipment.life_expectancy = "test"
- except(ValueError):
+ self.ddbb.session.add(equipment)
+ self.ddbb.session.flush()
+ except StatementError:
pass
else:
self.fail("Should not be able to set life expectancy to non numeric value.")
@@ -133,13 +150,17 @@ class EquipmentTest(unittest.TestCase):
def test_prior_usage_set_to_numeric_string(self):
equipment = Equipment()
equipment.prior_usage = "3"
+ self.ddbb.session.add(equipment)
+ self.ddbb.session.commit()
self.assertEquals(3, equipment.prior_usage)
def test_prior_usage_set_to_non_numeric_string(self):
equipment = Equipment()
+ equipment.prior_usage = "test"
try:
- equipment.prior_usage = "test"
- except(ValueError):
+ self.ddbb.session.add(equipment)
+ self.ddbb.session.flush()
+ except StatementError:
pass
else:
self.fail("Should not be able to set life expectancy to non numeric value.")
@@ -149,10 +170,14 @@ class EquipmentTest(unittest.TestCase):
self.assertEquals(u"", equipment.notes)
def test_notes_set_to_string(self):
+ if self.ddbb.engine.name == 'mysql':
+ self.skipTest('Not supported on Mysql 5.6')
equipment = Equipment()
+ equipment.notes = "100$ Shoes" + chr(255)
try:
- equipment.notes = "100$ Shoes"
- except(TypeError):
+ self.ddbb.session.add(equipment)
+ self.ddbb.session.flush()
+ except (ProgrammingError, DataError, OperationalError):
pass
else:
self.fail("Should not be able to set notes to non-unicode string value.")
@@ -164,12 +189,10 @@ class EquipmentTest(unittest.TestCase):
def test_notes_set_to_non_string(self):
equipment = Equipment()
- try:
- equipment.notes = 42
- except(TypeError):
- pass
- else:
- self.fail("Should not be able to set notes to non-string value.")
+ equipment.notes = 42
+ self.ddbb.session.add(equipment)
+ self.ddbb.session.commit()
+ self.assertEquals(u"42", equipment.notes)
def test_equals_new_instances(self):
equipment1 = Equipment()
@@ -193,19 +216,22 @@ class EquipmentTest(unittest.TestCase):
class EquipmentServiceTest(unittest.TestCase):
def setUp(self):
- profile = mock.Mock()
- profile.getValue = mock.Mock(return_value='memory')
- self.mock_ddbb = DDBB(profile)
+ self.mock_ddbb = DDBB()
self.mock_ddbb.connect()
self.mock_ddbb.create_tables()
self.equipment_service = EquipmentService(self.mock_ddbb)
+ self.equipment_table = DeclarativeBase.metadata.tables['equipment']
def tearDown(self):
self.mock_ddbb.disconnect()
+ self.mock_ddbb.drop_tables()
def test_get_equipment_item(self):
- self.mock_ddbb.insert("equipment", "life_expectancy,notes,description,prior_usage,active",
- (500, u"Test notes.", u"Test Description", 200, 1))
+ self.mock_ddbb.session.execute(self.equipment_table.insert(),
+ {"life_expectancy": 500,
+ "notes": u"Test notes.",
+ "description": u"Test Description",
+ "prior_usage": 200, "active": True})
item = self.equipment_service.get_equipment_item(1)
self.assertEquals(1, item.id)
self.assertEquals("Test Description", item.description)
@@ -215,8 +241,11 @@ class EquipmentServiceTest(unittest.TestCase):
self.assertEquals("Test notes.", item.notes)
def test_get_equipment_item_non_unicode(self):
- self.mock_ddbb.insert("equipment", "life_expectancy,notes,description,prior_usage,active",
- (500, u"Test notes.", u"Test Description", 200, 1))
+ self.mock_ddbb.session.execute(self.equipment_table.insert(),
+ {"life_expectancy": 500,
+ "notes": u"Test notes.",
+ "description": u"Test Description",
+ "prior_usage": 200, "active": True})
item = self.equipment_service.get_equipment_item(1)
self.assertEquals("Test Description", item.description)
self.assertEquals("Test notes.", item.notes)
@@ -226,10 +255,16 @@ class EquipmentServiceTest(unittest.TestCase):
self.assertEquals(None, item)
def test_get_all_equipment(self):
- self.mock_ddbb.insert("equipment", "life_expectancy,notes,description,prior_usage,active",
- (500, u"Test notes 1.", u"Test item 1", 200, 1))
- self.mock_ddbb.insert("equipment", "life_expectancy,notes,description,prior_usage,active",
- (600, u"Test notes 2.", u"Test item 2", 300, 0))
+ self.mock_ddbb.session.execute(self.equipment_table.insert(),
+ {"life_expectancy": 500,
+ "notes": u"Test notes 1.",
+ "description": u"Test item 1",
+ "prior_usage": 200, "active": True})
+ self.mock_ddbb.session.execute(self.equipment_table.insert(),
+ {"life_expectancy": 600,
+ "notes": u"Test notes 2.",
+ "description": u"Test item 2",
+ "prior_usage": 300, "active": False})
items = self.equipment_service.get_all_equipment()
item = items[0]
self.assertEquals(1, item.id)
@@ -251,10 +286,16 @@ class EquipmentServiceTest(unittest.TestCase):
self.assertEquals([], items)
def test_get_active_equipment(self):
- self.mock_ddbb.insert("equipment", "life_expectancy,notes,description,prior_usage,active",
- (500, u"Test notes 1.", u"Test item 1", 200, 1))
- self.mock_ddbb.insert("equipment", "life_expectancy,notes,description,prior_usage,active",
- (600, u"Test notes 2.", u"Test item 2", 300, 1))
+ self.mock_ddbb.session.execute(self.equipment_table.insert(),
+ {"life_expectancy": 500,
+ "notes": u"Test notes 1.",
+ "description": u"Test item 1",
+ "prior_usage": 200, "active": True})
+ self.mock_ddbb.session.execute(self.equipment_table.insert(),
+ {"life_expectancy": 600,
+ "notes": u"Test notes 2.",
+ "description": u"Test item 2",
+ "prior_usage": 300, "active": True})
items = self.equipment_service.get_active_equipment()
item = items[0]
self.assertEquals(1, item.id)
@@ -282,8 +323,11 @@ class EquipmentServiceTest(unittest.TestCase):
self.assertEquals(1, stored_equipment.id)
def test_store_equipment_duplicate_description(self):
- self.mock_ddbb.insert("equipment", "life_expectancy,notes,description,prior_usage,active",
- (500, u"Test notes.", u"test item", 200, 1))
+ self.mock_ddbb.session.execute(self.equipment_table.insert(),
+ {"life_expectancy": 500,
+ "notes": u"Test notes.",
+ "description": u"test item",
+ "prior_usage": 200, "active": True})
equipment = Equipment()
equipment.description = u"test item"
try:
@@ -293,26 +337,23 @@ class EquipmentServiceTest(unittest.TestCase):
pass
def test_update_equipment(self):
- self.mock_ddbb.insert("equipment", "life_expectancy,notes,description,prior_usage,active",
- (500, u"Test notes.", u"old description", 200, 1))
+ self.mock_ddbb.session.execute(self.equipment_table.insert(),
+ {"life_expectancy": 500,
+ "notes": u"Test notes.",
+ "description": u"old description",
+ "prior_usage": 200, "active": True})
equipment = self.equipment_service.get_equipment_item(1)
equipment.description = u"new description"
self.equipment_service.store_equipment(equipment)
equipment = self.equipment_service.get_equipment_item(1)
self.assertEquals("new description", equipment.description)
- def test_update_equipment_non_existant(self):
- equipment = Equipment()
- equipment.id = 1
- try:
- self.equipment_service.store_equipment(equipment)
- self.fail("Should not be able to update an item which did not previously exist.")
- except(EquipmentServiceException):
- pass
-
def test_update_equipment_duplicate_description(self):
- self.mock_ddbb.insert("equipment", "life_expectancy,notes,description,prior_usage,active",
- (500, u"Test notes.", u"test item", 200, 1))
+ self.mock_ddbb.session.execute(self.equipment_table.insert(),
+ {"life_expectancy": 500,
+ "notes": u"Test notes.",
+ "description": u"test item",
+ "prior_usage": 200, "active": True})
equipment = Equipment()
equipment.id = 2
equipment.description = u"test item"
@@ -323,17 +364,23 @@ class EquipmentServiceTest(unittest.TestCase):
pass
def test_get_equipment_usage(self):
- self.mock_ddbb.insert("equipment", "life_expectancy,notes,description,prior_usage,active",
- (500, u"Test notes.", u"test item", 0, 1))
- self.mock_ddbb.insert("records", "distance", (250,))
- self.mock_ddbb.insert("record_equipment", "record_id,equipment_id", (1, 1))
+ self.mock_ddbb.session.execute(self.equipment_table.insert(),
+ {"life_expectancy": 500,
+ "notes": u"Test notes.",
+ "description": u"test item",
+ "prior_usage": 0, "active": True})
+ self.mock_ddbb.session.execute("insert into records (distance,sport) values (250,1)")
+ self.mock_ddbb.session.execute("insert into record_equipment (record_id,equipment_id) values (1,1)")
equipment = self.equipment_service.get_equipment_item(1)
usage = self.equipment_service.get_equipment_usage(equipment)
self.assertEquals(250, usage)
def test_get_equipment_usage_none(self):
- self.mock_ddbb.insert("equipment", "life_expectancy,notes,description,prior_usage,active",
- (500, u"Test notes.", u"test item", 0, 1))
+ self.mock_ddbb.session.execute(self.equipment_table.insert(),
+ {"life_expectancy": 500,
+ "notes": u"Test notes.",
+ "description": u"test item",
+ "prior_usage": 0, "active": True})
equipment = self.equipment_service.get_equipment_item(1)
usage = self.equipment_service.get_equipment_usage(equipment)
self.assertEquals(0, usage)
diff --git a/pytrainer/test/core/test_sport.py b/pytrainer/test/core/test_sport.py
index ffac07b..316ec8d 100644
--- a/pytrainer/test/core/test_sport.py
+++ b/pytrainer/test/core/test_sport.py
@@ -19,11 +19,20 @@
import unittest
from pytrainer.core.sport import Sport, SportService, SportServiceException
import mock
-from pytrainer.lib.sqliteUtils import Sql
import pytrainer.core
from pytrainer.lib.ddbb import DDBB
+from sqlalchemy.exc import IntegrityError, StatementError, ProgrammingError, OperationalError, InterfaceError, DataError
class SportTest(unittest.TestCase):
+
+ def setUp(self):
+ self.ddbb = DDBB()
+ self.ddbb.connect()
+ self.ddbb.create_tables(add_default=False)
+
+ def tearDown(self):
+ self.ddbb.disconnect()
+ self.ddbb.drop_tables()
def test_id_should_default_to_none(self):
sport = Sport()
@@ -37,26 +46,24 @@ class SportTest(unittest.TestCase):
def test_id_should_accept_integer_string(self):
sport = Sport()
sport.id = "1"
+ self.ddbb.session.add(sport)
+ self.ddbb.session.commit()
+ sport = self.ddbb.session.query(Sport).filter(Sport.id == 1).one()
self.assertEquals(1, sport.id)
def test_id_should_not_accept_non_integer_string(self):
+ if self.ddbb.engine.name == 'mysql':
+ self.skipTest('Not supported on Mysql 5.6')
sport = Sport()
try:
- sport.id = "1.1"
- except(ValueError):
+ sport.id = "test"
+ self.ddbb.session.add(sport)
+ self.ddbb.session.flush()
+ except (IntegrityError, DataError, OperationalError):
pass
else:
self.fail()
- def test_id_should_not_accept_none(self):
- sport = Sport()
- try:
- sport.id = None
- except(TypeError):
- pass
- else:
- self.fail()
-
def test_name_should_default_to_empty_string(self):
sport = Sport()
self.assertEquals(u"", sport.name)
@@ -67,19 +74,25 @@ class SportTest(unittest.TestCase):
self.assertEquals(u"Unicycling", sport.name)
def test_name_should_not_accept_non_unicode_string(self):
+ if self.ddbb.engine.name == 'mysql':
+ self.skipTest('Not supported on Mysql 5.6')
sport = Sport()
+ sport.name = "Juggling" + chr(255)
try:
- sport.name = "Juggling"
- except(TypeError):
+ self.ddbb.session.add(sport)
+ self.ddbb.session.flush()
+ except (ProgrammingError, DataError, OperationalError):
pass
else:
self.fail()
def test_name_should_not_accept_none(self):
sport = Sport()
+ sport.name = None
try:
- sport.name = None
- except(TypeError):
+ self.ddbb.session.add(sport)
+ self.ddbb.session.commit()
+ except (IntegrityError, OperationalError):
pass
else:
self.fail()
@@ -91,27 +104,41 @@ class SportTest(unittest.TestCase):
def test_met_should_accept_float(self):
sport = Sport()
sport.met = 22.5
+ self.ddbb.session.add(sport)
+ self.ddbb.session.flush()
self.assertEquals(22.5, sport.met)
def test_met_should_accept_float_string(self):
sport = Sport()
+ sport.name = "test1"
sport.met = "22.5"
+ self.ddbb.session.add(sport)
+ self.ddbb.session.commit()
+ sport = self.ddbb.session.query(Sport).filter(Sport.id == 1).one()
self.assertEquals(22.5, sport.met)
def test_met_should_not_accept_non_float_string(self):
+ if self.ddbb.engine.name == 'mysql':
+ self.skipTest('Not supported on Mysql 5.6')
sport = Sport()
+ sport.met = "22.5kg"
try:
- sport.met = "22.5kg"
- except(ValueError):
+ self.ddbb.session.add(sport)
+ self.ddbb.session.flush()
+ except(ValueError, StatementError):
pass
else:
self.fail()
def test_met_should_not_accept_negative_value(self):
+ if self.ddbb.engine.name == 'mysql':
+ self.skipTest('Check constraints not available on Mysql')
sport = Sport()
+ sport.met = -1
try:
- sport.met = -1
- except(ValueError):
+ self.ddbb.session.add(sport)
+ self.ddbb.session.flush()
+ except (IntegrityError, InterfaceError):
pass
else:
self.fail()
@@ -133,31 +160,43 @@ class SportTest(unittest.TestCase):
def test_weight_should_accept_float_string(self):
sport = Sport()
sport.weight = "22.5"
+ self.ddbb.session.add(sport)
+ self.ddbb.session.commit()
self.assertEquals(22.5, sport.weight)
def test_weight_should_not_accept_non_float_string(self):
+ if self.ddbb.engine.name == 'mysql':
+ self.skipTest('Not supported on Mysql 5.6')
sport = Sport()
+ sport.weight = "22.5kg"
try:
- sport.weight = "22.5kg"
- except(ValueError):
+ self.ddbb.session.add(sport)
+ self.ddbb.session.flush()
+ except StatementError:
pass
else:
self.fail()
def test_weight_should_not_accept_negative_value(self):
+ if self.ddbb.engine.name == 'mysql':
+ self.skipTest('Check constraints not available on Mysql')
sport = Sport()
+ sport.weight = -1
try:
- sport.weight = -1
- except(ValueError):
+ self.ddbb.session.add(sport)
+ self.ddbb.session.flush()
+ except (IntegrityError, InterfaceError):
pass
else:
self.fail()
def test_weight_should_not_accept_none(self):
sport = Sport()
+ sport.weight = None
try:
- sport.weight = None
- except(TypeError):
+ self.ddbb.session.add(sport)
+ self.ddbb.session.flush()
+ except (IntegrityError, OperationalError):
pass
else:
self.fail()
@@ -169,18 +208,24 @@ class SportTest(unittest.TestCase):
def test_max_pace_should_accept_integer(self):
sport = Sport()
sport.max_pace = 220
+ self.ddbb.session.add(sport)
+ self.ddbb.session.flush()
self.assertEquals(220, sport.max_pace)
def test_max_pace_should_accept_integer_string(self):
sport = Sport()
sport.max_pace = "220"
+ self.ddbb.session.add(sport)
+ self.ddbb.session.commit()
self.assertEquals(220, sport.max_pace)
def test_max_pace_should_not_accept_non_integer_string(self):
sport = Sport()
+ sport.max_pace = "225s"
try:
- sport.max_pace = "225s"
- except(ValueError):
+ self.ddbb.session.add(sport)
+ self.ddbb.session.flush()
+ except(ValueError, StatementError):
pass
else:
self.fail()
@@ -188,13 +233,20 @@ class SportTest(unittest.TestCase):
def test_max_pace_should_take_floor_of_float(self):
sport = Sport()
sport.max_pace = 220.6
+ self.ddbb.session.add(sport)
+ self.ddbb.session.commit()
+ sport = self.ddbb.session.query(Sport).filter(Sport.id == 1).one()
self.assertEquals(220, sport.max_pace)
-
+
def test_max_pace_should_not_accept_negative_value(self):
+ if self.ddbb.engine.name == 'mysql':
+ self.skipTest('Check constraints not available on Mysql')
sport = Sport()
+ sport.max_pace = -1
try:
- sport.max_pace = -1
- except(ValueError):
+ self.ddbb.session.add(sport)
+ self.ddbb.session.flush()
+ except (IntegrityError, InterfaceError):
pass
else:
self.fail()
@@ -210,9 +262,11 @@ class SportTest(unittest.TestCase):
def test_color_should_not_accept_none(self):
sport = Sport()
+ sport.color = None
try:
- sport.color = None
- except(ValueError):
+ self.ddbb.session.add(sport)
+ self.ddbb.session.commit()
+ except StatementError:
pass
else:
self.fail()
@@ -221,15 +275,14 @@ class SportTest(unittest.TestCase):
class SportServiceTest(unittest.TestCase):
def setUp(self):
- profile = mock.Mock()
- profile.getValue = mock.Mock(return_value='memory')
- self.mock_ddbb = DDBB(profile)
+ self.mock_ddbb = DDBB()
self.mock_ddbb.connect()
self.mock_ddbb.create_tables(add_default=False)
self.sport_service = SportService(self.mock_ddbb)
def tearDown(self):
self.mock_ddbb.disconnect()
+ self.mock_ddbb.drop_tables()
def test_store_sport_should_insert_row_when_sport_has_no_id(self):
sport = Sport()
@@ -252,16 +305,6 @@ class SportServiceTest(unittest.TestCase):
stored_sport = self.sport_service.store_sport(sport)
self.assertEquals(1, stored_sport.id)
- def test_store_sport_should_error_when_sport_has_unknown_id(self):
- sport = Sport()
- sport.id = 100
- try:
- self.sport_service.store_sport(sport)
- except(SportServiceException):
- pass
- else:
- self.fail()
-
def test_store_sport_should_error_when_new_sport_has_duplicate_name(self):
sport1 = Sport()
sport1.name = u"Test name"
diff --git a/pytrainer/test/imports/test_garminfit.py b/pytrainer/test/imports/test_garminfit.py
index e14c4ef..379fa5d 100644
--- a/pytrainer/test/imports/test_garminfit.py
+++ b/pytrainer/test/imports/test_garminfit.py
@@ -6,16 +6,31 @@ __license__ = "GPL v2 or later"
import unittest
import os
+import mock
from lxml import etree
from imports.file_garminfit import garminfit
+from pytrainer.lib.ddbb import DDBB
class GarminFitTest(unittest.TestCase):
+
+ def setUp(self):
+ self.ddbb = DDBB()
+ self.ddbb.connect()
+ self.ddbb.create_tables(add_default=True)
+ self.parent = mock.Mock()
+ self.parent.parent = mock.Mock()
+ self.parent.parent.ddbb = self.ddbb
+
+ def tearDown(self):
+ self.ddbb.disconnect()
+ self.ddbb.drop_tables()
+
def test_parse_fit_file(self):
try:
current_path = os.path.dirname(os.path.abspath(__file__))
data_path = os.path.dirname(os.path.dirname(os.path.dirname(current_path))) + "/"
fit_file = current_path + "/sample.fit"
- garmin_fit = garminfit(None, data_path)
+ garmin_fit = garminfit(self.parent, data_path)
xmldoc = etree.fromstring(garmin_fit.fromFIT2TCXv2(fit_file))
valid_xml = garmin_fit.validate(xmldoc, "schemas/GarminTrainingCenterDatabase_v2.xsd")
self.assertTrue(valid_xml)
diff --git a/pytrainer/test/imports/test_garmintcxv2.py b/pytrainer/test/imports/test_garmintcxv2.py
index 87673bd..ab487fc 100644
--- a/pytrainer/test/imports/test_garmintcxv2.py
+++ b/pytrainer/test/imports/test_garmintcxv2.py
@@ -6,10 +6,26 @@ __license__ = "GPL v2 or later"
import unittest
import os
+import mock
from lxml import etree
from imports.file_garmintcxv2 import garmintcxv2
+from pytrainer.lib.ddbb import DDBB
+from pytrainer.core.activity import Activity
class GarminTCXv2Test(unittest.TestCase):
+
+ def setUp(self):
+ self.ddbb = DDBB()
+ self.ddbb.connect()
+ self.ddbb.create_tables(add_default=True)
+ self.parent = mock.Mock()
+ self.parent.parent = mock.Mock()
+ self.parent.parent.ddbb = self.ddbb
+
+ def tearDown(self):
+ self.ddbb.disconnect()
+ self.ddbb.drop_tables()
+
def test_valid_file(self):
try:
current_path = os.path.dirname(os.path.abspath(__file__))
@@ -28,12 +44,25 @@ class GarminTCXv2Test(unittest.TestCase):
current_path = os.path.dirname(os.path.abspath(__file__))
data_path = os.path.dirname(os.path.dirname(os.path.dirname(current_path))) + "/"
tcx_file = current_path + "/sample.tcx"
- garmin_tcxv2 = garmintcxv2(None, data_path)
+ garmin_tcxv2 = garmintcxv2(self.parent, data_path)
garmin_tcxv2.xmldoc = etree.parse(tcx_file)
garmin_tcxv2.buildActivitiesSummary()
self.assertEquals(summary, garmin_tcxv2.activitiesSummary)
except():
self.fail()
+ def test_summary_in_database(self):
+ summary = [(0, True, '2012-10-14T12:02:42', '10.12', '00:39:51', 'Running')]
+ activity = Activity(date_time_utc='2012-10-14T10:02:42Z', sport_id='1')
+ self.ddbb.session.add(activity)
+ self.ddbb.session.commit()
+ current_path = os.path.dirname(os.path.abspath(__file__))
+ data_path = os.path.dirname(os.path.dirname(os.path.dirname(current_path))) + "/"
+ tcx_file = current_path + "/sample.tcx"
+ garmin_tcxv2 = garmintcxv2(self.parent, data_path)
+ garmin_tcxv2.xmldoc = etree.parse(tcx_file)
+ garmin_tcxv2.buildActivitiesSummary()
+ self.assertEquals(summary, garmin_tcxv2.activitiesSummary)
+
if __name__ == '__main__':
unittest.main()
diff --git a/pytrainer/test/lib/test_gpx.py b/pytrainer/test/lib/test_gpx.py
index 74e9ee7..e532c95 100644
--- a/pytrainer/test/lib/test_gpx.py
+++ b/pytrainer/test/lib/test_gpx.py
@@ -17,11 +17,6 @@
#along with this program; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Need to set this stuff up so that the translation functions work. Seems like
-# the module that needs translation ought to have some way of setting this up.
-import pytrainer.lib.localization
-pytrainer.lib.localization.initialize_gettext("../../locale")
-
import unittest
import os
from lxml import etree
diff --git a/pytrainer/test/lib/test_uc.py b/pytrainer/test/lib/test_uc.py
index e051998..4c3ec71 100644
--- a/pytrainer/test/lib/test_uc.py
+++ b/pytrainer/test/lib/test_uc.py
@@ -18,11 +18,8 @@ import unittest
from datetime import date
from mock import Mock
-import pytrainer.lib.localization
from pytrainer.lib.uc import *
-pytrainer.lib.localization.initialize_gettext("../../locale")
-
class UCUtilTest(unittest.TestCase):
def test_uc_pace2float(self):
diff --git a/pytrainer/test/plugins/__init__.py b/pytrainer/test/plugins/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/pytrainer/test/plugins/test_garmin-tcxv2.py b/pytrainer/test/plugins/test_garmin-tcxv2.py
new file mode 100644
index 0000000..12ec336
--- /dev/null
+++ b/pytrainer/test/plugins/test_garmin-tcxv2.py
@@ -0,0 +1,40 @@
+import unittest
+import os
+import mock
+from lxml import etree
+
+from pytrainer.plugins import Plugins
+from pytrainer.lib.ddbb import DDBB
+from pytrainer.core.activity import Activity
+
+class GarminTCXv2PluginTest(unittest.TestCase):
+
+ def setUp(self):
+ self.ddbb = DDBB()
+ self.ddbb.connect()
+ self.ddbb.create_tables(add_default=True)
+ main = mock.Mock()
+ main.ddbb = self.ddbb
+ main.startup_options = mock.Mock()
+ main.profile = mock.Mock()
+ main.profile.plugindir = 'plugins'
+ plugins = Plugins(parent=main)
+ self.plugin = plugins.importClass('plugins/garmin-tcxv2')
+ tree = etree.parse('pytrainer/test/imports/sample.tcx')
+ self.activity = self.plugin.getActivities(tree)[0]
+
+ def tearDown(self):
+ self.ddbb.disconnect()
+ self.ddbb.drop_tables()
+
+ def test_not_inDatabase(self):
+ self.assertFalse(self.plugin.inDatabase(self.activity))
+
+ def test_inDatabase(self):
+ activity = Activity(date_time_utc='2012-10-14T10:02:42.000Z', sport_id='1')
+ self.ddbb.session.add(activity)
+ self.ddbb.session.commit()
+ self.assertTrue(self.plugin.inDatabase(self.activity))
+
+ def test_detailsFromTCX(self):
+ self.assertEquals(self.plugin.detailsFromTCX(self.activity), '2012-10-14T10:02:42.000Z')
diff --git a/pytrainer/test/test_athlete.py b/pytrainer/test/test_athlete.py
index fde00f7..d954395 100644
--- a/pytrainer/test/test_athlete.py
+++ b/pytrainer/test/test_athlete.py
@@ -18,10 +18,6 @@ import unittest
from datetime import date
from mock import Mock
-# Gettext needs to be initialized before UC is imported (via profile)
-import pytrainer.lib.localization
-pytrainer.lib.localization.initialize_gettext("../../locale")
-
from pytrainer.lib.ddbb import DDBB
from pytrainer.profile import Profile
from pytrainer.athlete import Athlete
@@ -29,9 +25,7 @@ from pytrainer.athlete import Athlete
class AthleteTest(unittest.TestCase):
def setUp(self):
- profile = Mock()
- profile.getValue = Mock(return_value='memory')
- self.ddbb = DDBB(profile)
+ self.ddbb = DDBB()
main = Mock()
main.ddbb = self.ddbb
main.profile = Profile()
@@ -42,7 +36,7 @@ class AthleteTest(unittest.TestCase):
def tearDown(self):
self.athlete = None
self.ddbb.disconnect()
- self.ddbb = None
+ self.ddbb.drop_tables()
def test_athlete_insert_and_get(self):
data = {'date': date(2017, 4, 3), 'weight': 60.0, 'bodyfat': 20.0,
diff --git a/pytrainer/test/test_record.py b/pytrainer/test/test_record.py
new file mode 100644
index 0000000..dd43828
--- /dev/null
+++ b/pytrainer/test/test_record.py
@@ -0,0 +1,98 @@
+#Copyright (C) Arto Jantunen <viiru at iki.fi>
+
+#This program is free software; you can redistribute it and/or
+#modify it under the terms of the GNU General Public License
+#as published by the Free Software Foundation; either version 2
+#of the License, or (at your option) any later version.
+
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#GNU General Public License for more details.
+
+#You should have received a copy of the GNU General Public License
+#along with this program; if not, write to the Free Software
+#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import unittest
+import mock
+from datetime import datetime
+from pytrainer.lib.ddbb import DDBB
+from pytrainer.core.sport import SportService
+from pytrainer.record import Record
+from pytrainer.core.activity import ActivityService
+
+class RecordTest(unittest.TestCase):
+
+ def setUp(self):
+ self.ddbb = DDBB()
+ self.ddbb.connect()
+ self.ddbb.create_tables(add_default=True)
+ self.main = mock.Mock()
+ self.main.ddbb = self.ddbb
+ self.main.activitypool = ActivityService(pytrainer_main=self.main)
+ self.main.profile.gpxdir = '/nonexistent'
+ self.record = Record(SportService(self.ddbb), parent=self.main)
+ time = 7426
+ distance = 46.18
+ speed = distance * 3600 / time
+ time_hhmmss = [time // 3600, (time / 60) % 60, time % 60]
+ self.summary = {}
+ self.summary['rcd_gpxfile'] = u'/nonexistent'
+ self.summary['rcd_sport'] = u"Run"
+ self.summary['rcd_date'] = u'2016-07-24'
+ self.summary['rcd_calories'] = 1462
+ self.summary['rcd_comments'] = u'test comment'
+ self.summary['rcd_title'] = u'test 1'
+ self.summary['rcd_time'] = time_hhmmss
+ self.summary['rcd_distance'] = "%0.2f" %distance
+ self.summary['rcd_pace'] = "%d.%02d" % ((3600 / speed) / 60, (3600 / speed) % 60)
+ self.summary['rcd_maxpace'] = "%d.%02d" %((3600 / 72) / 60, (3600 / 72)% 60)
+ self.summary['rcd_average'] = speed
+ self.summary['rcd_maxvel'] = 72
+ self.summary['rcd_beats'] = 115.0
+ self.summary['rcd_maxbeats'] = 120
+ self.summary['rcd_upositive'] = 553.1
+ self.summary['rcd_unegative'] = 564.1
+ self.summary['date_time_local'] = datetime(2016, 7, 24, 9, 58, 23)
+ self.summary['date_time_utc'] = u'2016-07-24T09:58:23Z'
+ self.laps = [{'distance': 46181.9,
+ 'lap_number': 0,
+ 'calories': 1462,
+ 'elapsed_time': u'7426.0',
+ 'intensity': u'active',
+ 'avg_hr': 136,
+ 'max_hr': 173,
+ 'laptrigger': u'manual'}]
+
+ def tearDown(self):
+ self.ddbb.disconnect()
+ self.ddbb.drop_tables()
+
+ def test_insert_record(self):
+ newid = self.record.insertRecord(self.summary, laps=self.laps)
+ activity = self.main.activitypool.get_activity(newid)
+ self.assertEquals(activity.unegative, 564.1)
+ self.assertEquals(activity.upositive, 553.1)
+ self.assertEquals(activity.beats, 115.0)
+ self.assertEquals(activity.maxbeats, 120)
+ self.assertEquals(activity.date_time, datetime(2016, 7, 24, 9, 58, 23))
+ self.assertEquals(activity.date_time_utc, u'2016-07-24T09:58:23Z')
+ self.assertEquals(activity.sport, self.record._sport_service.get_sport_by_name(u"Run"))
+ self.assertEquals(activity.title, u'test 1')
+ self.assertEquals(activity.laps[0], {'distance': 46181.9, 'end_lon': None, 'lap_number': 0, 'start_lon': None, 'id_lap': 1, 'calories': 1462, 'comments': None, 'laptrigger': u'manual', 'elapsed_time': u'7426.0', 'record': 1, 'intensity': u'active', 'avg_hr': 136, 'max_hr': 173, 'end_lat': None, 'start_lat': None, 'max_speed': None})
+
+ def test_update_record(self):
+ newid = self.record.insertRecord(self.summary)
+ update_dict = self.summary.copy()
+ update_dict['rcd_title'] = u'test 2'
+ update_dict['rcd_sport'] = u"Bike"
+ self.record.updateRecord(update_dict, newid)
+ activity = self.main.activitypool.get_activity(newid)
+ self.assertEquals(activity.title, u'test 2')
+ self.assertEquals(activity.sport, self.record._sport_service.get_sport_by_name(u"Bike"))
+
+ def test_get_day_list(self):
+ self.record.insertRecord(self.summary)
+ daylist = list(self.record.getRecordDayList(datetime(2016, 7, 24, 9, 58, 23)))
+ self.assertEquals(daylist, [24])
diff --git a/pytrainer/test/test_waypoint.py b/pytrainer/test/test_waypoint.py
index 9b60ca0..8602c47 100644
--- a/pytrainer/test/test_waypoint.py
+++ b/pytrainer/test/test_waypoint.py
@@ -19,24 +19,22 @@ from datetime import date
from mock import Mock
from pytrainer.lib.ddbb import DDBB
-from pytrainer.waypoint import Waypoint
+from pytrainer.waypoint import WaypointService
class WaypointTest(unittest.TestCase):
def setUp(self):
- profile = Mock()
- profile.getValue = Mock(return_value='memory')
- self.ddbb = DDBB(profile)
+ self.ddbb = DDBB()
main = Mock()
main.ddbb = self.ddbb
main.ddbb.connect()
main.ddbb.create_tables(add_default=False)
- self.waypoint = Waypoint(parent=main)
+ self.waypoint = WaypointService(parent=main)
def tearDown(self):
self.waypoint = None
self.ddbb.disconnect()
- self.ddbb = None
+ self.ddbb.drop_tables()
def test_waypoint_add_and_get(self):
data = (30.0, 20.0, None, u'Comment', None, u'Test', u'sym')
diff --git a/pytrainer/timegraph.py b/pytrainer/timegraph.py
index c929b30..2024b82 100644
--- a/pytrainer/timegraph.py
+++ b/pytrainer/timegraph.py
@@ -35,18 +35,18 @@ class TimeGraph(object):
def getValue(self,record,value_selected):
#hacemos una relacion entre el value_selected y los values / we make a relation between value_selected and the values
conv = {
- 0: 1, #value 0 es kilometros (1)
- 1: 2, #value 1 es tiempo (2)
- 2: 3, #value 2 es pulsaciones(3)
- 3: 5, #value 3 es media(5)
- 4: 6 #value 4 es calorias(6)
+ 0: 'distance', #value 0 es kilometros (1)
+ 1: 'duration', #value 1 es tiempo (2)
+ 2: 'beats', #value 2 es pulsaciones(3)
+ 3: 'average', #value 3 es media(5)
+ 4: 'calories' #value 4 es calorias(6)
}
value_sel = conv[value_selected]
#si la opcion es tiempo lo pasamos a horas / if the option is time we passed it to hours
- if (value_sel == 2):
- return self.getFloatValue(record[value_sel])/3600
+ if (value_sel == 'duration'):
+ return self.getFloatValue(getattr(record, value_sel))/3600
else:
- return self.getFloatValue(record[value_sel])
+ return self.getFloatValue(getattr(record, value_sel))
def get_values(self, values, value_selected, key_format, sportfield=9):
valueDict = {} #Stores the totals
@@ -54,9 +54,9 @@ class TimeGraph(object):
sportColors = {}
for record in values:
- if record[0]:
- day = unicode(datetime.datetime.strptime(record[0], "%Y-%m-%d").strftime(key_format)) # Gives year for this record
- sport = record[sportfield]
+ if record.date:
+ day = unicode(record.date.strftime(key_format)) # Gives year for this record
+ sport = record.sport.name
value = self.getValue(record, value_selected)
if sport in valueDict: #Already got this sport
if day in valueDict[sport]: #Already got this sport on this day
@@ -105,8 +105,6 @@ class TimeGraph(object):
tit.append(title)
yvalues, valuesAreTime = self.get_values(values,value_selected, self.KEY_FORMAT, sportfield=self.SPORT_FIELD)
- if not len(values): return
-
xvalues = x_func(yvalues)
yval.append(yvalues)
diff --git a/pytrainer/totalgraph.py b/pytrainer/totalgraph.py
index 3546a3d..a9e13fa 100644
--- a/pytrainer/totalgraph.py
+++ b/pytrainer/totalgraph.py
@@ -47,17 +47,15 @@ class TotalGraph(TimeGraph):
def getValue(self,record,value_selected):
#hacemos una relacion entre el value_selected y los values / we make a relation between value_selected and the values
conv = {
- 0: 1, #value 0 es kilometros (1)
- 1: 6, #value 1 es tiempo (2)
- 2: 7, #value 2 es pulsaciones(3)
- 3: 2, #value 3 es media (2)
- 4: 8 #value 4 es calorias(6)
+ 0: 'distance', #value 0 es kilometros (1)
+ 1: 'duration', #value 1 es tiempo (2)
+ 2: 'beats', #value 2 es pulsaciones(3)
+ 3: 'average', #value 3 es media(5)
+ 4: 'calories' #value 4 es calorias(6)
}
value_sel = conv[value_selected]
#si la opcion es tiempo lo pasamos a horas / if the option is time we passed it to hours
- if (value_sel == 6):
- return self.getFloatValue(record[value_sel])/3600
+ if (value_sel == 'duration'):
+ return self.getFloatValue(getattr(record, value_sel))/3600
else:
- return self.getFloatValue(record[value_sel])
-
-
+ return self.getFloatValue(getattr(record, value_sel))
diff --git a/pytrainer/upgrade/versions/015_match_sqlalchemy.py b/pytrainer/upgrade/versions/015_match_sqlalchemy.py
new file mode 100644
index 0000000..386d15c
--- /dev/null
+++ b/pytrainer/upgrade/versions/015_match_sqlalchemy.py
@@ -0,0 +1,148 @@
+from sqlalchemy import *
+from migrate import *
+from migrate.changeset.constraint import ForeignKeyConstraint
+from migrate.changeset import schema
+
+pre_meta = MetaData()
+post_meta = MetaData()
+records = Table('records', pre_meta,
+ Column('distance', FLOAT),
+ Column('maxspeed', FLOAT),
+ Column('maxpace', FLOAT),
+ Column('title', VARCHAR(length=200)),
+ Column('id_record', INTEGER, primary_key=True),
+ Column('upositive', FLOAT),
+ Column('average', FLOAT),
+ Column('date_time_local', VARCHAR(length=40)),
+ Column('calories', INTEGER),
+ Column('date_time_utc', VARCHAR(length=40)),
+ Column('comments', TEXT),
+ Column('pace', FLOAT),
+ Column('unegative', FLOAT),
+ Column('duration', INTEGER),
+ Column('beats', FLOAT),
+ Column('gpslog', VARCHAR(length=200)),
+ Column('time', VARCHAR(length=200)),
+ Column('date', DATE),
+ Column('sport', INTEGER),
+ Column('maxbeats', FLOAT),
+)
+sports = Table('sports', pre_meta,
+ Column('id_sports', INTEGER, primary_key=True),
+ Column('name', VARCHAR(length=100)),
+ Column('weight', FLOAT),
+ Column('color', CHAR(length=6)),
+ Column('max_pace', INTEGER),
+ Column('met', FLOAT),
+)
+record_equipment = Table('record_equipment', pre_meta,
+ Column('record_id', INTEGER),
+ Column('equipment_id', INTEGER),
+ Column('id', INTEGER, primary_key=True),
+)
+equipment = Table('equipment', pre_meta,
+ Column('life_expectancy', INTEGER),
+ Column('description', TEXT(length=200)),
+ Column('notes', TEXT),
+ Column('active', BOOLEAN),
+ Column('id', INTEGER, primary_key=True),
+ Column('prior_usage', INTEGER),
+)
+laps = Table('laps', pre_meta,
+ Column('distance', FLOAT),
+ Column('end_lon', FLOAT),
+ Column('lap_number', INTEGER),
+ Column('start_lon', FLOAT),
+ Column('id_lap', INTEGER, primary_key=True),
+ Column('calories', INTEGER),
+ Column('avg_hr', INTEGER),
+ Column('comments', TEXT),
+ Column('elapsed_time', VARCHAR(length=20)),
+ Column('record', INTEGER),
+ Column('intensity', VARCHAR(length=7)),
+ Column('laptrigger', VARCHAR(length=9)),
+ Column('max_hr', INTEGER),
+ Column('end_lat', FLOAT),
+ Column('start_lat', FLOAT),
+ Column('max_speed', FLOAT),
+)
+
+record_sport_fkey = ForeignKeyConstraint([records.c.sport], [sports.c.id_sports])
+record_equipment_equipment_fkey = ForeignKeyConstraint([record_equipment.c.equipment_id], [equipment.c.id])
+record_equipment_record_fkey = ForeignKeyConstraint([record_equipment.c.record_id], [records.c.id_record])
+laps_records_fkey = ForeignKeyConstraint([laps.c.record], [records.c.id_record])
+
+def upgrade(migrate_engine):
+ # Upgrade operations go here. Don't create your own engine; bind
+ # migrate_engine to your metadata
+ pre_meta.bind = migrate_engine
+ post_meta.bind = migrate_engine
+ pre_meta.tables['records'].columns['time'].drop()
+ record_sport_fkey.create()
+ record_equipment_equipment_fkey.create()
+ record_equipment_record_fkey.create()
+ laps_records_fkey.create()
+ sports.c.color.alter(nullable=False)
+ sports.c.name.alter(nullable=False)
+ sports.c.weight.alter(nullable=False)
+ record_equipment.c.equipment_id.alter(nullable=False)
+ record_equipment.c.record_id.alter(nullable=False)
+ laps.c.record.alter(nullable=False)
+ equipment.c.description.alter(type=Unicode(100))
+ equipment_description_index = Index('ix_equipment_description',
+ equipment.c.description,
+ unique=True)
+ equipment_description_index.create()
+ sport_name_index = Index('ix_sports_name',
+ sports.c.name,
+ unique=True)
+ sport_name_index.create()
+ records_sport_index = Index('ix_records_sport', records.c.sport)
+ records_sport_index.create()
+ record_equipment_equipment_index = Index('ix_record_equipment_equipment_id',
+ record_equipment.c.equipment_id)
+ record_equipment_equipment_index.create()
+ record_equipment_record_index = Index('ix_record_equipment_record_id',
+ record_equipment.c.record_id)
+ record_equipment_record_index.create()
+ laps_record_index = Index('ix_laps_record', laps.c.record)
+ laps_record_index.create()
+ # We essentially rewrite the entire database multiple times,
+ # so here we clean up the mess we made.
+ if migrate_engine.name == 'sqlite':
+ migrate_engine.execute('VACUUM')
+
+def downgrade(migrate_engine):
+ # Operations to reverse the above upgrade go here.
+ pre_meta.bind = migrate_engine
+ post_meta.bind = migrate_engine
+ pre_meta.tables['records'].columns['time'].create()
+ record_sport_fkey.drop()
+ record_equipment_equipment_fkey.drop()
+ record_equipment_record_fkey.drop()
+ laps_records_fkey.drop()
+ sports.c.color.alter(nullable=True)
+ sports.c.name.alter(nullable=True)
+ sports.c.weight.alter(nullable=True)
+ record_equipment.c.equipment_id.alter(nullable=True)
+ record_equipment.c.record_id.alter(nullable=True)
+ laps.c.record.alter(nullable=True)
+ records_sport_index = Index('ix_records_sport', records.c.sport)
+ records_sport_index.drop()
+ equipment_description_index = Index('ix_equipment_description',
+ equipment.c.description,
+ unique=True)
+ equipment_description_index.drop()
+ equipment.c.description.alter(type=TEXT(200))
+ sport_name_index = Index('ix_sports_name',
+ sports.c.name,
+ unique=True)
+ sport_name_index.drop()
+ record_equipment_equipment_index = Index('ix_record_equipment_equipment_id',
+ record_equipment.c.equipment_id)
+ record_equipment_equipment_index.drop()
+ record_equipment_record_index = Index('ix_record_equipment_record_id',
+ record_equipment.c.record_id)
+ record_equipment_record_index.drop()
+ laps_record_index = Index('ix_laps_record', laps.c.record)
+ laps_record_index.drop()
diff --git a/pytrainer/waypoint.py b/pytrainer/waypoint.py
index 8048848..1ad5376 100644
--- a/pytrainer/waypoint.py
+++ b/pytrainer/waypoint.py
@@ -18,8 +18,21 @@
import logging
from pytrainer.lib.date import unixtime2date
+from sqlalchemy import Column, Unicode, Float, Integer, Date
+from pytrainer.lib.ddbb import DeclarativeBase
-class Waypoint:
+class Waypoint(DeclarativeBase):
+ __tablename__ = 'waypoints'
+ comment = Column(Unicode(length=240))
+ ele = Column(Float)
+ id = Column('id_waypoint', Integer, primary_key=True)
+ lat = Column(Float)
+ lon = Column(Float)
+ name = Column(Unicode(length=200))
+ sym = Column(Unicode(length=200))
+ time = Column(Date)
+
+class WaypointService(object):
def __init__(self, data_path = None, parent = None):
logging.debug(">>")
self.parent = parent
@@ -29,53 +42,49 @@ class Waypoint:
def removeWaypoint(self,id_waypoint):
logging.debug(">>")
- #self.pytrainer_main.ddbb.connect()
logging.debug("Deleting id_waypoint=%s" %id_waypoint)
- self.pytrainer_main.ddbb.delete("waypoints", "id_waypoint=\"%s\"" %id_waypoint)
- #self.pytrainer_main.ddbb.disconnect()
+ waypoint = self.pytrainer_main.ddbb.session.query(Waypoint).filter(Waypoint.id == id_waypoint).one()
+ self.pytrainer_main.ddbb.session.delete(waypoint)
+ self.pytrainer_main.ddbb.session.commit()
logging.debug("<<")
def updateWaypoint(self,id_waypoint,lat,lon,name,desc,sym):
logging.debug(">>")
- #self.pytrainer_main.ddbb.connect()
logging.debug("Updating waypoint id: %d with lat %s,lon %s,comment %s,name %s,sym %s" %(id_waypoint,lat,lon,desc,name,sym) )
- self.pytrainer_main.ddbb.update("waypoints","lat,lon,comment,name,sym",[lat,lon,desc,name,sym]," id_waypoint=%d" %id_waypoint)
- #self.pytrainer_main.ddbb.disconnect()
+ waypoint = self.pytrainer_main.ddbb.session.query(Waypoint).filter(Waypoint.id == id_waypoint).one()
+ waypoint.lat = lat
+ waypoint.lon = lon
+ waypoint.name = name
+ waypoint.comment = desc
+ waypoint.sym = sym
+ self.pytrainer_main.ddbb.session.commit()
logging.debug("<<")
def addWaypoint(self,lon=None,lat=None,name=None,comment=None,sym=None):
logging.debug(">>")
- #self.pytrainer_main.ddbb.connect()
- cells = "lat,lon,comment,name,sym"
- values = (lat,lon,comment,name,sym)
+ waypoint = Waypoint(lon=lon, lat=lat, name=name, comment=comment, sym=sym)
logging.debug("Adding waypoint with details lat %s,lon %s,comment %s,name %s,sym %s" % (lat,lon,comment,name,sym) )
- self.pytrainer_main.ddbb.insert("waypoints",cells,values)
- id_waypoint = self.pytrainer_main.ddbb.lastRecord("waypoints")
- #self.pytrainer_main.ddbb.disconnect()
+ self.pytrainer_main.ddbb.session.add(waypoint)
+ self.pytrainer_main.ddbb.session.commit()
logging.debug("<<")
- return id_waypoint
+ return waypoint.id
def getwaypointInfo(self,id_waypoint):
logging.debug(">>")
- #self.pytrainer_main.ddbb.connect()
retorno = self.pytrainer_main.ddbb.select("waypoints",
"lat,lon,ele,comment,time,name,sym",
- "id_waypoint=\"%s\"" %id_waypoint)
- #self.pytrainer_main.ddbb.disconnect()
+ "id_waypoint=%s" %id_waypoint)
logging.debug("<<")
return retorno
def getAllWaypoints(self):
logging.debug(">>")
- #self.pytrainer_main.ddbb.connect()
retorno = self.pytrainer_main.ddbb.select("waypoints","id_waypoint,lat,lon,ele,comment,time,name,sym","1=1 order by name")
- #self.pytrainer_main.ddbb.disconnect()
logging.debug("<<")
return retorno
def actualize_fromgpx(self,gpxfile):
logging.debug(">>")
- #self.pytrainer_main.ddbb.connect()
from lib.gpx import Gpx
gpx = Gpx(self.data_path,gpxfile)
tracks = gpx.getTrackRoutes()
@@ -90,7 +99,6 @@ class Waypoint:
warning = Warning(self.data_path,self._actualize_fromgpx,[gpx])
warning.set_text(msg)
warning.run()
- #self.pytrainer_main.ddbb.disconnect()
logging.debug("<<")
def _actualize_fromgpx(self, gpx):
diff --git a/setup.py b/setup.py
index 266077c..bd77458 100755
--- a/setup.py
+++ b/setup.py
@@ -83,6 +83,6 @@ setup( name = "pytrainer",
'matplotlib',
'lxml'],
test_suite='pytrainer.test',
- tests_require=['mock'],
+ tests_require=['mock', 'mysqlclient', 'psycopg2'],
zip_safe=False
)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/pytrainer.git
More information about the Pkg-running-devel
mailing list