Fix translate option

This commit is contained in:
Gustavo Maximiliano Cortez 2015-04-22 18:41:30 -03:00
commit 140440b224
8 changed files with 62 additions and 47 deletions

View file

@ -1,24 +1,12 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesLanguageController',
function($scope, $timeout, configService, applicationService) {
this.defaultLanguage = configService.getSync().wallet.settings.defaultLanguage || 'en';
function($scope, $timeout, go) {
this.save = function(newLang) {
var opts = {
wallet: {
settings: {
defaultLanguage: newLang
}
}
};
this.loading = true;
$scope.$emit('Local/DefaultLanguage', newLang);
$timeout(function() {
configService.set(opts, function(err) {
if (err) console.log(err);
applicationService.restart();
});
go.preferences();
}, 100);
};
});