Exclude directories from lupdate
-
Hello together!
Hopefully this is the correct section here.
Is there a way to exclude directories with lupdate? We have a bunch of directories which we don't need to check for translatable strings. At least we want to exclude the "lib/external" directory, because we definetly don't want to translate (or check for translatable strings) in external libraries :-)
Our command:
- lupdate -locations relative -recursive . -extensions php -ts lang/backend_de.ts
Thanks!
-
This is a long shot as I'm not too familiar with lupdate .
Yet, option -no-recursive could provide you means to skip certain directories.
-no-recursive Do not recursively scan the following directories.
Says the lupdate -help .
-
Mmh, yes I already tried it with:
- lupdate -locations relative -recursive . -no-recursive ./lib/external/ -extensions php -ts lang/backend_de.ts
But it didn't really work...
-
@mbohlaender Did you find any solution? Did it work with the absolute path?
-
@mbohlaender
Please try below code in your .pro fileProvide required files in lupdate_only { }
lupdate_only { SOURCES += // Please provide files which you want translate. qml/ * .qml \ qml/ * / * .qml \ qml/ * / * / * .qml \ qml/ * / * / * / *.qml \ qml/ * / * / * / * / *.qml }