Skip to content

Commit 4f02c88

Browse files
committed
locale
1 parent a272f46 commit 4f02c88

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

frontend/src/routes/+layout.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
<style>
2525
@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@500&display=swap');
26-
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
2726
2827
:global(:root.light) {
2928
--page-bg: #fafafa;
@@ -86,7 +85,7 @@
8685
display: flex;
8786
flex-direction: row;
8887
align-items: center;
89-
font-family: 'Roboto', 'Zen Kaku Gothic New', sans-serif;
88+
font-family: 'Zen Kaku Gothic New', sans-serif;
9089
width: 100vw;
9190
height: 100vh;
9291
background-color: var(--page-bg);

frontend/src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
});
5757
5858
async function generateNew(presetSeed?: number) {
59-
if (presetSeed) {
59+
if (presetSeed !== undefined) {
6060
seed = presetSeed;
6161
} else {
6262
seed = Math.floor(Math.random() * 1000000) + 1;

frontend/src/routes/+page.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { initialSettingsStore, placenameDatasetStore } from './store';
66
export async function load(event: any) {
77
const params = new URLSearchParams(event.url.search);
88
const localeSrc = params.get('locale');
9-
const locale = localeSrc ? localeSrc : getLocaleFromNavigator() || 'en';
9+
let locale = localeSrc ? localeSrc : getLocaleFromNavigator() || 'en';
10+
locale = locale.split('-')[0];
1011
setupI18n(locale);
1112

1213
const initialSeedSrc = params.get('seed');

0 commit comments

Comments
 (0)