GithubHelp home page GithubHelp logo

goldendict / goldendict Goto Github PK

View Code? Open in Web Editor NEW
5.8K 5.8K 720.0 71.98 MB

A feature-rich dictionary lookup program, supporting multiple dictionary formats (StarDict/Babylon/Lingvo/Dictd) and online dictionaries, featuring perfect article rendering with the complete markup, illustrations and other content retained, and allowing you to type in words without any accents or correct case.

Home Page: http://goldendict.org/

License: Other

C++ 48.22% CSS 1.35% C 47.48% Makefile 0.04% Shell 0.11% QMake 0.32% Objective-C++ 0.38% NSIS 0.42% HTML 1.63% Batchfile 0.05%

goldendict's Introduction

Introduction

GoldenDict is a feature-rich dictionary lookup program, supporting multiple dictionary formats (StarDict/Babylon/Lingvo/Dictd/AARD/MDict/SDict) and online dictionaries, featuring perfect article rendering with the complete markup, illustrations and other content retained, and allowing you to type in words without any accents or correct case.

Requirements

This code has been run and tested on Windows XP/Vista/7, Ubuntu Linux, Mac OS X.

External Deps

  • Make, GCC, Git
  • Qt framework. Minimum required version is 4.6. But Qt 4.7 or 4.8 is recommended.
  • Qt Creator IDE is recommended for development
  • Various libraries on Linux (png, zlib, etc)
  • On Mac and Windows all the libraries are already included in the repository

Installing External Deps on Ubuntu Linux

sudo apt-get install git pkg-config build-essential qt4-qmake \
     libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev \
     libqt4-dev libqtwebkit-dev libxtst-dev liblzo2-dev libbz2-dev \
     libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-dev

Installing External Deps on Ubuntu Linux for Qt5

sudo apt-get install git pkg-config build-essential qt5-qmake \
     libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev \
     qtdeclarative5-dev libxtst-dev liblzo2-dev libbz2-dev \
     libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-dev \
     libqt5webkit5-dev libqt5svg5-dev libqt5x11extras5-dev qttools5-dev \
     qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5-plugins

How to build

First, clone this repository, e.g.:

git clone https://github.com/goldendict/goldendict.git

And then invoke qmake-qt4 and make:

cd goldendict && qmake-qt4 && make

In case when qmake-qt4 does not exist, try using qmake but make sure it is indeed from the Qt 4 installation. On the other hand, if you want to use qt5, make sure that qmake is from Qt 5 installation. If not, you can try finding it at a path like /usr/lib/x86_64-linux-gnu/qt5/bin/qmake. Alternatively, you might want to load goldendict.pro file from within Qt Creator, especially on Windows.

Note: To compile with libhunspell older than 1.5 pass "CONFIG+=old_hunspell" to qmake.

Building with Chinese conversion support

To add Chinese conversion support you need at first install libopencc-dev package:

sudo apt-get install libopencc-dev

Then pass "CONFIG+=chinese_conversion_support" to qmake

qmake "CONFIG+=chinese_conversion_support"

Building with Zim dictionaries support

To add Zim and Slob formats support you need at first install lzma-dev and zstd-dev packages:

sudo apt-get install liblzma-dev libzstd-dev

Then pass "CONFIG+=zim_support" to qmake

qmake "CONFIG+=zim_support"

Building without extra tiff handler

If you have problem building with libtiff5-dev package, you can pass "CONFIG+=no_extra_tiff_handler" to qmake in order to disable extra tiff support (without such extra support some b/w tiff images will not be displayed):

qmake "CONFIG+=no_extra_tiff_handler"

Building without Epwing format support

If you have problem building with libeb-dev package, you can pass "CONFIG+=no_epwing_support" to qmake in order to disable Epwing format support

qmake "CONFIG+=no_epwing_support"

Building without internal audio players

If you have problem building with FFmpeg/libao (for example, Ubuntu older than 12.04), you can pass "CONFIG+=no_ffmpeg_player" to qmake in order to disable FFmpeg+libao internal audio player back end:

qmake "CONFIG+=no_ffmpeg_player"

If you have problem building with Qt5 Multimedia or experience GStreamer run-time errors (for example, Ubuntu 14.04), you can pass "CONFIG+=no_qtmultimedia_player" to qmake in order to disable Qt Multimedia internal audio player back end:

