Closed soshial closed 1 year ago
Can you upload a glossary for target=
?
Sure. Here's an official dictionary by ABBYY about sport: SportRuEn.zip
These links should open not "баскетбол" gloss but "баскетбол (команды судей)" gloss:
команды судей
[m1][i][trn][com]referee's commands[/com][/trn][/i][/m]
[m1][trn][ref target="баскетбол (команды судей)"]баскетбол[/ref][/trn][/m]
[m1][trn][ref target="бокс (команды судей)"]бокс[/ref][/trn][/m]
[m1][trn][ref target="волейбол (команды судей)"]волейбол[/ref][/trn][/m]
[m1][trn][ref target="гребной спорт (команды судей)"]гребной спорт[/ref][/trn][/m]
[m1][trn][ref target="дзюдо (команды судей)"]дзюдо[/ref][/trn][/m]
[m1][trn][ref target="лёгкая атлетика (команды судей)"]лёгкая атлетика[/ref][/trn][/m]
[m1][trn][ref target="теннис (команды судей)"]теннис[/ref][/trn][/m]
[m1][trn][ref target="тяжёлая атлетика (команды судей)"]тяжёлая атлетика[/ref][/trn][/m]
[m1][trn][ref target="стрельба (команды судей)"]стрельба[/ref][/trn][/m]
[m1][trn][ref target="фехтование (команды судей)"]фехтование[/ref][/trn][/m]
I saw this commit 74e736482239d, but it didn't fix the problem:
I added a great test file by @yozhic, that has all possible combinations of ref targets and headwords. This is a great dictionary to test that all links are valid.
Forget about [ref dict="..."]
for now.
I pushed to branch dsl-tag-attrs
.
Please test target=
for ref
/ url
.
Thanks.
It looks pretty great! I was surprised the code needed so much new code -- this was mainly to support attribute parsing?
Yes.
Pushed to master.
Where do you download these dsl files? Are there any in English?
I downloaded an official distribution of ABBYY Lingvo x6 and there were many dictionaries included, that were created by ABBYY themselves. Since it's a Russian business almost all their dictionaries were from/to Russian to/from other language.
Also, I have translated this test file for you: https://github.com/soshial/pyglossary-test/blob/dsl-ref-target/dsl/009-headwords-and-ref.dsl
Where do you download these dsl files? Are there any in English?
Which DSL files? Do you mean where I get those test ones or just general DSL for my personal usage?
Both.
Please test handling of parenthesis and curly brackets in title line.
One thing that should be improved (see updated test file):
#NAME "Dictionary: formatted headwords (En-En)"
#INDEX_LANGUAGE "English"
#CONTENTS_LANGUAGE "English"
{[c slategray]}{to }{[/c]}tell {[c violet]}smb{[/c]} {[u]}how{[/u]} to do {[c violet]}smth{[/c]} {[sub]subscript[/sub]}
[m1]1. main meaning[/m]
[m2]a. first submeaning[/m]
[m2]b. second submeaning[/m]
test link
[ref]tell smb how to do smth[/ref]
Speaking of rounded brackets ( )
headword with (brackets)
should generate 2 headword: headword with brackets
and headword with
. Your headword include brackets, while they should not.
I currently cannot test via Slob output , because this lib is broken versions temporarily. I can test using HtmlDir, but crosslinks between cards are broken at the moment.
Please try again.
It's great now! Thank you so much!
I think we already cover all these cases.
Yes we do, but I specially translated 009-headwords-and-ref.dsl
test file from Russian to English for you.
I guess we may now delete the DSL-related branches that are not needed anymore.
Other variants of this tag:
[ref dict="Persian Idioms (Fa-Fa)"]Dastam be dâmanet[/ref]
by its ID as in #NAME field[url target="www.yandex.ru"]yaru[/url]
<a>
href attribute):[ref target="take"]to take off[/ref]
Also, we should support brackets (that optional part of the headword):
The card should be opened by different combinations: вращать | превращать | вращаться | превращаться
Mentioning such gloss should be done omitting the brackets:
[ref]вращать[/ref]
Articles that have escaped brackets in headword:rounded brackets \( or \)
should be referenced as[ref]rounded brackets ( or )[/ref]