Bug 179297 - allow choosing translation memory to search in
Summary: allow choosing translation memory to search in
Alias: None
Product: lokalize
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: HI wishlist
Target Milestone: ---
Assignee: Nick Shaforostoff
Depends on:
Reported: 2009-01-01 17:13 UTC by Viesturs Zarins
Modified: 2011-01-27 22:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:

Implements TM search button, list sorting and rebuild TM button. (4.11 KB, patch)
2009-01-25 20:41 UTC, Viesturs Zarins

Note You need to log in before you can comment on or make changes to this bug.
Description Viesturs Zarins 2009-01-01 17:13:13 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

I'm trying out the new translation memory view (F7). 
I think it shows good promise, but needs several improvements:

* add a search button - enter in edit fields work, but no button is confusing and you cannot start search with mouse only.
* make the results table sortable
* allow choosing in witch translation memory to search in
* add means to update speficic translation memory - needed when files changed externally (svn up)
* add option for whole words only.

I'm actually willing to do some coding on this, it you can provide some not very painful way to compile lokalize from trunk.
Comment 1 Nick Shaforostoff 2009-01-04 02:07:06 UTC
it depends on your distro

for example, on debian, installing kdelibs5-dev, then compiling kdesdk module (mkdir kdesdk/build && cd kdesdk/build && cmake .. && make && make install) is enough.

see also http://techbase.kde.org/Getting_Started/Build/KDE4
this is websvn for lokalize: http://websvn.kde.org/trunk/KDE/kdesdk/lokalize/

a hint: printing code (on a real paper) may help - it eases the perception
Comment 2 Viesturs Zarins 2009-01-11 17:15:29 UTC
My first try to compile lokalize.

Installed kdelibs5-dev, kdepimlibs5-dev on Kubuntu, got the kdesdk sources (cmake and lokalize subdirs only) and run "cmake . && make".

Cmake finished sucessfully :), but make errored out on:

/home/koks-ubuntu/Documents/KDE-sources/KDE/kdesdk/lokalize/src/kaider.h:57: error: forward declaration of ‘struct KActionCategory’

A quick search in google and KDE svn revealed that this class is not present in KDE 4.1.3 - the version of kdelibs5-dev I have. 

I really don't want to compile kdelibs, kdepimlibs and whatnot by hand.
Is there a way to get a compatible kdelibs5-dev for Ubuntu?

Comment 3 Nick Shaforostoff 2009-01-12 22:34:16 UTC
you need kde 4.2. if you were using debian, then you could install KDE 4.2 from kde42.debian.net. if ubuntu doesn't provide 4.2 rc1 packages, then just wait two weeks.
Comment 4 Viesturs Zarins 2009-01-17 21:06:25 UTC
Examined the source a bit. It turns out the TM view shows only strings from opened project TM. I was under impression that it returns results from all registered memories.

This changes things a bit. The option to choose from existing memories does not make sense any more.

I also managed to revive my gentoo setup compile lokalize :). Will try to implement some of the improvements. 
Comment 5 Viesturs Zarins 2009-01-25 20:41:18 UTC
Created attachment 30599 [details]
Implements TM search button, list sorting and rebuild TM button.

My first patch for Lokalize. I hope this is useful.
Comment 6 Nick Shaforostoff 2009-01-30 04:06:03 UTC
SVN commit 918525 by shaforo:

apply patch by Viesturs Zarins, modified by me.
It adds explicit TM search button, results sorting and rebuild TM button.


 M  +38 -4     queryoptions.ui  
 M  +24 -3     tmwindow.cpp  
 M  +21 -9     tmwindow.h  

WebSVN link: http://websvn.kde.org/?view=rev&revision=918525
Comment 7 Nick Shaforostoff 2009-01-30 04:06:20 UTC
"The option to choose from existing memories does not make sense any more. "

Nom it still does. Thats' why I'm not closing this bug entry
Comment 8 Nick Shaforostoff 2011-01-25 18:34:21 UTC
SVN commit 1217082 by shaforo:

tm tab: allow choosing translation memory to search in

 M  +6 -2      common/languagelistmodel.cpp  
 M  +3 -2      tm/dbfilesmodel.cpp  
 M  +1 -1      tm/dbfilesmodel.h  
 M  +42 -2     tm/queryoptions.ui  
 M  +10 -1     tm/tmtab.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=1217082
Comment 9 Nick Shaforostoff 2011-01-27 22:06:01 UTC
btwm regarding your code in generatePOTMapping() that is slow - are you familiar with hash-based data structures - like qhash, qset, and also qmap?