mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 06:43:24 +00:00
Fixes for language and scaling
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
angular.module('app', ['ui.router', 'ct.ui.router.extras.sticky', 'ui.sortable', 'shipyard', 'ngLodash', 'app.templates', 'pascalprecht.translate'])
|
||||
.run(['$rootScope', '$location', '$window', '$document', '$state', '$translate', 'localeFormat', 'Persist', 'Discounts',
|
||||
function($rootScope, $location, $window, $doc, $state, $translate, localeFormat, Persist, Discounts) {
|
||||
.run(['$rootScope', '$location', '$window', '$document', '$state', '$translate', 'localeFormat', 'Persist', 'Discounts', 'Languages',
|
||||
function($rootScope, $location, $window, $doc, $state, $translate, localeFormat, Persist, Discounts, Languages) {
|
||||
// App is running as a standalone web app on tablet/mobile
|
||||
var isStandAlone;
|
||||
// This was causing issues on Windows phones ($window.external was causing Angular js to throw an exception). Backup is to try this and set isStandAlone to false if this fails.
|
||||
@@ -33,16 +33,9 @@ function($rootScope, $location, $window, $doc, $state, $translate, localeFormat,
|
||||
});
|
||||
|
||||
$rootScope.language = {
|
||||
opts: {
|
||||
en: 'English',
|
||||
de: 'Deutsh',
|
||||
es: 'Español',
|
||||
fr: 'Français',
|
||||
ru: 'ру́сский язы́к'
|
||||
},
|
||||
current: Persist.getLangCode()
|
||||
opts: Languages,
|
||||
current: Languages[Persist.getLangCode()] ? Persist.getLangCode() : 'en'
|
||||
};
|
||||
|
||||
$rootScope.localeFormat = d3.locale(localeFormat.get($rootScope.language.current));
|
||||
updateNumberFormat();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user