Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into resources
Browse files Browse the repository at this point in the history
  • Loading branch information
b-n committed Oct 26, 2024
2 parents e74d0d4 + bc5a612 commit de7a520
Show file tree
Hide file tree
Showing 16 changed files with 93 additions and 187 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ GEM
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2024.1)
tzinfo-data (1.2024.2)
tzinfo (>= 1.0.0)
unicode-display_width (2.6.0)
webrick (1.8.2)
Expand Down
21 changes: 14 additions & 7 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,25 @@ sass:

include:
- _pages
- _redirects
exclude:
- .jekyll-cache/
languages: ['en', 'nl']
exclude_from_localizations: ['assets', 'admin', 'vendor']
exclude_from_localizations: ['assets', 'admin', 'vendor', '_redirects']
# We don't want english to be any more or less special than other languages
default_locale_in_subfolder: true

# header menu items
# text: the i18n key for link
# namespace: the namespace that matches the page's frontmatter namespac
header_themes:
- url: /about
text: about
- url: /events
text: events
- text: about
namespace: about
- text: events
namespace: events
# TODO: Uncomment when we want to go live with resources
# - url: /resources
# text: resources
# - text: resources
# namespace: resources

permalink: pretty
future: true
Expand Down
10 changes: 10 additions & 0 deletions _events/biweekly-planning-meeting-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Biweekly Planning Meeting
date: 2024-11-04 18:00
locations:
- The Netherlands
hide_form: false
---
Our biweekly action planning meeting, hosted from the TWC Slack.

We hope to open this beyond slack one day!
10 changes: 10 additions & 0 deletions _events/biweekly-planning-meeting-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Biweekly Planning Meeting
date: 2024-11-18 18:00
locations:
- The Netherlands
hide_form: false
---
Our biweekly action planning meeting, hosted from the TWC Slack.

We hope to open this beyond slack one day!
2 changes: 1 addition & 1 deletion _i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ home:

connect:
info: Get involved!
description: The easiest way to get involved is to attend an upcoming <a href="/events" >events</a>.
description: The easiest way to get involved is to attend an upcoming <a href="/en/events" >events</a>.
email: Your email
name: Your name
public_link: Social media link
Expand Down
2 changes: 1 addition & 1 deletion _i18n/nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ home:

connect:
info: Sluit je aan!
description: De makkelijkste manier om mee te doen is door deel te nemen aan een van onze komende <a href="/events">evenementen</a>.
description: De makkelijkste manier om mee te doen is door deel te nemen aan een van onze komende <a href="/nl/activiteiten">evenementen</a>.
email: Email
name: Naam
public_link: Sociale media link
Expand Down
2 changes: 1 addition & 1 deletion _includes/events.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% unless page.permalink == '/events' %}
<a href="/events">{% t home.events.more %}</a>
<a href="{% tl events %}">{% t home.events.more %}</a>
{% endunless %}
<ul
class="list -no-list-style l-stack -vertical"
Expand Down
6 changes: 3 additions & 3 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<header class="header dropdown__header" role="banner">
<div>
<a href="/">
<a href="{% tl index %}">
<h1 class="logo">{{ site.title }}</h1>
<p class="work">Tech <span class="link">Werkers</span> NL</p>
</a>
Expand All @@ -11,13 +11,13 @@ <h1 class="logo">{{ site.title }}</h1>
<ul id="nav" class="dropdown__menu hide">
{% for link in site.header_themes %}
<li>
<a href="{{link.url}}">{{ site.translations[site.lang].pages[link.text] }}</a>
<a href="{% tl link.namespace %}">{{ site.translations[site.lang].pages[link.text] }}</a>
</li>
{% endfor %}
</ul>
</li>
<li>
<a href="{% translate_link join %}">{% t connect.subscribe %}</a>
<a href="{% tl join %}">{% t connect.subscribe %}</a>
</li>
</ul>
</header>
2 changes: 1 addition & 1 deletion _includes/links.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name="subscribe"
class="join-form"
method="POST"
action="/welcome"
action="{% tl welcome %}"
data-netlify="true"
>
<div class="control">
Expand Down
1 change: 1 addition & 0 deletions _pages/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
layout: page
permalink: /events
permalink_nl: /activiteiten
namespace: events
languages: ['en', 'nl']
---

Expand Down
11 changes: 0 additions & 11 deletions _pages/generic-welcome.md

This file was deleted.

40 changes: 0 additions & 40 deletions _pages/press_mentions.md

This file was deleted.

2 changes: 2 additions & 0 deletions _pages/subscribe-redirect.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
layout: page
permalink: /welcome
permalink_nl: /welkom
namespace: welcome
hide_form: true
---

Expand Down
18 changes: 18 additions & 0 deletions _redirects
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# All redirects in this file are parsed down from top to bottom

# Redirect default Netlify subdomain to primary domain
https://techwerkers.netlify.com/* https://techwerkers.nl/:splat 301!

# Root domain redirects
/ /nl/ 301! Language=nl
/ /en/ 301! Language=en
/ /en/ 301!

# Locale specific redirects
/over_ons /nl/over_ons 301!
/activiteiten/* /nl/activitieten/:splat 301!
/activiteiten /nl/activitieten 301!
/about /en/about 301!
/events/* /en/events/:splat 301!
/events /en/events 301!

# Note: do not include /* redirects, because you are likely to end up in a loop
# unless they're in the localised list above
30 changes: 30 additions & 0 deletions docs/i18n.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# I18n

Accessibility is important. Reading things in your own language is also important.

## Default locales

The fallback locale is `en`. Apart from that, landing on techwerkers.nl should redirect to techwerkers.nl/en/. Otherwise there is no special treatment of the `en` locale.

## Translation keys

`_i18n/` contains all the things you should need for translation keys. In
general, it is better to use a translation key than it is to switch between languages.

`<h1>Something</h1>`

`<h1>{{ t 'something' }}</h1>`

`<h1>{{ translate 'something' }}</h1>`

👆 The above assumes a key of `something` exists in locale file in `_i18n/`.

## Links

Use `namespace` frontmatter attribute on pages, and the `translate_link` or `tl` tag in the `href`.

`<a href="/something">Something</a>`

`<a href="{% tl something %}">Something</a>`

`<a href="{% translate_link something %}">Something</a>`
121 changes: 0 additions & 121 deletions themes.md

This file was deleted.

0 comments on commit de7a520

Please sign in to comment.