aboutsummaryrefslogtreecommitdiff
path: root/modules/ECMPoQmTools.cmake
AgeCommit message (Collapse)Author
2022-01-24Fix ECMPoQmTools when using Qt6Volker Krause
2021-12-01Include QtVersionOption before all Qt5 find_package callsVolker Krause
This doesn't make all these modules actually work with Qt6 yet, but it prevents them from unconditionally pulling in Qt5 in a Qt6 build. This is useful in order to even be able to pass a CMake run to the point one can port, test and debug the rest.
2021-05-21ecm_create_qm_loader: support target as alternative argumentFriedrich W. H. Kossebau
2021-04-23Modules docs: move rst docs into bracket commentsFriedrich W. H. Kossebau
CMake >= 3.0 supports bracket comments, and the reStructuredText integration code in sphinx/ext/ecm.py already supports extracting the docs from a bracket comment instead. Editing documentation without leading line comment markers is more simple, e,g. when reflowing text over lines. With ECM meanwhile requiring CMake 3.5 now it is possible to switch (and thus follow also the approach used by cmake itself). NO_CHANGELOG
2021-04-10Fix installation of qm files from po files in the build directoryVolker Krause
That's the case when using KDE_L10N_AUTO_TRANSLATIONS, and the code handles this case above when looking for the right po location already, but that result was accidentally discarded here.
2020-06-14extra-cmake-modules: Convert to SPDX license statementsAndreas Cord-Landwehr
2018-08-06Make it possible for ECM to detect po files at configure timeAleix Pol
Summary: ECMPoQmTools will need to have the translations downloaded at configure time instead of on build time, otherwise it needs an awkward second configure. To that end we introduce a KDE_L10N_SYNC_TRANSLATIONS variable that allows it to do so. ECMPoTools will download the translations in the build directory, because cmake shouldn't touch the sources. Have it check the build directory too when the macro is called. Test Plan: Built analitza translations. Reviewers: #frameworks, cgiboudeaux Reviewed By: cgiboudeaux Subscribers: cgiboudeaux, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D14569
2017-04-20fix documentation, ecm_install_po_files_as_qm generates .qm, not .moHarald Sitter
2016-09-05ecm_process_po_files_as_qm: Skip fuzzy translationsAlexander Potashev
REVIEW: 128823
2016-08-31add full license textAllen Winter
REVIEW: 128780
2015-11-30Make sure we load translations on the main thread.Alex Merry
Because the old implementation (accidentally) worked when you put the ecm_create_qm_loader call in a different CMakeLists.txt file to the target the file was added to, some projects did this. This won't work with build-time-generated files, though, like moc files. So we (ab)use QTimer events to make the loading happen on the main thread. BUG: 346188 REVIEW: 126000
2015-11-14Fix multiple calls to ecm_create_qm_loader.Alex Merry
Multiple ecm_create_qm_loader() with different catalog names would overwrite each other's generated files, causing the wrong catalog to be loaded at runtime for some targets. This puts the catalog name into the generated filename. Since the catalog name is the only difference between the generated files, this is sufficient to fix the runtime behaviour. REVIEW: 125999
2015-11-08Revert "Make sure we load translations on the main thread."Alex Merry
This broke the build for projects which used ecm_create_qm_loader in unusual ways. A better approach is coming, but won't be in e-c-m 5.16. This reverts commit 009c480413910e8c1a18f4d1420f4a517ea606e6. CCBUG: 346188 CCMAIL: release-team@kde.org CCMAIL: kde-buildsystem@kde.org
2015-11-03Make sure we load translations on the main thread.Alex Merry
BUG: 346188 REVIEW: 123726
2015-04-09Do not call lrelease with -compressLasse Liehu
According to Oswald Buddenhagen "it doesn't buy much, and there are some long-standing issues with it". Qt bug report: https://bugreports.qt.io/browse/QTBUG-44362 REVIEW: 122501
2015-03-06Use lconvert path from Qt cmake config when on Qt >= 5.3.1v1.8.0-rc1v1.8.0Dmitry Shachnev
Qt5LinguistToolsConfig.cmake defines CMake target for lconvert since Qt 5.3.1, so we should use that if it is available. Our own hacks were not working in some configurations (i.e. when there is /usr/bin/lconvert managed by qtchooser, but no qtchooser configuration file). REVIEW: 122626
2015-02-06Document when modules were added to ECM.Alex Merry
2014-07-14Don't search default paths when finding lconvert.Michael Palimaka
Otherwise, if lconvert exists in normal system paths (eg. /usr/bin) that one will be used instead of the one alongside Qt5::lrelease. This could cause Qt4 lconvert to be incorrectly used on some systems. REVIEW: 119198
2014-05-26Skip non-directory files inside the po/ directoryAurélien Gâteau
REVIEW: 118216
2014-05-04Add ECMPoQmTools moduleAurélien Gâteau
ecm_create_qm_from_po_files() was actually not very useful in practice. So that is deprecated, to be removed before ECM 1.0. Instead, the ECMPoQmTools provides several useful functions: ecm_create_qm_loader() (which already existed in ECMCreateQmFromPoFiles), ecm_process_po_files_as_qm() (which has the same signature as gettext_process_po_files() from the FindGettext module) and ecm_install_po_files_as_qm(), which is a convenience function mostly for the benefit of KDE Frameworks (although potentially useful for whatever other projects have the unusual requirement of a Gettext translation workflow but no Gettext usage in the code). NB: some clean-up to the documentation was done by Alex Merry <alex.merry@kde.org> as part of this commit. REVIEW: 117823