#69 organise locales in directories
This commit is contained in:
parent
ef84e4913e
commit
d783fba6c4
|
@ -14,7 +14,7 @@
|
|||
|
||||
<script>
|
||||
import { nounDeclensionTemplates } from "../src/data";
|
||||
import cases from "../data/declension";
|
||||
import cases from "../data/nouns/cases";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import nameCount from '../data/nameCount/nameCount';
|
||||
import nameCount from '../data/names/nameCount';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
|
Can't render this file because it has a wrong number of fields in line 3.
|
Can't render this file because it contains an unexpected character in line 3 and column 240.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 2.
|
Can't render this file because it has a wrong number of fields in line 3.
|
Can't render this file because it contains an unexpected character in line 3 and column 285.
|
Can't render this file because it has a wrong number of fields in line 10.
|
|
@ -189,7 +189,7 @@
|
|||
import { examples, templates, getSources, templateLibrary } from "~/src/data";
|
||||
import Compressor from "../src/compressor";
|
||||
import { getTemplate } from "../src/buildTemplate";
|
||||
import MORPHEMES from '../data/morphemes';
|
||||
import MORPHEMES from '../data/templates/morphemes';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import EnglishTable from "../data/EnglishTable";
|
||||
import EnglishTable from "../data/templates/EnglishTable";
|
||||
import { head } from "../src/helpers";
|
||||
|
||||
export default {
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
|
||||
<script>
|
||||
import { templates, sources, templateLibrary } from '../src/data'
|
||||
import sourcesForMultipleForms from '../data/sourcesMultiple';
|
||||
import sourcesForMultipleForms from '../data/sources/sourcesMultiple';
|
||||
import { Source } from "../src/classes";
|
||||
import { head } from "../src/helpers";
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
import { examples, templates, getSources, templateLibrary } from "~/src/data";
|
||||
import { buildTemplate } from "../src/buildTemplate";
|
||||
import { head } from "../src/helpers";
|
||||
import GrammarTables from "../data/GrammarTables";
|
||||
import GrammarTables from "../data/templates/GrammarTables";
|
||||
|
||||
export default {
|
||||
components: { GrammarTables },
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Template } from "./classes";
|
||||
import Compressor from "./compressor";
|
||||
import { buildDict } from "./helpers";
|
||||
import MORPHEMES from '../data/morphemes';
|
||||
import MORPHEMES from '../data/templates/morphemes';
|
||||
|
||||
export const addAliasesToTemplates = (templates) => {
|
||||
const templatesWithAliases = {}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {buildDict, buildList} from "./helpers";
|
||||
import MORPHEMES from '../data/morphemes';
|
||||
import MORPHEMES from '../data/templates/morphemes';
|
||||
|
||||
export class ExamplePart {
|
||||
constructor(variable, str) {
|
||||
|
|
18
src/data.js
18
src/data.js
|
@ -1,7 +1,7 @@
|
|||
import {Source, Example, NounTemplate, TemplateGroup, TemplateLibrary, Name, Person, NounDeclension} from './classes'
|
||||
import { buildDict, buildList } from './helpers';
|
||||
import { parseTemplates, getTemplate } from './buildTemplate';
|
||||
import sourcesForMultipleForms from '../data/sourcesMultiple';
|
||||
import sourcesForMultipleForms from '../data/sources/sourcesMultiple';
|
||||
|
||||
export const locales = {
|
||||
en: { name: 'English', url: 'https://en.pronouns.page' },
|
||||
|
@ -10,10 +10,10 @@ export const locales = {
|
|||
nl: { name: 'Nederlands', url: 'https://nl.pronouns.page' },
|
||||
}
|
||||
|
||||
import templatesRaw from '../data/templates.tsv';
|
||||
import templatesRaw from '../data/templates/templates.tsv';
|
||||
export const templates = parseTemplates(templatesRaw);
|
||||
|
||||
import examplesRaw from '../data/examples.tsv';
|
||||
import examplesRaw from '../data/templates/examples.tsv';
|
||||
export const examples = buildList(function* () {
|
||||
for (let e of examplesRaw) {
|
||||
yield new Example(
|
||||
|
@ -24,7 +24,7 @@ export const examples = buildList(function* () {
|
|||
}
|
||||
});
|
||||
|
||||
import sourcesRaw from '../data/sources.tsv';
|
||||
import sourcesRaw from '../data/sources/sources.tsv';
|
||||
export const sources = buildDict(function* () {
|
||||
for (let s of sourcesRaw) {
|
||||
yield [
|
||||
|
@ -65,7 +65,7 @@ export const getSources = (selectedTemplate) => {
|
|||
return sources;
|
||||
}
|
||||
|
||||
import nounTemplatesRaw from '../data/nounTemplates.tsv';
|
||||
import nounTemplatesRaw from '../data/nouns/nounTemplates.tsv';
|
||||
export const nounTemplates = buildList(function* () {
|
||||
for (let t of nounTemplatesRaw) {
|
||||
yield new NounTemplate(
|
||||
|
@ -79,7 +79,7 @@ export const nounTemplates = buildList(function* () {
|
|||
}
|
||||
});
|
||||
|
||||
import templateGroupsRaw from '../data/templateGroups.tsv';
|
||||
import templateGroupsRaw from '../data/templates/templateGroups.tsv';
|
||||
export const templateGroups = buildList(function* () {
|
||||
for (let g of templateGroupsRaw) {
|
||||
yield new TemplateGroup(
|
||||
|
@ -92,7 +92,7 @@ export const templateGroups = buildList(function* () {
|
|||
|
||||
export const templateLibrary = new TemplateLibrary(templateGroups, templates);
|
||||
|
||||
import namesRaw from '../data/names.tsv';
|
||||
import namesRaw from '../data/names/names.tsv';
|
||||
export const names = buildDict(function* () {
|
||||
for (let n of namesRaw) {
|
||||
yield [n.name, new Name(
|
||||
|
@ -110,7 +110,7 @@ export const names = buildDict(function* () {
|
|||
}
|
||||
});
|
||||
|
||||
import peopleRaw from '../data/people.tsv';
|
||||
import peopleRaw from '../data/people/people.tsv';
|
||||
export const people = buildList(function* () {
|
||||
for (let p of peopleRaw) {
|
||||
yield new Person(
|
||||
|
@ -122,7 +122,7 @@ export const people = buildList(function* () {
|
|||
}
|
||||
});
|
||||
|
||||
import nounDeclensionTemplatesRaw from '../data/nounDeclension.tsv';
|
||||
import nounDeclensionTemplatesRaw from '../data/nouns/nounDeclension.tsv';
|
||||
export const nounDeclensionTemplates = buildList(function* () {
|
||||
for (let d of nounDeclensionTemplatesRaw) {
|
||||
yield new NounDeclension(d);
|
||||
|
|
Reference in New Issue