sbsev / site

Homepage of the German student-run non-profit initiative StudyTutors e.V.
https://studytutors.de
MIT License
15 stars 3 forks source link

Make Signup form translateable #69

Open kleinicke opened 2 years ago

kleinicke commented 2 years ago

Currently the Signup form is defined in the folder src/signup-form/de/. For other websites, the de can be exchanged with for example a us, at or it.

kleinicke commented 2 years ago

@janosh The new signupform can be translated and is shown for each of the languages. The submit part of the implementation is still missing.

Current issues, are when the signup form is loaded directly without being redirected from another URL, the site won't load. The reason is, that the microcopy signup store is not filled yet. This leads to an undefined country entry:

import { microcopy } from '$lib/stores'
import { get } from 'svelte/store'
var country = get(microcopy).country
console.log('country', country)

Which leads to error messages when the form is loaded. We need to wait until the signup store is filled until, we can access the country and continue importing the yml files for the form