diff --git a/src/components/HtmlFormattedMessage.svelte b/src/components/HtmlFormattedMessage.svelte
index 81c85dc07..8a3166f55 100644
--- a/src/components/HtmlFormattedMessage.svelte
+++ b/src/components/HtmlFormattedMessage.svelte
@@ -63,7 +63,7 @@
export let options: Options | undefined = undefined;
- const adaptedOptions = {
+ $: adaptedOptions = {
...options,
values: Object.fromEntries(
Object.entries(options?.values ?? {}).map(([k, v]) => {
diff --git a/src/pages/Homepage.svelte b/src/pages/Homepage.svelte
index c1f2e8fc3..3720e6467 100644
--- a/src/pages/Homepage.svelte
+++ b/src/pages/Homepage.svelte
@@ -36,8 +36,10 @@
import { locale as currentLocale } from 'svelte-i18n';
import { get } from 'svelte/store';
- const playgroundSurveyUrl =
- 'https://microbit.org/teach/playground-survey/exploring-machine-learning/';
+ const playgroundSurveyUrlByLang: Record = {
+ en: 'https://microbit.org/teach/playground-survey/exploring-machine-learning/',
+ cy: 'https://microbit.org/cy/teach/playground-survey/exploring-machine-learning/',
+ };
$: hasExistingSession = $gestures.some(g => g.name || g.recordings.length);
let showDataLossWarning = false;
@@ -69,6 +71,9 @@
};
$: title = getTitle(Paths.HOME, $t);
+ $: playgroundSurveyUrl =
+ ($currentLocale ? playgroundSurveyUrlByLang[$currentLocale] : undefined) ??
+ playgroundSurveyUrlByLang.en;