Bug 339821 - Missing/failing message extraction in kf5
Summary: Missing/failing message extraction in kf5
Status: RESOLVED FIXED
Alias: None
Product: analitza
Classification: Frameworks and Libraries
Component: core (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-09 16:02 UTC by Burkhard Lück
Modified: 2014-11-06 23:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Burkhard Lück 2014-10-09 16:02:43 UTC
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?
Comment 1 Aleix Pol 2014-10-09 16:06:32 UTC
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()
Comment 2 Aleix Pol 2014-10-09 16:06:44 UTC
Sorry, I meant generated by extractplots
Comment 3 Burkhard Lück 2014-10-09 16:22:43 UTC
(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
Comment 4 Aleix Pol 2014-10-09 16:26:29 UTC
I'll look into it tonight.

Thanks!
Comment 5 Burkhard Lück 2014-10-30 19:33:32 UTC
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
Comment 6 Aleix Pol 2014-10-31 14:42:15 UTC
Do you know why that is? Is it because it's using QCoreApplication::translate?
Comment 7 Burkhard Lück 2014-11-01 08:55:21 UTC
(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>)"
Comment 8 Burkhard Lück 2014-11-02 17:17:55 UTC
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
Comment 9 Burkhard Lück 2014-11-04 12:25:18 UTC
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
Comment 10 Aleix Pol 2014-11-06 23:57:07 UTC
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