commit 78eacb99588f8072eae48252c71c9c3b2b025d75
Author: Václav Jirák <jirakv95@gmail.com>
Date:   Wed Jun 5 13:14:12 2019 +0200

    Frontend localization completed

diff --git a/webapp/src/app/add-vacation-dialog/add-vacation-dialog.component.html b/webapp/src/app/add-vacation-dialog/add-vacation-dialog.component.html
index ba3b03c..9a09bb2 100644
--- a/webapp/src/app/add-vacation-dialog/add-vacation-dialog.component.html
+++ b/webapp/src/app/add-vacation-dialog/add-vacation-dialog.component.html
@@ -1,20 +1,20 @@
-<h1 mat-dialog-title>Výběr volna</h1>
+<h1 mat-dialog-title>{{ 'addVacation.headline' | translate }}</h1>
 
 <div mat-dialog-content>
   <div class="vacation-selection-container">
-    <label id="vacation-type-radio-group-label" class="dialog-label">Typ volna: </label>
+    <label id="vacation-type-radio-group-label" class="dialog-label">{{ 'basic.vacationType' | translate }}</label>
     <mat-radio-group aria-labelledby="vacation-type-radio-group-label" class="vacation-type-radio-group" [(ngModel)]="selectedVacationType">
       <mat-radio-button class="vacation-type-radio-button" [value]=vacationType.SICKDAY>
-        {{vacationType.SICKDAY}}
+        {{ vacationType.SICKDAY | translate }}
       </mat-radio-button>
       <mat-radio-button class="vacation-type-radio-button" [value]=vacationType.VACATION>
-        {{vacationType.VACATION}}
+        {{ vacationType.VACATION | translate }}
       </mat-radio-button>
     </mat-radio-group>
   </div>
   <div class="datetime-selection-container">
     <div class="date-selection">
-      <span class="dialog-label">Datum:</span>
+      <span class="dialog-label">{{ 'basic.date' | translate }}</span>
       <mat-form-field class="date-input">
         <input id="date-input" matInput [matDatepicker]="datePicker" [(ngModel)]="data.date">
         <mat-datepicker-toggle matSuffix [for]="datePicker"></mat-datepicker-toggle>
@@ -43,6 +43,6 @@
 </div>
 
 <div mat-dialog-actions align="end">
-  <button mat-raised-button color="primary" (click)="onConfirmClick()">Potvrdit</button>
-  <button mat-raised-button color="basic" (click)="onCloseClick()">Zavřít</button>
+  <button mat-raised-button color="primary" (click)="onConfirmClick()">{{ 'button.confirm' | translate }}</button>
+  <button mat-raised-button color="basic" (click)="onCloseClick()">{{ 'button.close' | translate }}</button>
 </div>
diff --git a/webapp/src/app/add-vacation-dialog/add-vacation-dialog.module.ts b/webapp/src/app/add-vacation-dialog/add-vacation-dialog.module.ts
index 3b012be..9d40c99 100644
--- a/webapp/src/app/add-vacation-dialog/add-vacation-dialog.module.ts
+++ b/webapp/src/app/add-vacation-dialog/add-vacation-dialog.module.ts
@@ -14,6 +14,7 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms';
 import {BrowserModule} from '@angular/platform-browser';
 import {SharedModule} from '../shared/shared.module';
 import {NgxMaterialTimepickerModule} from 'ngx-material-timepicker';
