Enable translation for even name "modechange"

Enable translations for dive event name "modechange".
But clearly don't do this for the string which is used internally
but only push "modechange" to the translation system to be able to
translate it in the UI.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
Stefan Fuchs 2018-06-16 16:24:16 +02:00
parent 5b09d13729
commit a6608f1b9f

View file

@ -1623,7 +1623,8 @@ void ProfileWidget2::addDivemodeSwitch()
QPointF scenePos = mapToScene(mapFromGlobal(action->data().toPoint())); QPointF scenePos = mapToScene(mapFromGlobal(action->data().toPoint()));
for (i = 0; i < UNDEF_COMP_TYPE; i++) for (i = 0; i < UNDEF_COMP_TYPE; i++)
if (QString(divemode_text_ui[i]) == action->text()) if (QString(divemode_text_ui[i]) == action->text())
add_event(current_dc, lrint(timeAxis->valueAt(scenePos)), 8, 0, i, "modechange"); add_event(current_dc, lrint(timeAxis->valueAt(scenePos)), 8, 0, i,
QT_TRANSLATE_NOOP("gettextFromC", "modechange"));
invalidate_dive_cache(current_dive); invalidate_dive_cache(current_dive);
mark_divelist_changed(true); mark_divelist_changed(true);
replot(); replot();