diff --git a/ext/js/language/la/latin-text-preprocessors.js b/ext/js/language/la/latin-text-preprocessors.js index 0a115f461..1a8a8ab09 100644 --- a/ext/js/language/la/latin-text-preprocessors.js +++ b/ext/js/language/la/latin-text-preprocessors.js @@ -16,20 +16,18 @@ */ /** @type {import('language').BidirectionalConversionPreprocessor} */ -export const processDiphtongAE = { +export const processDiphtongs = { name: 'Convert æ to ae', - description: 'æ → ae, Æ → AE, ae → æ, AE → Æ', + description: 'æ → ae, Æ → AE, œ → oe, Œ → OE', options: ['off', 'direct', 'inverse'], process: (str, setting) => { switch (setting) { case 'off': return str; case 'direct': - return str.replace(/æ/g, 'ae').replace(/Æ/g, 'AE'); + return str.replace(/æ/g, 'ae').replace(/Æ/g, 'AE').replace(/œ/g, 'oe').replace(/Œ/g, 'OE'); case 'inverse': - return str.replace(/ae/g, 'æ').replace(/AE/g, 'Æ'); + return str.replace(/ae/g, 'æ').replace(/AE/g, 'Æ').replace(/oe/g, 'œ').replace(/OE/g, 'Œ'); } }, - - }; diff --git a/ext/js/language/language-descriptors.js b/ext/js/language/language-descriptors.js index 5547d3bc1..85976621d 100644 --- a/ext/js/language/language-descriptors.js +++ b/ext/js/language/language-descriptors.js @@ -37,7 +37,7 @@ import {japaneseTransforms} from './ja/japanese-transforms.js'; import {isStringPartiallyJapanese} from './ja/japanese.js'; import {disassembleHangul, reassembleHangul} from './ko/korean-text-processors.js'; import {koreanTransforms} from './ko/korean-transforms.js'; -import {processDiphtongAE} from './la/latin-text-preprocessors.js'; +import {processDiphtongs} from './la/latin-text-preprocessors.js'; import {latinTransforms} from './la/latin-transforms.js'; import {removeRussianDiacritics, yoToE} from './ru/russian-text-preprocessors.js'; import {oldIrishTransforms} from './sga/old-irish-transforms.js'; @@ -207,7 +207,7 @@ const languageDescriptors = [ textPreprocessors: { ...capitalizationPreprocessors, removeAlphabeticDiacritics, - processDiphtongAE, + processDiphtongs, }, languageTransforms: latinTransforms, }, diff --git a/types/ext/language-descriptors.d.ts b/types/ext/language-descriptors.d.ts index 9fd5df095..82c46acb3 100644 --- a/types/ext/language-descriptors.d.ts +++ b/types/ext/language-descriptors.d.ts @@ -130,7 +130,7 @@ type AllTextProcessors = { }; la: { pre: CapitalizationPreprocessors & AlphabeticDiacriticsProcessor & { - processDiphtongAE: BidirectionalConversionPreprocessor; + processDiphtongs: BidirectionalConversionPreprocessor; }; }; lo: Record;