On Tue, Jun 2, 2009 at 11:20 AM, Alexandre Bique <[email protected]> wrote: > On Tue, Jun 2, 2009 at 3:26 PM, Diego Schulz <[email protected]> wrote: >> Hi all, >> >> I recently found this in ./src/plugins/coreplugin/versiondialog.cpp: >> >> >> const QString description = tr( >> "<h3>Qt Creator %1</h3>" >> "Based on Qt %2<br/>" >> "<br/>" >> "Built on " __DATE__ " at " __TIME__ "<br />" >> #ifdef IDE_REVISION >> "From revision %5<br/>" >> #endif >> "<br/>" >> "<br/>" >> "Copyright 2008-%3 %4. All rights reserved.<br/>" >> "<br/>" >> "The program is provided AS IS with NO WARRANTY OF ANY KIND, " >> "INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A " >> "PARTICULAR PURPOSE.<br/>") >> .arg(version, QLatin1String(QT_VERSION_STR), >> QLatin1String(IDE_YEAR), (QLatin1String(IDE_AUTHOR)) >> #ifdef IDE_REVISION >> , QString(IDE_REVISION_STR).left(10) >> #endif >> ); >> >> >> Just want to point out that this appears not to be fully >> translatable.. Does Linguist and the other Qt translation tools can >> manage to work with macros? >> >> Please let me know if I'm wrong. > > It is possible to transform it to a printf like string: > > QString("....... %1 ............").arg(__DATE__);
yes, but there's only one QString and more important, only one tr() call. const QString description = tr( ..... and there are some #ifdefs ... I suspect this is wrong, in fact Linguist (Qt 4.5.0) doesn't recognize the full string. I think it could be solved by splitting in multiple QStrings (translated independently) and then joined together after the tr() calls. _______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
