Skip to content

Commit

Permalink
Merge pull request #389 from amtriathlon/calendar
Browse files Browse the repository at this point in the history
Enable Diary Translations
  • Loading branch information
liversedge committed Dec 18, 2012
2 parents 649ebaf + f234284 commit 883d728
Show file tree
Hide file tree
Showing 12 changed files with 4,293 additions and 3,048 deletions.
20 changes: 10 additions & 10 deletions src/GcCalendar.cpp
Expand Up @@ -244,9 +244,9 @@ GcCalendar::GcCalendar(MainWindow *main) : main(main)
summarySelect = new QComboBox(this);
//summarySelect->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength); XXX
summarySelect->setFixedWidth(150); // XXX is it impossible to size constrain qcombos?????
summarySelect->addItem("Day Summary");
summarySelect->addItem("Weekly Summary");
summarySelect->addItem("Monthly Summary");
summarySelect->addItem(tr("Day Summary"));
summarySelect->addItem(tr("Weekly Summary"));
summarySelect->addItem(tr("Monthly Summary"));
summarySelect->setCurrentIndex(1); // default to weekly
h->addStretch();
h->addWidget(summarySelect, Qt::AlignCenter);
Expand Down Expand Up @@ -629,22 +629,22 @@ GcCalendar::setSummary()

switch(i) {
case 0 : // Totals
aggname = "Totals";
aggname = tr("Totals");
list = totalColumn;
break;

case 1 : // Averages
aggname = "Averages";
aggname = tr("Averages");
list = averageColumn;
break;

case 3 : // Maximums
aggname = "Maximums";
aggname = tr("Maximums");
list = maximumColumn;
break;

case 2 : // User defined..
aggname = "Metrics";
aggname = tr("Metrics");
list = metricColumn;
break;

Expand Down Expand Up @@ -698,9 +698,9 @@ GcCalendar::setSummary()

// tell everyone the date range changed
QString name;
if (summarySelect->currentIndex() == 0) name = "Day of " + from.toString("dddd MMMM d");
else if (summarySelect->currentIndex() == 1) name = QString("Week Commencing %1").arg(from.toString("dddd MMMM d"));
else if (summarySelect->currentIndex() == 2) name = from.toString("MMMM yyyy");
if (summarySelect->currentIndex() == 0) name = tr("Day of ") + from.toString("dddd MMMM d");
else if (summarySelect->currentIndex() == 1) name = QString(tr("Week Commencing %1")).arg(from.toString("dddd MMMM d"));
else if (summarySelect->currentIndex() == 2) name = from.toString(tr("MMMM yyyy"));

emit dateRangeChanged(DateRange(from, to, name));

Expand Down
10 changes: 5 additions & 5 deletions src/MainWindow.cpp
Expand Up @@ -496,7 +496,7 @@ MainWindow::MainWindow(const QDir &home) :
QIcon chartIcon(":images/addchart.png");
QPushButton *newchart = new QPushButton(chartIcon, "", this);
newchart->setFocusPolicy(Qt::NoFocus);
newchart->setToolTip("Add Chart");
newchart->setToolTip(tr("Add Chart"));
newchart->setIconSize(QSize(15,15));
newchart->setAutoFillBackground(false);
newchart->setAutoDefault(false);
Expand Down Expand Up @@ -769,15 +769,15 @@ MainWindow::MainWindow(const QDir &home) :
rideMenu->addAction(tr("Down&load from TrainingPeaks..."), this, SLOT(downloadTP()), tr("Ctrl+L"));
#endif

stravaAction = new QAction("Upload to Strava...", this);
stravaAction = new QAction(tr("Upload to Strava..."), this);
connect(stravaAction, SIGNAL(triggered(bool)), this, SLOT(uploadStrava()));
rideMenu->addAction(stravaAction);

rideWithGPSAction = new QAction("Upload to RideWithGPS...", this);
rideWithGPSAction = new QAction(tr("Upload to RideWithGPS..."), this);
connect(rideWithGPSAction, SIGNAL(triggered(bool)), this, SLOT(uploadRideWithGPSAction()));
rideMenu->addAction(rideWithGPSAction);

ttbAction = new QAction("Upload to Trainingstagebuch...", this);
ttbAction = new QAction(tr("Upload to Trainingstagebuch..."), this);
connect(ttbAction, SIGNAL(triggered(bool)), this, SLOT(uploadTtb()));
rideMenu->addAction(ttbAction);

Expand Down Expand Up @@ -859,7 +859,7 @@ MainWindow::MainWindow(const QDir &home) :
viewMenu->addAction(tr("Diary"), this, SLOT(selectDiary()));
#endif
viewMenu->addSeparator();
subChartMenu = viewMenu->addMenu("Add Chart");
subChartMenu = viewMenu->addMenu(tr("Add Chart"));
viewMenu->addAction(tr("Reset Layout"), this, SLOT(resetWindowLayout()));

windowMenu = menuBar()->addMenu(tr("&Window"));
Expand Down

0 comments on commit 883d728

Please sign in to comment.