From 65713477dedafedb5a7a658d7b6f9733430f3ce3 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 23 Jul 2018 21:47:08 -0400 Subject: [PATCH] set locale for angular app --- src/app/app.module.ts | 5 +++++ src/app/layouts/footer.component.ts | 2 +- src/app/services/services.module.ts | 6 ++++++ src/scss/styles.scss | 6 ++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 6fcc342a30..4817699dce 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -135,6 +135,11 @@ import { I18nPipe } from 'jslib/angular/pipes/i18n.pipe'; import { SearchCiphersPipe } from 'jslib/angular/pipes/search-ciphers.pipe'; import { SearchPipe } from 'jslib/angular/pipes/search.pipe'; +import { registerLocaleData } from '@angular/common'; +import localeDa from '@angular/common/locales/da'; + +registerLocaleData(localeDa, 'da'); + @NgModule({ imports: [ BrowserModule, diff --git a/src/app/layouts/footer.component.ts b/src/app/layouts/footer.component.ts index 33c208c258..05a4076643 100644 --- a/src/app/layouts/footer.component.ts +++ b/src/app/layouts/footer.component.ts @@ -11,7 +11,7 @@ import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; }) export class FooterComponent implements OnInit { version: string; - year: string = '2016'; + year: string = '2015'; constructor(private platformUtilsService: PlatformUtilsService) { } diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts index 84869fe921..7837c4917d 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts @@ -1,5 +1,6 @@ import { APP_INITIALIZER, + LOCALE_ID, NgModule, } from '@angular/core'; @@ -181,6 +182,11 @@ export function initFactory(): Function { deps: [], multi: true, }, + { + provide: LOCALE_ID, + useFactory: () => i18nService.translationLocale, + deps: [], + }, ], }) export class ServicesModule { diff --git a/src/scss/styles.scss b/src/scss/styles.scss index 70fdf69239..899fff6f31 100644 --- a/src/scss/styles.scss +++ b/src/scss/styles.scss @@ -644,6 +644,12 @@ app-user-billing { } } +.form-inline { + input[type='datetime-local'] { + width: 200px; + } +} + .org-nav { background-color: $input-bg; border-bottom: 1px solid $border-color;