mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
Use language from query parameter
This commit is contained in:
parent
3b4fe19dfb
commit
bc0a8fcc1d
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@ syncthing.config(function ($httpProvider, $translateProvider) {
|
||||
$translateProvider.preferredLanguage('en');
|
||||
});
|
||||
|
||||
syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate) {
|
||||
syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $location) {
|
||||
var prevDate = 0;
|
||||
var getOK = true;
|
||||
var restarting = false;
|
||||
@ -40,6 +40,13 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate) {
|
||||
$scope.reportPreview = false;
|
||||
$scope.upgradeInfo = {};
|
||||
|
||||
$scope.$on("$locationChangeSuccess", function () {
|
||||
var lang = $location.search().lang;
|
||||
if (lang) {
|
||||
$translate.use(lang);
|
||||
}
|
||||
});
|
||||
|
||||
$scope.needActions = {
|
||||
'rm': 'Del',
|
||||
'rmdir': 'Del (dir)',
|
||||
|
Loading…
Reference in New Issue
Block a user