Skip to content

Commit

Permalink
bun format
Browse files Browse the repository at this point in the history
  • Loading branch information
tdamsma committed Jun 8, 2024
1 parent 5ee730d commit 55ad080
Show file tree
Hide file tree
Showing 25 changed files with 535 additions and 542 deletions.
6 changes: 2 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"recommendations": [
"inlang.vs-code-extension"
]
}
"recommendations": ["inlang.vs-code-extension"]
}
10 changes: 5 additions & 5 deletions content/blog/_.en._.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "not found"
img: "_.jpg"
alt: ""
volgnummer: ""
title: 'not found'
img: '_.jpg'
alt: ''
volgnummer: ''
---

# The requested page could not be found
# The requested page could not be found
10 changes: 5 additions & 5 deletions content/blog/_.nl._.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "niet gevonden"
img: "_.jpg"
alt: ""
volgnummer: ""
title: 'niet gevonden'
img: '_.jpg'
alt: ''
volgnummer: ''
---

# De gevraagde pagina kon niet worden gevonden
# De gevraagde pagina kon niet worden gevonden
218 changes: 109 additions & 109 deletions content/blog/aan-de-slag-verwachtingen.en.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions content/coaching/_.en._.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "not found"
img: "_.jpg"
alt: ""
volgnummer: ""
title: 'not found'
img: '_.jpg'
alt: ''
volgnummer: ''
---

# The requested page could not be found
# The requested page could not be found
10 changes: 5 additions & 5 deletions content/coaching/_.nl._.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "niet gevonden"
img: "_.jpg"
alt: ""
volgnummer: ""
title: 'niet gevonden'
img: '_.jpg'
alt: ''
volgnummer: ''
---

# De gevraagde pagina kon niet worden gevonden
# De gevraagde pagina kon niet worden gevonden
1 change: 1 addition & 0 deletions content/team/marijn.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: Marijn Damsma-Blaisse
volgnummer: 1
---

I am a psychologist-trainer and founder of Yep Trainingen. Working as a trainer is challenging and diverse for me – constantly searching for the context in which a person or group can experience and learn.

I am most familiar with the topics of communication, coaching skills, and personal effectiveness.
10 changes: 5 additions & 5 deletions content/trainingen/_.en._.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "not found"
img: "_.jpg"
alt: ""
volgnummer: ""
title: 'not found'
img: '_.jpg'
alt: ''
volgnummer: ''
---

# The requested page could not be found
# The requested page could not be found
10 changes: 5 additions & 5 deletions content/trainingen/_.nl._.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "niet gevonden"
img: "_.jpg"
alt: ""
volgnummer: ""
title: 'niet gevonden'
img: '_.jpg'
alt: ''
volgnummer: ''
---

# De gevraagde pagina kon niet worden gevonden
# De gevraagde pagina kon niet worden gevonden
3 changes: 2 additions & 1 deletion content/trainingen/feedback-in-onderwijs.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ img: feedback-in-onderwijs-1.jpg
alt: feedback gesprek tussen 2 leerkrachten
volgnummer: 4
---
Dit moet dan vertaald worden

Dit moet dan vertaald worden
270 changes: 135 additions & 135 deletions messages/en.json

Large diffs are not rendered by default.

270 changes: 135 additions & 135 deletions messages/nl.json

Large diffs are not rendered by default.

88 changes: 44 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
{
"name": "yeptrainingen-svelte",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/enhanced-img": "^0.2.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"bootstrap": "^4.6.2",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"mdsvex": "^0.11.0",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"rehype-rewrite": "^4.0.2",
"sass": "1.52.3",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"svelte-preprocess": "^5.1.4",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3",
"@inlang/paraglide-js": "1.9.1"
},
"type": "module",
"dependencies": {
"pug": "^3.0.3",
"@inlang/paraglide-sveltekit": "0.9.2"
}
}
"name": "yeptrainingen-svelte",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/enhanced-img": "^0.2.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"bootstrap": "^4.6.2",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"mdsvex": "^0.11.0",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"rehype-rewrite": "^4.0.2",
"sass": "1.52.3",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"svelte-preprocess": "^5.1.4",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3",
"@inlang/paraglide-js": "1.9.1"
},
"type": "module",
"dependencies": {
"pug": "^3.0.3",
"@inlang/paraglide-sveltekit": "0.9.2"
}
}
33 changes: 15 additions & 18 deletions project.inlang/settings.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"sourceLanguageTag": "nl",
"languageTags": [
"nl",
"en"
],
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-valid-js-identifier@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@latest/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "./messages/{languageTag}.json"
}
}
"$schema": "https://inlang.com/schema/project-settings",
"sourceLanguageTag": "nl",
"languageTags": ["nl", "en"],
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-valid-js-identifier@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@latest/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "./messages/{languageTag}.json"
}
}
10 changes: 5 additions & 5 deletions src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { AvailableLanguageTag } from "../../lib/paraglide/runtime"
import type { ParaglideLocals } from "@inlang/paraglide-sveltekit"
import type { AvailableLanguageTag } from '../../lib/paraglide/runtime';
import type { ParaglideLocals } from '@inlang/paraglide-sveltekit';
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
interface Locals {
paraglide: ParaglideLocals<AvailableLanguageTag>,
}
interface Locals {
paraglide: ParaglideLocals<AvailableLanguageTag>;
}
// interface PageData {}
// interface PageState {}
// interface Platform {}
Expand Down
6 changes: 3 additions & 3 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// file initialized by the Paraglide-SvelteKit CLI - Feel free to edit it
import { sequence } from "@sveltejs/kit/hooks"
import { i18n } from "$lib/i18n"
import { sequence } from '@sveltejs/kit/hooks';
import { i18n } from '$lib/i18n';

