Skip to content

Commit

Permalink
Merge branch 'feat/es-de-translations'
Browse files Browse the repository at this point in the history
  • Loading branch information
th0rgall committed Jun 27, 2024
2 parents 71253b0 + 8ed806b commit b8ec7b3
Show file tree
Hide file tree
Showing 14 changed files with 3,108 additions and 963 deletions.
15 changes: 11 additions & 4 deletions src/lib/components/Footer.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<script lang="ts">
import { _, locale } from 'svelte-i18n';
import routes from '$lib/routes';
import { SHOP_URL, WTMG_BLOG_BASE_URL, WTMG_UTM_SOURCE, mailToSupportHref } from '$lib/constants';
import {
SHOP_URL,
STP_TITLE,
STP_URL,
WTMG_BLOG_BASE_URL,
WTMG_UTM_SOURCE,
mailToSupportHref
} from '$lib/constants';
import Socials from './Socials.svelte';
import LanguageSelector from './LanguageSelector.svelte';
import WtmgLogo from './UI/WTMGLogo.svelte';
Expand All @@ -10,7 +17,7 @@
import trackEvent from '$lib/util/track-plausible';
import { PlausibleEvent } from '$lib/types/Plausible';
import createUrl from '$lib/util/create-url';
import { coerceToMainLanguageENBlank } from '$lib/util/get-browser-lang';
import { coerceToMainLanguage, coerceToMainLanguageENBlank } from '$lib/util/get-browser-lang';
const wtmgSignURLParams = new URLSearchParams({
...($user
Expand Down Expand Up @@ -65,8 +72,8 @@
title: $_('footer.link-category-titles.our-projects'),
links: [
{
title: $_('footer.links.slow-travel-pass.title'),
link: createUrl($_('footer.links.slow-travel-pass.url'), {
title: STP_TITLE,
link: createUrl(`${STP_URL}/${coerceToMainLanguage($locale ?? undefined)}`, {
utm_source: WTMG_UTM_SOURCE,
utm_medium: 'web',
utm_content: 'footer'
Expand Down
2 changes: 2 additions & 0 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export const WTMG_BLOG_BASE_URL = 'https://blog.welcometomygarden.org';
export const WTMG_UTM_SOURCE = 'welcometomygarden.org';
export const UTM_MEMBERSHIP_CAMPAIGN = 'membership';
export const DEFAULT_MAP_STYLE = 'mapbox://styles/mapbox/streets-v8';
export const STP_URL = 'https://slowtravelpass.com';
export const STP_TITLE = 'Slow Travel Pass';

export const LOCATION_BELGIUM = { longitude: 4.5, latitude: 50.5 };
export const LOCATION_WESTERN_EUROPE = {
Expand Down
6 changes: 3 additions & 3 deletions src/lib/util/get-browser-lang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ const coercedBrowserLanguage = () =>

export default coercedBrowserLanguage;

export const coerceToSupportedLanguage = (lang: string | undefined): SupportedLanguage => {
export const coerceToSupportedLanguage = (lang: string | undefined | null): SupportedLanguage => {
if ((SUPPORTED_LANGUAGES as ReadonlyArray<string>).includes(lang ?? '')) {
return lang as SupportedLanguage;
} else {
return 'en';
}
};

export const coerceToMainLanguage = (lang: string | undefined): MainLanguage => {
export const coerceToMainLanguage = (lang: string | undefined | null): MainLanguage => {
if ((MAIN_LANGUAGES as ReadonlyArray<string>).includes(lang ?? '')) {
return lang as MainLanguage;
} else {
return 'en';
}
};

export const coerceToMainLanguageENBlank = (lang: string | undefined): string => {
export const coerceToMainLanguageENBlank = (lang: string | undefined | null): string => {
const coercedLang = coerceToMainLanguage(lang);
if (coercedLang === 'en') {
return '';
Expand Down
1,970 changes: 1,290 additions & 680 deletions src/locales/de.json

Large diffs are not rendered by default.

54 changes: 0 additions & 54 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,42 +195,6 @@
},
"message": "Happy camping!"
},
"recommendations": {
"title": "Slow travel inspirations",
"description": "Planning to discover Belgium on foot or by bike? Here are some links and tools we can warmly recommend!",
"recommendations-groups": {
"0": {
"title": "Planning tools, apps & maps",
"recommendations": {
"0": "Route planner for cycling and hiking: BRouter",
"1": "Another great route planner: Komoot",
"2": "Great route finder and planner: OutdoorActive",
"3": "Great navigation app for cycling and hiking: OSMAnd",
"4": "Another great navigation app: ViewRanger",
"5": "Overview of the whole cycling network cycling layer of OpenStreetMap"
}
},
"1": {
"title": "Trail info",
"recommendations": {
"0": "Great collection of hiking trails: RouteYou",
"1": "Knooppunten network planner: Wandelknooppunt",
"2": "Long distance trails in Wallonia: le RAVeL",
"3": "Long distance biking trails in Flanders: LF network Flanders",
"4": "Long distance hiking trails in Flanders and Wallonia: Grote Routepaden"
}
},
"2": {
"title": "Other accomodation services",
"recommendations": {
"0": "Hospitality network for cyclists: WarmShowers",
"1": "More detailed information about all bivouac places: Bivakzone.be"
}
}
},
"message": "Enjoy!",
"contact": "Anything else we should add to this list? Drop us a line at {support} to let us know."
},
"faq": {
"title": "FAQ",
"description": "Frequently asked questions",
Expand Down Expand Up @@ -1476,20 +1440,6 @@
"our-story-description": "<p>Hey! We’re Dries and Manon and we’re the proud parents of Welcome To My Garden. In 2019, we cycled from Brussels to Tokyo. Over the course of 11 months, we travelled through 21 countries, and were hosted by countless incredible people along the way.</p><p>When we arrived back in Belgium, we asked ourselves: how can we make slow travel easier and more fun in our own country? On a rainy Sunday afternoon in 2020, Dries set up the first version of WTMG. Within two hours, there were 50 gardens on the map - and after two weeks, there were 500!</p><p>We’ve come a long way since then: today, WTMG counts 30.000+ users and 4000+ gardens. It’s clear we’re here to stay! And it’s time to step up. We’ve listened to you, our community, and we’re now investing in making WTMG meet all your slow travel needs.</p><p>WTMG exists thanks to the hard work of a passionate bunch of volunteers, who invested evenings and weekends in it. But to keep going, we need more time and people power. This is why Thor and Janneke also jumped on board. We’re giving it our all, and are hoping that you will join us on the ride!</p>",
"bigger-picture-title": "The bigger picture",
"bigger-picture-description": "<p>If there’s one thing we’ve learned over the past few years, it’s this: it’s time to slow down. This applies to life in general, but also definitely to travel specifically. The faster we travel, the more we miss out on. Fast travel generates a lot of CO2 emissions, disconnects people from their surroundings, and damages communities. Enter slow travel!</p><p>And enter WTMG! We are proud to be part of the solution to this global challenge. In two years’ time, WTMG has achieved a lot:<ul><li>31.000 users have embarked on a slow travel adventure</li><li>4.300 warm-hearted hosts have opened up their garden to slow travellers</li><li>57.000 stay requests have been sent through the WTMG platform</li><li>We started in Belgium but more and more gardens are now also popping up across Europe and beyond?</li><li>We received financial support from partners like Wikimedia Belgium, Grote Routepaden vzw, GR Sentiers and Natuurpunt</li></ul></p><p>The most meaningful and memorable experiences happen when we take our time to explore and engage with our surroundings. With WTMG, we want to help you do just that. Together, we can make the world a better place – by travelling more slowly and more sustainably. Will you join the ride?</p><p>We’re always open to new ideas and collaborations, so please don’t hesitate to get in touch!</p>",
"contribute-blocks": {
"1": {
"title": "Become a Superfan",
"text": "<a href=\"/about-superfan\">Become a Superfan</a> and get access to extra features! Superfans are very important to WTMG as they keep it free for everyone to use."
},
"2": {
"title": "Go on a secret trip",
"text": "With <a href=\"https://www.slowby.travel/?utm_source=welcometomygarden.org&utm_medium=web&utm_content=contribute_method\" target=\"_blank\">Slowby</a>, WTMG’s little sister, you can go on a secret slow travel trip! We take care of the planning. All you need to do is pack and pedal, or walk! You can also get a <a href=\"https://gift.slowby.travel/?utm_source=welcometomygarden.org&utm_medium=web&utm_campaign=giftcard&utm_content=contribute_method\" target=\"_blank\">gift card</a> for someone you love!"
},
"3": {
"title": "Spread the word",
"text": "Tell other slow travel lovers and garden owners about WTMG, and share WTMG on social media. More slow travellers means a bigger impact on our beautiful world!"
}
},
"contributors": "Contributors",
"amazing-people": "Last but not least, we want to thank these amazing people",
"cradle": "Without these amazing people, Welcome To My Garden wouldn’t exist. They stood at the cradle of the platform and believed in it from the start!",
Expand All @@ -1514,10 +1464,6 @@
"title": "Women Don't Cycle - The Film",
"url": "https://womendontcycle.com/?utm_source=welcometomygarden.org&utm_medium=web&utm_content=footer"
},
"slow-travel-pass": {
"title": "Slow Travel Pass",
"url": "https://slowtravelpass.com/en"
},
"wtmg-sign": {
"title": "WTMG Sign"
}
Expand Down
Loading

0 comments on commit b8ec7b3

Please sign in to comment.