summaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/diveeventitem.cpp12
-rw-r--r--profile-widget/diveprofileitem.cpp3
2 files changed, 8 insertions, 7 deletions
diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp
index 274ac0685..3780ebbf7 100644
--- a/profile-widget/diveeventitem.cpp
+++ b/profile-widget/diveeventitem.cpp
@@ -152,17 +152,17 @@ void DiveEventItem::setupToolTipString()
/* Do we have an explicit cylinder index? Show it. */
if (internalEvent->gas.index >= 0)
- name += QString(" (cyl %1)").arg(internalEvent->gas.index+1);
+ name += tr(" (cyl. %1)").arg(internalEvent->gas.index + 1);
} else if (value) {
- if (type == SAMPLE_EVENT_PO2 && name == "SP change") {
- name += QString(":%1").arg((double)value / 1000);
+ if (type == SAMPLE_EVENT_PO2 && same_string(internalEvent->name, "SP change")) {
+ name += QString(": %1bar").arg((double)value / 1000, 0, 'f', 1);
} else {
- name += QString(":%1").arg(value);
+ name += QString(": %1").arg(value);
}
- } else if (type == SAMPLE_EVENT_PO2 && name == "SP change") {
+ } else if (type == SAMPLE_EVENT_PO2 && same_string(internalEvent->name, "SP change")) {
// this is a bad idea - we are abusing an existing event type that is supposed to
// warn of high or low pO₂ and are turning it into a set point change event
- name += "\n" + tr("Manual switch to OC");
+ name += ":\n" + tr("Manual switch to OC");
} else {
name += internalEvent->flags & SAMPLE_FLAGS_BEGIN ? tr(" begin", "Starts with space!") :
internalEvent->flags & SAMPLE_FLAGS_END ? tr(" end", "Starts with space!") : "";
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp
index c1c98ee14..83857abf8 100644
--- a/profile-widget/diveprofileitem.cpp
+++ b/profile-widget/diveprofileitem.cpp
@@ -192,7 +192,8 @@ void DiveProfileItem::modelDataChanged(const QModelIndex &topLeft, const QModelI
if (entry->depth < max - 100 && entry->sec > 0) {
profileColor = QColor(Qt::red);
if (!eventAdded) {
- add_event(&displayed_dive.dc, entry->sec, SAMPLE_EVENT_CEILING, -1, max / 1000, "planned waypoint above ceiling");
+ add_event(&displayed_dive.dc, entry->sec, SAMPLE_EVENT_CEILING, -1, max / 1000,
+ QT_TRANSLATE_NOOP("gettextFromC", "planned waypoint above ceiling"));
eventAdded = true;
}
}