stardict-tools doesn't allow duplicate keys

Bug #1313920 reported by Christian Hildmann
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
stardict-tools (Debian)
Fix Released
Unknown
stardict-tools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Unfortunaltely, stardict-tools 3.0.2 doesn't allow duplicate keys, while version 3.0.1 does. However, on newer Ubuntu (at least 13.10, 14.04) it is not possible to install 3.0.1 any longer. There is a description how to correct the source code by commenting out just 3 lines (see http://www.simidic.org/wiki/index.php/Install_StarDict-Tools ), but I couldn't compile the source (got two errors, seems nothing to do with the error). Is it possible to get a new 3.0.2a without this error? Would be great!

(Creating a dictionary, it is common to get duplicate keys, so it's a pity that the actual version doesn't support this.)

Best regards,
Christian

Tags: patch
Revision history for this message
Christian Hildmann (christian-hildmann) wrote :

The link given above does not work any longer. The description can be found under https://code.google.com/p/stardict-3/issues/detail?id=37

Revision history for this message
Christian Hildmann (christian-hildmann) wrote :

sorry, affected is 3.0.2-4

Revision history for this message
Christian Hildmann (christian-hildmann) wrote :

A possible workaround is the use of 3.0.5, the source is available now at http://sourceforge.net/projects/stardict-4/files/3.0.5/ It was possible to build first the lib's and then the tools (see also https://code.google.com/p/stardict-3/wiki/Building#Ubuntu). The resulting stardict.tools worked fine and can handle duplicate keys - so now I can create my own dictionaries again. Would be fine, if the latest version will be used for the next Ubuntu-version ;-)

Revision history for this message
Hiroshi Miura (miurahr) wrote :

I've been using stardict-tools with my backported patch for issue37.
I think it should be backport to current version in ubuntu.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in stardict-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Hiroshi Miura (miurahr) wrote :

An attached patch is back-ported from a git commit to fix issue37;

https://code.google.com/p/stardict-3/source/diff?spec=svn7dd38f09f1b9b85eabb9dcd91ce6e282926e8875&old=f06c2a78b0ab51ddaa78da81f9963f9ba0ac1b9d&r=7dd38f09f1b9b85eabb9dcd91ce6e282926e8875&format=unidiff&path=%2Ftools%2Fsrc%2Flibtabfile.cpp

Upstream developer make a huge changeset and no description for issue number which distro maintainer feel difficult to find fix. :-<

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "issue37 patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in stardict-tools (Debian):
status: Unknown → New
Revision history for this message
Bill Poser (billposer) wrote :

For those who have trouble installing or building a patched version, a simple workaround is to unify duplicate entries by tacking all of the glosses together. Here's an AWK script that does the job. Run this on your tab separated file and it will transform, e.g.:

'at wife
'at over there

into

'at wife, over there

----------

BEGIN {
    FS="\t";
    PreviousHeadword="";
}
{
    if($NF < 2) next;
    Headword=$1;
    Gloss=$2;
    if(Headword == PreviousHeadword) {
 Accum = Accum ", " Gloss;
    } else {
 if(NR > 1) printf("%s\t%s\n",PreviousHeadword,Accum);
 Accum=Gloss;
    }
    PreviousHeadword=Headword;
}

Changed in stardict-tools (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.