Repository: syncthing/syncthing
File: gui/default/syncthing/core/syncthingController.js (JavaScript)

Code before:
                    return $translate.instant('Unexpected Items');
                case 'outofsync':
                    return $translate.instant('Out of Sync');
                case 'idle':
                    return $translate.instant('Up to Date');
                case 'localadditions':
                    return $translate.instant('Local Additions');
                case 'paused':
                    return $translate.instant('Paused');
                case 'scanning':
                    text = $translate.instant('Scanning');
                    if ($scope.scanPercentage(folder.id) !== undefined) {
                        text += ' (' +
                        percentFilter($scope.scanPercentage(folder.id)) +
                        ')';
                    }
                    return text;
                case 'stopped':
                    return $translate.instant('Stopped');
                case 'syncing':
                    text = $translate.instant('Syncing') +
                    ' (' + 
                    percentFilter($scope.syncPercentage(folder.id)) + 
                    ', ' +
                    binaryFilter($scope.model[folder.id].needBytes) +
                    'B)';
                    return text;
                case 'unknown':
                    return $translate.instant('Unknown');
                case 'unshared':
                    return $translate.instant('Unshared');
            }
        };

        $scope.deviceClass = function (deviceCfg) {
            if (typeof $scope.connections[deviceCfg.deviceID] === 'undefined') {
                return 'info';
            }

            if (deviceCfg.paused) {
                return 'default';
            }

            if ($scope.connections[deviceCfg.deviceID].connected) {
                if ($scope.completion[deviceCfg.deviceID] && $scope.completion[deviceCfg.deviceID]._total === 100) {
                    return 'success';
                } else {
                    return 'primary';
                }
            }


Review comment (suggestion):
Same as above, and you did have some trailing whitespace here. Maybe teach your editor to remove that automatically?

```suggestion
                    ' (' + percentFilter($scope.syncPercentage(folder.id)) + ', ' +
                    binaryFilter($scope.model[folder.id].needBytes) + ' B)';
```

Code after:
                case 'sync-preparing':
                    return $translate.instant('Preparing to Sync');
                case 'sync-waiting':
                    return $translate.instant('Waiting to Sync');
                case 'syncing':
                    return $translate.instant('Syncing');
                case 'unknown':
                    return $translate.instant('Unknown');
                case 'unshared':
                    return $translate.instant('Unshared');
            }
        };

        $scope.deviceClass = function (deviceCfg) {
            if (typeof $scope.connections[deviceCfg.deviceID] === 'undefined') {
                return 'info';
            }

            if (deviceCfg.paused) {
                return 'default';
            }

            if ($scope.connections[deviceCfg.deviceID].connected) {
                if ($scope.completion[deviceCfg.deviceID] && $scope.completion[deviceCfg.deviceID]._total === 100) {
                    return 'success';
                } else {
                    return 'primary';
                }
            }

            // Disconnected
            return 'info';
        };

        $scope.syncthingStatus = function () {
            var syncCount = 0;
            var notifyCount = 0;
            var pauseCount = 0;

            // loop through all folders
            var folderListCache = $scope.folderList();
            for (var i = 0; i < folderListCache.length; i++) {
                var status = $scope.folderStatus(folderListCache[i]);
                switch (status) {
                    case 'sync-preparing':
                    case 'syncing':
                        syncCount++;
                        break;
                    case 'stopped':
                    case 'unknown':
                    case 'outofsync':