mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-13 09:36:57 -04:00
(nouns) group conventions similar too pronouns
This commit is contained in:
parent
2a9fde5efd
commit
bf2954c6fe
@ -6,11 +6,12 @@ const nounConventions = await loadNounConventions();
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ul v-if="nounConventions" class="list-group mt-4">
|
<ul v-if="nounConventions" class="list-group mt-4">
|
||||||
<NounsConventionsIndexItem
|
<li
|
||||||
v-for="(nounConvention, key) in nounConventions.conventions"
|
v-for="nounConventionGroup of withKey(nounConventions.groups)"
|
||||||
:key
|
:key="nounConventionGroup.key"
|
||||||
:noun-convention
|
class="list-group-item"
|
||||||
:noun-convention-key="key"
|
>
|
||||||
/>
|
<NounsConventionsIndexGroup :noun-convention-group />
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
|
31
components/nouns/NounsConventionsIndexGroup.vue
Normal file
31
components/nouns/NounsConventionsIndexGroup.vue
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { loadNounConventions } from '~/src/data.ts';
|
||||||
|
import type { NounConventionGroup } from '~/src/nouns.ts';
|
||||||
|
|
||||||
|
defineProps<{
|
||||||
|
nounConventionGroup: NounConventionGroup;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const nounConventions = await loadNounConventions();
|
||||||
|
if (nounConventions === undefined) {
|
||||||
|
throw new Error('no nounConventions defined');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<p class="h5">
|
||||||
|
<Spelling :text="nounConventionGroup.name" />
|
||||||
|
</p>
|
||||||
|
<p v-if="nounConventionGroup.description" class="small my-1">
|
||||||
|
<Icon v="info-circle" />
|
||||||
|
<LinkedText :text="nounConventionGroup.description" />
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<NounsConventionsIndexItem
|
||||||
|
v-for="nounConventionKey of nounConventionGroup.conventions"
|
||||||
|
:key="nounConventionKey"
|
||||||
|
:noun-convention="nounConventions.conventions[nounConventionKey]"
|
||||||
|
:noun-convention-key
|
||||||
|
/>
|
||||||
|
</ul>
|
||||||
|
</template>
|
@ -36,9 +36,10 @@ const pluralExample = computed(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<li class="list-group-item d-flex align-items-center flex-wrap">
|
<li>
|
||||||
|
<div class="d-flex align-items-center flex-wrap">
|
||||||
<div class="col-12 col-md-4">
|
<div class="col-12 col-md-4">
|
||||||
<nuxt-link :to="nounConventionKey" class="h4">{{ nounConvention.name }}</nuxt-link>
|
<nuxt-link :to="nounConventionKey">{{ nounConvention.name }}</nuxt-link>
|
||||||
<NormativeBadge v-if="nounConvention.normative" />
|
<NormativeBadge v-if="nounConvention.normative" />
|
||||||
</div>
|
</div>
|
||||||
<span class="col">
|
<span class="col">
|
||||||
@ -49,6 +50,8 @@ const pluralExample = computed(() => {
|
|||||||
<span class="col">
|
<span class="col">
|
||||||
<template v-if="pluralExample">
|
<template v-if="pluralExample">
|
||||||
⁖ {{ pluralExample }}
|
⁖ {{ pluralExample }}
|
||||||
</template></span>
|
</template>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
|
@ -233,6 +233,47 @@ classExample:
|
|||||||
g: 'der '
|
g: 'der '
|
||||||
d: 'den '
|
d: 'den '
|
||||||
a: 'die '
|
a: 'die '
|
||||||
|
groups:
|
||||||
|
binäre:
|
||||||
|
name: 'Binäre Formen'
|
||||||
|
conventions: ['maskulinum', 'femininum']
|
||||||
|
description: >
|
||||||
|
Es ist wichtig zu betonen, dass Genus und Geschlecht unterschiedliche Konzepte sind.
|
||||||
|
Maskuline Wörter sind nicht zwingend „männlich“ und feminine nicht zwingend „weiblich“.
|
||||||
|
normative-alternativen:
|
||||||
|
name: 'Normative Alternativen'
|
||||||
|
conventions: ['person-formen', 'mensch-formen', 'diminuitiv']
|
||||||
|
description: >
|
||||||
|
Viele geschlechtsspezifische Substantive lassen sich durch neutrale Optionen ausdrücken,
|
||||||
|
die auch den normativen Regeln folgen.
|
||||||
|
neutrum:
|
||||||
|
name: 'Formen mit Neutrum'
|
||||||
|
conventions: ['y-formen', 'i-formen']
|
||||||
|
description: >
|
||||||
|
Während das Neutrum keine regelmäßigen Substantive für Personen bildet,
|
||||||
|
gibt es Vorschläge den normativen Genus mit seinen bekannten Artikeln mit neuen Endungen zu kombinieren.
|
||||||
|
neogenera:
|
||||||
|
name: 'Neogenera'
|
||||||
|
conventions: ['inklusivum', 'indefinitivum', 'ojum', 'nona-system']
|
||||||
|
description: >
|
||||||
|
Im Gegensatz zu den Genera, die offiziell als „grammatikalisch korrekt“ anerkannt werden,
|
||||||
|
sind Neogenera neu geschaffen.
|
||||||
|
Diese beschreiben nicht nur neue Endungen, sondern unter anderem auch neue Artikel.
|
||||||
|
Doch nur weil sie (noch) nicht in offiziellen Wörterbüchern stehen,
|
||||||
|
sind sie noch lange nicht „schlechter“ oder „falsch“!
|
||||||
|
inflexive:
|
||||||
|
name: 'Inflexive Formen'
|
||||||
|
conventions: ['ens-formen', 'ex-formen']
|
||||||
|
description: >
|
||||||
|
Diese Formen beschreiben neue Endungen und teilweise auch neue Artikel,
|
||||||
|
allerdings sind diese nur für einfache Ausdrücke gedacht,
|
||||||
|
sodass diese keine „vollständigen“ Neogenera bilden.
|
||||||
|
sonderzeichen:
|
||||||
|
name: 'Formen mit Sonderzeichen'
|
||||||
|
conventions: ['genderdoppelpunkt', 'gendergap', 'gendersternchen', 'binnen-i']
|
||||||
|
description: >
|
||||||
|
Diese Formen benutzen Sonderzeichen, die der Trennung der Bestandteile dienen
|
||||||
|
und vor einem Vokal als {https://de.wikipedia.org/wiki/Glottaler_Plosiv=Glottisschlag} ausgesprochen werden.
|
||||||
conventions:
|
conventions:
|
||||||
maskulinum:
|
maskulinum:
|
||||||
name: 'Maskulinum'
|
name: 'Maskulinum'
|
||||||
@ -308,48 +349,6 @@ conventions:
|
|||||||
t4:
|
t4:
|
||||||
suffix: 'in'
|
suffix: 'in'
|
||||||
declension: 'x1'
|
declension: 'x1'
|
||||||
diminuitiv:
|
|
||||||
name: 'Diminuitiv'
|
|
||||||
normative: true
|
|
||||||
warning: >
|
|
||||||
Die Verniedlichungsform benutzt zwar das Neutrum und ist damit eine normativ neutrale Form,
|
|
||||||
jedoch zeichnet diese Form üblicherweise kleine und junge Nomen aus.
|
|
||||||
Daher solltest du vorsichtig sein und diese Substantive nur gebrauchen,
|
|
||||||
wenn die entsprechende Person es sich ausdrücklich wünscht.
|
|
||||||
morphemes:
|
|
||||||
article_n: 'das'
|
|
||||||
article_g: 'des'
|
|
||||||
article_d: 'dem'
|
|
||||||
article_a: 'das'
|
|
||||||
indefinite_article_n: 'ein'
|
|
||||||
indefinite_article_g: 'eines'
|
|
||||||
indefinite_article_d: 'einem'
|
|
||||||
indefinite_article_a: 'ein'
|
|
||||||
adjective_weak_n: 'e'
|
|
||||||
adjective_weak_g: 'en'
|
|
||||||
adjective_weak_d: 'en'
|
|
||||||
adjective_weak_a: 'e'
|
|
||||||
adjective_mixed_n: 'es'
|
|
||||||
adjective_mixed_g: 'en'
|
|
||||||
adjective_mixed_d: 'en'
|
|
||||||
adjective_mixed_a: 'es'
|
|
||||||
adjective_strong_n: 'es'
|
|
||||||
adjective_strong_g: 'en'
|
|
||||||
adjective_strong_d: 'em'
|
|
||||||
adjective_strong_a: 'es'
|
|
||||||
templates:
|
|
||||||
t1:
|
|
||||||
suffix: 'erchen'
|
|
||||||
declension: 'x2'
|
|
||||||
t2:
|
|
||||||
suffix: 'chen'
|
|
||||||
declension: 'x2'
|
|
||||||
t3:
|
|
||||||
suffix: 'chen'
|
|
||||||
declension: 'x2'
|
|
||||||
t4:
|
|
||||||
suffix: 'chen'
|
|
||||||
declension: 'x2'
|
|
||||||
person-formen:
|
person-formen:
|
||||||
name: 'Person-Formen'
|
name: 'Person-Formen'
|
||||||
normative: true
|
normative: true
|
||||||
@ -406,6 +405,48 @@ conventions:
|
|||||||
t1:
|
t1:
|
||||||
suffix: 'smensch'
|
suffix: 'smensch'
|
||||||
declension: 'w1b'
|
declension: 'w1b'
|
||||||
|
diminuitiv:
|
||||||
|
name: 'Diminuitiv'
|
||||||
|
normative: true
|
||||||
|
warning: >
|
||||||
|
Die Verniedlichungsform benutzt zwar das Neutrum und ist damit eine normativ neutrale Form,
|
||||||
|
jedoch zeichnet diese Form üblicherweise kleine und junge Nomen aus.
|
||||||
|
Daher solltest du vorsichtig sein und diese Substantive nur gebrauchen,
|
||||||
|
wenn die entsprechende Person es sich ausdrücklich wünscht.
|
||||||
|
morphemes:
|
||||||
|
article_n: 'das'
|
||||||
|
article_g: 'des'
|
||||||
|
article_d: 'dem'
|
||||||
|
article_a: 'das'
|
||||||
|
indefinite_article_n: 'ein'
|
||||||
|
indefinite_article_g: 'eines'
|
||||||
|
indefinite_article_d: 'einem'
|
||||||
|
indefinite_article_a: 'ein'
|
||||||
|
adjective_weak_n: 'e'
|
||||||
|
adjective_weak_g: 'en'
|
||||||
|
adjective_weak_d: 'en'
|
||||||
|
adjective_weak_a: 'e'
|
||||||
|
adjective_mixed_n: 'es'
|
||||||
|
adjective_mixed_g: 'en'
|
||||||
|
adjective_mixed_d: 'en'
|
||||||
|
adjective_mixed_a: 'es'
|
||||||
|
adjective_strong_n: 'es'
|
||||||
|
adjective_strong_g: 'en'
|
||||||
|
adjective_strong_d: 'em'
|
||||||
|
adjective_strong_a: 'es'
|
||||||
|
templates:
|
||||||
|
t1:
|
||||||
|
suffix: 'erchen'
|
||||||
|
declension: 'x2'
|
||||||
|
t2:
|
||||||
|
suffix: 'chen'
|
||||||
|
declension: 'x2'
|
||||||
|
t3:
|
||||||
|
suffix: 'chen'
|
||||||
|
declension: 'x2'
|
||||||
|
t4:
|
||||||
|
suffix: 'chen'
|
||||||
|
declension: 'x2'
|
||||||
y-formen:
|
y-formen:
|
||||||
name: 'Y-Formen'
|
name: 'Y-Formen'
|
||||||
normative: false
|
normative: false
|
||||||
|
@ -30,6 +30,12 @@ export const longIdentifierByGender: Record<Gender, string> = {
|
|||||||
nb: 'nonbinary',
|
nb: 'nonbinary',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export interface NounConventionGroup {
|
||||||
|
name: string;
|
||||||
|
conventions: string[];
|
||||||
|
description?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface NounConvention {
|
export interface NounConvention {
|
||||||
name: string;
|
name: string;
|
||||||
normative: boolean;
|
normative: boolean;
|
||||||
@ -65,5 +71,6 @@ export interface NounConventions {
|
|||||||
classes: Record<string, NounClass>;
|
classes: Record<string, NounClass>;
|
||||||
classExample: NounClassExample;
|
classExample: NounClassExample;
|
||||||
declensions: Record<string, NounDeclension>;
|
declensions: Record<string, NounDeclension>;
|
||||||
|
groups: Record<string, NounConventionGroup>;
|
||||||
conventions: Record<string, NounConvention>;
|
conventions: Record<string, NounConvention>;
|
||||||
}
|
}
|
||||||
|
@ -178,6 +178,11 @@ describe.each(allLocales)('data files of $code', async ({ code }) => {
|
|||||||
.toEqual(expect.arrayContaining(Object.keys(convention.morphemes)));
|
.toEqual(expect.arrayContaining(Object.keys(convention.morphemes)));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
test('groups reference conventions by key', () => {
|
||||||
|
for (const group of Object.values(nounConventions.groups)) {
|
||||||
|
expect(Object.keys(nounConventions.conventions)).toEqual(expect.arrayContaining(group.conventions));
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
5
utils/withKey.ts
Normal file
5
utils/withKey.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export type WithKey<T> = T & { key: string };
|
||||||
|
|
||||||
|
export default <T>(record: Record<string, T>): WithKey<T>[] => {
|
||||||
|
return Object.entries(record).map(([key, value]) => ({ ...value, key }));
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user