mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-10 15:20:56 +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');
|
$translateProvider.preferredLanguage('en');
|
||||||
});
|
});
|
||||||
|
|
||||||
syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate) {
|
syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $location) {
|
||||||
var prevDate = 0;
|
var prevDate = 0;
|
||||||
var getOK = true;
|
var getOK = true;
|
||||||
var restarting = false;
|
var restarting = false;
|
||||||
@ -40,6 +40,13 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate) {
|
|||||||
$scope.reportPreview = false;
|
$scope.reportPreview = false;
|
||||||
$scope.upgradeInfo = {};
|
$scope.upgradeInfo = {};
|
||||||
|
|
||||||
|
$scope.$on("$locationChangeSuccess", function () {
|
||||||
|
var lang = $location.search().lang;
|
||||||
|
if (lang) {
|
||||||
|
$translate.use(lang);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$scope.needActions = {
|
$scope.needActions = {
|
||||||
'rm': 'Del',
|
'rm': 'Del',
|
||||||
'rmdir': 'Del (dir)',
|
'rmdir': 'Del (dir)',
|
||||||
|
Loading…
Reference in New Issue
Block a user