From 88bab7c2d06824558375d5c3d1b465264bd5c72a Mon Sep 17 00:00:00 2001 From: grummbeer Date: Fri, 3 Mar 2023 18:38:37 +0100 Subject: [PATCH] Fix. Android settings theme always show "Dark theme" --- flutter/lib/mobile/pages/settings_page.dart | 9 +++++++-- src/lang/ca.rs | 1 + src/lang/cn.rs | 1 + src/lang/cs.rs | 1 + src/lang/da.rs | 1 + src/lang/de.rs | 1 + src/lang/eo.rs | 1 + src/lang/es.rs | 1 + src/lang/fa.rs | 1 + src/lang/fr.rs | 1 + src/lang/gr.rs | 1 + src/lang/hu.rs | 1 + src/lang/id.rs | 1 + src/lang/it.rs | 1 + src/lang/ja.rs | 1 + src/lang/ko.rs | 1 + src/lang/kz.rs | 1 + src/lang/nl.rs | 1 + src/lang/pl.rs | 1 + src/lang/pt_PT.rs | 1 + src/lang/ptbr.rs | 1 + src/lang/ro.rs | 1 + src/lang/ru.rs | 1 + src/lang/sk.rs | 1 + src/lang/sl.rs | 1 + src/lang/sq.rs | 1 + src/lang/sr.rs | 1 + src/lang/sv.rs | 1 + src/lang/template.rs | 1 + src/lang/th.rs | 1 + src/lang/tr.rs | 1 + src/lang/tw.rs | 1 + src/lang/ua.rs | 1 + src/lang/vn.rs | 1 + 34 files changed, 40 insertions(+), 2 deletions(-) diff --git a/flutter/lib/mobile/pages/settings_page.dart b/flutter/lib/mobile/pages/settings_page.dart index e07f8f59f..c19601956 100644 --- a/flutter/lib/mobile/pages/settings_page.dart +++ b/flutter/lib/mobile/pages/settings_page.dart @@ -397,8 +397,13 @@ class _SettingsState extends State with WidgetsBindingObserver { showLanguageSettings(gFFI.dialogManager); }), SettingsTile.navigation( - title: Text(translate('Dark Theme')), - leading: Icon(Icons.dark_mode), + title: Text(translate( + Theme.of(context).brightness == Brightness.light + ? 'Dark Theme' + : 'Light Theme')), + leading: Icon(Theme.of(context).brightness == Brightness.light + ? Icons.dark_mode + : Icons.light_mode), onPressed: (context) { showThemeSettings(gFFI.dialogManager); }, diff --git a/src/lang/ca.rs b/src/lang/ca.rs index 53ec69b5f..89cc46920 100644 --- a/src/lang/ca.rs +++ b/src/lang/ca.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Seguretat"), ("Theme", "Tema"), ("Dark Theme", "Tema Fosc"), + ("Light Theme", ""), ("Dark", "Fosc"), ("Light", "Clar"), ("Follow System", "Tema del sistema"), diff --git a/src/lang/cn.rs b/src/lang/cn.rs index 4c037234b..3f4f6d25c 100644 --- a/src/lang/cn.rs +++ b/src/lang/cn.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "安全"), ("Theme", "主题"), ("Dark Theme", "暗黑主题"), + ("Light Theme", ""), ("Dark", "黑暗"), ("Light", "明亮"), ("Follow System", "跟随系统"), diff --git a/src/lang/cs.rs b/src/lang/cs.rs index 25a494eef..a2813815b 100644 --- a/src/lang/cs.rs +++ b/src/lang/cs.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", ""), ("Theme", ""), ("Dark Theme", ""), + ("Light Theme", ""), ("Dark", ""), ("Light", ""), ("Follow System", ""), diff --git a/src/lang/da.rs b/src/lang/da.rs index 8fd6f9be1..2760f94fb 100644 --- a/src/lang/da.rs +++ b/src/lang/da.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Sikkerhed"), ("Theme", "Thema"), ("Dark Theme", "Mørk Tema"), + ("Light Theme", ""), ("Dark", "Mørk"), ("Light", "Lys"), ("Follow System", "Følg System"), diff --git a/src/lang/de.rs b/src/lang/de.rs index d6ebe7f1a..dd8d2e8f0 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Sicherheit"), ("Theme", "Farbgebung"), ("Dark Theme", "Dunkle Farbgebung"), + ("Light Theme", "Helle Farbgebung"), ("Dark", "Dunkel"), ("Light", "Hell"), ("Follow System", "Systemstandard"), diff --git a/src/lang/eo.rs b/src/lang/eo.rs index dfee4fb87..7a191f05d 100644 --- a/src/lang/eo.rs +++ b/src/lang/eo.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", ""), ("Theme", ""), ("Dark Theme", ""), + ("Light Theme", ""), ("Dark", ""), ("Light", ""), ("Follow System", ""), diff --git a/src/lang/es.rs b/src/lang/es.rs index dc28cdae0..b290c7696 100644 --- a/src/lang/es.rs +++ b/src/lang/es.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Seguridad"), ("Theme", "Tema"), ("Dark Theme", "Tema Oscuro"), + ("Light Theme", ""), ("Dark", "Oscuro"), ("Light", "Claro"), ("Follow System", "Tema del sistema"), diff --git a/src/lang/fa.rs b/src/lang/fa.rs index 158e16f75..22ecf0355 100644 --- a/src/lang/fa.rs +++ b/src/lang/fa.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "امنیت"), ("Theme", "نمایه"), ("Dark Theme", "نمایه تیره"), + ("Light Theme", ""), ("Dark", "تیره"), ("Light", "روشن"), ("Follow System", "پیروی از سیستم"), diff --git a/src/lang/fr.rs b/src/lang/fr.rs index 28f1dd9d1..dd436831e 100644 --- a/src/lang/fr.rs +++ b/src/lang/fr.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Sécurité"), ("Theme", "Thème"), ("Dark Theme", "Thème somble"), + ("Light Theme", ""), ("Dark", "Sombre"), ("Light", "Clair"), ("Follow System", "Suivi système"), diff --git a/src/lang/gr.rs b/src/lang/gr.rs index 55a3c9bb7..cbd4f89e0 100644 --- a/src/lang/gr.rs +++ b/src/lang/gr.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Ασφάλεια"), ("Theme", "Θέμα"), ("Dark Theme", "Σκούρο θέμα"), + ("Light Theme", ""), ("Dark", "Σκούρο"), ("Light", "Φωτεινό"), ("Follow System", "Από το σύστημα"), diff --git a/src/lang/hu.rs b/src/lang/hu.rs index f47d522db..8727c53c2 100644 --- a/src/lang/hu.rs +++ b/src/lang/hu.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Biztonság"), ("Theme", "Téma"), ("Dark Theme", "Sötét téma"), + ("Light Theme", ""), ("Dark", "Sötét"), ("Light", "Világos"), ("Follow System", ""), diff --git a/src/lang/id.rs b/src/lang/id.rs index 7d02e154d..b363a2ae8 100644 --- a/src/lang/id.rs +++ b/src/lang/id.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Keamanan"), ("Theme", "Tema"), ("Dark Theme", "Tema gelap"), + ("Light Theme", ""), ("Dark", "Gelap"), ("Light", "Terang"), ("Follow System", "Ikuti sistem"), diff --git a/src/lang/it.rs b/src/lang/it.rs index 05fffedbd..340794ceb 100644 --- a/src/lang/it.rs +++ b/src/lang/it.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Sicurezza"), ("Theme", "Tema"), ("Dark Theme", "Tema Scuro"), + ("Light Theme", ""), ("Dark", "Scuro"), ("Light", "Chiaro"), ("Follow System", "Segui il sistema"), diff --git a/src/lang/ja.rs b/src/lang/ja.rs index d097a8b61..260c27607 100644 --- a/src/lang/ja.rs +++ b/src/lang/ja.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", ""), ("Theme", ""), ("Dark Theme", ""), + ("Light Theme", ""), ("Dark", ""), ("Light", ""), ("Follow System", ""), diff --git a/src/lang/ko.rs b/src/lang/ko.rs index 8ca881f16..f101ae20b 100644 --- a/src/lang/ko.rs +++ b/src/lang/ko.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", ""), ("Theme", ""), ("Dark Theme", ""), + ("Light Theme", ""), ("Dark", ""), ("Light", ""), ("Follow System", ""), diff --git a/src/lang/kz.rs b/src/lang/kz.rs index a9acdce65..fe0937a65 100644 --- a/src/lang/kz.rs +++ b/src/lang/kz.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", ""), ("Theme", ""), ("Dark Theme", ""), + ("Light Theme", ""), ("Dark", ""), ("Light", ""), ("Follow System", ""), diff --git a/src/lang/nl.rs b/src/lang/nl.rs index d1c154546..63d3cee7b 100644 --- a/src/lang/nl.rs +++ b/src/lang/nl.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Beveiliging"), ("Theme", "Thema"), ("Dark Theme", "Donker Thema"), + ("Light Theme", ""), ("Dark", "Donker"), ("Light", "Licht"), ("Follow System", "Volg Systeem"), diff --git a/src/lang/pl.rs b/src/lang/pl.rs index 494715527..162dec052 100644 --- a/src/lang/pl.rs +++ b/src/lang/pl.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Zabezpieczenia"), ("Theme", "Motyw"), ("Dark Theme", "Ciemny motyw"), + ("Light Theme", ""), ("Dark", "Ciemny"), ("Light", "Jasny"), ("Follow System", "Zgodny z systemem"), diff --git a/src/lang/pt_PT.rs b/src/lang/pt_PT.rs index b62bd5a31..8eb4df2ad 100644 --- a/src/lang/pt_PT.rs +++ b/src/lang/pt_PT.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", ""), ("Theme", ""), ("Dark Theme", ""), + ("Light Theme", ""), ("Dark", ""), ("Light", ""), ("Follow System", ""), diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rs index 546ef2a3c..973048f3d 100644 --- a/src/lang/ptbr.rs +++ b/src/lang/ptbr.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Segurança"), ("Theme", "Tema"), ("Dark Theme", "Tema escuro"), + ("Light Theme", ""), ("Dark", "Escuro"), ("Light", "Claro"), ("Follow System", "Seguir sistema"), diff --git a/src/lang/ro.rs b/src/lang/ro.rs index af9389a29..9e252aa8a 100644 --- a/src/lang/ro.rs +++ b/src/lang/ro.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Securitate"), ("Theme", "Temă"), ("Dark Theme", "Temă întunecată"), + ("Light Theme", ""), ("Dark", "Întunecat"), ("Light", "Luminos"), ("Follow System", "Urmărește sistem"), diff --git a/src/lang/ru.rs b/src/lang/ru.rs index d524b8f4d..4c1f9ae34 100644 --- a/src/lang/ru.rs +++ b/src/lang/ru.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Безопасность"), ("Theme", "Тема"), ("Dark Theme", "Тёмная тема"), + ("Light Theme", ""), ("Dark", "Тёмная"), ("Light", "Светлая"), ("Follow System", "Системная"), diff --git a/src/lang/sk.rs b/src/lang/sk.rs index 8a6b765be..d60384286 100644 --- a/src/lang/sk.rs +++ b/src/lang/sk.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", ""), ("Theme", ""), ("Dark Theme", ""), + ("Light Theme", ""), ("Dark", ""), ("Light", ""), ("Follow System", ""), diff --git a/src/lang/sl.rs b/src/lang/sl.rs index 5721d01f4..bd07b1acb 100755 --- a/src/lang/sl.rs +++ b/src/lang/sl.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Varnost"), ("Theme", "Tema"), ("Dark Theme", "Temna tema"), + ("Light Theme", ""), ("Dark", "Temna"), ("Light", "Svetla"), ("Follow System", "Sistemska"), diff --git a/src/lang/sq.rs b/src/lang/sq.rs index 1c488d470..b8f9203ca 100644 --- a/src/lang/sq.rs +++ b/src/lang/sq.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Siguria"), ("Theme", "Theme"), ("Dark Theme", "Theme e errët"), + ("Light Theme", ""), ("Dark", "E errët"), ("Light", "Drita"), ("Follow System", "Ndiq sistemin"), diff --git a/src/lang/sr.rs b/src/lang/sr.rs index 249c0b599..4a9b73374 100644 --- a/src/lang/sr.rs +++ b/src/lang/sr.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Bezbednost"), ("Theme", "Tema"), ("Dark Theme", "Tamna tema"), + ("Light Theme", ""), ("Dark", "Tamno"), ("Light", "Svetlo"), ("Follow System", "Prema sistemu"), diff --git a/src/lang/sv.rs b/src/lang/sv.rs index 90ec8c1cf..f73154e3e 100644 --- a/src/lang/sv.rs +++ b/src/lang/sv.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Säkerhet"), ("Theme", "Tema"), ("Dark Theme", "Mörkt tema"), + ("Light Theme", ""), ("Dark", "Mörk"), ("Light", "Ljus"), ("Follow System", "Följ system"), diff --git a/src/lang/template.rs b/src/lang/template.rs index 6563d6056..e51a095c0 100644 --- a/src/lang/template.rs +++ b/src/lang/template.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", ""), ("Theme", ""), ("Dark Theme", ""), + ("Light Theme", ""), ("Dark", ""), ("Light", ""), ("Follow System", ""), diff --git a/src/lang/th.rs b/src/lang/th.rs index 316622395..3214c3452 100644 --- a/src/lang/th.rs +++ b/src/lang/th.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "ความปลอดภัย"), ("Theme", "ธีม"), ("Dark Theme", "ธีมมืด"), + ("Light Theme", ""), ("Dark", "มืด"), ("Light", "สว่าง"), ("Follow System", "ตามระบบ"), diff --git a/src/lang/tr.rs b/src/lang/tr.rs index 7359bf064..82f95ef84 100644 --- a/src/lang/tr.rs +++ b/src/lang/tr.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Güvenlik"), ("Theme", "Tema"), ("Dark Theme", "Koyu Tema"), + ("Light Theme", ""), ("Dark", "Koyu"), ("Light", "Açık"), ("Follow System", "Sisteme Uy"), diff --git a/src/lang/tw.rs b/src/lang/tw.rs index 70533c482..d0f12cdfa 100644 --- a/src/lang/tw.rs +++ b/src/lang/tw.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "安全"), ("Theme", "主題"), ("Dark Theme", "暗黑主題"), + ("Light Theme", ""), ("Dark", "黑暗"), ("Light", "明亮"), ("Follow System", "跟隨系統"), diff --git a/src/lang/ua.rs b/src/lang/ua.rs index 6b54c83c3..793d1e147 100644 --- a/src/lang/ua.rs +++ b/src/lang/ua.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", "Безпека"), ("Theme", "Тема"), ("Dark Theme", "Темна тема"), + ("Light Theme", ""), ("Dark", "Темна"), ("Light", "Світла"), ("Follow System", "Як у системі"), diff --git a/src/lang/vn.rs b/src/lang/vn.rs index a379b3185..fc665834d 100644 --- a/src/lang/vn.rs +++ b/src/lang/vn.rs @@ -349,6 +349,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Security", ""), ("Theme", ""), ("Dark Theme", ""), + ("Light Theme", ""), ("Dark", ""), ("Light", ""), ("Follow System", ""),