mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-28 07:20:49 -04:00
[de][pronouns] make slashes work
This commit is contained in:
parent
af1d94dc36
commit
2f48f4ca8b
@ -15,7 +15,7 @@ pronouns:
|
|||||||
examples: ['er&sie', 'er&dey', 'sie&xier']
|
examples: ['er&sie', 'er&dey', 'sie&xier']
|
||||||
null: false
|
null: false
|
||||||
emoji: false
|
emoji: false
|
||||||
slashes: true
|
slashes: ['pronoun_n', 'possessive', 'pronoun_d', 'pronoun_a']
|
||||||
avoiding: false
|
avoiding: false
|
||||||
others: 'Andere Pronomen'
|
others: 'Andere Pronomen'
|
||||||
|
|
||||||
|
@ -72,23 +72,28 @@ export const buildPronoun = (pronouns, path) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const p = path.split('/').filter(s => !!s);
|
const p = path.split('/').filter(s => !!s);
|
||||||
if (!pronoun && process.env.CONFIG.pronouns.slashes !== false && p.length === MORPHEMES.length) {
|
if (!pronoun && process.env.CONFIG.pronouns.slashes !== false) {
|
||||||
pronoun = new Pronoun(
|
const slashMorphemes = process.env.CONFIG.pronouns.slashes === true
|
||||||
`${p[0]}/${p[1]}`,
|
? MORPHEMES
|
||||||
'',
|
: process.env.CONFIG.pronouns.slashes;
|
||||||
false,
|
if (p.length === slashMorphemes.length) {
|
||||||
buildDict(function*() {
|
pronoun = new Pronoun(
|
||||||
let i = 0;
|
`${p[0]}/${p[1]}`,
|
||||||
for (let m of MORPHEMES) {
|
'',
|
||||||
yield [m, p[i++]];
|
false,
|
||||||
}
|
buildDict(function*() {
|
||||||
}),
|
for (let m of MORPHEMES) {
|
||||||
[ p[p.length - 1].endsWith('selves') ], // TODO English specific, extract somewhere
|
const index = slashMorphemes.indexOf(m)
|
||||||
[ false ],
|
yield [m, index === -1 ? '' : p[index]];
|
||||||
[],
|
}
|
||||||
'__generator__',
|
}),
|
||||||
false,
|
[ p[p.length - 1].endsWith('selves') ], // TODO English specific, extract somewhere
|
||||||
)
|
[ false ],
|
||||||
|
[],
|
||||||
|
'__generator__',
|
||||||
|
false,
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return pronoun;
|
return pronoun;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user