Added localization and fixed ui width

Signed-off-by: Juergen Kleck <j.kleck@peak-solution.de>
diff --git a/org.eclipse.mdm.application/src/main/webapp/src/app/details/components/attribute-editor/attribute-editor.component.html b/org.eclipse.mdm.application/src/main/webapp/src/app/details/components/attribute-editor/attribute-editor.component.html
index a5ec3b9..43121f7 100644
--- a/org.eclipse.mdm.application/src/main/webapp/src/app/details/components/attribute-editor/attribute-editor.component.html
+++ b/org.eclipse.mdm.application/src/main/webapp/src/app/details/components/attribute-editor/attribute-editor.component.html
@@ -19,7 +19,7 @@
     <input *ngSwitchCase="'LONG'" pInputText type="number" [(ngModel)]="attribute.value[ident.contextGroup]" class="attreditor">
     <input *ngSwitchCase="'LONGLONG'" pInputText type="number" [(ngModel)]="attribute.value[ident.contextGroup]" class="attreditor">
     <input *ngSwitchCase="'DOUBLE'" pInputText type="number" [(ngModel)]="attribute.value[ident.contextGroup]" class="attreditor">
-    <p-calendar *ngSwitchCase="'DATE'" dataType="string" showTime="true" hourFormat="24" dateFormat="{{'details.mdm-detail-descriptive-data.input-dateformat' | translate}}" [(ngModel)]="attribute.value[ident.contextGroup]" class="attreditor"></p-calendar>
+    <p-calendar *ngSwitchCase="'DATE'" [locale]="locale" dataType="string" showTime="true" hourFormat="24" dateFormat="{{'details.mdm-detail-descriptive-data.input-dateformat' | translate}}" [(ngModel)]="attribute.value[ident.contextGroup]" class="attreditor" [style]="{'width':'80%'}" [inputStyle]="{'min-width':'0.2em','width':'80%'}"></p-calendar>
     <input *ngSwitchCase="'BOOLEAN'" pInputText type="checkbox" [(ngModel)]="attribute.value[ident.contextGroup]" class="attreditorbool">
     <mdm5-file-link-editor *ngSwitchCase="'FILE_LINK'"
         class="attreditor"
diff --git a/org.eclipse.mdm.application/src/main/webapp/src/app/details/components/attribute-editor/attribute-editor.component.ts b/org.eclipse.mdm.application/src/main/webapp/src/app/details/components/attribute-editor/attribute-editor.component.ts
index c920edf..53cec5a 100644
--- a/org.eclipse.mdm.application/src/main/webapp/src/app/details/components/attribute-editor/attribute-editor.component.ts
+++ b/org.eclipse.mdm.application/src/main/webapp/src/app/details/components/attribute-editor/attribute-editor.component.ts
@@ -13,6 +13,7 @@
  ********************************************************************************/
 
 import { Component, Input } from '@angular/core';
+import { TranslateService } from '@ngx-translate/core';
 
 import { Attribute } from '@navigator/node';
 import { ContextAttributeIdentifier } from '../../model/details.model';
@@ -27,7 +28,63 @@
   @Input() ident: ContextAttributeIdentifier;
   @Input() attribute: Attribute;
 
-  constructor() { }
+  locale: any;
+
+  constructor(private translateService: TranslateService) {
+    // calendar localization
+    this.locale = {
+        firstDayOfWeek: 1,
+        dayNames: [this.translateService.instant('details.attribute-editor.cal-sunday'),
+                       this.translateService.instant('details.attribute-editor.cal-monday'),
+                       this.translateService.instant('details.attribute-editor.cal-tuesday'),
+                       this.translateService.instant('details.attribute-editor.cal-wednesday'),
+                       this.translateService.instant('details.attribute-editor.cal-thursday'),
+                       this.translateService.instant('details.attribute-editor.cal-friday'),
+                       this.translateService.instant('details.attribute-editor.cal-saturday')],
+        dayNamesShort: [this.translateService.instant('details.attribute-editor.cal-sun'),
+                            this.translateService.instant('details.attribute-editor.cal-mon'),
+                            this.translateService.instant('details.attribute-editor.cal-tue'),
+                            this.translateService.instant('details.attribute-editor.cal-wed'),
+                            this.translateService.instant('details.attribute-editor.cal-thu'),
+                            this.translateService.instant('details.attribute-editor.cal-fri'),
+                            this.translateService.instant('details.attribute-editor.cal-sat')],
+        dayNamesMin: [this.translateService.instant('details.attribute-editor.cal-su'),
+                          this.translateService.instant('details.attribute-editor.cal-mo'),
+                          this.translateService.instant('details.attribute-editor.cal-tu'),
+                          this.translateService.instant('details.attribute-editor.cal-we'),
+                          this.translateService.instant('details.attribute-editor.cal-th'),
+                          this.translateService.instant('details.attribute-editor.cal-fr'),
+                          this.translateService.instant('details.attribute-editor.cal-sa')],
+        monthNames: [this.translateService.instant('details.attribute-editor.cal-january'),
+                         this.translateService.instant('details.attribute-editor.cal-february'),
+                         this.translateService.instant('details.attribute-editor.cal-march'),
+                         this.translateService.instant('details.attribute-editor.cal-april'),
+                         this.translateService.instant('details.attribute-editor.cal-may'),
+                         this.translateService.instant('details.attribute-editor.cal-june'),
+                         this.translateService.instant('details.attribute-editor.cal-july'),
+                         this.translateService.instant('details.attribute-editor.cal-august'),
+                         this.translateService.instant('details.attribute-editor.cal-september'),
+                         this.translateService.instant('details.attribute-editor.cal-october'),
+                         this.translateService.instant('details.attribute-editor.cal-november'),
+                         this.translateService.instant('details.attribute-editor.cal-december')],
+        monthNamesShort: [this.translateService.instant('details.attribute-editor.cal-jan'),
+                              this.translateService.instant('details.attribute-editor.cal-feb'),
+                              this.translateService.instant('details.attribute-editor.cal-mar'),
+                              this.translateService.instant('details.attribute-editor.cal-apr'),
+                              this.translateService.instant('details.attribute-editor.cal-may'),
+                              this.translateService.instant('details.attribute-editor.cal-jun'),
+                              this.translateService.instant('details.attribute-editor.cal-jul'),
+                              this.translateService.instant('details.attribute-editor.cal-aug'),
+                              this.translateService.instant('details.attribute-editor.cal-sep'),
+                              this.translateService.instant('details.attribute-editor.cal-oct'),
+                              this.translateService.instant('details.attribute-editor.cal-nov'),
+                              this.translateService.instant('details.attribute-editor.cal-dec')],
+        today: this.translateService.instant('details.attribute-editor.cal-today'),
+        clear: this.translateService.instant('details.attribute-editor.cal-clear'),
+        dateFormat: this.translateService.instant('details.attribute-editor.cal-format'),
+        weekHeader: this.translateService.instant('details.attribute-editor.cal-week')
+    };
+}
 
 }
 
diff --git a/org.eclipse.mdm.application/src/main/webapp/src/app/details/components/mdm-detail-descriptive-data/mdm-detail-descriptive-data.component.ts b/org.eclipse.mdm.application/src/main/webapp/src/app/details/components/mdm-detail-descriptive-data/mdm-detail-descriptive-data.component.ts
index 4fb3743..d64ca38 100644
--- a/org.eclipse.mdm.application/src/main/webapp/src/app/details/components/mdm-detail-descriptive-data/mdm-detail-descriptive-data.component.ts
+++ b/org.eclipse.mdm.application/src/main/webapp/src/app/details/components/mdm-detail-descriptive-data/mdm-detail-descriptive-data.component.ts
@@ -371,7 +371,7 @@
         // manually attach the time as toISOString() will not properly transform the winter/summer time
         newDt = dt.substring(startYear, endYear + 1) + '-' + dt.substring(startMonth, endMonth + 1)
                   + '-' + dt.substring(startDay, endDay + 1);
