aboutsummaryrefslogtreecommitdiff
path: root/ext/js/dictionary/dictionary-importer.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/dictionary/dictionary-importer.js')
-rw-r--r--ext/js/dictionary/dictionary-importer.js20
1 files changed, 2 insertions, 18 deletions
diff --git a/ext/js/dictionary/dictionary-importer.js b/ext/js/dictionary/dictionary-importer.js
index f0c92481..98612d9e 100644
--- a/ext/js/dictionary/dictionary-importer.js
+++ b/ext/js/dictionary/dictionary-importer.js
@@ -615,8 +615,7 @@ export class DictionaryImporter {
*/
_convertTermBankEntryV1(entry, dictionary) {
let [expression, reading, definitionTags, rules, score, ...glossary] = entry;
- expression = this._normalizeTermOrReading(expression);
- reading = this._normalizeTermOrReading(reading.length > 0 ? reading : expression);
+ reading = reading.length > 0 ? reading : expression;
return {expression, reading, definitionTags, rules, score, glossary, dictionary};
}
@@ -627,8 +626,7 @@ export class DictionaryImporter {
*/
_convertTermBankEntryV3(entry, dictionary) {
let [expression, reading, definitionTags, rules, score, glossary, sequence, termTags] = entry;
- expression = this._normalizeTermOrReading(expression);
- reading = this._normalizeTermOrReading(reading.length > 0 ? reading : expression);
+ reading = reading.length > 0 ? reading : expression;
return {expression, reading, definitionTags, rules, score, glossary, sequence, termTags, dictionary};
}
@@ -784,20 +782,6 @@ export class DictionaryImporter {
}
/**
- * @param {string} text
- * @returns {string}
- */
- _normalizeTermOrReading(text) {
- // Note: this function should not perform String.normalize on the text,
- // as it will normalize characters in an undesirable way.
- // Thus, this function is currently a no-op.
- // Example:
- // - '\u9038'.normalize('NFC') => '\u9038' (逸)
- // - '\ufa67'.normalize('NFC') => '\u9038' (逸 => 逸)
- return text;
- }
-
- /**
* @template [T=unknown]
* @param {import('@zip.js/zip.js').Entry} entry
* @param {import('@zip.js/zip.js').Writer<T>|import('@zip.js/zip.js').WritableWriter} writer