Commit 5e621a06 authored by Marius Trautrims's avatar Marius Trautrims

Add i18n database for pool categories

parent 6b28bc5b
......@@ -19,3 +19,4 @@ zimme:active-route
......@@ -149,6 +149,7 @@ session@1.1.0
......@@ -4,8 +4,7 @@ ARSnova Flashcards is a digital recreation of a classic learning tool. The servi
## Getting Started
To start ARSnova Flashcards on localhost use `npm start` inside the repository. You can then access
ARSnova Flashcards from your host machine by opening http://localhost:3000.
To start ARSnova Flashcards on localhost the first time use `npm run init` inside the repository. Every other run you can use `npm start` to start ARSnova Flashcards. You can then access ARSnova Flashcards from your host machine by opening http://localhost:3000.
## CI Pipeline
......@@ -66,6 +66,15 @@ Router.route('/pool', {
name: 'pool'
Router.route('/pool/:_id', {
name: 'category',
template: 'category',
data: function() {
var currentPool = this.params._id;
return Categories.findOne({_id: currentPool});
Router.route('/profile', {
name: 'userprofile'
<template name="pool">
<div class="col-md-12" id="pool-category-region">
<div class="list-group">
{{#each getpool}}
<a class="list-group-item" href="pool/{{name}}"><span class="badge">0</span> {{name}}</a>
{{#each getCategories}}
<a class="list-group-item" href="pool/{{_id}}">
<span class="badge">0</span> {{name}}</a>
<template name="category">
Template.registerHelper("getpool", function(id) {
// German
if (getUserLanguage() == "de"){
return [
{"id": "00", "name": "Agrar- und Forstwissenschaften"},
{"id": "01", "name": "Informations- und Telekommunikationstechnik"},
{"id": "02", "name": "Ingeniuerswissenschaften"},
{"id": "03", "name": "Kultur- und Gesellschaftswissenschften"},
{"id": "04", "name": "Kunst und Musik"},
{"id": "05", "name": "Mathematik und Naturwissenschaften"},
{"id": "06", "name": "Medien"},
{"id": "07", "name": "Medizin und Gesundheit"},
{"id": "08", "name": "Pädagogik und Lehre"},
{"id": "09", "name": "Rechtswissenschaften"},
{"id": "10", "name": "Sprach- und Literaturwissenschaften"},
{"id": "11", "name": "Sozial- und Verhaltenswissenschaften"},
{"id": "12", "name": "Wirtschaft und Management"}
// English
else {
return [
{"id": "00", "name": "Agricultural and Forestry Sciences"},
{"id": "01", "name": "Information and Telecommunications Technology"},
{"id": "02", "name": "Engineering Sciences"},
{"id": "03", "name": "Cultural and Social Sciences"},
{"id": "04", "name": "Art and Music"},
{"id": "05", "name": "Mathematics and Natural Sciences"},
{"id": "06", "name": "Media"},
{"id": "07", "name": "Medicine and Health"},
{"id": "08", "name": "Education and Teaching"},
{"id": "09", "name": "Jurisprudence"},
{"id": "10", "name": "Foreign Languages and Literatures"},
{"id": "11", "name": "Social and Behavioral Sciences"},
{"id": "12", "name": "Economics and Management"}
getCategories: function() {
return Categories.find({}, {
sort: {
name: 1
//------------------------ ACCESS DATABASE
Cardsets = new Mongo.Collection('cardsets');
Categories = new TAPi18n.Collection("categories");
{_id: "01", name: "Agricultural and Forestry Sciences", i18n: { de: { name: "Agrar- und Forstwissenschaften"}}}
{_id: "02", name: "Information and Telecommunications Technology", i18n: { de: { name: "Informations- und Telekommunikationstechnik"}}}
{_id: "03", name: "Engineering Sciences", i18n: { de: { name: "Ingeniuerswissenschaften"}}}
{_id: "04", name: "Cultural and Social Sciences", i18n: { de: { name: "Kultur- und Gesellschaftswissenschften"}}}
{_id: "05", name: "Art and Music", i18n: { de: { name: "Kunst und Musik"}}}
{_id: "06", name: "Mathematics and Natural Sciences", i18n: { de: { name: "Mathematik und Naturwissenschaften"}}}
{_id: "07", name: "Media", i18n: { de: { name: "Medien"}}}
{_id: "08", name: "Medicine and Health", i18n: { de: { name: "Medizin und Gesundheit"}}}
{_id: "09", name: "Education and Teaching", i18n: { de: { name: "Pädagogik und Lehre"}}}
{_id: "10", name: "Jurisprudence", i18n: { de: { name: "Rechtswissenschaften"}}}
{_id: "11", name: "Foreign Languages and Literatures", i18n: { de: { name: "Sprach- und Literaturwissenschaften"}}}
{_id: "12", name: "Social and Behavioral Sciences", i18n: { de: { name: "Sozial- und Verhaltenswissenschaften"}}}
{_id: "13", name: "Economics and Management", i18n: { de: { name: "Wirtschaft und Management"}}}
"name": "flashcards",
"scripts": {
"start": "meteor --settings settings-development.json"
"start": "meteor --settings settings-development.json",
"init": "mongoimport --db meteor --collection categories --type json --file 'i18n/categories.json' -h localhost --port 3001"
Markdown is supported
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