We need to escape all regex relevant characters before using the build
directory as part of a regex.
Amends fc236d4534
Change-Id: Idfb9e5a1733e153943781888976de97aac4fb8cb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
The "project sources" contain lots of generated files that we are not
interested in, simply exclude anything from the build directory.
The *_tr.h header that we generate for the wizards and external tools
are handled separately.
Change-Id: I2ab1d6ac4312b1140ee475f8f16ba82d8488c43e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Created .ts files with the wrong name.
Amends 556e7315f7
Change-Id: I3c0199c564f47dce178a9d8218d5dacf8c75f78a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Filter out .pro files from the translation sources.
A ProjectExplorer test was added that added files like
`multi-target-project-app.pro` to the target sources.
lupdate then triggers a call for lupdate-pro, which in turn fails.
Also filter .css files, which result in lupdate warnings.
Change-Id: Ib2fa5f0228307bc5850915ed89c14a0956d1d6a8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Instead of trying to update all files in a single lupdate call,
make the ts_all targets just depend on the individual language targets.
It is less efficient, but not used often, simpler to setup and since
lconvert cannot work on mutliple .ts files simultanously easier to
setup a ts_all_cleaned target.
Change-Id: I60718408a661f011d84f3f74645e2f8fd49a95d1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
No longer needed, since we generally only support building with
Qt 6 nowadays, and the parts that still do support building with
Qt 5 handle that manually.
Change-Id: I72381589ca3ab7bf1af88d9f185cad7f0cdf149c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Since we do not support Qt < 5.15 anymore, and as a first step
for getting rid of our special FindQt5.cmake.
Change-Id: Icc5dbaf9b0a3a622b1f609ff114b9decb6d2856c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
For the translation process it is nice to keep obsolete items and locations,
but we do not want these submitted in the end. So while translating we'd have
patches:
1. lupdate cleaned of obsolete and line numbers
2. wip: lupdate with obsolete and line numbers
3. translation of plugin X
4. translation of plugin Y
and before submitting we want to remove the wip patch (2).
But, running lupdate with "-no-obsolete -locations none" for cleaning
the ts file has a slightly different sorting than without it, which
leads to conflicts when removing the wip patch (2).
Instead run lupdate with obsolete items and line numbers first, and
clean the ts file with lconvert afterwards. That keeps the diff between
patch (1) and (2) minimal, and results in a clean rebase process when
removing patch (2).
Change-Id: I3b8ac7c30dc6eb0e501be765eb6e64069007a5bd
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Without obsolete and vanished translations, and files and line numbers.
Which is what we would in the end submit into the repository.
run with `cmake --build . --target ts_<lang>_cleaned`
Change-Id: If5b73f19d8fc7b49bcf95fbeb0b0ff7793056cca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The include paths that we extract from the targets often still contain
the generator expression, like $<BUILD_INTERFACE:actual/include/path>.
Throw away "paths" with generator expressions that we don't care about,
and strip the BUILD_INTERFACE expression around the paths, which are the
ones that we do care about.
This wasn't only partially relevant so far, though it probably was the
reason for the need for fully qualified tr(...) calls at some places.
It becomes essential when we move to the <Plugin>::Tr class, which
requires an include to <plugin>tr.h, which is otherwise not found for
files that are not in the same directory.
Change-Id: I7a0183f002973069839920ec29944342cfd91721
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Amends 30bb32d9af
which added the .json.in files to the list of target sources.
Change-Id: I7282cfcda50cbd156403a23cce06baed9698bb4d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Alias for lupdate for missing
Change-Id: I8a9a68e6d3be54ab8e1d143d3611e9d8da6d760d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
- Make the build system aware that empty_pch.c/.cpp are generated files
to prevent invalid access from _add_pch_target.
- Force the creation of the translation output directory before copying
qm files into it.
Change-Id: Iaff5e5ebdbfec7e89a47d277d95f9dec760a5b6b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
And fix that the "ts_all" target did not get the custom target prefix.
Change-Id: Iff6a5e328456f3d949c31f2e41b48c400fad773c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>