Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add basic English intro #58

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions www/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@ map_js: |
maxZoom: 18,
detectRetina: true
}).addTo(map);

defaults:
-
scope:
path: ""
type: "pages"
values:
lang: "de"
23 changes: 16 additions & 7 deletions www/_includes/header.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="de">
<html lang="{{ page.lang }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
Expand All @@ -12,18 +12,27 @@
<script src="/leaflet/leaflet.js"></script>
<script src="/js/turbolinks.js"></script>
<link rel="shortcut icon" href="/img/favicon.ico">
{% assign base = '' %}
{% if page.lang != "de" %}
{% assign base = "/" | append: page.lang | append: "/" %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either assign base = "/" above, or leave out the first "/" here. It should either be "/" and "/en/", or "" and "en/" (I believe the former, so links are interpreted correctly as domain-relative when in a deeper path).

{% endif %}
</head>
<body lang="de">

<div class="site">
<div class="menu_scroll_wrapper"><div class="menu">
<a {% if page.url == "/index.html" %} class="active" {% endif %} href="/">tl;dr</a>
<a {% if page.url == "/howtotreff.html" %} class="active" {% endif %} href="/howtotreff.html">Treff</a>
<a {% if page.url == "/chaotische_viertelstunde.html" %} class="active" {% endif %} href="/chaotische_viertelstunde.html?latest={{ page.vortraege_latest }}">c¼h</a>
<a {% if page.url == "/verein.html" %} class="active" {% endif %} href="/verein.html">Verein</a>
<a {% if page.url == "/kontakt.html" %} class="active" {% endif %} href="/kontakt.html">Kontakt</a>
<a {% if page.url == "{{base}}index.html" %} class="active" {% endif %} href="{{base}}index.html">tl;dr</a>
<a {% if page.url == "{{base}}howtotreff.html" %} class="active" {% endif %} href="{{base}}howtotreff.html">Treff</a>
<a {% if page.url == "{{base}}chaotische_viertelstunde.html" %} class="active" {% endif %} href="{{base}}chaotische_viertelstunde.html?latest={{ page.vortraege_latest }}">c¼h</a>
<a {% if page.url == "{{base}}verein.html" %} class="active" {% endif %} href="{{base}}verein.html">Verein</a>
<a {% if page.url == "{{base}}kontakt.html" %} class="active" {% endif %} href="{{base}}kontakt.html">Kontakt</a>
<a data-no-turbolink href="https://www.noname-ev.de/w/">Wiki</a>
<a {% if page.url == "/cryptoparty.html" %} class="active" {% endif %} href="/cryptoparty.html">Cryptoparty</a>
<a {% if page.url == "{{base}}cryptoparty.html" %} class="active" {% endif %} href="{{base}}cryptoparty.html">Cryptoparty</a>
{% if page.lang == "de" %}
<a href="{{ 'en/' | append: page.url | replace: '//','/' }}" lang="en">English</a>
{% else %}
<a href="{{ page.url | replace: 'en/','' }}" lang="de">Deutsch</a>
{% endif %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still unhappy about having this in the navigation… Can't it be in the sidebar? Or… anywhere else? :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this will still break the navbar layout. This issue have to be fixed first (ref #55).

</div></div>

<div class="cont">
39 changes: 39 additions & 0 deletions www/_includes/termine_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{% for termin in page.termine %}
<p {% if notfirst %}class="dim"{% endif %}>
{% assign notfirst = true %}

<b>date (yyyy-mm-dd): {{ termin.date | escape }}</b> from 19h<br>
{% if termin.override != "" %}
{{ termin.override | escape }}
{% elsif termin.stammtisch %}
<a href="stammtisch.html">Restaurant (“Stammtisch”)</a><br/>
<a href="yarpnarp.html">please RSVP</a><br/>
{% if termin.location != "" %}
{% for st in site.pages %}
{% unless st.layout == "stammtisch" %}
{% continue %}
{% endunless %}
{% unless st.locname == termin.location %}
{% continue %}
{% endunless %}
{% assign done = true %}
Location: <a href="{{ st.url }}">{{ termin.location | escape }}</a>
{% endfor %}
{% unless done %}
Location: <a href="stammtisch.html">{{ termin.location | escape }}</a>
{% endunless %}
{% else %}
Location: TBA
{% endif %}
{% else %}
regular meeting (<a href="anfahrt.html">Route?</a>)<br>
(short) talk:
{% if termin.topic %}
<a href="chaotische_viertelstunde.html#c14h_{{termin.c14h_id}}">{{ termin.topic | escape }}</a>
{% else %}
none yet ◉︵◉.
{% endif %}
{% endif %}
</p>
{% endfor %}

6 changes: 5 additions & 1 deletion www/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

<div class="main_right">
{% include foto.md %}
{% include termine.md %}
{% if page.lang == "en" %}
{% include termine_en.md %}
{% else %}
{% include termine.md %}
{% endif %}
</div>

{% include footer.html %}
33 changes: 33 additions & 0 deletions www/_plugins/lang_polyfill.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# encoding: utf-8



module Jekyll
class LangPolyfill < Generator
priority :high

def generate(site)
fakes = site.pages.map do |p|
next if p.data['lang'] != 'de'
next if File.exist?("en/#{p.name}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't that be p.path?


copy = p.dup
copy.data['lang'] = 'en'
copy.process("en/#{copy.name}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy.path?

copy.data['title'] << " (untranslated, sorry)"

notice = <<~NOTICE
# Translation missing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be sensible to put this in a <div> with a class, so that we can highlight it specifically and make it stand out as an info-box (As done here like so)


Sorry, unfortunately the current page has not been translated yet. [Maybe an
automated translation suffices](https://translate.google.com/translate?hl=en&sl=de&tl=en&u=#{site.config['url']}#{copy.url})?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only link automated translation. A link goes to a thing, not a statement.

NOTICE
copy.content = "#{notice}\n\n#{copy.content}"

copy
end.compact

site.pages += fakes
end
end
end
2 changes: 1 addition & 1 deletion www/edit_c14.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: c¼h editieren
<p>
Bitte speichere folgenden Link. Du brauchst ihn, wenn du in Zukunft deinen
Eintrag editieren willst:<br />
<a href="/edit_c14.html?id=(( .Id ))&pw=(( .Password.String ))">http://www.noname-ev.de/edit_c14.html?id=(( .Id ))&pw=(( .Password.String ))</a>
<a href="edit_c14.html?id=(( .Id ))&pw=(( .Password.String ))">http://www.noname-ev.de/edit_c14.html?id=(( .Id ))&pw=(( .Password.String ))</a>
</p>
(( end ))

Expand Down
31 changes: 31 additions & 0 deletions www/en/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
layout: default
title: Intro in English
lang: en
---

# What?
Meeting about computers, technology and their influence on society

# When?
Every Thursday, 19h

# Where?
Most often in the university building [Mathematikon, Im Neuenheimer Feld 205,
Seminarraum A](anfahrt.html). Use the map or QR codes to find your way.

Every first Thursday of a month we [meet in a random restaurant](stammtisch.html)
(„Stammtisch“). [Please RSVP](yarpnarp.html) a couple of days in advance, so
that we can book a suitable table. It’s pretty simple, just enter your nick
and click “yarp”. Be sure to check the site again before you go, sometimes we
need to choose a different place if there are too many people.

You can join either – both are suitable for newcomers.

# Language barrier
There's no denying the main language of the meetings, talks and such is
German. Don't turn away just yet, because almost everyone speaks English.
We can't guarantee you'll feel home right off the bat, but we'll sure try
to include you.

See you soon!