Bug 203152 - Lokalize doesn’t show statistics for all files
Summary: Lokalize doesn’t show statistics for all files
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Nick Shaforostoff
URL:
Keywords:
: 214571 233713 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-09 11:55 UTC by Karl Ove Hufthammer
Modified: 2011-07-22 12:34 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.4


Attachments
Screenshot (114.47 KB, image/png)
2009-08-09 11:56 UTC, Karl Ove Hufthammer
Details
Example PO file with statistics problem (104.17 KB, text/x-gettext-translation)
2009-08-12 19:44 UTC, Karl Ove Hufthammer
Details
Screenshot 2 (46.88 KB, image/png)
2009-11-14 19:03 UTC, Nick Shaforostoff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2009-08-09 11:55:53 UTC
Version:           1.0 (using 4.3.00 (KDE 4.3.0), Mandriva Linux release 2009.1 (Official) for i586)
Compiler:          gcc
OS:                Linux (i686) release 2.6.29.6-desktop-1mnb

Lokalize doesn’t show statistics for all files. For some, the numbers are all 0, and the background is grey. See the attached screenshot for an example (look at kttsd.po). This bug is observed in KDE 4.3. I believe a similar bug was ‘fixed’ in earlier versions, but it doesn’t look it is completely fixed yet.
Comment 1 Karl Ove Hufthammer 2009-08-09 11:56:42 UTC
Created attachment 36009 [details]
Screenshot
Comment 2 Karl Ove Hufthammer 2009-08-12 19:44:37 UTC
Created attachment 36102 [details]
Example PO file with statistics problem

Here’s an example. No statistics is displayed for the attached file. However, if I delete line 3320 and to the end, the statistics is shown. (If I delete from 3328 and to the end, the statistics is not shown.)

Here is line 3320 and the following few lines:

#: ../printer/printerdrake.pm:5027
#, c-format
msgid ""
"The memory card readers in your printer can be accessed like a usual USB "
"mass storage device. "
msgstr ""
"Du kan bruka minnekortlesaren i skrivaren som ei vanleg USB-basert "
"lagringseining. "
Comment 3 Karl Ove Hufthammer 2009-08-12 23:12:09 UTC
Ignore the comment about 3328. I accidently attached a file with that portion removed. But the file should still show the problem.
Comment 4 Alex Minton 2009-08-21 20:51:34 UTC
I confirm this bug fully on openSUSE 11.1 x86_64. (And there are a lot of files with "zero"-statistics in openSUSE translation repo) Obviously, Nick is kinda busy these days, can't get a note from him...
Comment 5 Franklin Weng 2009-08-31 06:50:55 UTC
Current bugs seemed to be for large files.
Comment 6 Alex Minton 2009-08-31 07:27:58 UTC
Not always true. One of my "zero" files is only 9701 bytes long...
Comment 7 Nick Shaforostoff 2009-11-14 19:03:53 UTC
Created attachment 38328 [details]
Screenshot 2

I placed attached file 36102 (printerdrake.po) into l10n-kde4/ru/messages (so that it is shown in my current project) and the stats is shown correctly.

my system is debian, kde 4.3.2
Comment 8 Marek Laane 2009-11-17 05:31:14 UTC
Well, it has become even worse - now the files before grayed out and without statistics in project overview are not shown at all. See also BR https://bugs.kde.org/show_bug.cgi?id=214571 . And "now" means: KDE 4.3.73 (KDE 4.3.73 (KDE 4.4 >= 20091026)). For example, digikam.po is not seen in project overview but can be opened with File->Open; msgfmt shows correct statistics (and no errors which may be cause of not showing in Lokalize).
Comment 9 Nick Shaforostoff 2009-11-18 01:21:38 UTC
can you show me output of 
xmlindexer <'bad' .po file>  | grep translation.total
?
Comment 10 Marek Laane 2009-11-18 01:53:39 UTC
for me, in the case mentioned digikam, is is:
$ xmlindexer digikam.po | grep translation.total
  <value name='translation.total'>3541</value>
xmlindexer: symbol lookup error: /usr/lib/libldap-2.4.so.2: undefined symbol: ldap_int_tls_destroy

And: 
$ msgfmt -cv digikam.po
3531 tõlgitud teadet, 9 kahtlast tõlget, 1 tõlkimata teade.

So, it seems to be right but Lokalize just doesn't show digikam (and many files more, including such important as kdelibs and kio) at all...
Comment 11 Marek Laane 2009-11-18 02:01:46 UTC
And as I said, I can File->Open them in Lokalize and Lokalize shows correct statistics in status bar - just Project Overview doesn't show them.
Comment 12 Nick Shaforostoff 2009-11-18 02:36:04 UTC
i have just seen the problem on a notebook, so I now got the place to test my kdelibs patch, so I expect to solve the problem in few days.
Comment 13 Nick Shaforostoff 2009-11-19 11:40:01 UTC
you can try replacing your /usr/lib/libkio.so.5.3.0 by the one from http://lokalize.program.net.ua/data/nick/l.7z
Comment 14 Nick Shaforostoff 2009-11-19 17:04:28 UTC
i posted the patch to RB: http://reviewboard.kde.org/r/2215/
Comment 15 Nick Shaforostoff 2009-11-19 23:58:25 UTC
*** Bug 214571 has been marked as a duplicate of this bug. ***
Comment 16 Nick Shaforostoff 2009-11-20 00:01:38 UTC

*** This bug has been marked as a duplicate of bug 192927 ***
Comment 17 Nick Shaforostoff 2009-11-23 03:53:23 UTC
SVN commit 1053062 by shaforo:

BUG: 203152

Don't impose limit on size of files being indexed via KFileMetaInfo c'tor, when KFileMetaInfo::WhatFlags w parameter of KFileMetaInfo c'tor is KFileMetaInfo::Everything.
This is needed for Lokalize to show statsics for gettext .po files whose size is more than 64k

CCMAIL: jos@vandenoever.info




 M  +14 -5     kfilemetainfo.cpp  
 M  +2 -0      kfilemetainfo.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1053062
Comment 18 Franklin Weng 2009-12-22 11:10:51 UTC
Does this patch applied in KDE 4.3.4?  I upgraded my KDE to 4.3.4 from MIB Mandriva packages, but this problem still occurred.

Or do I have to wait for KDE 4.4?
Comment 19 Nick Shaforostoff 2009-12-22 11:59:48 UTC
no, it's for 4.4. I'm afraid of making changes to the branch ;)
Comment 20 Nick Shaforostoff 2010-04-08 11:22:09 UTC
*** Bug 233713 has been marked as a duplicate of this bug. ***