[Qt-creator] Untranslatable strings

Alexandre Bique bique.alexandre at gmail.com
Tue Jun 2 17:20:07 CEST 2009


On Tue, Jun 2, 2009 at 3:26 PM, Diego Schulz <dschulz at gmail.com> 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__);

I think. But i am not sure about the exact syntax. Good luck!

-- 
Alexandre Bique




More information about the Qt-creator-old mailing list