[Companion] Radio data translation/strings (#5554)
* [Companion] Add Qt tr() functions to all radio data classes instead of using generic QObject type. (no functional changes) * Small fix for gcc. * Move more element name string generation to individual classes; settle on nameToString as function name. * Also put firmware build options translations into Firmware scope.
This commit is contained in:
committed by
Bertrand Songis
parent
7806c2096d
commit
a951292f27
@@ -270,27 +270,27 @@ const int Boards::getCapability(Board::Type board, Board::Capability capability)
|
||||
const QString Boards::getAxisName(int index)
|
||||
{
|
||||
const QString axes[] = {
|
||||
QObject::tr("Left Horizontal"),
|
||||
QObject::tr("Left Vertical"),
|
||||
QObject::tr("Right Vertical"),
|
||||
QObject::tr("Right Horizontal"),
|
||||
QObject::tr("Aux. 1"),
|
||||
QObject::tr("Aux. 2"),
|
||||
tr("Left Horizontal"),
|
||||
tr("Left Vertical"),
|
||||
tr("Right Vertical"),
|
||||
tr("Right Horizontal"),
|
||||
tr("Aux. 1"),
|
||||
tr("Aux. 2"),
|
||||
};
|
||||
if (index < (int)DIM(axes))
|
||||
return axes[index];
|
||||
else
|
||||
return QObject::tr("Unknown");
|
||||
return tr("Unknown");
|
||||
}
|
||||
|
||||
const QString Boards::getAnalogInputName(Board::Type board, unsigned index)
|
||||
{
|
||||
if ((int)index < getBoardCapability(board, Board::Sticks)) {
|
||||
const QString sticks[] = {
|
||||
QObject::tr("Rud"),
|
||||
QObject::tr("Ele"),
|
||||
QObject::tr("Thr"),
|
||||
QObject::tr("Ail")
|
||||
tr("Rud"),
|
||||
tr("Ele"),
|
||||
tr("Thr"),
|
||||
tr("Ail")
|
||||
};
|
||||
return sticks[index];
|
||||
}
|
||||
@@ -398,7 +398,7 @@ const QString Boards::getBoardName(Board::Type board)
|
||||
case BOARD_X10:
|
||||
return "X10";
|
||||
default:
|
||||
return QObject::tr("Unknown");
|
||||
return tr("Unknown");
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user