mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 12:03:25 -04:00
(fix)(english) fix loading of pronouns
This commit is contained in:
parent
f9c0bbfedd
commit
a21152d204
@ -1,10 +1,24 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
interface TableRow {
|
||||||
|
pronoun: string;
|
||||||
|
formal?: boolean;
|
||||||
|
romanised: string;
|
||||||
|
ipa: string;
|
||||||
|
meaning: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
defineProps<{
|
||||||
|
table: TableRow[];
|
||||||
|
}>();
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table text-nowrap">
|
<table class="table text-nowrap">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Japanese</th>
|
<th>Japanese</th>
|
||||||
<th v-if="t[0].formal !== undefined">
|
<th v-if="table[0].formal !== undefined">
|
||||||
Formal?
|
Formal?
|
||||||
</th>
|
</th>
|
||||||
<th>Romanised</th>
|
<th>Romanised</th>
|
||||||
@ -13,7 +27,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="{ pronoun, formal, romanised, ipa, meaning } in t">
|
<tr v-for="{ pronoun, formal, romanised, ipa, meaning } in table">
|
||||||
<th>
|
<th>
|
||||||
<LinkedText :text="pronoun" />
|
<LinkedText :text="pronoun" />
|
||||||
</th>
|
</th>
|
||||||
@ -34,11 +48,3 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
t: { required: true },
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { loadPronouns } from '~/src/data.ts';
|
||||||
|
|
||||||
|
defineProps<{
|
||||||
|
table: Record<string, string>;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const config = useConfig();
|
||||||
|
const pronouns = await loadPronouns(config);
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table text-nowrap">
|
<table class="table text-nowrap">
|
||||||
@ -10,7 +21,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(description, pronoun) in t">
|
<tr v-for="(description, pronoun) in table">
|
||||||
<th>
|
<th>
|
||||||
<nuxt-link :to="`/${pronouns[pronoun].canonicalName}`">
|
<nuxt-link :to="`/${pronouns[pronoun].canonicalName}`">
|
||||||
{{ pronouns[pronoun].name() }}
|
{{ pronouns[pronoun].name() }}
|
||||||
@ -45,35 +56,3 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
|
||||||
import { getPronoun } from '~/src/buildPronoun.ts';
|
|
||||||
import { loadPronouns } from '~/src/data.ts';
|
|
||||||
import { buildDict } from '~/src/helpers.ts';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
t: { required: true },
|
|
||||||
},
|
|
||||||
async setup() {
|
|
||||||
const config = useConfig();
|
|
||||||
const pronounsList = await loadPronouns(config);
|
|
||||||
return {
|
|
||||||
pronounsList,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
const that = this;
|
|
||||||
return {
|
|
||||||
pronouns: buildDict(function* () {
|
|
||||||
for (const name in that.t) {
|
|
||||||
if (!Object.hasOwn(that.t, name)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
yield [name, getPronoun(this.pronounsList, name)];
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
defineProps<{
|
||||||
|
table: Record<string, string>;
|
||||||
|
}>();
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table text-nowrap">
|
<table class="table text-nowrap">
|
||||||
@ -52,35 +58,3 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
|
||||||
import { getPronoun } from '~/src/buildPronoun.ts';
|
|
||||||
import { loadPronouns } from '~/src/data.ts';
|
|
||||||
import { buildDict } from '~/src/helpers.ts';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
t: { required: true },
|
|
||||||
},
|
|
||||||
async setup() {
|
|
||||||
const config = useConfig();
|
|
||||||
const pronounsList = await loadPronouns(config);
|
|
||||||
return {
|
|
||||||
pronounsList,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
const that = this;
|
|
||||||
return {
|
|
||||||
pronouns: buildDict(function* () {
|
|
||||||
for (const name in that.t) {
|
|
||||||
if (!Object.hasOwn(that.t, name)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
yield [name, getPronoun(this.pronounsList, name)];
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
defineProps<{
|
||||||
|
table: Record<string, string>;
|
||||||
|
}>();
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table text-nowrap">
|
<table class="table text-nowrap">
|
||||||
@ -52,35 +58,3 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
|
||||||
import { getPronoun } from '~/src/buildPronoun.ts';
|
|
||||||
import { loadPronouns } from '~/src/data.ts';
|
|
||||||
import { buildDict } from '~/src/helpers.ts';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
t: { required: true },
|
|
||||||
},
|
|
||||||
async setup() {
|
|
||||||
const config = useConfig();
|
|
||||||
const pronounsList = await loadPronouns(config);
|
|
||||||
return {
|
|
||||||
pronounsList,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
const that = this;
|
|
||||||
return {
|
|
||||||
pronouns: buildDict(function* () {
|
|
||||||
for (const name in that.t) {
|
|
||||||
if (!Object.hasOwn(that.t, name)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
yield [name, getPronoun(this.pronounsList, name)];
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
@ -48,7 +48,7 @@ const config = useConfig();
|
|||||||
<p v-for="p in pronounGroup.description">
|
<p v-for="p in pronounGroup.description">
|
||||||
<LinkedText :text="p" />
|
<LinkedText :text="p" />
|
||||||
</p>
|
</p>
|
||||||
<EnglishTable v-if="pronounGroup.table" :t="pronounGroup.table" />
|
<EnglishTable v-if="pronounGroup.table" :table="pronounGroup.table" />
|
||||||
</section>
|
</section>
|
||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user