-
Notifications
You must be signed in to change notification settings - Fork 42
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
base: master
Are you sure you want to change the base?
Changes from 4 commits
e366fe2
b161b5b
dfc0976
a947b55
73d4020
8d248c1
302b368
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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"> | ||
|
@@ -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: "/" %} | ||
{% 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 %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? :) There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"> |
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 %} | ||
|
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}") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't that be |
||
|
||
copy = p.dup | ||
copy.data['lang'] = 'en' | ||
copy.process("en/#{copy.name}") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
copy.data['title'] << " (untranslated, sorry)" | ||
|
||
notice = <<~NOTICE | ||
# Translation missing | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
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})? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only link |
||
NOTICE | ||
copy.content = "#{notice}\n\n#{copy.content}" | ||
|
||
copy | ||
end.compact | ||
|
||
site.pages += fakes | ||
end | ||
end | ||
end |
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! |
There was a problem hiding this comment.
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).