PDA

View Full Version : Qt Linguist An array of strings to be translated



PierreA
26th December 2017, 12:40
char exceptionNames[N_EXCEPTIONS][24]=
{
"noerror",
"notri",
"samepnts",
"flattri",
"badheader",
"baddata",
"matrixmismatch",
"singularmatrix",
"unsetgeoid",
"unsetsource",
"badunits",
"badnumber",
"badbreaklineend",
"breaklinescross",
"badbreaklineformat",
"fileerror"
};
I'm going to call tr(exceptionNames[i]). How do I tell lupdate that these strings need to be translated?

PierreA
27th December 2017, 10:44
Found it:

QT_TRANSLATE_NOOP("BeziExcept","notri"),