mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Translate names of additional dive events and nicer format info box text
Enable translation for a few additional internal dive events. Ensure that all event names in datatrak.c are collected for translation. Ensure that for gaschange in profile info box the "cyl." string is also translated. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
parent
5c89115efe
commit
b39b641a05
5 changed files with 16 additions and 14 deletions
|
|
@ -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!") : "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue