From 59359ce62be7d3f826cb9a56aa05a08a15aa788e Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Fri, 22 Dec 2017 07:37:17 +0100 Subject: [PATCH 1/4] Add support for multilingual page --- _config.yml | 3 +++ _includes/menu.html | 2 ++ _layouts/page.html | 7 +++++++ assets/css/index.css | 5 +++++ index.md | 2 ++ mumble.md | 2 ++ 6 files changed, 21 insertions(+) diff --git a/_config.yml b/_config.yml index 4e08ea0..9ea58be 100644 --- a/_config.yml +++ b/_config.yml @@ -4,3 +4,6 @@ defaults: path: "" values: layout: "page" +langs: + de: "Deutsch" + en: "English" diff --git a/_includes/menu.html b/_includes/menu.html index 3eef7e7..14a21ce 100644 --- a/_includes/menu.html +++ b/_includes/menu.html @@ -1,9 +1,11 @@ {% for node in site.pages %} +{% if node.lang == page.lang %} {% if node.url == page.url %}
  • {{ node.menutitle }}
  • {% else %}
  • {{ node.menutitle }}
  • {% endif %} +{% endif %} {% endfor %}
  • Git
  • Wiki
  • diff --git a/_layouts/page.html b/_layouts/page.html index a0d28cd..fd7d34e 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -1,6 +1,13 @@ {% include header.html %}
    +
    + {% assign translations = site.pages | where: "ref", page.ref | sort: 'lang' %} + {% for node in translations %} + {{ site.langs[node.lang] | escape }} + {% endfor %} +
    + {{ content }}
    diff --git a/assets/css/index.css b/assets/css/index.css index adf8cab..67fb98a 100644 --- a/assets/css/index.css +++ b/assets/css/index.css @@ -122,6 +122,11 @@ body { .whitebox h2 { color: #1eb513; font-size: 1.5em; } .whitebox h3 { color: #1eb513; font-size: 1em; } +.whitebox .lang-list { + font-size: 0.8rem; + text-align: center; +} + .sidebar .boxhead { font-size:1.1rem; text-transform: uppercase; diff --git a/index.md b/index.md index db4571a..bbd6915 100644 --- a/index.md +++ b/index.md @@ -1,6 +1,8 @@ --- title: The friendly neighborhood undead tech community menutitle: Startseite +lang: de +ref: home --- # Willkommen bei Zombi diff --git a/mumble.md b/mumble.md index ee2a0cb..bddb674 100644 --- a/mumble.md +++ b/mumble.md @@ -1,6 +1,8 @@ --- title: Mumble menutitle: Mumble +lang: de +ref: mumble --- # Mumble From 31e0bb03856bfccede80f5eac57251fc9b1c3ec8 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Fri, 22 Dec 2017 07:38:32 +0100 Subject: [PATCH 2/4] Translate mumble page --- mumble-en.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 mumble-en.md diff --git a/mumble-en.md b/mumble-en.md new file mode 100644 index 0000000..a5a5a11 --- /dev/null +++ b/mumble-en.md @@ -0,0 +1,29 @@ +--- +title: Mumble +menutitle: Mumble +lang: en +ref: mumble +--- + +# Mumble + + + +Our community hosts a Mumble server. If you want to contact us or talk about +Technology or any other topic, you can connect to our Mumble server. + +You can find our Mumble server here: Unser Mumble-Server findet sich unter: +[mumble.zom.bi](mumble://mumble.zom.bi) + +Mumble is an Open Source VOIP software, which provides low latency and high +audio quality. You can find more information on the +[official webpage for Mumble](https://wiki.mumble.info/wiki/Main_Page). + +For the mobile users among you there is +[Mumblefy for Apple iOS](https://itunes.apple.com/us/app/mumblefy/id858752232?mt=8) +and the +[Plumble app for Android](https://play.google.com/store/apps/details?id=com.morlunk.mumbleclient.free&hl=en) + +We would like you to join our discussions and conversations. The more ther merrier! + + From e7cc6fd44ee0993ef6e7a78104d7d9e840dc518d Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Fri, 22 Dec 2017 07:51:55 +0100 Subject: [PATCH 3/4] Translate home page --- index-en.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 index-en.md diff --git a/index-en.md b/index-en.md new file mode 100644 index 0000000..a1b22e1 --- /dev/null +++ b/index-en.md @@ -0,0 +1,34 @@ +--- +title: The friendly neighborhood undead tech community +menutitle: Home +lang: en +ref: home +--- + +# Welcome to Zombi + +## Who are we? + +Zombi is a small community with about 25 members, who are mostly from +Germany and Austria, but also include people from other parts of +Europe and North America. Our community is rather dynamic: People from +all over the world occasionaly find their way to our Mumble server or +into our [XMPP group chat](xmpp://zombi@conference.zom.bi), and decide +to stay. We get to know a lot of interesting people. Of course the +topics don't have to be technical. Often we discuss cultural +differences, current events or talk about anything and everything. New +friendships are formed and are strengthened, sometimes even by +exchanging sweets and delicacies. + +## What do we do? + +Apart from the daily discussions, we also do projects of every kind +together. One of the long-living projects is the administration of our +Linux root server, which hosts our Mumble server, mail server, Gitlab, +DNS, a Nextcloud instance, a web service for synchronized video watching +and a bunch of more services for our members. + +Sometimes we play games together whether it'd be in person or through +the internet. Among the latter are games like Minecraft, Rust, CS:GO, +Dota 2, TableTop Simulator, Arma 3, Guns of Icarus and whatever else +sounds fun. From 030e1bce0e25c72e980d586d74069fe21807769c Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Fri, 22 Dec 2017 19:41:14 +0100 Subject: [PATCH 4/4] Improve language chooser --- _config.yml | 4 ++-- assets/css/index.css | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index 9ea58be..60f8ac0 100644 --- a/_config.yml +++ b/_config.yml @@ -5,5 +5,5 @@ defaults: values: layout: "page" langs: - de: "Deutsch" - en: "English" + de: "DE" + en: "EN" diff --git a/assets/css/index.css b/assets/css/index.css index 67fb98a..282237b 100644 --- a/assets/css/index.css +++ b/assets/css/index.css @@ -124,7 +124,8 @@ body { .whitebox .lang-list { font-size: 0.8rem; - text-align: center; + display: inline; + float: right; } .sidebar .boxhead {