| Summary: | Missing/failing message extraction in kf5 | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] analitza | Reporter: | Burkhard Lück <lueck> |
| Component: | core | Assignee: | Aleix Pol <aleixpol> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | http://commits.kde.org/analitza/591305185a70a20834325a2a7b60fb259004aeae | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
I guess the ones using i18n() are the ones generated by i18n? Most of the i18n() calls you identified are commented out. It's meant to use tr() Sorry, I meant generated by extractplots (In reply to Aleix Pol from comment #1) > I guess the ones using i18n() are the ones generated by i18n? > yes extraplots extracts just two i18n > Most of the i18n() calls you identified are commented out. It's meant to use > tr() Then extraplots has to be adapted + extraction itself as well + the target catalog has to be renamed to analitza_qt.po I'll look into it tonight. Thanks! Extraction seems to work now, but some messages from the translation catalog are still untranslated in the gui: "Name" + "Value" in Variables docker of console In Dictionary the Description + Parameters of an operation are untranslated Do you know why that is? Is it because it's using QCoreApplication::translate? (In reply to Aleix Pol from comment #6) > Do you know why that is? Is it because it's using > QCoreApplication::translate? No. But where do you load the translation catalog? Analitza has no "ecm_create_qm_loader (<source_files_var> <catalog_name>)" With this patch the catalog is loaded and in kalgebra "Name" + "Value" in Variables docker of console and in dictionary the Description + Parameters of an operation are translated.
kdeframeworks@parodia:~/src/kdeedu/analitza()$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21f9a73..3cac3d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ include(GenerateExportHeader)
include(CheckIncludeFiles)
include(CheckLibraryExists) #FindCurses seems to need that on the CI
include(ECMPoQmTools)
-
+ecm_create_qm_loader(analitza_QM_LOADER analitza_qt)
set(ANALITZA_INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_DIR}/Analitza")
ecm_setup_version(5.0.0 VARIABLE_PREFIX ANALITZA
Git commit a76790d6a5245641b9ecde561a7935beab4d7e58 by Burkhard Lück. Committed on 04/11/2014 at 12:25. Pushed by lueck into branch 'master'. Add translation catalog loader to analitza REVIEW:120948 M +1 -1 CMakeLists.txt http://commits.kde.org/analitza/a76790d6a5245641b9ecde561a7935beab4d7e58 Git commit 591305185a70a20834325a2a7b60fb259004aeae by Aleix Pol, on behalf of Burkhard Lück. Committed on 04/11/2014 at 12:25. Pushed by apol into branch 'Applications/14.12'. Add translation catalog loader to analitza REVIEW:120948 M +1 -1 CMakeLists.txt http://commits.kde.org/analitza/591305185a70a20834325a2a7b60fb259004aeae |
analitza kf5 recent master kdeframeworks@parodia:~/src$ wcgrep "tr(" kdeedu/analitza/|wc -l 230 kdeframeworks@parodia:~/src$ wcgrep "translate(" kdeedu/analitza/|wc -l 44 kdeframeworks@parodia:~/src$ wcgrep "18n" kdeedu/analitza/|wc -l 17 kdeedu/analitza/Messages.sh:3:$XGETTEXT analitzagui/*.cpp analitza/*.cpp rc.cpp -o $podir/analitza.pot This is a mixture of Qt + i18n translation calls and extracted are only xgettext msgs, so as of now 230+44 msgs are untranslated What is intended here, l10n via Qt or xgettext?