From 28a1b1987b1031c8199df95a4ba71425393a4235 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Sat, 3 Sep 2022 13:32:01 +0200 Subject: [PATCH] feat: added `Widget activation threshold option` to the Network module (#931) --- Kit/module/settings.swift | 13 ++-- Modules/Net/main.swift | 19 ++++- Modules/Net/settings.swift | 69 +++++++++++++++++++ .../bg.lproj/Localizable.strings | 1 + .../ca.lproj/Localizable.strings | 1 + .../cs.lproj/Localizable.strings | 1 + .../da.lproj/Localizable.strings | 1 + .../de.lproj/Localizable.strings | 1 + .../el.lproj/Localizable.strings | 1 + .../en.lproj/Localizable.strings | 1 + .../es.lproj/Localizable.strings | 1 + .../fr.lproj/Localizable.strings | 1 + .../he.lproj/Localizable.strings | 1 + .../hr.lproj/Localizable.strings | 1 + .../hu.lproj/Localizable.strings | 1 + .../id.lproj/Localizable.strings | 1 + .../it.lproj/Localizable.strings | 1 + .../ja.lproj/Localizable.strings | 1 + .../ko.lproj/Localizable.strings | 1 + .../nb.lproj/Localizable.strings | 1 + .../nl.lproj/Localizable.strings | 1 + .../pl.lproj/Localizable.strings | 1 + .../pt-BR.lproj/Localizable.strings | 1 + .../pt-PT.lproj/Localizable.strings | 1 + .../ro.lproj/Localizable.strings | 1 + .../ru.lproj/Localizable.strings | 1 + .../sl.lproj/Localizable.strings | 1 + .../sv.lproj/Localizable.strings | 1 + .../tr.lproj/Localizable.strings | 1 + .../uk.lproj/Localizable.strings | 1 + .../vi.lproj/Localizable.strings | 1 + .../zh-Hans.lproj/Localizable.strings | 1 + .../zh-Hant.lproj/Localizable.strings | 1 + 33 files changed, 124 insertions(+), 7 deletions(-) diff --git a/Kit/module/settings.swift b/Kit/module/settings.swift index 7fcdfa2b..d73750bc 100644 --- a/Kit/module/settings.swift +++ b/Kit/module/settings.swift @@ -164,16 +164,19 @@ open class Settings: NSStackView, Settings_p { // MARK: - views private func settings() -> NSView { - let view: NSTabView = NSTabView() - view.widthAnchor.constraint(equalToConstant: Constants.Settings.width - Constants.Settings.margin*2).isActive = true - view.heightAnchor.constraint(equalToConstant: Constants.Settings.height - 40 - Constants.Widget.height - (Constants.Settings.margin*5)).isActive = true + let view: NSTabView = NSTabView(frame: NSRect(x: 0, y: 0, + width: Constants.Settings.width - Constants.Settings.margin*2, + height: Constants.Settings.height - 40 - Constants.Widget.height - (Constants.Settings.margin*5) + )) + view.widthAnchor.constraint(equalToConstant: view.frame.width).isActive = true + view.heightAnchor.constraint(equalToConstant: view.frame.height).isActive = true view.tabViewType = .topTabsBezelBorder view.tabViewBorderType = .line let moduleTab: NSTabViewItem = NSTabViewItem() moduleTab.label = localizedString("Module settings") moduleTab.view = { - let view = ScrollableStackView() + let view = ScrollableStackView(frame: view.frame) self.moduleSettingsContainer = view.stackView self.loadModuleSettings() return view @@ -182,7 +185,7 @@ open class Settings: NSStackView, Settings_p { let widgetTab: NSTabViewItem = NSTabViewItem() widgetTab.label = localizedString("Widget settings") widgetTab.view = { - let view = ScrollableStackView() + let view = ScrollableStackView(frame: view.frame) view.stackView.spacing = 0 self.widgetSettingsContainer = view.stackView self.loadWidgetSettings() diff --git a/Modules/Net/main.swift b/Modules/Net/main.swift index 8af0564c..b64cf077 100644 --- a/Modules/Net/main.swift +++ b/Modules/Net/main.swift @@ -109,6 +109,12 @@ public class Network: Module { private let ipUpdater = NSBackgroundActivityScheduler(identifier: "eu.exelban.Stats.Network.IP") private let usageReseter = NSBackgroundActivityScheduler(identifier: "eu.exelban.Stats.Network.Usage") + private var widgetActivationThreshold: Int { + get { + return Store.shared.int(key: "\(self.config.name)_widgetActivationThreshold", defaultValue: 0) + } + } + public init() { self.settingsView = Settings("Network") self.popupView = Popup("Network") @@ -178,10 +184,19 @@ public class Network: Module { self.popupView.usageCallback(value) + var upload = value.bandwidth.upload + var download = value.bandwidth.download + let activationValue = Units(bytes: min(upload, download)).kilobytes + + if Double(self.widgetActivationThreshold) > activationValue { + upload = 0 + download = 0 + } + self.menuBar.widgets.filter{ $0.isActive }.forEach { (w: Widget) in switch w.item { - case let widget as SpeedWidget: widget.setValue(upload: value.bandwidth.upload, download: value.bandwidth.download) - case let widget as NetworkChart: widget.setValue(upload: Double(value.bandwidth.upload), download: Double(value.bandwidth.download)) + case let widget as SpeedWidget: widget.setValue(upload: upload, download: download) + case let widget as NetworkChart: widget.setValue(upload: Double(upload), download: Double(download)) default: break } } diff --git a/Modules/Net/settings.swift b/Modules/Net/settings.swift index 8d550242..9245bb7a 100644 --- a/Modules/Net/settings.swift +++ b/Modules/Net/settings.swift @@ -18,6 +18,7 @@ internal class Settings: NSStackView, Settings_v { private var readerType: String = "interface" private var usageReset: String = AppUpdateInterval.atStart.rawValue private var VPNModeState: Bool = false + private var widgetActivationThreshold: Int = 0 public var callback: (() -> Void) = {} public var callbackWhenUpdateNumberOfProcesses: (() -> Void) = {} @@ -25,6 +26,7 @@ internal class Settings: NSStackView, Settings_v { private let title: String private var button: NSPopUpButton? + private var valueField: NSTextField? private var list: [Network_interface] = [] @@ -41,6 +43,7 @@ internal class Settings: NSStackView, Settings_v { self.readerType = Store.shared.string(key: "\(self.title)_reader", defaultValue: self.readerType) self.usageReset = Store.shared.string(key: "\(self.title)_usageReset", defaultValue: self.usageReset) self.VPNModeState = Store.shared.bool(key: "\(self.title)_VPNMode", defaultValue: self.VPNModeState) + self.widgetActivationThreshold = Store.shared.int(key: "\(self.title)_widgetActivationThreshold", defaultValue: self.widgetActivationThreshold) super.init(frame: NSRect(x: 0, y: 0, width: 0, height: 0)) @@ -69,6 +72,8 @@ internal class Settings: NSStackView, Settings_v { public func load(widgets: [widget_t]) { self.subviews.forEach{ $0.removeFromSuperview() } + self.addArrangedSubview(self.activationSlider()) + self.addArrangedSubview(selectSettingsRowV1( title: localizedString("Number of top processes"), action: #selector(changeNumberOfProcesses), @@ -151,6 +156,57 @@ internal class Settings: NSStackView, Settings_v { return view } + func activationSlider() -> NSView { + let view: NSStackView = NSStackView() + view.translatesAutoresizingMaskIntoConstraints = false + view.heightAnchor.constraint(equalToConstant: Constants.Settings.row * 1.5).isActive = true + view.orientation = .horizontal + view.alignment = .centerY + view.distribution = .fill + view.spacing = 0 + + let titleField: NSTextField = LabelField(frame: NSRect(x: 0, y: 0, width: 0, height: 0), localizedString("Widget activation threshold")) + titleField.font = NSFont.systemFont(ofSize: 12, weight: .regular) + titleField.textColor = .textColor + + let container = NSStackView() + container.spacing = 0 + container.orientation = .vertical + container.alignment = .centerX + container.distribution = .fillEqually + + var value = localizedString("Disabled") + if self.widgetActivationThreshold != 0 { + value = "\(self.widgetActivationThreshold) KB" + } + + let valueField: NSTextField = LabelField(frame: NSRect(x: 0, y: 0, width: 0, height: 0), value) + valueField.font = NSFont.systemFont(ofSize: 12, weight: .regular) + valueField.textColor = .textColor + self.valueField = valueField + + let slider = NSSlider() + slider.minValue = 0 + slider.maxValue = 1024 + slider.doubleValue = Double(self.widgetActivationThreshold) + slider.target = self + slider.isContinuous = true + slider.action = #selector(self.sliderCallback) + slider.sizeToFit() + + container.addArrangedSubview(valueField) + container.addArrangedSubview(slider) + + view.addArrangedSubview(titleField) + view.addArrangedSubview(NSView()) + view.addArrangedSubview(container) + + container.widthAnchor.constraint(equalToConstant: 180).isActive = true + container.heightAnchor.constraint(equalTo: view.heightAnchor).isActive = true + + return view + } + @objc func handleSelection(_ sender: NSPopUpButton) { guard let item = sender.selectedItem, let id = item.identifier?.rawValue else { return } @@ -204,4 +260,17 @@ internal class Settings: NSStackView, Settings_v { self.VPNModeState = state! == .on ? true : false Store.shared.set(key: "\(self.title)_VPNMode", value: self.VPNModeState) } + + @objc private func sliderCallback(_ sender: NSSlider) { + guard let valueField = self.valueField else { return } + + let value = Int(sender.doubleValue) + if value == 0 { + valueField.stringValue = localizedString("Disabled") + } else { + valueField.stringValue = "\(value) KB" + } + self.widgetActivationThreshold = value + Store.shared.set(key: "\(self.title)_widgetActivationThreshold", value: widgetActivationThreshold) + } } diff --git a/Stats/Supporting Files/bg.lproj/Localizable.strings b/Stats/Supporting Files/bg.lproj/Localizable.strings index ccc6caad..45dffbce 100644 --- a/Stats/Supporting Files/bg.lproj/Localizable.strings +++ b/Stats/Supporting Files/bg.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Ниво"; diff --git a/Stats/Supporting Files/ca.lproj/Localizable.strings b/Stats/Supporting Files/ca.lproj/Localizable.strings index 2641f048..6550ff57 100644 --- a/Stats/Supporting Files/ca.lproj/Localizable.strings +++ b/Stats/Supporting Files/ca.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Nivell"; diff --git a/Stats/Supporting Files/cs.lproj/Localizable.strings b/Stats/Supporting Files/cs.lproj/Localizable.strings index 326f09cf..7b746b1a 100644 --- a/Stats/Supporting Files/cs.lproj/Localizable.strings +++ b/Stats/Supporting Files/cs.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Kanál"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Úroveň"; diff --git a/Stats/Supporting Files/da.lproj/Localizable.strings b/Stats/Supporting Files/da.lproj/Localizable.strings index b7c755d0..ddc786f3 100644 --- a/Stats/Supporting Files/da.lproj/Localizable.strings +++ b/Stats/Supporting Files/da.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Niveau"; diff --git a/Stats/Supporting Files/de.lproj/Localizable.strings b/Stats/Supporting Files/de.lproj/Localizable.strings index 45efa794..f284fe96 100644 --- a/Stats/Supporting Files/de.lproj/Localizable.strings +++ b/Stats/Supporting Files/de.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Ladezustand"; diff --git a/Stats/Supporting Files/el.lproj/Localizable.strings b/Stats/Supporting Files/el.lproj/Localizable.strings index ad935193..8d391bfe 100644 --- a/Stats/Supporting Files/el.lproj/Localizable.strings +++ b/Stats/Supporting Files/el.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Κανάλι"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Επίπεδο"; diff --git a/Stats/Supporting Files/en.lproj/Localizable.strings b/Stats/Supporting Files/en.lproj/Localizable.strings index ef90733a..07a893b5 100644 --- a/Stats/Supporting Files/en.lproj/Localizable.strings +++ b/Stats/Supporting Files/en.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Level"; diff --git a/Stats/Supporting Files/es.lproj/Localizable.strings b/Stats/Supporting Files/es.lproj/Localizable.strings index b68f4733..7540b7c4 100644 --- a/Stats/Supporting Files/es.lproj/Localizable.strings +++ b/Stats/Supporting Files/es.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Nivel"; diff --git a/Stats/Supporting Files/fr.lproj/Localizable.strings b/Stats/Supporting Files/fr.lproj/Localizable.strings index 53425ff4..a8abfea2 100644 --- a/Stats/Supporting Files/fr.lproj/Localizable.strings +++ b/Stats/Supporting Files/fr.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Niveau"; diff --git a/Stats/Supporting Files/he.lproj/Localizable.strings b/Stats/Supporting Files/he.lproj/Localizable.strings index 510ec458..c9fa70e7 100644 --- a/Stats/Supporting Files/he.lproj/Localizable.strings +++ b/Stats/Supporting Files/he.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "רמה"; diff --git a/Stats/Supporting Files/hr.lproj/Localizable.strings b/Stats/Supporting Files/hr.lproj/Localizable.strings index f0fde9a4..55ab0e4b 100644 --- a/Stats/Supporting Files/hr.lproj/Localizable.strings +++ b/Stats/Supporting Files/hr.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Kanal"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Stanje"; diff --git a/Stats/Supporting Files/hu.lproj/Localizable.strings b/Stats/Supporting Files/hu.lproj/Localizable.strings index 22b872d4..ce04cfdd 100644 --- a/Stats/Supporting Files/hu.lproj/Localizable.strings +++ b/Stats/Supporting Files/hu.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Csatorna"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Töltöttségi szint"; diff --git a/Stats/Supporting Files/id.lproj/Localizable.strings b/Stats/Supporting Files/id.lproj/Localizable.strings index 0c0189d6..66b6bc68 100644 --- a/Stats/Supporting Files/id.lproj/Localizable.strings +++ b/Stats/Supporting Files/id.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Level"; diff --git a/Stats/Supporting Files/it.lproj/Localizable.strings b/Stats/Supporting Files/it.lproj/Localizable.strings index c02597b7..74584687 100644 --- a/Stats/Supporting Files/it.lproj/Localizable.strings +++ b/Stats/Supporting Files/it.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Livello"; diff --git a/Stats/Supporting Files/ja.lproj/Localizable.strings b/Stats/Supporting Files/ja.lproj/Localizable.strings index fbab1732..1d8ba023 100644 --- a/Stats/Supporting Files/ja.lproj/Localizable.strings +++ b/Stats/Supporting Files/ja.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "充電残量"; diff --git a/Stats/Supporting Files/ko.lproj/Localizable.strings b/Stats/Supporting Files/ko.lproj/Localizable.strings index 9f66faed..40ed8d43 100644 --- a/Stats/Supporting Files/ko.lproj/Localizable.strings +++ b/Stats/Supporting Files/ko.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "채널"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "잔량"; diff --git a/Stats/Supporting Files/nb.lproj/Localizable.strings b/Stats/Supporting Files/nb.lproj/Localizable.strings index 2800151f..4b61f6f9 100644 --- a/Stats/Supporting Files/nb.lproj/Localizable.strings +++ b/Stats/Supporting Files/nb.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Nivå"; diff --git a/Stats/Supporting Files/nl.lproj/Localizable.strings b/Stats/Supporting Files/nl.lproj/Localizable.strings index fcb5f3fa..83a9e27b 100644 --- a/Stats/Supporting Files/nl.lproj/Localizable.strings +++ b/Stats/Supporting Files/nl.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Niveau"; diff --git a/Stats/Supporting Files/pl.lproj/Localizable.strings b/Stats/Supporting Files/pl.lproj/Localizable.strings index be6481fd..ef3dbe09 100644 --- a/Stats/Supporting Files/pl.lproj/Localizable.strings +++ b/Stats/Supporting Files/pl.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Kanał"; "Common scale" = "Wspólna skala"; "Autodetection" = "Autodetekcja"; +"Widget activation threshold" = "Próg aktywacji widżetu"; // Battery "Level" = "Poziom naładowania"; diff --git a/Stats/Supporting Files/pt-BR.lproj/Localizable.strings b/Stats/Supporting Files/pt-BR.lproj/Localizable.strings index 7de9e2f5..2ca10a2f 100644 --- a/Stats/Supporting Files/pt-BR.lproj/Localizable.strings +++ b/Stats/Supporting Files/pt-BR.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Nível"; diff --git a/Stats/Supporting Files/pt-PT.lproj/Localizable.strings b/Stats/Supporting Files/pt-PT.lproj/Localizable.strings index 746c11ed..4040c2eb 100644 --- a/Stats/Supporting Files/pt-PT.lproj/Localizable.strings +++ b/Stats/Supporting Files/pt-PT.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Nível"; diff --git a/Stats/Supporting Files/ro.lproj/Localizable.strings b/Stats/Supporting Files/ro.lproj/Localizable.strings index a4076631..a4f20831 100644 --- a/Stats/Supporting Files/ro.lproj/Localizable.strings +++ b/Stats/Supporting Files/ro.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Nivel"; diff --git a/Stats/Supporting Files/ru.lproj/Localizable.strings b/Stats/Supporting Files/ru.lproj/Localizable.strings index 7131d286..a9d757f9 100644 --- a/Stats/Supporting Files/ru.lproj/Localizable.strings +++ b/Stats/Supporting Files/ru.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Канал"; "Common scale" = "Общий масштаб"; "Autodetection" = "Автоопределение"; +"Widget activation threshold" = "Порог активации виджета"; // Battery "Level" = "Уровень заряда"; diff --git a/Stats/Supporting Files/sl.lproj/Localizable.strings b/Stats/Supporting Files/sl.lproj/Localizable.strings index ef1aafb1..c05dbe8f 100644 --- a/Stats/Supporting Files/sl.lproj/Localizable.strings +++ b/Stats/Supporting Files/sl.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Kanal"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Raven"; diff --git a/Stats/Supporting Files/sv.lproj/Localizable.strings b/Stats/Supporting Files/sv.lproj/Localizable.strings index dea728b6..8b493055 100644 --- a/Stats/Supporting Files/sv.lproj/Localizable.strings +++ b/Stats/Supporting Files/sv.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Kanal"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Nivå"; diff --git a/Stats/Supporting Files/tr.lproj/Localizable.strings b/Stats/Supporting Files/tr.lproj/Localizable.strings index e45bcaa6..79237238 100644 --- a/Stats/Supporting Files/tr.lproj/Localizable.strings +++ b/Stats/Supporting Files/tr.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Channel"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Doluluk"; diff --git a/Stats/Supporting Files/uk.lproj/Localizable.strings b/Stats/Supporting Files/uk.lproj/Localizable.strings index c043c518..44098bf9 100644 --- a/Stats/Supporting Files/uk.lproj/Localizable.strings +++ b/Stats/Supporting Files/uk.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Канал"; "Common scale" = "Загальна шкала"; "Autodetection" = "Автовизначення"; +"Widget activation threshold" = "Поріг активації віджета"; // Battery "Level" = "Рівень заряду"; diff --git a/Stats/Supporting Files/vi.lproj/Localizable.strings b/Stats/Supporting Files/vi.lproj/Localizable.strings index c9652cfc..02e2bb8f 100644 --- a/Stats/Supporting Files/vi.lproj/Localizable.strings +++ b/Stats/Supporting Files/vi.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "Kênh"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "Dung lượng Pin"; diff --git a/Stats/Supporting Files/zh-Hans.lproj/Localizable.strings b/Stats/Supporting Files/zh-Hans.lproj/Localizable.strings index ffc79864..252a1118 100644 --- a/Stats/Supporting Files/zh-Hans.lproj/Localizable.strings +++ b/Stats/Supporting Files/zh-Hans.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "频道"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "电量"; diff --git a/Stats/Supporting Files/zh-Hant.lproj/Localizable.strings b/Stats/Supporting Files/zh-Hant.lproj/Localizable.strings index 79b2d0b8..6cb18941 100644 --- a/Stats/Supporting Files/zh-Hant.lproj/Localizable.strings +++ b/Stats/Supporting Files/zh-Hant.lproj/Localizable.strings @@ -285,6 +285,7 @@ "Channel" = "通道"; "Common scale" = "Common scale"; "Autodetection" = "Autodetection"; +"Widget activation threshold" = "Widget activation threshold"; // Battery "Level" = "電量";