mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 04:34:15 -04:00
(profile) use short names in profile like in the pronouns list
This commit is contained in:
parent
eb2c455de2
commit
125aef931f
@ -1,4 +1,4 @@
|
||||
import { pronouns } from '../src/data.js';
|
||||
import { pronounLibrary, pronouns } from '../src/data.js';
|
||||
import { buildPronoun } from '../src/buildPronoun.js';
|
||||
import opinions from '../src/opinions.js';
|
||||
|
||||
@ -27,9 +27,29 @@ export default {
|
||||
}
|
||||
|
||||
const linkNorm = link.toLowerCase();
|
||||
if (linkNorm === this.config.pronouns.any
|
||||
|| linkNorm.startsWith(this.config.pronouns.any + ':')
|
||||
|| (this.config.pronouns.null && this.config.pronouns.null.routes && this.config.pronouns.null.routes.includes(linkNorm))
|
||||
if (linkNorm === this.config.pronouns.any) {
|
||||
pronounOpinions.push({
|
||||
link,
|
||||
pronoun: this.$t('pronouns.any.short'),
|
||||
opinion,
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
const prefix = `${this.config.pronouns.any}:`;
|
||||
if (linkNorm.startsWith(prefix)) {
|
||||
const merged = pronounLibrary.byKey()[linkNorm.substring(prefix.length)];
|
||||
if (merged) {
|
||||
pronounOpinions.push({
|
||||
link,
|
||||
pronoun: merged.short(this.$translator),
|
||||
opinion,
|
||||
});
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ((this.config.pronouns.null && this.config.pronouns.null.routes && this.config.pronouns.null.routes.includes(linkNorm))
|
||||
|| (this.config.pronouns.mirror && this.config.pronouns.mirror.route === linkNorm)
|
||||
) {
|
||||
pronounOpinions.push({
|
||||
|
Loading…
x
Reference in New Issue
Block a user