qmake "CONFIG+=no_qtmultimedia_player"

NB: All additional settings for qmake that you need must be combined in one qmake launch, for example:

qmake "CONFIG+=zim_support" "CONFIG+=no_extra_tiff_handler" "CONFIG+=no_ffmpeg_player"

Then, invoke make clean before make because the setting change:

make clean && make

Building under Windows with MS Visual Studio

To build GoldenDict with Visual Studio take one of next library packs and unpack it to "winlibs/lib/msvc" folder in GoldenDict sources folder.
GoldenDict_libs_VS2013_x86_v4.7z - for MS Visual Studio 2013, 32 bit
GoldenDict_libs_VS2013_x64_v4.7z - for MS Visual Studio 2013, 64 bit
GoldenDict_libs_VS2015_x86_v4.7z - for MS Visual Studio 2015, 32 bit
GoldenDict_libs_VS2015_x64_v4.7z - for MS Visual Studio 2015, 64 bit

To create project files for Visual Studio you can pass "-tp vc" option to qmake.

Note: In Qt 5.6.0 and later the Webkit module was removed from official release builds. You should build it from sources to compile GoldenDict.

Installation

Installation is an optional step since the built binary can be used as-is without installation. But you can properly install via:

make install

NB: Don't do that on Windows!

You can uninstall via:

make uninstall

License

This project is licensed under the GNU GPLv3+ license, a copy of which can be found in the LICENSE.txt file.

Support

Users looking for support should file an issue in the official GoldenDict issue tracker, or even better: submit a pull request if you have a fix available. General questions should be asked on the official GoldenDict forum.

goldendict's People

Contributors

0x1997 avatar abs62 avatar alexandrocasanova avatar chulai avatar dinvlad avatar dragonroot avatar embar- avatar gd-fix avatar hosiet avatar hrimfaxi avatar hyln9 avatar ibragimov avatar jjzz avatar jose1711 avatar kyleskimo avatar ozzii avatar passw avatar proletarius101 avatar quendimax avatar sikmir avatar sukruyekta avatar timonwong avatar tvangeste avatar vedgy avatar virtualtam avatar vtliem avatar wlhunag avatar xiaoyifang avatar xvitaly avatar zdenop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goldendict's Issues

Can't scan all of my dictionaries..

I use Arch Linux. I have about 50 dictionaries. I use goldendict on winXP, and it works fine, i scanned every one..
I have a problem, which allows only few(ten, maybe) dictionaries to be scanned(added)...
What to do ? If you need more info, please tell....

In Asian dictionaries look up (while clicking the mouse) does not work

Platform Windows 7, 64 bit.

For dictionaries of asian languages (Chinese, Japanese, Thai , etc.) if clicking the mouse on the word in the dictionary ,
that searched in the dictionary only two letters of word, but not selected words.

For example, for แก้ไข will search ก้ or ไข (depending on mouse position).

Samples of dictionaries can be found https://sites.google.com/site/thaidictproject/ or http://www.yaru.info/skachat.html

Adding new pronunciation engines

**Problem :-

  • GoldenDict has only one pronunciation engine which is Forvo, which faces many issues like sound quality, noise, lack of pronunciation standards.

**Suggested Solution :-

  • Add more reliable pronunciation engines like Google's Dictionary and The Free Dictionary; their resources are available for unlimited free access.

**More Details :-
1- Google Dictionary:

2- The Free Dictionary:

3- Google Translate TTS engine:

Headword wildcard search is needed

Typical wildcard search for the headwords would be very useful. Here's how Lingvo does it:

“?” replaces any letter (including a blank).
“*” replaces any sequence of letters (including blanks).

Example:

f?llow
This wildcard matches the words fellow, follow, fallow, etc.

summ*r
This wildcard matches the words summer, summator, etc., as well as the phrases summable filter, summing counter, etc.

bgl dict display incorrect

Before using GD, I used babylon as multilanguage dictionary program.
Some bgls were displayed fine in babylon but not in GD.
Detail:
GD:v1.01/v1.01-68.xxx (lasted build for windows)
OS:windows 7 utimate x64

