stuff
This commit is contained in:
parent
bc92231240
commit
b8225c639e
11904 changed files with 1472749 additions and 133 deletions
30
node_modules/speech-rule-engine/mjs/l10n/locales/locale_it.js
generated
vendored
Normal file
30
node_modules/speech-rule-engine/mjs/l10n/locales/locale_it.js
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { combinePostfixIndex, nestingToString } from '../locale_util.js';
|
||||
import { createLocale } from '../locale.js';
|
||||
import { NUMBERS } from '../numbers/numbers_it.js';
|
||||
import { Combiners } from '../transformers.js';
|
||||
const italianPostfixCombiner = function (letter, font, cap) {
|
||||
if (letter.match(/^[a-zA-Z]$/)) {
|
||||
font = font.replace('cerchiato', 'cerchiata');
|
||||
}
|
||||
letter = cap ? letter + ' ' + cap : letter;
|
||||
return font ? letter + ' ' + font : letter;
|
||||
};
|
||||
let locale = null;
|
||||
export function it() {
|
||||
if (!locale) {
|
||||
locale = create();
|
||||
}
|
||||
return locale;
|
||||
}
|
||||
function create() {
|
||||
const loc = createLocale();
|
||||
loc.NUMBERS = NUMBERS;
|
||||
loc.COMBINERS['italianPostfix'] = italianPostfixCombiner;
|
||||
loc.FUNCTIONS.radicalNestDepth = nestingToString;
|
||||
loc.FUNCTIONS.combineRootIndex = combinePostfixIndex;
|
||||
loc.FUNCTIONS.combineNestedFraction = (a, b, c) => c.replace(/ $/g, '') + b + a;
|
||||
loc.FUNCTIONS.combineNestedRadical = (a, _b, c) => c + ' ' + a;
|
||||
loc.FUNCTIONS.fontRegexp = (font) => RegExp(' (en |)' + font + '$');
|
||||
loc.ALPHABETS.combiner = Combiners.romanceCombiner;
|
||||
return loc;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue