From a17a46af8497919c26cc889dfe3007e6e9474ad9 Mon Sep 17 00:00:00 2001 From: Stefan Vukovic Date: Wed, 3 Jan 2024 17:54:08 +0100 Subject: [PATCH] fix tests --- ext/css/display.css | 2 +- ext/js/language/translator.js | 4 ++-- types/ext/dictionary-data.d.ts | 6 +----- types/ext/dictionary.d.ts | 4 +++- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ext/css/display.css b/ext/css/display.css index e44deb944a..6b688886ec 100644 --- a/ext/css/display.css +++ b/ext/css/display.css @@ -809,7 +809,7 @@ button.action-button:active { /* Inflections */ -.inflection-hypotheses{ +.inflection-hypotheses { padding-inline-start: 0; list-style-type: none; } diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js index e5a7440e6b..e1d01e50e3 100644 --- a/ext/js/language/translator.js +++ b/ext/js/language/translator.js @@ -267,8 +267,8 @@ export class Translator { } /** - * @param {import('dictionary-data').InflectionHypothesis} hypothesis1 - * @param {import('dictionary-data').InflectionHypothesis} hypothesis2 + * @param {import('dictionary').Inflections} hypothesis1 + * @param {import('dictionary').Inflections} hypothesis2 * @returns {boolean} */ _areInflectionHyphothesesEqual(hypothesis1, hypothesis2) { diff --git a/types/ext/dictionary-data.d.ts b/types/ext/dictionary-data.d.ts index e5e59e2c9c..0e0edd5c46 100644 --- a/types/ext/dictionary-data.d.ts +++ b/types/ext/dictionary-data.d.ts @@ -93,17 +93,13 @@ export type TermGlossary = ( TermGlossaryString | TermGlossaryText | TermGlossaryImage | - TermGlossaryStructuredContent | - TermGlossaryDeinflection + TermGlossaryStructuredContent ); export type TermGlossaryString = string; export type TermGlossaryText = {type: 'text', text: string}; export type TermGlossaryImage = {type: 'image'} & TermImage; export type TermGlossaryStructuredContent = {type: 'structured-content', content: StructuredContent.Content}; -export type TermGlossaryDeinflection = [formOf: string, InflectionHypothesis: InflectionHypothesis]; - -export type InflectionHypothesis = string[]; export type TermImage = StructuredContent.ImageElementBase & { // Compatibility properties diff --git a/types/ext/dictionary.d.ts b/types/ext/dictionary.d.ts index 6e462ae53e..54172f2a8d 100644 --- a/types/ext/dictionary.d.ts +++ b/types/ext/dictionary.d.ts @@ -255,9 +255,11 @@ export type TermDictionaryEntry = { export type InflectionHypothesis = { source: InflectionSource; - inflections: string[]; + inflections: Inflections; }; +export type Inflections = string[]; + export type InflectionSource = 'algorithm' | 'dictionary' | 'both'; /**