+import {TranslateModule} from "@ngx-translate/core";
 
 
 @NgModule({
@@ -33,7 +34,8 @@ import {NgxMaterialTimepickerModule} from 'ngx-material-timepicker';
     MatRadioModule,
     MatSnackBarModule,
     SharedModule,
-    NgxMaterialTimepickerModule
+    NgxMaterialTimepickerModule,
+    TranslateModule
   ],
   exports: [
     AddVacationDialogComponent
diff --git a/webapp/src/app/app.module.ts b/webapp/src/app/app.module.ts
index 1781c2e..7188414 100644
--- a/webapp/src/app/app.module.ts
+++ b/webapp/src/app/app.module.ts
@@ -13,6 +13,7 @@ import {EmployeesModule} from './employees/employees.module';
 import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
 import {TranslateHttpLoader} from '@ngx-translate/http-loader';
 import {PageNotFoundComponent} from './page-not-found/page-not-found.component';
+import {CommonModule} from '@angular/common';
 
 @NgModule({
   declarations: [
@@ -36,7 +37,8 @@ import {PageNotFoundComponent} from './page-not-found/page-not-found.component';
     MatDialogModule,
     ProfileSettingsModule,
     EmployeesModule,
-    MatMenuModule
+    MatMenuModule,
+    CommonModule
   ],
   providers: [],
   bootstrap: [AppComponent]
diff --git a/webapp/src/app/menu/menu.component.html b/webapp/src/app/menu/menu.component.html
index 97c85e9..1ba3242 100644
--- a/webapp/src/app/menu/menu.component.html
+++ b/webapp/src/app/menu/menu.component.html
@@ -5,7 +5,7 @@
           [class.selected]="item === _selectedMenuItem"
           (click)="onSelect(item)"
           class="nav-item">
-        <a routerLink="{{item.routePath}}"><div>{{item.name}}</div></a>
+        <a routerLink="{{item.routePath}}"><div>{{item.name | translate}}</div></a>
       </li>
     </ul>
   </nav>
diff --git a/webapp/src/app/profile-settings/profile-settings.component.html b/webapp/src/app/profile-settings/profile-settings.component.html
index a14810a..8375a1b 100644
--- a/webapp/src/app/profile-settings/profile-settings.component.html
+++ b/webapp/src/app/profile-settings/profile-settings.component.html
@@ -1,11 +1,11 @@
-<h1 mat-dialog-title>Nastavení</h1>
+<h1 mat-dialog-title>{{ 'profileSettings.headline' | translate }}</h1>
 
 <div mat-dialog-content>
-  <span class="notification-label">Notifikace o vypršení dovolené: </span>
+  <span class="notification-label">{{ 'profileSettings.notification' | translate }}</span>
   <app-datetime [(date)]="date" [(time)]="time" [minuteStep]="15"></app-datetime>
 </div>
 
 <div mat-dialog-actions align="end">
-  <button mat-raised-button color="primary" (click)="onConfirmClick()">Potvrdit</button>
-  <button mat-raised-button color="basic" (click)="onCloseClick()">Zavřít</button>
+  <button mat-raised-button color="primary" (click)="onConfirmClick()">{{ 'button.confirm' | translate }}</button>
+  <button mat-raised-button color="basic" (click)="onCloseClick()">{{ 'button.close' | translate }}</button>
 </div>
diff --git a/webapp/src/app/profile-settings/profile-settings.component.ts b/webapp/src/app/profile-settings/profile-settings.component.ts
index ef2c3bb..d373b6a 100644
--- a/webapp/src/app/profile-settings/profile-settings.component.ts
+++ b/webapp/src/app/profile-settings/profile-settings.component.ts
@@ -1,7 +1,7 @@
 import { Component, Inject } from '@angular/core';
 import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
 import {DateToolsService} from '../services/util/date-tools.service';
-import {DateFormatterService} from "../services/util/date-formatter.service";
+import {DateFormatterService} from '../services/util/date-formatter.service';
 
 @Component({
   selector: 'app-profile-settings',
@@ -9,8 +9,8 @@ import {DateFormatterService} from "../services/util/date-formatter.service";
   styleUrls: ['./profile-settings.component.sass']
 })
 export class ProfileSettingsComponent {
-  readonly date: Date;
-  readonly time: string;
+  private date: Date;
+  private time: string;
 
   constructor(
     private dateToolsService: DateToolsService,
diff --git a/webapp/src/app/profile-settings/profile-settings.module.ts b/webapp/src/app/profile-settings/profile-settings.module.ts
index 10d900f..1591477 100644
--- a/webapp/src/app/profile-settings/profile-settings.module.ts
+++ b/webapp/src/app/profile-settings/profile-settings.module.ts
@@ -11,6 +11,7 @@ import {
 import {FormsModule} from '@angular/forms';
 import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
 import {SharedModule} from '../shared/shared.module';
+import {TranslateModule} from '@ngx-translate/core';
 
 
 @NgModule({
@@ -25,7 +26,8 @@ import {SharedModule} from '../shared/shared.module';
     MatFormFieldModule,
     MatInputModule,
     NgbModule,
-    SharedModule
+    SharedModule,
+    TranslateModule
   ],
   entryComponents: [
     ProfileSettingsComponent
diff --git a/webapp/src/app/services/util/menu.service.ts b/webapp/src/app/services/util/menu.service.ts
index e45c80c..dd518ca 100644
--- a/webapp/src/app/services/util/menu.service.ts
+++ b/webapp/src/app/services/util/menu.service.ts
@@ -37,9 +37,9 @@ export class MenuService {
 
   private createAppropriateMenuForUser(profile: UserProfile): MenuItem[] {
     const menuItems: MenuItem[] = [];
-    menuItems.push({name: 'Dashboard', routePath: 'dashboard'});
+    menuItems.push({name: 'menuItem.dashboard', routePath: 'dashboard'});
     if (profile.role === UserType.EMPLOYER) {
-      menuItems.push({name: 'Zaměstnanci', routePath: 'employees'});
+      menuItems.push({name: 'menuItem.employers', routePath: 'employees'});
     }
 
     return menuItems;
diff --git a/webapp/src/assets/i18n/cs.json b/webapp/src/assets/i18n/cs.json
index 8046ea6..5969a94 100644
--- a/webapp/src/assets/i18n/cs.json
+++ b/webapp/src/assets/i18n/cs.json
@@ -18,6 +18,17 @@
     "headline": "Mé nadcházející volno",
     "status": "Status"
   },
+  "profileSettings": {
+    "headline": "Nastavení",
+    "notification": "Notifikace o vypršení dovolené"
+  },
+  "addVacation": {
+    "headline": "Výběr volna"
+  },
+  "menuItem": {
+    "dashboard": "Dashboard",
+    "employers": "Zaměstnanci"
+  },
   "basic": {
     "name": "Jméno",
     "employees": "Zaměstnanci",
@@ -44,5 +55,5 @@
   "EMPLOYER": "Zaměstnavatel",
   "EMPLOYEE": "Zaměstnanec",
   "VACATION": "Dovolená",
-  "SICKDAY": "Sickday"
+  "SICK_DAY": "Sickday"
 }
diff --git a/webapp/src/assets/i18n/en.json b/webapp/src/assets/i18n/en.json
index a30bc7b..8e4cac9 100644
--- a/webapp/src/assets/i18n/en.json
+++ b/webapp/src/assets/i18n/en.json
@@ -18,6 +18,17 @@
     "headline": "My oncoming vacation",
     "status": "Status"
   },
+  "profileSettings": {
+    "headline": "Settings",
+    "notification": "Vacation expiration notification"
+  },
+  "addVacation": {
+    "headline": "Pick vacation"
+  },
+  "menuItem": {
+    "dashboard": "Dashboard",
+    "employers": "Employers"
+  },
   "basic": {
     "name": "Name",
     "employees": "Employees",