1/mydictionary1.bgl(kanji-Vietnamese): http://www.box.net/shared/dmqdxanhgz
Babylon:
http://i9.photobucket.com/albums/a69/thumoibiet/Goldendict/babylonhanvietsf6.jpg
GD:
http://i9.photobucket.com/albums/a69/thumoibiet/Goldendict/hanviet.png

2/CV (Chinese-Vietnamese)
http://www.mediafire.com/download.php?qdkgnbymdix
http://www.mediafire.com/download.php?jmvktz5rx2b

Babylon:
http://kuas.files.wordpress.com/2008/07/072008-1147-tintrung2.png
GD:
http://i9.photobucket.com/albums/a69/thumoibiet/Goldendict/ct.png

Sorry for my English!

Better history support

I would like to suggest a feature that allows the user to have better control of the history, e.g.,

  • import, export and browse the search history
  • bookmark and make notes on a word, a sentence or a paragraph

I believe people would benefit a lot from that.

Thanks a lot for the hard work!

Feng

show longest match in scan popup / lookup from clipboard

With ideographic languages (i.e. Chinese), if l select a group of characters to lookup, I need GoldenDict to show me the longest possible match available. As an example, perhaps I am reading "中文字", which means "Chinese character", or "Chinese writing". This three-character compound is not in my dictionary, but when I select all three characters, I would like to see the entry for "中文", "Chinese (language)". The point is that I usually don't know whether a cluster of characters is a phrase which has it's own entry, or whether I have to figure the meaning out from the meanings of the constituents myself.

The behaviour I'm describing is the way the pop-up works on StarDict, and is the only reason why I use StarDict all day every day, and only rarely start GoldenDict. GoldenDict is superior in pretty much every respect, but this is a key part of the way I work, and so it's a deal-breaker for me.

Thanks for the consideration.

Dictionaries buttons status doesn't match the buttons status of the scan mode

In my opinion this is a bug:

The buttons status shown the toolbar (pressed or not) of the "Interface mode", doesn't match the button status shown on the toolbar of the "Scan mode". So, if I have two dictionaries and in the Interface mode I press on button and lift the other, when I pass to the scan mode, I expect to find the same button status but unfortunally I see that any buttons is pressed.

Cheers

Floating dictionary bar crash GoldenDict on restart

if the dictionary bar is left floating, GoldenDict cannot be restarted. Debugging shows a segmentation fault at line:
"ArticleView & view = dynamic_cast< ArticleView & >( *( ui.tabWidget->currentWidget() ) );" of mainwindow.cc

Workaround: Delete ... from the config file.

Translate line should select all on mouse click that brings focus

That's the standard behavior in all browsers, and makes perfect sense for GoldenDict as well.

In 99.99% of cases users, when they go to the translate line, they would like to enter a NEW word to translate, and deleting the old one is just an annoying extra step.

Ctrl-Tab is invalid

Hi all. I noticed that I can use Tab to navigate, but Ctrl-Tab didn't work as expected (i.e. reverse navigation). Please add this function, especially with the new feature "Dictionaries Pane", in that case I'd like to use Ctrl-Tab to quickly access the pane without running through all the hotspots in the dic text. Thanks very much.

High cpu usage

Version 1.0.1-223-g81ee55a
Platform WIndows 7, 64 bit

Active GoldenDict 's window cause for 47-50% CPU usage

I checked release 1.0.1-210-gfb179ac has not bug.

Desktop search integration

It would be useful to integrate Google Desktop search in GoldenDict.
Probably the only desktop search that can be integradted easily is Google desktop search as the others (such as Copernic) uses its own interface.
The google desktop search API offers this solution, as far as I understand:
http://code.google.com/intl/en-EN/apis/desktop/

UTF-8 Ifo file

GoldenDict currently doesn't support ifo file which is encoded in UTF-8. This kind of ifo file is created by StarDict Editor v3.03. Below code fails

if ( f.gets() != "StarDict's dict ifo file" ||
       f.gets().compare( 0, versionEq.size(), versionEq ) )
    throw exNotAnIfoFile();

possible solutions is to change to

  if ( QString::fromUtf8(f.gets().c_str()) != "StarDict's dict ifo file" ||
       f.gets().compare( 0, versionEq.size(), versionEq ) )
    throw exNotAnIfoFile();

Printing is broken

Users reported that GD prints only question marks for them.

For me, GD produces just empty pages with no content at all. Clearly, the printing functionality is broken.

