Skip to content

Commit

Permalink
🔥 Removed friByte as sponsor (#46)
Browse files Browse the repository at this point in the history
* 🔥 Removed friByte as sponsor

Should have a section for friByte instead, like volunteering or
creators? 😅

Signed-off-by: SindreKjelsrud <sindre@kjelsrud.dev>

* 🚚 Merge english and norwegian program

Makes it much simpler to maintain the program, only one file per year.

In order to translate titles or descriptions etc. Add the same key twice suffixed with `_<language>`:

Ex: `{ "title": "Tittel", "title_en": "Title English" }` which will be converted to `{ "title": "Title English" }` if the user has selected english.

* 🐛 Deep clone program before replacing keys with translation

* Move json programs to ts files for easy type checking

* Import program files statically with clear error instructions

---------

Signed-off-by: SindreKjelsrud <sindre@kjelsrud.dev>
Co-authored-by: Mathias Haugsbø <mathiash98@gmail.com>
  • Loading branch information
SindreKjelsrud and mathiash98 authored Oct 16, 2024
1 parent 0eb2d2e commit b6bd819
Show file tree
Hide file tree
Showing 16 changed files with 938 additions and 642 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,27 @@ const t = useTranslation(Astro.url);

- Everything in the program comes from JSON files located in `src/program`.

- See `program.d.ts` for updated schema, here is an example that might be outdated:
- To add english translations, add a key to the program suffixed with `_en`. Ex: `{ "title": "Tittel", "title_en": "Title English" }` which will be converted to `{ "title": "Title English" }` if the user has selected english.

```json
{
"date": "2023-09-20",
"location": "Kvarteret, Bergen",
"locationUrl": "url",
"address": "Christies gate 14, 5015 Bergen",
"schedule": [
{
"title": "Event Name",
"description": "Description",
"speaker": "Name",
"title": "Program navn",
"title_en": "Event Name",
"description": "Beskrivelse",
"description_en": "Description",
"speaker": {
"name": "Name",
"description": "Beskrivelse",
"description_en": "Description",
"imageUrl": "url to image"
},
"from": "2023-09-20T19:24:00",
"to": "2023-09-20T20:24:00",
"type": "info",
Expand Down
Loading

0 comments on commit b6bd819

Please sign in to comment.