mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 12:43:48 -04:00
Merge branch 'german-pronoun-groups' into 'main'
(de) Pronoun Groups See merge request PronounsPage/PronounsPage!396
This commit is contained in:
commit
92e051efb7
@ -1,5 +1,5 @@
|
||||
name pronouns description
|
||||
Binäre Pronomen sie,er Es ist wichtig zu betonen, dass Pronomen und Geschlecht unterschiedliche Konzepte sind. Eine Person kann nicht-binär sein und gleichzeitig die Pronomen nutzen, die bei der Geburt zugewiesen wurden – oder aber diesen normativ gegenübergestellt sind.
|
||||
Neutrum es Das Pronomen „es“ ist zwar sehr gebräuchlich im Deutschen, aber nicht im Bezug auf Menschen. Einige wenige Personenwörter wie „Mädchen“, „Individuum“ und „Mitglied“ sind zwar sächlich. Doch viele Deutschsprachige empfinden das Neutrum dennoch als versächlichend und entmündigend, wenn es statt „sie“ oder „er“ für Personen verwendet wird, was manche transfeindliche Personen auch ausnutzen. Daher solltest du vorsichtig sein und dieses Pronomen nur gebrauchen, wenn die entsprechende Person es sich ausdrücklich wünscht.
|
||||
Neopronomen dey,dey/denen/demm,die,el,em,en,en/em,et,ey,hän,hen,hie,iks,ind,mensch,nin,oj,per,ser,sier,they,xier,zet,ersie Im Gegensatz zu anderen Pronomen, die offiziell als „grammatikalisch korrekt“ anerkannt werden, sind Neopronomen neu geschaffen. Doch nur weil sie (noch) nicht in offiziellen Wörterbüchern stehen, sind sie noch lange nicht „schlechter“ oder „falsch“!
|
||||
Pronomen mit Sonderzeichen er:sie,er*sie,er_sie Diese Pronomen benutzen Sonderzeichen, die der Trennung der Bestandteile dienen und vor einem Vokal als {https://de.wikipedia.org/wiki/Glottaler_Plosiv=Glottisschlag} ausgesprochen werden.
|
||||
key name pronouns description
|
||||
binäre Binäre Pronomen sie,er Es ist wichtig zu betonen, dass Pronomen und Geschlecht unterschiedliche Konzepte sind. Eine Person kann nicht-binär sein und gleichzeitig die Pronomen nutzen, die bei der Geburt zugewiesen wurden – oder aber diesen normativ gegenübergestellt sind.
|
||||
neutrum Neutrum es,es/ihr,es/denen Das Pronomen „es“ ist zwar sehr gebräuchlich im Deutschen, aber nicht im Bezug auf Menschen. Einige wenige Personenwörter wie „Mädchen“, „Individuum“ und „Mitglied“ sind zwar sächlich. Doch viele Deutschsprachige empfinden das Neutrum dennoch als versächlichend und entmündigend, wenn es statt „sie“ oder „er“ für Personen verwendet wird, was manche transfeindliche Personen auch ausnutzen. Daher solltest du vorsichtig sein und dieses Pronomen nur gebrauchen, wenn die entsprechende Person es sich ausdrücklich wünscht. Viele Formen sind im Neutrum identisch mit denen des Maskulinums, daher bevorzugen einige Menschen modifizierte Varianten bei denen diese ausgetauscht werden.
|
||||
neopronomen Neopronomen dey,dey/denen/demm,die,el,em,en,en/em,et,ey,hän,hen,hie,iks,ind,mensch,nin,oj,per,ser,sier,they,xier,zet,ersie Im Gegensatz zu anderen Pronomen, die offiziell als „grammatikalisch korrekt“ anerkannt werden, sind Neopronomen neu geschaffen. Doch nur weil sie (noch) nicht in offiziellen Wörterbüchern stehen, sind sie noch lange nicht „schlechter“ oder „falsch“!
|
||||
sonderzeichen Pronomen mit Sonderzeichen er:sie,er*sie,er_sie Diese Pronomen benutzen Sonderzeichen, die der Trennung der Bestandteile dienen und vor einem Vokal als {https://de.wikipedia.org/wiki/Glottaler_Plosiv=Glottisschlag} ausgesprochen werden.
|
||||
|
|
@ -2,6 +2,8 @@ key description normative pronoun_n pronoun_g pronoun_d pronoun_a possessive_f_n
|
||||
er,er/sein,er/ihm Maskulinum TRUE er seiner ihm ihn seine seiner seiner seine sein seines seinem seinen sein seines seinem sein der des dem den dieser dieses diesem diesen FALSE FALSE TRUE
|
||||
sie,sie/ihr Femininum TRUE sie ihrer ihr sie ihre ihrer ihrer ihre ihr ihres ihrem ihren ihr ihres ihrem ihr die der der die diese dieser dieser diese FALSE FALSE TRUE
|
||||
es,es/sein,es/ihm Neutrum TRUE es seiner ihm es seine seiner seiner seine sein seines seinem seinen sein seines seinem sein das des dem das dieses dieses diesem dieses FALSE FALSE TRUE
|
||||
es/ihr Neutrum mit femininen Formen FALSE es ihrer ihr es ihre ihrer ihrer ihre ihr ihres ihrem ihren ihr ihres ihrem ihr das der der das dieses dieser dieser dieses FALSE FALSE TRUE Wie {/es=„es/sein“}, wobei Wörter, bei denen das {/es=Neutrum} identisch mit dem {/er=Maskulinum} ist, durch {/sie=feminine} Formen ersetzt werden
|
||||
es/denen Neutrum mit inflexiven Formen FALSE es derer denen es deren deren deren deren deren deren deren deren deren deren deren deren das des dem das dieses dieses diesem dieses FALSE FALSE TRUE Wie {/es=„es/sein“}, wobei die meisten Wörter, bei denen das {/es=Neutrum} identisch mit dem {/er=Maskulinum} ist, durch inflexive Formen ersetzt werden, wie sie auch in {/dey/denen=„dey/denen“} verwendet werden
|
||||
dey,dey/denen Neopronomen „dey“ FALSE dey derer denen dey deren deren deren deren deren deren deren deren deren deren deren deren FALSE FALSE TRUE Im Akkusativ ist ebenfalls {/dey/denen/demm=„demm”} üblich. pronoun_a
|
||||
dey/denen/demm Neopronomen „dey“ FALSE dey derer denen demm deren deren deren deren deren deren deren deren deren deren deren deren FALSE FALSE TRUE Im Akkusativ ist ebenfalls {/dey/denen=„dey”} üblich. pronoun_a
|
||||
die,die/denen Neopronomen „die“ FALSE die derer denen die deren deren deren deren deren deren deren deren deren deren deren deren FALSE FALSE TRUE
|
||||
|
|
@ -75,6 +75,13 @@ pronouns:
|
||||
description: >
|
||||
Auch wenn es für manche Menschen sehr wichtig ist, dass bestimmte Pronomen benutzt werden, wenn über sie geredet wird, ist es anderen egal, welche Pronomen für sie verwendet werden.
|
||||
options: 'Überprüfe die Optionen [share]{/pronomen=hier}.'
|
||||
group:
|
||||
neutrum:
|
||||
short: 'alle mit Neutrum'
|
||||
neopronomen:
|
||||
short: 'alle Neopronomen'
|
||||
sonderzeichen:
|
||||
short: 'alle mit Sonderzeichen'
|
||||
comprehensive:
|
||||
simple: 'häufige'
|
||||
comprehensive: 'erweitert'
|
||||
|
@ -10,6 +10,7 @@ export default ({ app, store }) => {
|
||||
|
||||
Vue.prototype.$base = process.env.BASE_URL;
|
||||
|
||||
Vue.prototype.$translator = translator;
|
||||
Vue.prototype.$t = (key, params = {}, warn = false) => translator.translate(key, params, warn);
|
||||
Vue.prototype.$te = (key, fallback = false) => {
|
||||
if (translator.has(key)) {
|
||||
|
@ -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({
|
||||
|
@ -14,8 +14,7 @@
|
||||
<div class="alert alert-primary">
|
||||
<h2 class="text-center mb-0">
|
||||
<strong>
|
||||
<T>pronouns.any.short</T>
|
||||
<span v-if="groupKey">{{groupKey}}</span>
|
||||
<Spelling :text="short"/>
|
||||
</strong>
|
||||
</h2>
|
||||
<p class="h6 small text-center mb-0 mt-2">
|
||||
@ -71,13 +70,18 @@
|
||||
data() {
|
||||
const groupKey = this.$route.params.group;
|
||||
let pronounGroups = [];
|
||||
let short;
|
||||
if (groupKey) {
|
||||
pronounGroups = pronounLibrary.byKey()[groupKey];
|
||||
const merged = pronounLibrary.byKey()[groupKey];
|
||||
pronounGroups = merged.groups;
|
||||
short = merged.short(this.$translator);
|
||||
} else {
|
||||
short = this.$t('pronouns.any.short');
|
||||
}
|
||||
|
||||
return {
|
||||
examples,
|
||||
groupKey,
|
||||
short,
|
||||
pronounGroups,
|
||||
|
||||
comprehensive: false,
|
||||
@ -85,7 +89,7 @@
|
||||
},
|
||||
head() {
|
||||
return head({
|
||||
title: `${this.$t('pronouns.intro')}: ${this.$t('pronouns.any.short')} ${this.groupKey || ''}`.trim(),
|
||||
title: `${this.$t('pronouns.intro')}: ${this.short}`.trim(),
|
||||
banner: `api/banner/${this.$t('pronouns.any.short')}.png`,
|
||||
});
|
||||
},
|
||||
|
@ -313,7 +313,7 @@
|
||||
|
||||
<script>
|
||||
import {head, buildList, buildDict, isValidLink} from "../src/helpers";
|
||||
import { pronouns } from '../src/data';
|
||||
import { pronouns, pronounLibrary } from '../src/data';
|
||||
import { buildPronoun } from "../src/buildPronoun";
|
||||
import config from '../data/config.suml';
|
||||
import link from '../plugins/link';
|
||||
@ -542,14 +542,18 @@
|
||||
if (!pronoun) {
|
||||
return 'profile.pronounsNotFound';
|
||||
}
|
||||
return pronoun === this.config.pronouns.any
|
||||
|| pronoun.startsWith(this.config.pronouns.any + ':')
|
||||
return this.validateAnyPronoun(pronoun)
|
||||
|| (this.config.pronouns.null && this.config.pronouns.null.routes && this.config.pronouns.null.routes.includes(pronoun))
|
||||
|| (this.config.pronouns.mirror && this.config.pronouns.mirror.route === pronoun)
|
||||
|| buildPronoun(pronouns, pronoun)
|
||||
? null
|
||||
: 'profile.pronounsNotFound'
|
||||
},
|
||||
validateAnyPronoun(pronoun) {
|
||||
const prefix = `${this.config.pronouns.any}:`;
|
||||
return pronoun === this.config.pronouns.any
|
||||
|| pronoun.startsWith(prefix) && pronounLibrary.byKey()[pronoun.substring(prefix.length)];
|
||||
},
|
||||
async resetWords() {
|
||||
await this.$confirm();
|
||||
|
||||
|
@ -212,8 +212,10 @@
|
||||
<li>
|
||||
<nuxt-link :to="`/${config.pronouns.any}`"><T>pronouns.any.short</T></nuxt-link>
|
||||
</li>
|
||||
<li v-for="(keyPronouns, key) in pronounLibrary.byKey()">
|
||||
<nuxt-link :to="`/${config.pronouns.any}:${key}`"><T>pronouns.any.short</T> {{key}}</nuxt-link>
|
||||
<li v-for="(merged, key) in pronounLibrary.byKey()" :key="key">
|
||||
<nuxt-link :to="`/${config.pronouns.any}:${key}`">
|
||||
<Spelling :text="merged.short($translator)"/>
|
||||
</nuxt-link>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -579,6 +579,22 @@ export class PronounGroup {
|
||||
}
|
||||
}
|
||||
|
||||
export class MergedPronounGroup {
|
||||
constructor(key, groups) {
|
||||
this.key = key;
|
||||
this.groups = groups;
|
||||
}
|
||||
|
||||
short(translator) {
|
||||
const specificTranslationKey = `pronouns.any.group.${this.key}.short`;
|
||||
if (translator.has(specificTranslationKey)) {
|
||||
return translator.translate(specificTranslationKey);
|
||||
} else {
|
||||
return `${translator.translate('pronouns.any.short')} ${this.key}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class PronounLibrary {
|
||||
constructor(groups, pronouns) {
|
||||
this.groups = groups;
|
||||
@ -622,7 +638,9 @@ export class PronounLibrary {
|
||||
const ret = {};
|
||||
for (let g of this.groups) {
|
||||
if (g.key === null) { continue; }
|
||||
if (ret[g.key] === undefined) { ret[g.key] = []; }
|
||||
if (ret[g.key] === undefined) {
|
||||
ret[g.key] = new MergedPronounGroup(g.key, []);
|
||||
}
|
||||
|
||||
const p = {};
|
||||
for (let t of g.pronouns) {
|
||||
@ -631,7 +649,7 @@ export class PronounLibrary {
|
||||
p[pronoun.canonicalName] = pronoun;
|
||||
}
|
||||
|
||||
ret[g.key].push({ group: g, groupPronouns: p});
|
||||
ret[g.key].groups.push({ group: g, groupPronouns: p});
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -1,4 +1,7 @@
|
||||
import { beforeEach, describe, expect, jest, test } from '@jest/globals';
|
||||
import { mockTranslations } from './fixtures/translations.js';
|
||||
|
||||
mockTranslations({});
|
||||
|
||||
// workaround to be independent of the current selected locale
|
||||
jest.unstable_mockModule('../data/pronouns/morphemes.js', () => {
|
||||
@ -9,69 +12,7 @@ jest.unstable_mockModule('../data/pronouns/morphemes.js', () => {
|
||||
|
||||
const { Pronoun } = await import('../src/classes.js');
|
||||
const { buildPronoun } = await import('../src/buildPronoun.js');
|
||||
|
||||
const pronouns = {
|
||||
he: new Pronoun(
|
||||
'he',
|
||||
'Normative “he/him”',
|
||||
true,
|
||||
{
|
||||
pronoun_subject: 'he',
|
||||
pronoun_object: 'him',
|
||||
possessive_determiner: 'his',
|
||||
possessive_pronoun: 'his',
|
||||
reflexive: 'himself',
|
||||
},
|
||||
[false],
|
||||
[false],
|
||||
['he/him'],
|
||||
'',
|
||||
true,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
),
|
||||
she: new Pronoun(
|
||||
'she',
|
||||
'Normative “she/her”',
|
||||
true,
|
||||
{
|
||||
pronoun_subject: 'she',
|
||||
pronoun_object: 'her',
|
||||
possessive_determiner: 'her',
|
||||
possessive_pronoun: 'hers',
|
||||
reflexive: 'herself',
|
||||
},
|
||||
[false],
|
||||
[false],
|
||||
['she/her'],
|
||||
'',
|
||||
true,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
),
|
||||
they: new Pronoun(
|
||||
'they',
|
||||
'Singular “they”',
|
||||
true,
|
||||
{
|
||||
pronoun_subject: 'they',
|
||||
pronoun_object: 'them',
|
||||
possessive_determiner: 'their',
|
||||
possessive_pronoun: 'theirs',
|
||||
reflexive: 'themselves',
|
||||
},
|
||||
[true],
|
||||
[true],
|
||||
['they/them'],
|
||||
'',
|
||||
true,
|
||||
'',
|
||||
'themselves',
|
||||
'',
|
||||
),
|
||||
};
|
||||
const { default: pronouns } = await import('./fixtures/pronouns.js');
|
||||
|
||||
beforeEach(() => {
|
||||
global.config.pronouns = {
|
||||
|
102
test/classes.test.js
Normal file
102
test/classes.test.js
Normal file
@ -0,0 +1,102 @@
|
||||
import { describe, expect, test } from '@jest/globals';
|
||||
|
||||
import { MergedPronounGroup, PronounGroup, PronounLibrary } from '../src/classes.js';
|
||||
import { mockTranslations } from './fixtures/translations.js';
|
||||
|
||||
const translations = {
|
||||
pronouns: {
|
||||
any: {
|
||||
short: 'any',
|
||||
},
|
||||
},
|
||||
};
|
||||
mockTranslations(translations);
|
||||
|
||||
const { default: pronouns } = await import('./fixtures/pronouns.js');
|
||||
const { default: translator } = await import('../src/translator.js');
|
||||
|
||||
describe('when merging pronoun groups by key', () => {
|
||||
test('groups without keys are not assigned a merged group', () => {
|
||||
const groups = [
|
||||
new PronounGroup('Normative-ish forms', ['they']),
|
||||
];
|
||||
const library = new PronounLibrary(groups, pronouns);
|
||||
expect(library.byKey()).toEqual({});
|
||||
});
|
||||
|
||||
test('groups with different keys are assigned different merged groups', () => {
|
||||
const groups = [
|
||||
new PronounGroup('Binary forms', ['he', 'she'], null, 'normative'),
|
||||
new PronounGroup('Normative-ish forms', ['they'], null, 'normative-ish'),
|
||||
];
|
||||
const library = new PronounLibrary(groups, pronouns);
|
||||
expect(library.byKey()).toEqual(
|
||||
{
|
||||
'normative': new MergedPronounGroup('normative', [
|
||||
{
|
||||
group: groups[0],
|
||||
groupPronouns: { he: pronouns.he, she: pronouns.she },
|
||||
},
|
||||
]),
|
||||
'normative-ish': new MergedPronounGroup('normative-ish', [
|
||||
{
|
||||
group: groups[1],
|
||||
groupPronouns: { they: pronouns.they },
|
||||
},
|
||||
]),
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
test('groups with same key are assigned same merged group', () => {
|
||||
const groups = [
|
||||
new PronounGroup('Binary forms', ['he', 'she'], null, 'normative-ish'),
|
||||
new PronounGroup('Normative-ish forms', ['they'], null, 'normative-ish'),
|
||||
];
|
||||
const library = new PronounLibrary(groups, pronouns);
|
||||
expect(library.byKey()).toEqual(
|
||||
{
|
||||
'normative-ish': new MergedPronounGroup('normative-ish', [
|
||||
{
|
||||
group: groups[0],
|
||||
groupPronouns: { he: pronouns.he, she: pronouns.she },
|
||||
},
|
||||
{
|
||||
group: groups[1],
|
||||
groupPronouns: { they: pronouns.they },
|
||||
},
|
||||
]),
|
||||
},
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when displaying merged groups', () => {
|
||||
test('and no group specific translation is available, the key is used', () => {
|
||||
const group = new PronounGroup('Binary forms', ['he', 'she'], null, 'normative-ish');
|
||||
const merged = new MergedPronounGroup('normative', [
|
||||
{
|
||||
group,
|
||||
groupPronouns: { he: pronouns.he, she: pronouns.she },
|
||||
},
|
||||
]);
|
||||
expect(merged.short(translator)).toBe('any normative');
|
||||
});
|
||||
|
||||
test('and a group specific translation is available, the translation is used', () => {
|
||||
translations.pronouns.any.group = {
|
||||
'normative': {
|
||||
short: 'both binaries',
|
||||
},
|
||||
};
|
||||
|
||||
const group = new PronounGroup('Binary forms', ['he', 'she'], null, 'normative-ish');
|
||||
const merged = new MergedPronounGroup('normative', [
|
||||
{
|
||||
group,
|
||||
groupPronouns: { he: pronouns.he, she: pronouns.she },
|
||||
},
|
||||
]);
|
||||
expect(merged.short(translator)).toBe('both binaries');
|
||||
});
|
||||
});
|
70
test/fixtures/pronouns.js
vendored
Normal file
70
test/fixtures/pronouns.js
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
import { Pronoun } from '../../src/classes.js';
|
||||
|
||||
const he = new Pronoun(
|
||||
'he',
|
||||
'Normative “he/him”',
|
||||
true,
|
||||
{
|
||||
pronoun_subject: 'he',
|
||||
pronoun_object: 'him',
|
||||
possessive_determiner: 'his',
|
||||
possessive_pronoun: 'his',
|
||||
reflexive: 'himself',
|
||||
},
|
||||
[false],
|
||||
[false],
|
||||
['he/him'],
|
||||
'',
|
||||
true,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
);
|
||||
|
||||
const she = new Pronoun(
|
||||
'she',
|
||||
'Normative “she/her”',
|
||||
true,
|
||||
{
|
||||
pronoun_subject: 'she',
|
||||
pronoun_object: 'her',
|
||||
possessive_determiner: 'her',
|
||||
possessive_pronoun: 'hers',
|
||||
reflexive: 'herself',
|
||||
},
|
||||
[false],
|
||||
[false],
|
||||
['she/her'],
|
||||
'',
|
||||
true,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
);
|
||||
|
||||
const they = new Pronoun(
|
||||
'they',
|
||||
'Singular “they”',
|
||||
true,
|
||||
{
|
||||
pronoun_subject: 'they',
|
||||
pronoun_object: 'them',
|
||||
possessive_determiner: 'their',
|
||||
possessive_pronoun: 'theirs',
|
||||
reflexive: 'themselves',
|
||||
},
|
||||
[true],
|
||||
[true],
|
||||
['they/them'],
|
||||
'',
|
||||
true,
|
||||
'',
|
||||
'themselves',
|
||||
'',
|
||||
);
|
||||
|
||||
export default {
|
||||
he,
|
||||
she,
|
||||
they,
|
||||
};
|
12
test/fixtures/translations.js
vendored
Normal file
12
test/fixtures/translations.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import { jest } from '@jest/globals';
|
||||
|
||||
const __dirname = new URL('.', import.meta.url).pathname;
|
||||
|
||||
export const mockTranslations = translations => {
|
||||
jest.unstable_mockModule(`${__dirname}/../../data/translations.suml`, () => {
|
||||
return { default: translations };
|
||||
});
|
||||
jest.unstable_mockModule(`${__dirname}/../../locale/_base/translations.suml`, () => {
|
||||
return { default: {} };
|
||||
});
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user