diff options
author | StefanVukovic99 <stefanvukovic44@gmail.com> | 2024-06-03 19:25:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-03 17:25:51 +0000 |
commit | 7955fc85ac089d856b44bdea78eccd26ffbd690c (patch) | |
tree | 6a7cfc6464612f9f129b25fa59a46f9c7c0e72b5 /ext/js/display/display-generator.js | |
parent | d2fce502ecb00e3c9202295c93fbb8c554ddbd69 (diff) |
display inflection rule descriptions (#1000)24.6.3.0
* load descriptions in deinflector
* description functions in deinflectors
* show descriptions in title
* use toaster
* use names without internal
* css lint
* reformat transform descriptors
* fix merge errors
* done?
* rename method
Diffstat (limited to 'ext/js/display/display-generator.js')
-rw-r--r-- | ext/js/display/display-generator.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/js/display/display-generator.js b/ext/js/display/display-generator.js index 6236f749..be87761b 100644 --- a/ext/js/display/display-generator.js +++ b/ext/js/display/display-generator.js @@ -401,14 +401,16 @@ export class DisplayGenerator { } /** - * @param {string} inflection + * @param {import('dictionary').InflectionRule} inflection * @returns {DocumentFragment} */ _createTermInflection(inflection) { + const {name, description} = inflection; const fragment = this._templates.instantiateFragment('inflection'); const node = this._querySelector(fragment, '.inflection'); - this._setTextContent(node, inflection); - node.dataset.reason = inflection; + this._setTextContent(node, name); + if (description) { node.title = description; } + node.dataset.reason = name; return fragment; } |