From deee8abf61a80cd4fdb306a13e53ff91d8be7030 Mon Sep 17 00:00:00 2001 From: DevilXD Date: Sun, 29 Oct 2023 22:36:12 +0100 Subject: [PATCH] Change inventory filters to show all campaigns when all of them are selected --- gui.py | 10 +++++----- lang/Deutsch.json | 2 +- lang/Español.json | 2 +- lang/Français.json | 2 +- lang/Italiano.json | 2 +- lang/Polski.json | 2 +- lang/Português.json | 2 +- lang/Türkçe.json | 2 +- lang/Čeština.json | 2 +- lang/Русский.json | 2 +- lang/Українська.json | 2 +- lang/العربية.json | 2 +- lang/简体中文.json | 2 +- lang/繁體中文.json | 2 +- translate.py | 4 ++-- 15 files changed, 20 insertions(+), 20 deletions(-) diff --git a/gui.py b/gui.py index d7db9ae..ed93a29 100644 --- a/gui.py +++ b/gui.py @@ -1147,7 +1147,7 @@ class InventoryOverview: self._cache: ImageCache = manager._cache self._settings: Settings = manager._twitch.settings self._filters = { - "linked": IntVar(master, 1), + "not_linked": IntVar(master, 1), "upcoming": IntVar(master, 1), "expired": IntVar(master, 0), "excluded": IntVar(master, 0), @@ -1165,11 +1165,11 @@ class InventoryOverview: ).grid(column=0, row=0) icolumn = 0 ttk.Checkbutton( - filter_frame, variable=self._filters["linked"] + filter_frame, variable=self._filters["not_linked"] ).grid(column=(icolumn := icolumn + 1), row=0) ttk.Label( filter_frame, - text=_("gui", "inventory", "filter", "linked"), + text=_("gui", "inventory", "filter", "not_linked"), padding=(0, 0, LABEL_SPACING, 0), ).grid(column=(icolumn := icolumn + 1), row=0) ttk.Checkbutton( @@ -1230,14 +1230,14 @@ class InventoryOverview: def _update_visibility(self, campaign: DropsCampaign): # True if the campaign is supposed to show, False makes it hidden. frame = self._campaigns[campaign]["frame"] - linked = bool(self._filters["linked"].get()) + not_linked = bool(self._filters["not_linked"].get()) expired = bool(self._filters["expired"].get()) excluded = bool(self._filters["excluded"].get()) upcoming = bool(self._filters["upcoming"].get()) finished = bool(self._filters["finished"].get()) priority_only = self._settings.priority_only if ( - (not linked or campaign.linked) + (not_linked or campaign.linked) and (campaign.active or upcoming and campaign.upcoming or expired and campaign.expired) and ( excluded or ( diff --git a/lang/Deutsch.json b/lang/Deutsch.json index caba0b1..263cda3 100644 --- a/lang/Deutsch.json +++ b/lang/Deutsch.json @@ -107,7 +107,7 @@ "filter": { "name": "Filter", "show": "Anzeigen:", - "linked": "Nur verknüpfte", + "not_linked": "Nicht verbunden", "upcoming": "Zukünftig", "expired": "Abgelaufen", "excluded": "Ausgeschlossen", diff --git a/lang/Español.json b/lang/Español.json index 49cd80c..1a5b6c1 100644 --- a/lang/Español.json +++ b/lang/Español.json @@ -107,7 +107,7 @@ "filter": { "name": "Filtro de campañas", "show": "Mostrar:", - "linked": "Vinculadas", + "not_linked": "No enlazado", "upcoming": "Próximas", "expired": "Expiradas", "excluded": "Excluidas", diff --git a/lang/Français.json b/lang/Français.json index 026c981..e17a3dc 100644 --- a/lang/Français.json +++ b/lang/Français.json @@ -107,7 +107,7 @@ "filter": { "name": "Filtre", "show": "Afficher :", - "linked": "Liés uniquement", + "not_linked": "Non lié", "upcoming": "À venir", "expired": "Expiré", "excluded": "Exclu", diff --git a/lang/Italiano.json b/lang/Italiano.json index 296c8cd..6b7f07f 100644 --- a/lang/Italiano.json +++ b/lang/Italiano.json @@ -107,7 +107,7 @@ "filter": { "name": "Filtro", "show": "Mostra:", - "linked": "Solo collegati", + "not_linked": "Non collegato", "upcoming": "In arrivo", "expired": "Scaduti", "excluded": "Esclusi", diff --git a/lang/Polski.json b/lang/Polski.json index 80e334b..028234a 100644 --- a/lang/Polski.json +++ b/lang/Polski.json @@ -107,7 +107,7 @@ "filter": { "name": "Filtr", "show": "Pokaż:", - "linked": "Tylko połączone", + "not_linked": "Nie połączone", "upcoming": "Nadchodzące", "expired": "Wygasłe", "excluded": "Wykluczone", diff --git a/lang/Português.json b/lang/Português.json index 5ddab64..1f32827 100644 --- a/lang/Português.json +++ b/lang/Português.json @@ -107,7 +107,7 @@ "filter": { "name": "Filtro", "show": "Mostrar:", - "linked": "Conectado apenas", + "not_linked": "Não ligado", "upcoming": "Se Aproximando", "expired": "Expirado", "excluded": "Excluido", diff --git a/lang/Türkçe.json b/lang/Türkçe.json index 1301e52..09df1e7 100644 --- a/lang/Türkçe.json +++ b/lang/Türkçe.json @@ -107,7 +107,7 @@ "filter": { "name": "Filtre", "show": "Dava etmek:", - "linked": "Yalnızca bağlantılı", + "not_linked": "Bağlantılı değil", "upcoming": "Gelecek", "expired": "Süresi doldu", "excluded": "Hariç tutuldu", diff --git a/lang/Čeština.json b/lang/Čeština.json index 8200552..67c037e 100644 --- a/lang/Čeština.json +++ b/lang/Čeština.json @@ -100,7 +100,7 @@ "filter": { "name": "Filtr", "show": "Drop:", - "linked": "Pouze živě", + "not_linked": "Nepropojeno", "expired": "Ukončeno", "excluded": "Vynecháno", "upcoming": "Nadcházející", diff --git a/lang/Русский.json b/lang/Русский.json index 5245afc..3905aec 100644 --- a/lang/Русский.json +++ b/lang/Русский.json @@ -107,7 +107,7 @@ "filter": { "name": "Фильтр", "show": "Показать:", - "linked": "Только связанные", + "not_linked": "Не связано", "upcoming": "Будущие", "expired": "Прошедшие", "excluded": "Исключенные", diff --git a/lang/Українська.json b/lang/Українська.json index 45b995d..1e24a01 100644 --- a/lang/Українська.json +++ b/lang/Українська.json @@ -107,7 +107,7 @@ "filter": { "name": "Фільтри", "show": "Показати тільки:", - "linked": "Зв'язані", + "not_linked": "Не пов'язано", "upcoming": "Наближаються", "expired": "Прострочені", "excluded": "Виключені", diff --git a/lang/العربية.json b/lang/العربية.json index dd0ac5b..bd0ad71 100644 --- a/lang/العربية.json +++ b/lang/العربية.json @@ -107,7 +107,7 @@ "filter": { "name": "تصفية", "show": "عرض \u279C", - "linked": "المرتبطة فقط", + "not_linked": "غير مرتبط", "upcoming": "القادمة", "expired": "المنتهية", "excluded": "المستبعدة", diff --git a/lang/简体中文.json b/lang/简体中文.json index 429cae8..b673801 100644 --- a/lang/简体中文.json +++ b/lang/简体中文.json @@ -107,7 +107,7 @@ "filter": { "name": "筛选", "show": "掉宝活动:", - "linked": "仅已关联账户的游戏掉宝", + "not_linked": "未链接", "expired": "已结束", "excluded": "未添加的掉宝活动", "upcoming": "即将上线", diff --git a/lang/繁體中文.json b/lang/繁體中文.json index 3a4d096..52af0c3 100644 --- a/lang/繁體中文.json +++ b/lang/繁體中文.json @@ -107,7 +107,7 @@ "filter": { "name": "篩選", "show": "掉寶活動:", - "linked": "僅顯示關聯帳號的遊戲掉寶", + "not_linked": "未連結", "expired": "已結束", "excluded": "未添加的掉寶活動", "upcoming": "即將開啟", diff --git a/translate.py b/translate.py index 9a9d560..9d51485 100644 --- a/translate.py +++ b/translate.py @@ -130,7 +130,7 @@ class GUIChannels(TypedDict): class GUIInvFilter(TypedDict): name: str show: str - linked: str + not_linked: str upcoming: str expired: str excluded: str @@ -330,7 +330,7 @@ default_translation: Translation = { "filter": { "name": "Filter", "show": "Show:", - "linked": "Linked only", + "not_linked": "Not linked", "upcoming": "Upcoming", "expired": "Expired", "excluded": "Excluded",