Page 1 of 1

GoldenDict to support colorizing pronunciations

PostPosted: Sun Jun 16, 2013 10:54 am
by Michael72
DICT servers format their results such that pronunciations are enclosed between \\. See http://goodies.xfce.org/projects/applic ... xfce4-dict for reference.

It would be nice for the GoldenDict to color the pronunciation differently.

Re: GoldenDict to support colorizing pronunciations

PostPosted: Sun Jun 16, 2013 5:59 pm
by Tvangeste
GoldenDict currently supports only local dictd files (*.index and *.dict). Is this feature relevant for such use case?

If so, do you have a sample dictd file with colors? And cross-references, while we're at it... :)

Re: GoldenDict to support colorizing pronunciations

PostPosted: Sun Jun 16, 2013 8:54 pm
by Michael72
I find support for these Formatting Codes ({...} and \...\) in two DICT applications:
  • xfce4-dict
  • gnome-dictionary
Here's screen shot for xfce4-dict:
Image

If so, do you have a sample dictd file with colors?

The dictionary "The Collaborative International Dictionary of English v.0.51" have these Formatting Codes, which is on the server dict://dict.org (or package called dict-gcide in Ubuntu).

Re: GoldenDict to support colorizing pronunciations

PostPosted: Sun Jun 16, 2013 10:10 pm
by Tvangeste
Thanks for the references, I'll take a look.

Re: GoldenDict to support colorizing pronunciations

PostPosted: Tue Jun 18, 2013 1:29 pm
by Tvangeste
The feature has been implemented:

Image

Re: GoldenDict to support colorizing pronunciations

PostPosted: Tue Jun 18, 2013 3:48 pm
by Michael72
Now GoldenDict not removes the \, Format Code that surrounds the highlighted word.
In my opinion, this makes the output look not cleaner.

Re: GoldenDict to support colorizing pronunciations

PostPosted: Tue Jun 18, 2013 3:57 pm
by Tvangeste
I kinda like those slashes, they provide additional clues and visual separation.

But if you dislike them, you can easily get rid of them via article-style.css file in your configuration folder:

Add the following lines to the CSS file:
Code: Select all
.dictd_phonetic:before, .dictd_phonetic:after
{
  content: "";
}

Re: GoldenDict to support colorizing pronunciations

PostPosted: Tue Jul 02, 2013 8:27 am
by Michael72
I played with it for a while and now I want to let you know what I think.

Some problems:

1) The GoldenDict not want to show an definition for the cross-referenced Greek word.
Currently the definitions for the Hebrew word found when you click on a Hebrew word that was in {}. But it not working for the Greek word. I think I understand why this is happening. The program is too smart and converts Greek characters by their rules, so that the diacritical signs combined with the symbol of the Greek letter to one character.
For example.
The two characters ε and ́ (U+03B5 GREEK SMALL LETTER EPSILON and U+0301 COMBINING ACUTE ACCENT) are converted to a single character έ (U+03AD GREEK SMALL LETTER EPSILON WITH TONOS).
This is not what I expected. I was expect exactly the same principle as is the case with Hebrew. Now I will try to provide repro steps.
Dictionaries: "Греческо-русский лексикон Нового Завета" and "Древнееврейско-русский лексикон Ветхого Завета"
The original word that contains the cross-references: אדם
Try for the cross-referenced words:
  1. Hebrew word that contains diacritical signs. For example: גִּבּוֹר‎
  2. Greek word that contains diacritical signs. For example: ἀνήρ

2) The GoldenDict not want to show an definition for the cross-referenced Hebrew word, when it contains additional diacritical sign.
Databases of DICT dictionaries usually built such when only alphanumeric characters are used for search. GoldenDict uses a different strategy. It turns the difference between the work of GoldenDict and other Dict-clients. For example, when I use Xfce4 Dictionary to lookup the Hebrew word קֹ֫דֶשׁ I get necessary definition. When I do the same thing by GoldenDict, I do not get the expected. Enter the word αγιωσυνη in the search bar and press on the Enter key. Click on the word קֹ֫דֶשׁ, and this clicking not display window containing its definition because of the presence of one additional diacritical sign (U+05AB HEBREW ACCENT OLE). In Dict-client Xfce4 Dictionary no such problem, necessary definition opens under this hyperlink.

Re: GoldenDict to support colorizing pronunciations

PostPosted: Sat Jul 06, 2013 6:35 pm
by Tvangeste
Hi Michael,

The first problem should be fixed in the master repository:
https://github.com/goldendict/goldendict/commit/27c4bf7

Please test and let me know your results.

I haven't looked at the second problem (yet).

Re: GoldenDict to support colorizing pronunciations

PostPosted: Sun Jul 07, 2013 12:51 pm
by Michael72
I can not build the latest GoldenDict source from the Git repository because my system is screwed, but I was instead
able to find a version goldendict-1.5.0-RC-64-g5ca8279 under Wine, which has taken here.
Now the first problem is solved.