aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display/display-generator.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/display/display-generator.js')
-rw-r--r--ext/js/display/display-generator.js8
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;
}