mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-05-26 07:08:04 +00:00
* All games will be linked * feat: Add 'Add Game' button to Settings tab - Added 'Add Game' button to Games to Watch section in Settings - Implemented logic to add custom games via search input - Fixed alignment issue with games filter search bar - Added English translations for new UI elements * fix PR 33 review issues --------- Co-authored-by: ethanblazkowicz <wow990922@outlook.com> Co-authored-by: LeonSparta <46887992+LeonSparta@users.noreply.github.com> Co-authored-by: Fengqing Liu <fq_aaron@hotmail.com>
23 lines
795 B
Python
23 lines
795 B
Python
import json
|
|
|
|
from src.config import LANG_PATH
|
|
from src.i18n.translator import GUISettings
|
|
|
|
|
|
def test_all_language_settings_include_gui_settings_schema_keys():
|
|
required_settings_keys = set(GUISettings.__annotations__)
|
|
english_settings = json.loads((LANG_PATH / "English.json").read_text(encoding="utf-8"))["gui"][
|
|
"settings"
|
|
]
|
|
missing_by_language = {}
|
|
|
|
for filepath in LANG_PATH.glob("*.json"):
|
|
translation = json.loads(filepath.read_text(encoding="utf-8"))
|
|
settings = translation["gui"]["settings"]
|
|
missing = sorted(required_settings_keys - set(settings))
|
|
if missing:
|
|
missing_by_language[filepath.name] = missing
|
|
|
|
assert sorted(set(english_settings) - required_settings_keys) == []
|
|
assert missing_by_language == {}
|