// add your own hooks as part of the sequence here
export const handle = sequence(i18n.handle())
export const handle = sequence(i18n.handle());
4 changes: 2 additions & 2 deletions src/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// file initialized by the Paraglide-SvelteKit CLI - Feel free to edit it
import { i18n } from "$lib/i18n"
import { i18n } from '$lib/i18n';

export const reroute = i18n.reroute()
export const reroute = i18n.reroute();
38 changes: 17 additions & 21 deletions src/lib/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
// file initialized by the Paraglide-SvelteKit CLI - Feel free to edit it
import { createI18n } from "@inlang/paraglide-sveltekit"
import * as runtime from "$lib/paraglide/runtime.js"
import { createI18n } from '@inlang/paraglide-sveltekit';
import * as runtime from '$lib/paraglide/runtime.js';

export const i18n = createI18n(runtime, {
pathnames: {
"/team": {
nl: "/team",
en: "/team",

},
"/blog": {
nl: "/blog",
en: "/blog",

},
"/onze-aanpak": {
nl: "/onze-aanpak",
en: "/our-approach",

},
}

})
pathnames: {
'/team': {
nl: '/team',
en: '/team'
},
'/blog': {
nl: '/blog',
en: '/blog'
},
'/onze-aanpak': {
nl: '/onze-aanpak',
en: '/our-approach'
}
}
});
53 changes: 26 additions & 27 deletions src/lib/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
import type { AvailableLanguageTag } from '$lib/paraglide/runtime.js';
const importPathsNl = {
blog: import.meta.glob('$content/blog/*.nl.md'),
coaching: import.meta.glob('$content/coaching/*.nl.md'),
opdrachtgevers: import.meta.glob('$content/opdrachtgevers/*.nl.md'),
team: import.meta.glob('$content/team/*.nl.md'),
trainingen: import.meta.glob('$content/trainingen/*.nl.md')
blog: import.meta.glob('$content/blog/*.nl.md'),
coaching: import.meta.glob('$content/coaching/*.nl.md'),
opdrachtgevers: import.meta.glob('$content/opdrachtgevers/*.nl.md'),
team: import.meta.glob('$content/team/*.nl.md'),
trainingen: import.meta.glob('$content/trainingen/*.nl.md')
};
const importPathsEn = {
blog: import.meta.glob('$content/blog/*.en.md'),
coaching: import.meta.glob('$content/coaching/*.en.md'),
opdrachtgevers: import.meta.glob('$content/opdrachtgevers/*.en.md'),
team: import.meta.glob('$content/team/*.en.md'),
trainingen: import.meta.glob('$content/trainingen/*.en.md')
blog: import.meta.glob('$content/blog/*.en.md'),
coaching: import.meta.glob('$content/coaching/*.en.md'),
opdrachtgevers: import.meta.glob('$content/opdrachtgevers/*.en.md'),
team: import.meta.glob('$content/team/*.en.md'),
trainingen: import.meta.glob('$content/trainingen/*.en.md')
};

const importPathsMap = {
nl: importPathsNl,
en: importPathsEn
nl: importPathsNl,
en: importPathsEn
};


type ValidCategory = 'blog' | 'coaching' | 'opdrachtgevers' | 'team' | 'trainingen';

export const fetchContent = async (category: ValidCategory, language: AvailableLanguageTag) => {
const importPaths = importPathsMap[language];
const allPostFiles = importPaths[category];
const iterablePostFiles = Object.entries(allPostFiles);
const importPaths = importPathsMap[language];
const allPostFiles = importPaths[category];
const iterablePostFiles = Object.entries(allPostFiles);

const allPosts = await Promise.all(
iterablePostFiles.map(async ([path, resolver]) => {
const { metadata } = await resolver();
const postPath = path.replace(`/content/${category}/`, '').replace(`.${language}.md`, '');
return {
meta: metadata,
path: postPath
};
})
);
const allPosts = await Promise.all(
iterablePostFiles.map(async ([path, resolver]) => {
const { metadata } = await resolver();
const postPath = path.replace(`/content/${category}/`, '').replace(`.${language}.md`, '');
return {
meta: metadata,
path: postPath
};
})
);

return allPosts;
return allPosts;
};
2 changes: 1 addition & 1 deletion src/routes/blog/[blog_title]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { languageTag } from '$lib/paraglide/runtime.js';
import type { BlogPost } from '$lib/types';

export async function load({ depends, params }) {
depends("paraglide:lang");
depends('paraglide:lang');
let post;
try {
post = await import(`$content/blog/${params.blog_title}.${languageTag()}.md`);
Expand Down
Loading

0 comments on commit 55ad080

Please sign in to comment.