Apache OpenOffice (AOO) Bugzilla – Issue 33726
on-screen picking dictionary translation
Last modified: 2017-05-20 11:29:42 UTC
OOo doesn't have one quite useful feature yet. That's supporting on-screen picking up words and translation of electronic dictionaries. Especially in China, KingSoft iCiba Dictionary is quite spreaded all over the country, and it could pick up English words in programs on Windows and translate them into Chinese with one popup tip window, just as in the attachment. It can't pick up words from OOo, but from MSO, and many other ordinary Windows programs. I roughly browsed relative materials and found that this kind of on-screen picking up dictionaries, almost all use Windows API Hook functions, and four functions as " TextOutA,TextOutW,ExtTextOutA,ExtTextOutW" in gdi32.dll and perhaps certain conversion function like WideCharToMultiByte. I think perhaps other dictionaries need also this feature if users want to pick up words of foreign languages and translate them online. Correspondingly, there's one English & Chinese dictionary "StarDict" on UNIX and UNIX-like OSs. StarDict 2 is writen with Gtk+ ( StarDict was writen with Motif), and it calls X-Window message to transfer the mouse position and output string. StarDict is trying to imitate KingSoft iCiba dictionary. If OOo could support on-screen picking up words by electronic dictionaries, it could improve its application greatly.
Created attachment 17496 [details] KingSoft iCiba Dictionary
Created attachment 17497 [details] StarDict based on Gtk+
Created attachment 17498 [details] KingSoft iCiba Dictionary pickes up a word in Microsoft Word
TM->BH: Please have a look, thanks !
HLI : This feature is very important , hope can be developed asap .
FT: I'll take over since I'm taking care of G11N issues.
FT: For further investigation I need copnfirmation that both mentioned tools do not work with OO.org 2.0 EA. Waiting for feedback for the moment.
Created attachment 17591 [details] StarDict 2.0 works with OOo 2.0 EA on Linux
Created attachment 17592 [details] StarDict 2 works with OOo 2.0 EA on Windows
glu: I attched two screenshots of StarDict 2.4.3 with OOo2.0/SO8 EA. Actually it works well with OOo/SO. StarDict is based on Gtk2+ libraries, and it can run on Linux, FreeBSD, Solaris and Windows. It's homepgae is at http://stardict.sourceforge.net/. Its picking-word style is different from KingSoft iCiba, much simplier than it. On Linux/x86, after users select certain words and then StarDict pops up one float tip showing the translation phrases. On Windows it brings along with GTK runtime environment 2.2.4, and there's one bug (probably) currently so that the floating tip doesn't show once words are selected. They can get the translation phrases by pressing "ctrl+c" after words are selected. I think its scheme is involving in copy & paste clipboard of various window systems. KingSoft iCiba does much better than it. Once users move their mouses across or onto words, the floating tip window pops up showing the translation phrases. Users need not press any key or select the words. Several 3rd-party Chinese materials say that it utilizes Windows API hook functions, but not very clear. There's one electronic dictionary - Clicktionary at http://www.cleverlearn.com/en/clicktionary.jsp , translating words easily from English to German, English to Chinese, and English to Vietnamese. You may download a free copy there. Its picking words style is similiar to StarDict, firstly selecting words and then click right button of mouse. Maybe you can take it as a reference. But Clicktionary doesn't work with OOo/SO either.
Created attachment 17609 [details] StarDict1.31 works with SO7 PP2 on Solaris/Sparc
Created attachment 17610 [details] StarDict1.31 on Solaris/Sparc is based on Motif.
FT: OK, for StarDict no work is required but I learned the iCiba appearantly doesn't work. Since we do not have expertise in Chinese tools here in Hamburg/Germany I need to forward this issue for tesing implementation to Karl Hong. From what I can see is that OO.o does not recognise Windows API standards for read-out text. Karl: Please refer to Hercule Li (hercule.li@sun.com) for testing and tooling. Thx. Note: Please implement this to 2.0 only if small changes and little effort is needed!
.
add deuce into cc list.
Two Chinese webpages are helpful perhaps: 1) http://www.yourblog.org/Data/20044/39680.html 2) http://www.18ie.com/pmzhz.php
I have got a copy of iCiba and downloaded Clicktionary, both of them do not work on OpenOffice. The reason may be that, as mentioned by glu, the MS API those applications used is on text level (TextOut*), while OO use the API in glyph level, which is required by glyph fallback feature. I will forward the issue to Graphic System Layer Project for further evaluation.
I checked the websites for iCiba and Clicktionary but could not find any details about what API they rely on. Can somebody provide concrete details ? Recent versions of OpenOffice.org and StarOffice do not use the standard text output but the standard glyph output routines to display textual information on screen or on printer. This will not change in the forseeable future. If iCiba and Clicktionary rely on TextOut* API then they will not work with our product any time soon. They should fix their product to rely on standard APIs for querying text, like for example the accessibility API. Using the Text API would break important features like glyph fallback on Windows (except for XP) and CTL and the effort is in the magnitude of several man month, not even close to being appropriate.
I checked iCiBa with SoftICE and found that they at least rely on ExtTextOutW, including menu, button, text, etc. all standard Windows application use ExtTextOutW including Open dialog in OpenOffice( Windows version ) can be available for on-screen picking up. since KingSoft( producer of iCiBa ) is competiter of OpenOffice.org based Office Suite, they will not provide their patch for OpenOffice.org in their product.:-(.
Well, we are using ExtTextOutW, but nowadays mostly with the ETO_GLYPH_INDEX flag. This means that the text is already translated into glyph indices which are a little harder to digest for hooked in functions than their unicode counterparts...
iCiba is almost the monopoly electronic dictionary in China, or Great China, KingSoft is its provider, whom you may know for its cooperation with old WPS file formats with OOo, also provides its own office suite software, WPS Office. So in this way, if OOo can't support KingSoft iCiba, it will show a great disadvantage in comparison with KingSoft WPS Office, and MSO. This feature is asked by major Chinese users of OOo for a long time too. Can we make any working-around way to implement it? Thanks.
can you check wether it works with StarOffice 6, respectively on Windows 98 ?
I tried Chinese StarSuite 6 PP3 on Window XP and Simplified Chinese Window 98, iCiba does not work for SS6 on both platforms. Other applications work fine on both of them.
ok, it seems that just having an ExtTextOut / Text based API is not sufficient. Since we don't have enough information about what's really required to make this feature work and we don't have enough time befor beta to investigate into it I retarget this to Office Later.
cp->ssa: request for enhancement, please take over
SSA: reassign to HDU
Reset assigne to the default "issues@openoffice.apache.org".