From 376eab61d9ad76f0887f763d52cd18de395cd2b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de>
Date: Thu, 18 Apr 2019 15:38:04 +0200
Subject: [PATCH] Add translation for new menu in header

---
 THEME-README.md                               | 19 +++++++++++++++++++
 .../shared/header/header.component.html       |  4 ++--
 src/assets/i18n/home/de.json                  |  4 +++-
 src/assets/i18n/home/en.json                  |  4 +++-
 src/theme/themeReadMe.md                      | 10 ----------
 5 files changed, 27 insertions(+), 14 deletions(-)
 create mode 100644 THEME-README.md
 delete mode 100644 src/theme/themeReadMe.md

diff --git a/THEME-README.md b/THEME-README.md
new file mode 100644
index 000000000..2e2a7831d
--- /dev/null
+++ b/THEME-README.md
@@ -0,0 +1,19 @@
+# How to add a new Theme
+
+## Preparation
+
+Create a new directory with the name of the new theme in src/theme.
+
+## Create new theme
+
+1. Create a new scss file with the same structure as `_dark-theme.scss` and style it using material palette.
+
+2. Create a new scss file in your working theme directory named {YourThemeName}.const.ts and copy the structure of `darkTheme.const.ts`.
+
+## Add new theme to theme manager
+
+Import the file in `styles.scss` and add the new theme to theme menu in `header.component.html`.
+
+## Configure your theme 
+
+Start editing the variables and see the magic happen. We recommend to use [material colors](https://material.io/tools/color).
diff --git a/src/app/components/shared/header/header.component.html b/src/app/components/shared/header/header.component.html
index 03fedfba8..9c7192066 100644
--- a/src/app/components/shared/header/header.component.html
+++ b/src/app/components/shared/header/header.component.html
@@ -8,8 +8,8 @@
     <span class="fill-remaining-space"></span>
 
     <mat-menu #themeMenu="matMenu" [overlapTrigger]="false">
-      <button mat-menu-item (click)="changeTheme('')">{{ 'default' | translate }}</button>
-      <button mat-menu-item (click)="changeTheme('dark')">{{ 'dark' | translate }}</button>
+      <button mat-menu-item (click)="changeTheme('')">{{ 'header.default' | translate }}</button>
+      <button mat-menu-item (click)="changeTheme('dark')">{{ 'header.dark' | translate }}</button>
     </mat-menu>
 
     <button mat-icon-button [matMenuTriggerFor]="themeMenu">
diff --git a/src/assets/i18n/home/de.json b/src/assets/i18n/home/de.json
index c6f2e078e..0d9bd5084 100644
--- a/src/assets/i18n/home/de.json
+++ b/src/assets/i18n/home/de.json
@@ -7,7 +7,9 @@
 		"logged-out": "Ausloggen erfolgreich.",
 		"back": "Zurück",
 		"my-sessions": "Meine Sessions",
-		"visited-sessions": "Besuchte Sessions"
+		"visited-sessions": "Besuchte Sessions",
+    "default": "ARSnova",
+    "dark": "Nacht"
 	},
 	"login-page": {
 		"creator": "Dozent/in",
diff --git a/src/assets/i18n/home/en.json b/src/assets/i18n/home/en.json
index 6025d8644..e87024f24 100644
--- a/src/assets/i18n/home/en.json
+++ b/src/assets/i18n/home/en.json
@@ -7,7 +7,9 @@
 		"logged-out": "Logout successful",
 		"back": "Back",
 		"my-sessions": "My Sessions",
-		"visited-sessions": "Visited Sessions"
+		"visited-sessions": "Visited Sessions",
+    "default": "ARSnova",
+    "dark": "Night"
 	},
 	"login-page": {
 		"creator": "Lecturer",
diff --git a/src/theme/themeReadMe.md b/src/theme/themeReadMe.md
deleted file mode 100644
index c6641b43b..000000000
--- a/src/theme/themeReadMe.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# How to add a new Theme
-
-- create a new directory with the name of the theme in src/theme
-- than create a new scss file with the same construct as _dark-theme.scss and style it using 
-  material palette
-- import the file in styles.scss and add the option in header.component.html
-
-- create a new scss file in your working theme directory : name.const.ts 
-  and copy the construct of darkTheme.const.ts
-- start editing the variables and see the magic happen   
-- 
GitLab