icon set for Linux/KDE

I’ve created the icon set for KDE. There are some minor problems, but I’ll cover them in other threads.

Instruction:
• download and unzip the archive
• go to goldendict source and paste files from the unpacked archive to appropriate folders

link:
http://dl.dropbox.com/u/1220038/icons.zip

Please consider updating the copyright notices to reflect the new mailing address of the Free Software Foundation

The Free Software Foundation is no longer at 675 Mass Ave, Cambridge, MA.

Our new address is 51 Franklin Street, Suite 500, Boston, MA 02110.

You can confirm this for yourself here: http://www.fsf.org/about/contact/

Please update all references to our old address in your code so people can continue to contact us (we haven't been at the old address for more than a decade at this point)

Kind regards,

matt

Matt Lee
Campaigns Manager
Free Software Foundation

GoldenDict can't handle certain dictionary filenames

At least on Windows. Let's say, I have a Russian locale. And any dictionary's file name with umlauts is completely ignored by GD.

For example, testüö.dsl, or test朗.dsl. Looks like GD stores all the dictionary file names in standard strings, first converting to them via toLocal8Bit(), which can't handle those symbols that are outside of the current locale.

There are some comment notes in dictionary.cc about desire to be Qt-neutral and not using any Qt stuff, but the code still has some Qt dependencies already. Maybe, the names should be stored as QStrings then?

Show the most suitable result in popup scanning!

When I scan words with suffix or prefix, goldendict returns a list of close words. Such as, I scan word: nations, it'll return a list of close words (nation, national, nationality,...). I think it would more efficient if goldendict returned result of "nation", because "popup scanning" is a quick scan, I think :D. If possible please add a option for this issue. Thanks and sorry for my bad English.

Proper popup position for multimonitor boxes.

In some cases popup window is divided by different monitors. This makes popup hard to read. Could you position popup entirely at the screen where the mouse pointer is?

for information:
I have TwinView configuration with one screen device shared among two monitors.

the icon doesn’t appear in the KDE’s taskbar

This doesn’t work both in stable 1.0.1 version and latest trunk version. Maybe this will be helpful:

install -m 755 -p "goldendict" "/usr/local/bin/goldendict"
strip "/usr/local/bin/goldendict"
install -m 755 -p /home/wojtek/Pobieranie/git/goldendict/redist/icons/goldendict.png /usr/local/share/pixmaps/
strip /usr/local/share/pixmaps/goldendict.png
strip:/usr/local/share/pixmaps/goldendict.png: File format not recognized
make: [install_icons] Error 1 (ignored)
install -m 755 -p /home/wojtek/Pobieranie/git/goldendict/redist/icons/goldendict.png /usr/local/share/app-install/icons/
strip /usr/local/share/app-install/icons/goldendict.png
strip:/usr/local/share/app-install/icons/goldendict.png: File format not recognized
make: [install_icons2] Error 1 (ignored)
install -m 755 -p /home/wojtek/Pobieranie/git/goldendict/redist/goldendict.desktop /usr/local/share/applications/
strip /usr/local/share/applications/goldendict.desktop
strip:/usr/local/share/applications/goldendict.desktop: File format not recognized
make: [install_desktops] Error 1 (ignored)
install -m 755 -p /home/wojtek/Pobieranie/git/goldendict/redist/goldendict.desktop /usr/local/share/app-install/desktop/
strip /usr/local/share/app-install/desktop/goldendict.desktop
strip:/usr/local/share/app-install/desktop/goldendict.desktop: File format not recognized
make: [install_desktops2] Error 1 (ignored)

Complex script font rendering doesn't work properly for headwords (bold)

For languages using complex scripts, the letters in the word being looked up (bold headword) do not shape (join) correctly. This looks like the rendering you get when the OpenType look ups in the font are not being applied. Complex script letters in the article below the headword and in the word list in the left column are shaped properly.

Perhaps this is related to the bold attribute applied to the headword. Many complex scripts do not have bold, italic and bold-italic variants of fonts available - and if a bold font is not available, this attribute is then generated by the rendering system. Could this be preventing the OpenType lookups being applied?

(GoldenDict 1.0.1 on Windows)

Dictionary bar segfault.

When I drag dictionary bar away from main window as shown at this screenshot: (the dictionary bar is deattached from the main window)
http://imageshack.us/photo/my-images/52/goldenbug.png/
And then if program is closed at this state, next run will cause segmentation fault :(

I figured out the difference in config files between attached and deattached states:
1)
AAAA/wAAAAH9AAAAAAAAAi0AAAGTAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAQAAAAEAAAAaAGQAaQBjAHQAaQBvAG4AYQByAHkAQgBhAHICAAAAAP////8AAAAAAAAAAA==
AdnQywABAAAAAAJ2AAAAQgAABKIAAAHUAAACdgAAAEIAAASiAAAB1AAAAAAAAA==
AAAA/wAAAAH9AAAAAQAAAAAAAADMAAAB0PwCAAAAAfsAAAAUAHMAZQBhAHIAYwBoAFAAYQBuAGUBAAAANgAAAdAAAACIAP///wAAAboAAAHQAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAIAAAAUAG4AYQB2AFQAbwBvAGwAYgBhAHIBAAAAAP////8AAAAAAAAAAAAAABoAZABpAGMAdABpAG8AbgBhAHIAeQBCAGEAcgEAAAE7/////wAAAAAAAAAA

AAAA/wAAAAH9AAAAAAAAAAAAAAAAAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAQAAAAEAAAAaAGQAaQBjAHQAaQBvAG4AYQByAHkAQgBhAHICAAAAAP////8AAAAAAAAAAA==
AdnQywABAAAAAAJ2AAAAQgAABKIAAAHUAAACdgAAAEIAAASiAAAB1AAAAAAAAA==
AAAA/wAAAAH9AAAAAQAAAAAAAADMAAAB0PwCAAAAAfsAAAAUAHMAZQBhAHIAYwBoAFAAYQBuAGUBAAAANgAAAdAAAACIAP///wAAAboAAAHQAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAIAAAAUAG4AYQB2AFQAbwBvAGwAYgBhAHIBAAAAAP////8AAAAAAAAAAAAAABoAZABpAGMAdABpAG8AbgBhAHIAeQBCAGEAcgEAAAE7/////woBBx0AH4Gz
AdnQywABAAAAAAJTAAAAygAABOcAAAL/AAACVwAAAOIAAATjAAAC+wAAAAAAAA==

My system is archlinux with QT 4.7.4

Character "œ" not handled properly (at least in .bgl dictionary)

"œ" is used in french in words such as cœur (heart) or œil (eye).
I use babylon dictionaries in GD. In babylon the words are displayed just fine, but in GD I will get "il" instead of "œil" from the [English->french] when I type in "eye", and there isn't any way to get the [French->english] translation of œil (neither "œil" nor 'il' will work).
It seems to be related to the .bgl format since I get regular results from wikipedia if I add the french search engine manually, but nothing if I use the .bgl dictionary.

Full-text search

There is currently no full-text search feature. This has been requested many times in the discussion board.

Popup window

Often popup windows doesn't apper.
The previous release works without any problems.
I tried in Foxit Reader.

Strange "Speech" dictionary behaviour when using DirectShow mode in WinXP

When DirectShow mode is checked in sound preferences (to use Forvo sounds), sounds in built-in "Speech" dictionary are played wrong: sometimes the same word is played again and again while new words are opened, or just scraps of a word, or just noise.
Forvo sounds seem to work well though.

GoldenDict 1.0.1, WinXP SP3, DirectX 9.0c

use standard icon sizes

Standard icon sizes should be used. Now many icons are used twice – one in original size and the other in scaled one. This produces an ugly effect of losing quality.

Standard icons may be:
16×16, 22×22, 32×32, 48×48

Anytime you want to use smaller size, plase do use native size, not scale an icon as you are doing now.

You could use different folders – as those mentioned above, for different sizes.

New shortcuts to navigate output page

For example:
Ctrl+Up navigate output page up 1 pixel
Ctrl+Down navigate output page down 1 pixel
Ctrl+PageUp navigate output page up 1 page
Ctrl+PageDown navigate output page down 1 page

command line version

in addtion to the gui interface would it be possible to adapt the existing code to provide a cli interface ?

stardict has one, called sdcv, http://en.wikipedia.org/wiki/Sdcv

This is something tremendously useful, for use in scripts, and integrate with text processing utilities (grep, awk sed etc)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.