[Qt-creator] Running linguist from external tools with arguments (Ts-Files)?
Eike Ziller
Eike.Ziller at qt.io
Thu Nov 10 12:01:04 CET 2016
> On Nov 10, 2016, at 11:37, Matthias Ballreich <Matthias.Ballreich at outlook.de> wrote:
>
> Hi Julien,
>
> thanks for the answer, but this did not work. When I run the command, Linguist says there is no “*.ts” file.
> Did I anything wrong? Works this code when you try it by yourself?
Expansion of globs (*, ?) is a feature of the shell, and the command and arguments for external tools is not passed through a shell.
You’d either have to make the shell your command and pass it the command line to execute, smth like
Exe: bash
Args: -c ‘"%{CurrentProject:QT_INSTALL_BINS}/linguist" “%{CurrentProject:Path}/*.ts”'
(note the double quoting, this is a unix example)
or probably it would be less hassle to create a script that does what you want and call that.
Br, Eike
>
> Matthias
>
> Von: Qt-creator [mailto:qt-creator-bounces+matthias.ballreich=outlook.de at qt-project.org] Im Auftrag von Julien Bordes
> Gesendet: Mittwoch, 9. November 2016 11:27
> An: qt-creator at qt-project.org
> Betreff: [Qt-creator] Running linguist from external tools with arguments (Ts-Files)?
>
> Hello Matthias,
>
> One solution could be
>
> Executable: %{CurrentProject:QT_INSTALL_BINS}/linguist
>
> Arguments: %{CurrentProject:Path}/*.ts
>
> Working Directory: %{CurrentProject:Path}
>
> and in your .pro
>
> TRANSLATIONS += \
> $${TARGET}_en_US.ts \
> $${TARGET}_fr_FR.ts
>
> But I think this solution only works if the translations are generated where your .pro file is and you manage translations the same in all your projects.
>
> Julien.
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
More information about the Qt-creator
mailing list