-        if(dt.indexOf(' ') > -1) {
+        if (dt.indexOf(' ') > -1) {
           // use the provided timestamp
           newDt = newDt + 'T' + dt.substring(dt.indexOf(' ') + 1) + ':00Z';
         } else {
diff --git a/org.eclipse.mdm.application/src/main/webapp/src/assets/i18n/de.json b/org.eclipse.mdm.application/src/main/webapp/src/assets/i18n/de.json
index 27e2f70..ff349ad 100644
--- a/org.eclipse.mdm.application/src/main/webapp/src/assets/i18n/de.json
+++ b/org.eclipse.mdm.application/src/main/webapp/src/assets/i18n/de.json
@@ -160,7 +160,57 @@
 			"tblhdr-measured": "Gemessen",
 			"tblhdr-name": "Name",
 			"tblhdr-ordered": "Beauftragt"
-		}
+		},
+    "attribute-editor": {
+      "cal-sunday": "Sonntag",
+      "cal-monday": "Montag",
+      "cal-tuesday": "Dienstag",
+      "cal-wednesday": "Mittwoch",
+      "cal-thursday": "Donnerstag",
+      "cal-friday": "Freitag",
+      "cal-saturday": "Samstag",
+      "cal-sun": "Son",
+      "cal-mon": "Mon",
+      "cal-tue": "Die",
+      "cal-wed": "Mit",
+      "cal-thu": "Don",
+      "cal-fri": "Fre",
+      "cal-sat": "Sam",
+      "cal-su": "So",
+      "cal-mo": "Mo",
+      "cal-tu": "Di",
+      "cal-we": "Mi",
+      "cal-th": "Do",
+      "cal-fr": "Fr",
+      "cal-sa": "Sa",
+      "cal-today": "Heute",
+      "cal-clear": "Löschen",
+      "cal-week": "Wo",
+      "cal-january": "Januar",
+      "cal-february": "Februar",
+      "cal-march": "März",
+      "cal-april": "April",
+      "cal-may": "Mai",
+      "cal-june": "Juni",
+      "cal-july": "Juli",
+      "cal-august": "August",
+      "cal-september": "September",
+      "cal-october": "Oktober",
+      "cal-november": "November",
+      "cal-december": "Dezember",
+      "cal-jan": "Jan",
+      "cal-feb": "Feb",
+      "cal-mar": "Mär",
+      "cal-apr": "Apr",
+      "cal-jun": "Jun",
+      "cal-jul": "Jul",
+      "cal-aug": "Aug",
+      "cal-sep": "Sep",
+      "cal-oct": "Okt",
+      "cal-nov": "Nov",
+      "cal-dec": "Dez",
+      "cal-format": "dd.mm.yy"
+    }
 	},
 	"filerelease": {
 		"filerelease": {
diff --git a/org.eclipse.mdm.application/src/main/webapp/src/assets/i18n/en.json b/org.eclipse.mdm.application/src/main/webapp/src/assets/i18n/en.json
index 473397a..3078316 100644
--- a/org.eclipse.mdm.application/src/main/webapp/src/assets/i18n/en.json
+++ b/org.eclipse.mdm.application/src/main/webapp/src/assets/i18n/en.json
@@ -160,7 +160,57 @@
 			"tblhdr-measured": "Measured",
 			"tblhdr-name": "Name",
 			"tblhdr-ordered": "Ordered"
-		}
+		},
+    "attribute-editor": {
+      "cal-sunday": "Sunday",
+      "cal-monday": "Monday",
+      "cal-tuesday": "Tuesday",
+      "cal-wednesday": "Wednesday",
+      "cal-thursday": "Thursday",
+      "cal-friday": "Friday",
+      "cal-saturday": "Saturday",
+      "cal-sun": "Sun",
+      "cal-mon": "Mon",
+      "cal-tue": "Tue",
+      "cal-wed": "Wed",
+      "cal-thu": "Thu",
+      "cal-fri": "Fri",
+      "cal-sat": "Sat",
+      "cal-su": "Su",
+      "cal-mo": "Mo",
+      "cal-tu": "Tu",
+      "cal-we": "We",
+      "cal-th": "Th",
+      "cal-fr": "Fr",
+      "cal-sa": "Sa",
+      "cal-today": "Today",
+      "cal-clear": "Clear",
+      "cal-week": "We",
+      "cal-january": "January",
+      "cal-february": "February",
+      "cal-march": "March",
+      "cal-april": "April",
+      "cal-may": "May",
+      "cal-june": "June",
+      "cal-july": "July",
+      "cal-august": "August",
+      "cal-september": "September",
+      "cal-october": "October",
+      "cal-november": "November",
+      "cal-december": "December",
+      "cal-jan": "Jan",
+      "cal-feb": "Feb",
+      "cal-mar": "Mar",
+      "cal-apr": "Apr",
+      "cal-jun": "Jun",
+      "cal-jul": "Jul",
+      "cal-aug": "Aug",
+      "cal-sep": "Sep",
+      "cal-oct": "Oct",
+      "cal-nov": "Nov",
+      "cal-dec": "Dec",
+      "cal-format": "mm-dd-yy"
+    }
 	},
 	"filerelease": {
 		"filerelease": {