Commit 1c348c55 authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Add translations

parent 9172b966
......@@ -12,11 +12,39 @@
"Statuten": "Statuten",
"Kommissionen": "Kommissionen",
"Protokolle": "Protokolle",
"contact": "Kontakt",
"contact.location": "Die Räumlichkeiten des AMIV befinden sich im Gebäude CAB, E-Stock, im Zentrum der ETH Zürich.",
"contact.description": "Gewisse Dienstleistungen des AMIV wurden im Laufe der Zeit in eigene Kommissionen ausgelagert. Dies umfasst unsere Fachvereins-Zeitschrift Blitz, die Bastler (mit eigenem Bauteile-Laden und Messplatz) vom Bastli, eine eigene Bier-Braukommission, ein \"Local Committee\" des europäischen Netzwerks EESTEC, die Amateur-Funker von der Funkbude sowie das Organisationskomitee der AMIV-Firmenmesse Kontakt. Zudem gibt es seit dem Jahr 2009 je eine Kommission, die die Studenten der spezialisierten Masterstudiengänge \"Biomedical Engineering\" und \"Energy Science\" zusammenfassen und betreuen.",
"language_button": "EN",
"cancel": "abbrechen",
"confirm": "bestätigen",
"enroll": "einschreiben",
"withdraw": "austragen",
"username": "Benutzername",
"password": "Passwort",
"event.title": "TItel",
"event.start_time": "Start Zeit",
"event.signup_count": "Anmeldungen",
"event.spots": "Freie Plätze"
"event.spots": "Freie Plätze",
"regular_member": "Ordentliches Mitglied",
"extraordinary_member": "Ausserordentliches Mitglied",
"honorary_member": "Ehrenmitglied",
"frontpage.whats_hot": "What's HOT right now?",
"frontpage.social_media": "Folge uns auf Social Media",
"profile.free_beer": "Du bist berechtigt, gratis Bier zu beziehen!",
"profile.set_rfid": "Setze deine RFID unten, um gratis Bier zu erhalten!",
"profile.membership": "Mitgliedschaft",
"profile.change_password": "Passwort ändern",
"profile.revert_to_ldap": "Zu LDAP zurückkehren",
"profile.set_password": "Passwort setzen",
"profile.password_requirements": "Anforderungen: min. 8 Zeichen, Gross-, Kleinbuchstaben und Zahlen.",
"profile.old_password": "Altes Passwort",
"profile.new_password": "Neues Passwort",
"profile.repeat_password": "Wiederholen",
"profile.rfid": "RFID",
"profile.newsletter_unsubscribe": "Vom Newsletter abmelden",
"profile.newsletter_subscribe": "Newsletter abonnieren",
"profile.search_groups": "Gruppen durchsuchen",
"profile.expire_on": "läuft am %{date} ab"
}
}
......@@ -12,11 +12,39 @@
"Statuten": "Statuten in english",
"Kommissionen": "Commissions",
"Protokolle": "Protocols",
"contact": "Contact",
"contact.location": "The premises of the AMIV are located in the building CAB, E floor, in the center of ETH Zurich.",
"contact.description": "Certain AMIV services have been outsourced to commissions over time. This includes our magazine Blitz, the workshop (with its own component shop) from the Bastli, its own beer brewing committee, a \"Local Committee\" of the European network EESTEC, the amateur radio operator of the Funkbude and the organizing committee of the AMIV company fair Kontakt. In addition, since 2009, there has been a commission that brings together and supervises the students of the specialized master programs \"Biomedical Engineering\" and \"Energy Science\".",
"language_button": "DE",
"cancel": "cancel",
"confirm": "confirm",
"enroll": "enroll",
"withdraw": "withdraw",
"username": "Username",
"password": "Password",
"event.title": "Title",
"event.start_time": "Starting time",
"event.signup_count": "Signup count",
"event.spots": "Spots"
"event.spots": "Spots",
"regular_member": "regular member",
"extraordinary_member": "extraordinary member",
"honorary_member": "honorary member",
"frontpage.whats_hot": "What's HOT right now?",
"frontpage.social_media": "Join us on social media!",
"profile.free_beer": "You are allowed to get free beer!",
"profile.set_rfid": "Set your RFID below to get free beer!",
"profile.membership": "Membership",
"profile.change_password": "Change password",
"profile.revert_to_ldap": "Revert to LDAP",
"profile.set_password": "Set password",
"profile.password_requirements": "Requirements: min 8 characters, upper and lower case letters and numbers",
"profile.old_password": "Old Password",
"profile.new_password": "New Password",
"profile.repeat_password": "Repeat",
"profile.rfid": "RFID",
"profile.newsletter_unsubscribe": "Unsubscribe from Newsletter",
"profile.newsletter_subscribe": "subscribe to Newsletter",
"profile.search_groups": "Search groups",
"profile.expire_on": "expires on %{date}"
}
}
import m from 'mithril';
import { i18n } from '../models/language';
module.exports = {
view() {
return m('div', [
m('h3', 'Kontakt'),
m('h3', i18n('contact')),
m('pre', 'AMIV an der ETH\nCAB E37\nUniversitätsstrasse 6\n8092 Zürich'),
m('pre', '+41 44 632 42 45\ninfo@amiv.ethz.ch'),
m(
'pre',
'Die Räumlichkeiten des AMIV befinden sich im Gebäude CAB, E-Stock, im Zentrum der ETH Zürich:'
),
m(
'pre',
'Gewisse Dienstleistungen des AMIV wurden im Laufe der Zeit in eigene Kommissionen ausgelagert. Dies umfasst unsere Fachvereins-Zeitschrift Blitz, die Bastler (mit eigenem Bauteile-Laden und Messplatz) vom Bastli, eine eigene Bier-Braukommission, ein "Local Committee" des europäischen Netzwerks EESTEC, die Amateur-Funker von der Funkbude sowie das Organisationskomitee der AMIV-Firmenmesse Kontakt. Zudem gibt es seit dem Jahr 2009 je eine Kommission, die die Studenten der spezialisierten Masterstudiengänge "Biomedical Engineering" und "Energy Science" zusammenfassen und betreuen.'
),
m('pre', i18n('contact.location')),
m('pre', i18n('contact.description')),
]);
},
};
import m from 'mithril';
import { apiUrl } from '../models/config';
import * as events from '../models/events';
import { i18n } from '../models/language';
const date = `${new Date().toISOString().split('.')[0]}Z`;
......@@ -117,13 +118,13 @@ export default class Frontpage {
view() {
return m('div#frontpage-container', [
m('h2', "What's HOT right now?"),
m('h2', i18n('frontpage.whats_hot')),
m('div.hot-row', this.hot.map((item, index) => renderHotCards(item, index))),
m('h2', 'Events'),
m('h2', i18n('Events')),
m('div.frontpage-row', this.events.map(item => renderCards(item))),
m('h2', 'Jobs'),
m('div.frontpage-row', this.jobs.map(item => renderCards(item))),
m('h2', 'Join us on social media!'),
m('h2', i18n('frontpage.social_media')),
m('div.frontpage-row', [
renderFacebookCard(this.facebook),
renderInstagramCard(this.instagram),
......
import m from 'mithril';
import { login } from '../models/auth';
import { Button } from '../components';
import { i18n } from '../models/language';
import InputGroup from './form/inputGroup';
module.exports = {
username: '',
......@@ -22,21 +24,26 @@ module.exports = {
});
},
},
m('h3', 'Login'),
m('h3', i18n('Login')),
m('p', this.error),
m('input.input[type=text][placeholder=Username]', {
oninput: m.withAttr('value', value => {
this.username = value;
}),
m(InputGroup, {
name: 'username',
title: i18n('username'),
value: this.username,
oninput: e => {
this.username = e.target.value;
},
}),
m('input.input[placeholder=Password][type=password]', {
oninput: m.withAttr('value', value => {
this.password = value;
}),
m(InputGroup, {
name: 'password',
title: i18n('password'),
value: this.password,
type: 'password',
oninput: e => {
this.password = e.target.value;
},
}),
m(Button, { label: 'Login' })
m(Button, { label: i18n('Login') })
),
]);
},
......
......@@ -4,6 +4,7 @@ import * as user from '../models/user';
import * as groups from '../models/groups';
import inputGroup from './form/inputGroup';
import { Button } from '../components';
import { i18n } from '../models/language';
// shows all relevant user information
class showUserInfo {
......@@ -12,14 +13,17 @@ class showUserInfo {
if (user.get().membership !== 'none') {
if (user.get().rfid !== undefined && user.get().rfid.length === 6) {
freeBeerNotice = m('div', 'You are allowed to get free beer!');
freeBeerNotice = m('div', i18n('profile.free_beer'));
} else {
freeBeerNotice = m('div', 'Set your RFID below to get free beer!');
freeBeerNotice = m('div', i18n('profile.set_rfid'));
}
}
return m('div', [
m('div', [m('span', 'Membership: '), m('span', user.get().membership)]),
m('div', [
m('span', `${i18n('profile.membership')}: `),
m('span', i18n(`${user.get().membership}_member`)),
]),
freeBeerNotice,
]);
}
......@@ -87,12 +91,12 @@ class changePasswordForm {
buttons = [
m(Button, {
...buttonArgs,
label: 'change password',
label: i18n('profile.change_password'),
events: { onclick: () => this.submit() },
}),
m(Button, {
disabled: this.password_old.length === 0,
label: 'Revert to LDAP',
label: i18n('profile.revert_to_ldap'),
events: {
onclick: () => {
this.password1 = '';
......@@ -105,16 +109,16 @@ class changePasswordForm {
} else {
buttons = m(Button, {
...buttonArgs,
label: 'set password',
label: i18n('profile.set_password'),
events: { onclick: () => this.submit() },
});
}
return m('div', [
m('div', 'Requirements: min 8 characters, upper and lower case letters and numbers'),
m('div', i18n('profile.password_requirements')),
m(inputGroup, {
name: 'password_old',
title: 'Old Password',
title: i18n('profile.old_password'),
type: 'password',
value: this.password_old,
oninput: e => {
......@@ -124,7 +128,7 @@ class changePasswordForm {
}),
m(inputGroup, {
name: 'password1',
title: 'New Password',
title: i18n('profile.new_password'),
type: 'password',
value: this.password1,
oninput: e => {
......@@ -134,7 +138,7 @@ class changePasswordForm {
}),
m(inputGroup, {
name: 'password2',
title: 'Repeat',
title: i18n('profile.repeat_password'),
type: 'password',
value: this.password2,
oninput: e => {
......@@ -175,7 +179,7 @@ class rfidForm {
return m('div', [
m(inputGroup, {
name: 'rfid',
title: 'RFID',
title: i18n('profile.rfid'),
value: this.rfid,
oninput: e => {
this.rfid = e.target.value;
......@@ -210,7 +214,9 @@ class announceSubscriptionForm {
return m(Button, {
...buttonArgs,
label: user.get().send_newsletter ? 'unsubscribe from Newsletter' : 'subscribe to Newsletter',
label: user.get().send_newsletter
? i18n('profile.newsletter_unsubscribe')
: i18n('profile.newsletter_subscribe'),
});
}
}
......@@ -230,7 +236,7 @@ class groupMemberships {
const filterForm = m('div', [
m(inputGroup, {
name: 'group_search',
title: 'Search groups',
title: i18n('profile.search_groups'),
oninput: e => {
this.query = e.target.value;
if (this.query.length > 0) {
......@@ -260,7 +266,7 @@ class groupMemberships {
buttons = [
m(Button, {
...buttonArgs,
label: 'cancel',
label: i18n('cancel'),
className: 'flat-button',
events: {
onclick: () => {
......@@ -272,7 +278,7 @@ class groupMemberships {
m('span', ' '),
m(Button, {
...buttonArgs,
label: 'confirm',
label: i18n('confirm'),
events: {
onclick: () => {
this.busy[membership.group._id] = true;
......@@ -293,7 +299,7 @@ class groupMemberships {
} else {
buttons = m(Button, {
...buttonArgs,
label: 'withdraw',
label: i18n('withdraw'),
events: {
onclick: () => {
this.confirm[membership.group._id] = true;
......@@ -306,7 +312,7 @@ class groupMemberships {
m('span', membership.group.name),
membership.expiry === undefined
? undefined
: m('span', `(expires on ${membership.expiry})`),
: m('span', `(${i18n('profile.expire_on', { date: membership.expiry })})`),
buttons,
]);
})
......@@ -341,7 +347,10 @@ class groupMemberships {
if (this.busy[group._id]) {
buttonArgs.disabled = true;
}
return m('div', [m('span', group.name), m(Button, { ...buttonArgs, label: 'enroll' })]);
return m('div', [
m('span', group.name),
m(Button, { ...buttonArgs, label: i18n('enroll') }),
]);
})
),
]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment