Skip to content

Commit

Permalink
Use a Welsh link on the home page in Welsh (#236)
Browse files Browse the repository at this point in the history
Fix a reactivity bug that meant it didn't change.
  • Loading branch information
microbit-matt-hillsdon committed Feb 16, 2024
1 parent bc57103 commit c4a56fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/HtmlFormattedMessage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
export let options: Options | undefined = undefined;
const adaptedOptions = {
$: adaptedOptions = {
...options,
values: Object.fromEntries(
Object.entries(options?.values ?? {}).map(([k, v]) => {
Expand Down
9 changes: 7 additions & 2 deletions src/pages/Homepage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string> = {
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;
Expand Down Expand Up @@ -69,6 +71,9 @@
};
$: title = getTitle(Paths.HOME, $t);
$: playgroundSurveyUrl =
($currentLocale ? playgroundSurveyUrlByLang[$currentLocale] : undefined) ??
playgroundSurveyUrlByLang.en;
</script>

<svelte:head>
Expand Down

0 comments on commit c4a56fb

Please sign in to comment.