Skip to content

Commit

Permalink
Enable translation for new Metadata fields
Browse files Browse the repository at this point in the history
Mostly Garmin metrics, Feel and Raw Data tab
  • Loading branch information
amtriathlon committed Feb 14, 2022
1 parent 7c80da9 commit 2a1e4e5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Metrics/RideMetadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ RideMetadata::configChanged(qint32)
setExtraTab();

// add editor
tabs->addTab(editor, "Raw Data");
tabs->addTab(editor, tr("Raw Data"));

// tab bar look reasonably modern
QString styling = QString("QTabWidget { background: %1; }"
Expand Down
21 changes: 21 additions & 0 deletions src/Metrics/SpecialFields.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,40 @@ SpecialFields::SpecialFields()
namesmap.insert("Change History", tr("Change History")); // set by RideFileCommand
namesmap.insert("Calendar Text", "Calendar Text"); // set by openRideFile and rideMetadata DO NOT TRANSLATE
namesmap.insert("Source Filename", tr("Source Filename")); // set by openRideFile
namesmap.insert("Athlete", tr("Athlete")); // athlete name
namesmap.insert("Data", tr("Data")); // data present
namesmap.insert("File Format", tr("File Format")); // file format
namesmap.insert("Filename", tr("Filename")); // filename
namesmap.insert("Month", tr("Month")); // month name
namesmap.insert("Weekday", tr("Weekday")); // weekday name
namesmap.insert("Year", tr("Year")); // year

namesmap.insert("Route", tr("Route")); // GPS map Route tag
namesmap.insert("Sport", tr("Sport")); // Sport Code
namesmap.insert("SubSport", tr("SubSport")); // SubSport Code
namesmap.insert("Workout Code", tr("Workout Code")); // Workout Code
namesmap.insert("Workout Title", tr("Workout Title")); // Workout Title
namesmap.insert("Weight", tr("Weight")); // Weight tag
namesmap.insert("RPE", tr("RPE")); // RPE tag
namesmap.insert("Commute", tr("Commute")); // Commute tag
namesmap.insert("Trainer", tr("Trainer")); // Trainer tag
namesmap.insert("Feel", tr("Feel")); // Feel tag
namesmap.insert("Objective", tr("Objective")); // Objective tag
namesmap.insert("Keywords", tr("Keywords")); // Keywords tag
namesmap.insert("Equipment", tr("Equipment")); // Equipment tag
namesmap.insert("Device", tr("Device")); // Device tag
namesmap.insert("Device Info", tr("Device Info")); // Device Info tag
namesmap.insert("Pool Length", tr("Pool Length")); // Pool Length tag

namesmap.insert("VO2max detected", tr("VO2max detected")); // Garmin VO2max detected
namesmap.insert("Aerobic Training Effect", tr("Aerobic Training Effect"));// Garmin Aerobic Training Effect
namesmap.insert("Anaerobic Training Effect", tr("Anaerobic Training Effect"));// Garmin Anaerobic Training Effect
namesmap.insert("EPOC", tr("EPOC")); // Garmin EPOC
namesmap.insert("Recovery Time", tr("Recovery Time")); // Garmin Recovery Time
namesmap.insert("Performance Condition", tr("Performance Condition"));// Garmin Performance Condition
namesmap.insert("LTHR detected", tr("LTHR detected")); // Garmin LTHR detected
namesmap.insert("LTS detected", tr("LTS detected")); // Garmin LTS detected

// now add all the metric fields (for metric overrides)
const RideMetricFactory &factory = RideMetricFactory::instance();

Expand Down Expand Up @@ -131,6 +151,7 @@ SpecialTabs::SpecialTabs()
namesmap.insert("Notes", tr("Notes"));
namesmap.insert("Metric", tr("Metric"));
namesmap.insert("Extra", tr("Extra"));
namesmap.insert("Raw Data", tr("Raw Data"));
namesmap.insert("Device", tr("Device"));
namesmap.insert("Athlete", tr("Athlete"));
}
Expand Down

0 comments on commit 2a1e4e5

Please sign in to comment.