Menu

#545 OmegaT displays some stardict dictionaries in ugly way

6.1
closed-invalid
5
2024-02-04
2012-11-07
Anonymous
No

OmegaT displays stardict dictionaries created by makedict with lot's of extra spaces.

Steps to reproduce:

Create a small dictionary in DSL format (you can use dsl-dic.dsl and dsl-dic.ann from the attachment as an example).

Convert it to stardict format with makedict, as described here:
http://code.google.com/p/stardict-3/wiki/ConvertLingvo
( $ ./makedict -i dsl -o stardict ./dsl-dic.dsl )

Add the resulted dictionary to sample OmegaT project.

What was expected:

Articles in dictionaries pane in a clean form (as they are shown in stardict itself), like:
term - translation1
translation2

What I saw instead:
term - term
translation1

translation2

translation3

I've created another sample stardict dictionary, now with stardict-editor tool (I've just compiled st-editor-dic.txt from the attachment), and OmegaT displayed it in a perfect way! On the screenshot (Screenshot-OmegaT-2.6.1_1 :: sample-omt-project.png) you can see the difference of OmegaT handling of 2 stardict dictionaries with the same content, one converted from DSL by makedict (that with ugly spaces between lines) and one converted with stardict editor (the one, displayed neatly, with no extra newlines). On the contrary, stardict displays the content of these dictionaries identically (Screenshot-StarDict.png).

OmegaT 2.6.1_1, Debian GNU/Linux stable, OpenJDK 1.6.0_18

Description of attached files:
dsl-dic.dsl and dsl-dic.ann - sample dictionary in DSL format
stardict-dsl-dic-2.4.2.tar.bz2 - the result of compilation of DSL dict to stardict format with makedict 0.4.1-beta1
st-editor-dic.txt - sample tab separated file for conversion to stardict dictionary with stardict-editor
st-editor-dic.tar.bz2 - the result of compilation of tab separated file to stardict format with stardict-editor
Screenshot-StarDict.png - sreenshot of stardict showing an article from both dictionaries identically
Screenshot-OmegaT-2.6.1_1 :: sample-omt-project.png - screenshot of OmegaT showing an articles from these two dictionaries differently

Discussion

  • Hiroshi Miura

    Hiroshi Miura - 2024-02-04
    • assigned_to: Hiroshi Miura
    • Group: --> 6.1
     
  • Hiroshi Miura

    Hiroshi Miura - 2024-02-04

    I can reproduce the situation, and you can improve your UX with an option, Preference > Dictioanry > Compact mode that show articles in concise way.

     
  • Hiroshi Miura

    Hiroshi Miura - 2024-02-04

    The issue is observed with stardict-dsl-dic-2.4.2 dictionary that is made from DSL dict by makedict 0.4.1-beta1.

     
  • Hiroshi Miura

    Hiroshi Miura - 2024-02-04

    The tool mkaedict seems made as a part of XDXF project from a description of the tool wiki page.

    We will use makedict, a part of XDXF project, to perform conversion.
    1. Get makedict source code
    Get the latest source of makedict from xdxf repository.
    2. You'll get makedict subdirectory with makedict source code.
    3. Build makedict

    Stardict have an internal format, TEXT, HTML , XDXF or others. Because you use XDXF tool to convert, the file may be created with XDXF format.

    When you create stardict filie from TSV, the result has internal format TEXT.

     
  • Hiroshi Miura

    Hiroshi Miura - 2024-02-04

    The bug is reported on OmegaT 1.6.
    OmegaT 6.0.1 and 6.1.0 or later use new stardict parser and XDXF processor. It handles properly each internal formats.
    The observation is same as the screen capture here,

    By observed with debugger, I found the problematic dictionary has a XDXF content

    <html>
     <head></head>
     <body>
      <k>
       sentence
      </k>
      <blockquote>
       lots of meaningless words
      </blockquote>
      <blockquote>
       in english or some other language
      </blockquote>
      <blockquote>
       with absolutely no meaning
      </blockquote>
     </body>
    </html>
    

    and we show it on the dictionary pane in default as

    <div><blockquote style="display: block;margin-left: 20px;">
     lots of meaningless words
    </blockquote>
    <blockquote style="display: block;margin-left: 20px;">
     in english or some other language
    </blockquote>
    <blockquote style="display: block;margin-left: 20px;">
     with absolutely no meaning
    </blockquote></div>
    

    You can see blockquote in the contents, that make space between words

     
  • Hiroshi Miura

    Hiroshi Miura - 2024-02-04

    When compact mode is enabled, OmegaT 6.1.0 handles it as <span>lots of meaningless words in english or some other language with absolutely no meaning</span>

     
  • Hiroshi Miura

    Hiroshi Miura - 2024-02-04
    • status: open --> closed-invalid
     
  • Hiroshi Miura

    Hiroshi Miura - 2024-02-04

    This is not a problem on OmegaT but on the convert tool .
    OmegaT 6.0.1 and later provide a solution to use compact mode.

     
  • Hiroshi Miura

    Hiroshi Miura - 2024-02-04

    Your DSL source is bad.

    sentence
        [m1]lots of meaningless words[/m]
        [m1]in english or some other language[/m]
        [m1]with absolutely no meaning[/m]
    

    It defined THREE meanings of word. You want these as single description, so you should make file to be like

    sentence
        [m1]lots of meaningless words
        in english or some other language
        with absolutely no meaning[/m]
    
     

Log in to post a comment.