aboutsummaryrefslogtreecommitdiff
path: root/modules/ECMQmLoader.cpp.in
AgeCommit message (Collapse)Author
2020-06-14extra-cmake-modules: Convert to SPDX license statementsAndreas Cord-Landwehr
2020-02-26Load QM files from assets: URLs on AndroidVolker Krause
Summary: This works with both the old and the new way of Qt's asset deployment, ie. with Qt 5.13 and Qt 5.14. Reviewers: apol Reviewed By: apol Subscribers: apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Maniphest Tasks: T12520 Differential Revision: https://phabricator.kde.org/D27596
2018-10-15style++Harald Sitter
Summary: easier to read with spaces SCM_SILENT Reviewers: apol Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D16221
2018-09-24Android: Make sure Qm translations get loadedAleix Pol
Summary: Use a similar strategy as D14528 to find qm files. Test Plan: Analitza parts of KAlgebra are translated too. Reviewers: #frameworks, aacid Reviewed By: aacid Subscribers: svuorela, aacid, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D14529
2018-01-17Fall back to language name for translations lookup if locale name failsWolfgang Bauer
For locales like de_AT, the current code only looks in share/locale/de_AT/ and share/locale/de-AT/ for translation catalogs, but not in share/locale/de/ where they most likely are. That's because bcp47Name() returns "de-AT" for de_AT (though in the case of de_DE e.g. it does return "de"). This patch additionally tries to fall back to the general language by taking the part of the locale name before the first '_'. Differential Revision: https://phabricator.kde.org/D9793
2017-05-16Add or improve "Generated. Don't edit" messages and make consistentFriedrich W. H. Kossebau
Reviewers: #frameworks, #build_system, apol Reviewed By: apol Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D5867
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-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-03Add BSD license to ECMQmLoader.cpp.in.Alex Merry
CCMAIL: kde-licensing@kde.org CCMAIL: agateau@kde.org
2015-11-03Make sure we load translations on the main thread.Alex Merry
BUG: 346188 REVIEW: 123726
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
2014-04-22Improve plural handling for code using Qt translation systemAurélien Gâteau
- Always load "en" translation: This way if a plural string is not translated, we fallback to the correct english plural form. - Generate .ts files with correct plural settings REVIEW: 117629
2014-04-16Make ECMCreateQmFromPoFiles usable from within trunk/l10n-kf5Aurélien Gâteau
REVIEW: 117560
2014-04-01Do not replace "-" with "_" in .po filesAurélien Gâteau
This causes problem with .po files whose name contains "-". A nice side effect of this approach is we pass a QLocale to QTranslator, which means it will try to load translations for all "ui languages" [1] instead of just the one returned by QLocale::name(). [1]: http://doc-snapshot.qt-project.org/qt5-stable/qlocale.html#uiLanguages REVIEW: 117296
2014-03-28Add ECMCreateQmFromPoFiles.cmakeAurélien Gâteau
Simplifies translation handling for frameworks using Qt translation system. REVIEW: 117052