mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Next step towards working translations
This may seem like a really odd change - but with this change the Qt tools
can correctly parse the C files (and qt-gui.cpp) and get the context for
the translatable strings right.
It's not super-pretty (I'll admit that _("string literal") is much easier
on the eye than translate("gettextFromC", "string literal") ) but I think
this will be the price of success.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2d69d4a5ef
commit
193d20c479
14 changed files with 184 additions and 182 deletions
36
uemis.c
36
uemis.c
|
|
@ -191,45 +191,45 @@ static void uemis_event(struct dive *dive, struct divecomputer *dc, struct sampl
|
|||
static int lastndl;
|
||||
|
||||
if (flags[1] & 0x01)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("Safety Stop Violation"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","Safety Stop Violation"));
|
||||
if (flags[1] & 0x08)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("Speed Alarm"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","Speed Alarm"));
|
||||
#if WANT_CRAZY_WARNINGS
|
||||
if (flags[1] & 0x06) /* both bits 1 and 2 are a warning */
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("Speed Warning"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","Speed Warning"));
|
||||
if (flags[1] & 0x10)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("PO2 Green Warning"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","PO2 Green Warning"));
|
||||
#endif
|
||||
if (flags[1] & 0x20)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("PO2 Ascend Warning"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","PO2 Ascend Warning"));
|
||||
if (flags[1] & 0x40)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("PO2 Ascend Alarm"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","PO2 Ascend Alarm"));
|
||||
/* flags[2] reflects the deco / time bar
|
||||
* flags[3] reflects more display details on deco and pO2 */
|
||||
if (flags[4] & 0x01)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("Tank Pressure Info"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","Tank Pressure Info"));
|
||||
if (flags[4] & 0x04)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("RGT Warning"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","RGT Warning"));
|
||||
if (flags[4] & 0x08)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("RGT Alert"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","RGT Alert"));
|
||||
if (flags[4] & 0x40)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("Tank Change Suggested"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","Tank Change Suggested"));
|
||||
if (flags[4] & 0x80)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("Depth Limit Exceeded"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","Depth Limit Exceeded"));
|
||||
if (flags[5] & 0x01)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("Max Deco Time Warning"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","Max Deco Time Warning"));
|
||||
if (flags[5] & 0x04)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("Dive Time Info"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","Dive Time Info"));
|
||||
if (flags[5] & 0x08)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("Dive Time Alert"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","Dive Time Alert"));
|
||||
if (flags[5] & 0x10)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("Marker"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","Marker"));
|
||||
if (flags[6] & 0x02)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("No Tank Data"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","No Tank Data"));
|
||||
if (flags[6] & 0x04)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("Low Battery Warning"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","Low Battery Warning"));
|
||||
if (flags[6] & 0x08)
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TR_NOOP("Low Battery Alert"));
|
||||
add_event(dc, sample->time.seconds, 0, 0, 0, QT_TRANSLATE_NOOP("gettextFromC","Low Battery Alert"));
|
||||
/* flags[7] reflects the little on screen icons that remind of previous
|
||||
* warnings / alerts - not useful for events */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue