mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add Qtr_ macros that uses gettext in a tr() compatible manner
This should wrap gettext nicely and replace the "_()" macros we use in C code. Also added comments to the top of all the new files. Suggested-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
14e133321f
commit
f5c958ad73
16 changed files with 113 additions and 22 deletions
|
@ -1,3 +1,10 @@
|
|||
/*
|
||||
* models.cpp
|
||||
*
|
||||
* classes for the equipment models of Subsurface
|
||||
*
|
||||
*/
|
||||
#include "common.h"
|
||||
#include "models.h"
|
||||
#include "../dive.h"
|
||||
|
||||
|
@ -15,25 +22,25 @@ QVariant CylindersModel::headerData(int section, Qt::Orientation orientation, in
|
|||
if (role == Qt::DisplayRole) {
|
||||
switch(section) {
|
||||
case TYPE:
|
||||
ret = tr("Type");
|
||||
ret = Qtr_("Type");
|
||||
break;
|
||||
case SIZE:
|
||||
ret = tr("Size");
|
||||
ret = Qtr_("Size");
|
||||
break;
|
||||
case MAXPRESS:
|
||||
ret = tr("MaxPress");
|
||||
ret = Qtr_("MaxPress");
|
||||
break;
|
||||
case START:
|
||||
ret = tr("Start");
|
||||
ret = Qtr_("Start");
|
||||
break;
|
||||
case END:
|
||||
ret = tr("End");
|
||||
ret = Qtr_("End");
|
||||
break;
|
||||
case O2:
|
||||
ret = tr("O2%");
|
||||
ret = Qtr_("O2%");
|
||||
break;
|
||||
case HE:
|
||||
ret = tr("He%");
|
||||
ret = Qtr_("He%");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -157,10 +164,10 @@ QVariant WeightModel::headerData(int section, Qt::Orientation orientation, int r
|
|||
|
||||
switch(section){
|
||||
case TYPE:
|
||||
ret = tr("Type");
|
||||
ret = Qtr_("Type");
|
||||
break;
|
||||
case WEIGHT:
|
||||
ret = tr("Weight");
|
||||
ret = Qtr_("Weight");
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue