mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
[pl][pronouns] add unaccented and prep – BC fixes
This commit is contained in:
parent
4da995f044
commit
999b0a320b
@ -67,23 +67,21 @@ export const buildPronoun = (pronouns, path) => {
|
|||||||
base = base.merge(pronounsWithAliases[option])
|
base = base.merge(pronounsWithAliases[option])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (base) {
|
let baseArray = base ? base.toArray() : null;
|
||||||
base = base.toArray();
|
|
||||||
}
|
|
||||||
// i know, it's ugly… didn't think about BC much and now it's a huge mess…
|
// i know, it's ugly… didn't think about BC much and now it's a huge mess…
|
||||||
const pronounStrLen = pronounStr.map(x => x.startsWith('!') ? parseInt(x.substring(1)) : 1).reduce((c, a) => c + a, 0);
|
const pronounStrLen = pronounStr.map(x => x.startsWith('!') ? parseInt(x.substring(1)) : 1).reduce((c, a) => c + a, 0);
|
||||||
if (config.locale === 'pl' && base && pronounStrLen < 30) {
|
if (config.locale === 'pl' && baseArray && pronounStrLen < 30) {
|
||||||
base = [
|
baseArray = [
|
||||||
...base.slice(0, 4),
|
...baseArray.slice(0, 4),
|
||||||
base[5],
|
baseArray[5],
|
||||||
base[8],
|
baseArray[8],
|
||||||
...base.slice(11)
|
...baseArray.slice(11)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
let pronoun = pronounStr.length === 1
|
let pronoun = pronounStr.length === 1
|
||||||
? base
|
? base
|
||||||
: Pronoun.from(Compressor.uncompress(pronounStr, base, config.locale));
|
: Pronoun.from(Compressor.uncompress(pronounStr, baseArray, config.locale));
|
||||||
|
|
||||||
if (!config) {
|
if (!config) {
|
||||||
return pronoun;
|
return pronoun;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user