Added moment.js locales. Set locale from window.navigator at app init(). Use firstDayOfWeek on time picker

This commit is contained in:
Joona Romppanen
2016-07-05 17:08:44 +03:00
parent 07e522bb64
commit 438a73c58a
4 changed files with 11193 additions and 3457 deletions

View File

@@ -14,6 +14,7 @@ import $ from 'jquery';
import angular from 'angular';
import config from 'app/core/config';
import _ from 'lodash';
import moment from 'moment';
import {coreModule} from './core/core';
export class GrafanaApp {
@@ -47,6 +48,8 @@ export class GrafanaApp {
}
$httpProvider.useApplyAsync(true);
moment.locale(window.navigator.userLanguage || window.navigator.language);
this.registerFunctions.controller = $controllerProvider.register;
this.registerFunctions.directive = $compileProvider.directive;
this.registerFunctions.factory = $provide.factory;