Version: (using KDE 4.2.85) OS: Linux Installed from: Unlisted Binary Package The problem has been there from KBabel times. There are some files that do not show correct stats in project tree, but when opened have the correct stats. For example desktop-kdebase.po in Latvian translations, trunk ( http://websvn.kde.org/trunk/l10n-kde4/lv/messages/kdebase/desktop_kdebase.po ). The problem is - there are much more such files in current trunk, over 10%. Maybe Lokalize can use it's internal parser for the files where KFileMetaInfo returns all zeros?
strigi analyzer can use gettext c parser. i added this to my plan.
Created attachment 33772 [details] test file. Looks like files with commented lines are affected. See file.
the problem should be solved by now after recent commits to strigi-analyzer. if its not, please reopen this bug. (you can try 'xmlindexer file.po | less' to see immediate analyzer output)
Nice, I will try this out.
Created attachment 33996 [details] patch for POT file stats A lot better how :). There is still problem with POT files - indexer report their translated count as -1. Added patch to fix the problem. Did some manual edits on the patch file, I hope it will apply.
Noticed one more problem. KFileMetaInfo would not read files longer than exactly 104 Kib, for example kdebase/desktop_kdebase.po xmlindexer works fine on them, but KFileMetaInfo fails. Maybe you have a clue how to circumvent this?
this has smth to do with http://api.kde.org/kdesupport-api/kdesupport-apidocs/strigi/html/classStrigi_1_1AnalyzerConfiguration.html
SVN commit 972923 by shaforo: CCBUG: 192927 correctly handle templates M +6 -2 polineanalyzer.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=972923
btw, you might want to come to http://www.aspirationtech.org/events/opentranslation/2009/agenda/overview (I'm gathering things for getting visa right now)
regarding large files: a limit value in http://lxr.kde.org/source/KDE/kdelibs/kio/kio/predicateproperties.cpp#104 should be adjusted depending on 'what' value of KMetaInfo c'tor. gonna need some kde-core-devel@ procedures to get this into KDE 4.3...
Created attachment 35902 [details] Temporary fix for the large files problem Here is a temporary fix that I'm using for the lage files problem, before the real fix is available.
In the KDE 4.3.0 release this problem exists. I'm using Mandriva packages.
Can this bug be fixed soon? It is even more inconvenient than in KDE 4.2... :( I need to check every unstat file to make sure they needed to be translated or not.
(In reply to comment #11) > Created an attachment (id=35902) [details] > Temporary fix for the large files problem > > Here is a temporary fix that I'm using for the lage files problem, before the > real fix is available. I am using Stefans patch here in trunk + branch, works perfectly. This bug should be fixed really soon, all our (german) translators with a lokalize from there distro have this problem.
This bug is not really in Lokalize, but in KFileMetaInfo/Strigi. It could be fixed in Lokalize by bypassing KFileMetaInfo, but I don't think that is a good solution. To get it fixed it should be reassigned to Strigi. Could someone with enough karma please do that?
well i don't have this problem on my machine (standard debian kde 4.3.2 packages, http://patch-tracker.debian.org/package/kde4libs/4:4.3.2-2 shows no kio-related patches), desktop_kdebase.po has corrrect stats
Essentially, https://bugs.kde.org/show_bug.cgi?id=203152 and https://bugs.kde.org/show_bug.cgi?id=214571 are duplicates of this bug.
*** Bug 203152 has been marked as a duplicate of this bug. ***
i posted the patch to reviewboard (http://reviewboard.kde.org/r/2215/).
Well, it seems to be correct now (as of KDE 4.3.77) and Lokalize even shows real statistics for the files previously shown as grey, without statistics
ok, thanks all.