lk-collocations-feature #8

Merged
lkavcic merged 6 commits from lk-collocations-feature into master 2020-09-15 06:20:57 +00:00
2 changed files with 6 additions and 3 deletions
Showing only changes of commit 8802a09c9c - Show all commits

View File

@ -30,7 +30,7 @@ all: build
build: copy $(CSS_FILE) bundle.js local.js
transcrypt: $(RES_PY_FILE) $(TS_BUILD)
transcrypt $(TS_FLAGS) $<
python3 -m transcrypt $(TS_FLAGS) $<
bundle.js: transcrypt $(CONV_FILE)
cd ..; browserify $(BR_FLAGS) build/$(TS_BUILD)/main.js -o build/bundle.js

View File

@ -144,6 +144,9 @@ class SkeModal(ClickMessage):
if not data[0].gf2_check and type(data[0]) is SkeExample:
# we get the data, we have to match it with available data on our gf2 examples API
match_gf2_examples(data, page_num, search_term, ske_index)
elif type(data[0]) is SkeCollocation:
data.sort(key= lambda x: x.structure_name)
data = [x for x in data if x.structure_name is not "N/A"]
model.modal_set(lambda: modals.ske_list(
search_term, data, page_num, model.entry.senses, model.ske.request_kinds))
@ -238,7 +241,7 @@ class SkeInsert(DataChgClickMessage):
lex_mid = ComponentLexeme()
lex_mid.text = example["mid"]
lex_mid.role = "collocation"
lex_mid.role = "headword"
lex_right = ComponentLexeme()
lex_right.text = example["right"]
@ -263,7 +266,7 @@ class SkeInsert(DataChgClickMessage):
lex_mid = ComponentLexeme()
lex_mid.text = example.word
lex_mid.role = "collocation"
lex_mid.role = "collocate"
lex_right = ComponentLexeme()
lex_right.text = ""