[Development] Configuring Qt VS Tools to auto generate .qm files from .ts files
Konstantin Ritt
ritt.ks at gmail.com
Wed May 13 13:03:33 CEST 2020
in your .pro file:
CONFIG += lrelease
QMAKE_LRELEASE_FLAGS += -removeidentical
LRELEASE_DIR = $$OUT_PWD/GeneratedFiles/i18n
EXTRA_TRANSLATIONS += \
$$files($$[QT_INSTALL_TRANSLATIONS]/*.qm) \
$$files($$PWD/i18n/*.ts)
Regards,
Konstantin
ср, 13 мая 2020 г. в 13:47, David C. Partridge <
david.partridge at perdrix.co.uk>:
> I posted a question about this here:
> <https://forum.qt.io/topic/114479/another-vs-tools-translation-question>
> and
> was directed here when I didn't get an answer there.
>
> I wanted Qt VS Tools to automatically build .ts files (ideally in a defined
> location such as ".\GeneratedFiles\i18n"). What I can up with was much
> less
> sophisticated. I'd placed my .ts files in an i18n directory under my VS
> project, and added a Custom Build step to be run before QTPrepare.
>
> This simply did: cd i18n && for %%f in (*.ts) do
> ($(QtInstallDir)\bin\lrelease %%f)
>
> I'm sure there must be a better way to achieve this, so my question is what
> is the recommended way to do this,
>
> Many thanks
> David
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200513/515e57eb/attachment.html>
More information about the Development
mailing list