fletchtime 0.3.3__tar.gz → 0.3.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. {fletchtime-0.3.3/src/fletchtime.egg-info → fletchtime-0.3.4}/PKG-INFO +1 -1
  2. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/_version.py +3 -3
  3. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/gui.py +19 -32
  4. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/server/config_store.py +9 -1
  5. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/index.html +1 -1
  6. {fletchtime-0.3.3 → fletchtime-0.3.4/src/fletchtime.egg-info}/PKG-INFO +1 -1
  7. fletchtime-0.3.4/src/fletchtime.egg-info/scm_version.json +8 -0
  8. {fletchtime-0.3.3 → fletchtime-0.3.4}/tests/test_config_store.py +25 -0
  9. fletchtime-0.3.3/src/fletchtime.egg-info/scm_version.json +0 -8
  10. {fletchtime-0.3.3 → fletchtime-0.3.4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  11. {fletchtime-0.3.3 → fletchtime-0.3.4}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  12. {fletchtime-0.3.3 → fletchtime-0.3.4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  13. {fletchtime-0.3.3 → fletchtime-0.3.4}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  14. {fletchtime-0.3.3 → fletchtime-0.3.4}/.github/workflows/build.yml +0 -0
  15. {fletchtime-0.3.3 → fletchtime-0.3.4}/.github/workflows/docs.yml +0 -0
  16. {fletchtime-0.3.3 → fletchtime-0.3.4}/.github/workflows/test.yml +0 -0
  17. {fletchtime-0.3.3 → fletchtime-0.3.4}/.gitignore +0 -0
  18. {fletchtime-0.3.3 → fletchtime-0.3.4}/CLAUDE.md +0 -0
  19. {fletchtime-0.3.3 → fletchtime-0.3.4}/CODE_OF_CONDUCT.md +0 -0
  20. {fletchtime-0.3.3 → fletchtime-0.3.4}/CONTRIBUTING.md +0 -0
  21. {fletchtime-0.3.3 → fletchtime-0.3.4}/LICENSE +0 -0
  22. {fletchtime-0.3.3 → fletchtime-0.3.4}/README.md +0 -0
  23. {fletchtime-0.3.3 → fletchtime-0.3.4}/REMERCIEMENTS.md +0 -0
  24. {fletchtime-0.3.3 → fletchtime-0.3.4}/SECURITY.md +0 -0
  25. {fletchtime-0.3.3 → fletchtime-0.3.4}/config/app.toml +0 -0
  26. {fletchtime-0.3.3 → fletchtime-0.3.4}/config/flint.toml +0 -0
  27. {fletchtime-0.3.3 → fletchtime-0.3.4}/config/indoor.toml +0 -0
  28. {fletchtime-0.3.3 → fletchtime-0.3.4}/demo.py +0 -0
  29. {fletchtime-0.3.3 → fletchtime-0.3.4}/docs/_static/logo.svg +0 -0
  30. {fletchtime-0.3.3 → fletchtime-0.3.4}/docs/api-reference.md +0 -0
  31. {fletchtime-0.3.3 → fletchtime-0.3.4}/docs/architecture.md +0 -0
  32. {fletchtime-0.3.3 → fletchtime-0.3.4}/docs/conf.py +0 -0
  33. {fletchtime-0.3.3 → fletchtime-0.3.4}/docs/dev-guide/index.md +0 -0
  34. {fletchtime-0.3.3 → fletchtime-0.3.4}/docs/index.md +0 -0
  35. {fletchtime-0.3.3 → fletchtime-0.3.4}/docs/premier-club.md +0 -0
  36. {fletchtime-0.3.3 → fletchtime-0.3.4}/docs/remerciements.md +0 -0
  37. {fletchtime-0.3.3 → fletchtime-0.3.4}/docs/requirements.txt +0 -0
  38. {fletchtime-0.3.3 → fletchtime-0.3.4}/docs/roadmap.md +0 -0
  39. {fletchtime-0.3.3 → fletchtime-0.3.4}/docs/specifications.md +0 -0
  40. {fletchtime-0.3.3 → fletchtime-0.3.4}/docs/user-guide/index.md +0 -0
  41. {fletchtime-0.3.3 → fletchtime-0.3.4}/fletchtime.spec +0 -0
  42. {fletchtime-0.3.3 → fletchtime-0.3.4}/pyproject.toml +0 -0
  43. {fletchtime-0.3.3 → fletchtime-0.3.4}/run_server.py +0 -0
  44. {fletchtime-0.3.3 → fletchtime-0.3.4}/run_tests.py +0 -0
  45. {fletchtime-0.3.3 → fletchtime-0.3.4}/scripts/generate_classic_sounds.py +0 -0
  46. {fletchtime-0.3.3 → fletchtime-0.3.4}/setup.cfg +0 -0
  47. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/__init__.py +0 -0
  48. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/__main__.py +0 -0
  49. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/engine/__init__.py +0 -0
  50. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/engine/engine.py +0 -0
  51. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/engine/models.py +0 -0
  52. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/engine/modes/__init__.py +0 -0
  53. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/engine/modes/base.py +0 -0
  54. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/engine/modes/flint.py +0 -0
  55. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/engine/modes/indoor.py +0 -0
  56. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/engine/sequence.py +0 -0
  57. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/engine/turn_modes.py +0 -0
  58. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/logging_setup.py +0 -0
  59. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/runtime.py +0 -0
  60. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/server/__init__.py +0 -0
  61. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/server/http_static.py +0 -0
  62. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/server/match_server.py +0 -0
  63. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/server/ws_server.py +0 -0
  64. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/__init__.py +0 -0
  65. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/banners/README.md +0 -0
  66. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/club/README.md +0 -0
  67. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/sounds/packs/README.md +0 -0
  68. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/sounds/packs/classic/countdown_tick.wav +0 -0
  69. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/sounds/packs/classic/emergency_end.wav +0 -0
  70. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/sounds/packs/classic/emergency_start.wav +0 -0
  71. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/sounds/packs/classic/end_of_match.wav +0 -0
  72. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/sounds/packs/classic/end_of_volee.wav +0 -0
  73. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/sounds/packs/classic/pause_end.wav +0 -0
  74. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/sounds/packs/classic/pause_start.wav +0 -0
  75. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/sounds/packs/classic/prep_start.wav +0 -0
  76. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/sounds/packs/classic/shoot_start.wav +0 -0
  77. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/sounds/packs/classic/warning_orange.wav +0 -0
  78. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/targets/flint_20cm_4spot.svg +0 -0
  79. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/targets/flint_35cm_1spot.svg +0 -0
  80. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/targets/indoor_compound.svg +0 -0
  81. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/_defaults/targets/indoor_recurve.svg +0 -0
  82. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/config.html +0 -0
  83. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/control.html +0 -0
  84. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/display.html +0 -0
  85. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/i18n.js +0 -0
  86. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/logo.ico +0 -0
  87. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/logo.svg +0 -0
  88. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/manual.html +0 -0
  89. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/screenshots/config.png +0 -0
  90. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/screenshots/control.png +0 -0
  91. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/screenshots/display.png +0 -0
  92. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/screenshots/index.png +0 -0
  93. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime/web/theme.js +0 -0
  94. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime.egg-info/SOURCES.txt +0 -0
  95. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime.egg-info/dependency_links.txt +0 -0
  96. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime.egg-info/entry_points.txt +0 -0
  97. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime.egg-info/requires.txt +0 -0
  98. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime.egg-info/scm_file_list.json +0 -0
  99. {fletchtime-0.3.3 → fletchtime-0.3.4}/src/fletchtime.egg-info/top_level.txt +0 -0
  100. {fletchtime-0.3.3 → fletchtime-0.3.4}/tests/test_engine.py +0 -0
  101. {fletchtime-0.3.3 → fletchtime-0.3.4}/tests/test_flint_mode.py +0 -0
  102. {fletchtime-0.3.3 → fletchtime-0.3.4}/tests/test_indoor_mode.py +0 -0
  103. {fletchtime-0.3.3 → fletchtime-0.3.4}/tests/test_main_cli.py +0 -0
  104. {fletchtime-0.3.3 → fletchtime-0.3.4}/tests/test_match_server.py +0 -0
  105. {fletchtime-0.3.3 → fletchtime-0.3.4}/tests/test_runtime.py +0 -0
  106. {fletchtime-0.3.3 → fletchtime-0.3.4}/tests/test_theme_drift.py +0 -0
  107. {fletchtime-0.3.3 → fletchtime-0.3.4}/web/assets/banners/README.md +0 -0
  108. {fletchtime-0.3.3 → fletchtime-0.3.4}/web/assets/sounds/packs/README.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fletchtime
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: Chronométrage de compétitions d'archerie FFTL (Indoor, Flint) -- serveur + interfaces web incluses
5
5
  License: GPL-3.0-or-later
6
6
  Requires-Python: >=3.11
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.3.3'
22
- __version_tuple__ = version_tuple = (0, 3, 3)
21
+ __version__ = version = '0.3.4'
22
+ __version_tuple__ = version_tuple = (0, 3, 4)
23
23
 
24
- __commit_id__ = commit_id = 'g7d0212ef6'
24
+ __commit_id__ = commit_id = 'g4024da168'
@@ -60,6 +60,14 @@ from fletchtime.server import config_store
60
60
 
61
61
  SECTIONS = ["accueil", "affichage", "reseau", "statut_technique", "journal", "aide"]
62
62
 
63
+ # Mêmes icônes que la vue web (theme.css, boutons .theme-btn) et que le
64
+ # sélecteur de thème de FletchScore (gui/app.py::ICONES_THEME, issue #49)
65
+ # -- reprises telles quelles ici (issue #15) pour remplacer le dropdown
66
+ # texte "Système"/"Clair"/"Sombre" d'avant, qui devait être retraduit à
67
+ # chaque changement de langue.
68
+ ICONES_THEME = {"system": "◐", "light": "☀", "dark": "☾"}
69
+ _THEME_PAR_ICONE = {icone: theme for theme, icone in ICONES_THEME.items()}
70
+
63
71
  # Même fichier que celui utilisé comme icône de fletchtime.spec -- pas de
64
72
  # nouvel asset à ajouter, seulement "*.ico" au package-data pip (voir
65
73
  # pyproject.toml, absent jusqu'ici -- déjà embarqué par PyInstaller, qui
@@ -110,9 +118,6 @@ _TRANSLATIONS = {
110
118
  "log_title": "Journal",
111
119
  "club_data": "Données du club :",
112
120
  "addressCaption": "Adresse :",
113
- "themeSystem": "Système",
114
- "themeLight": "Clair",
115
- "themeDark": "Sombre",
116
121
  "networkCaption": "Ports (HTTP/WS) :",
117
122
  "displayOptionsCaption": "Lane à ouvrir :",
118
123
  "muteLabel": "Muet",
@@ -175,9 +180,6 @@ _TRANSLATIONS = {
175
180
  "log_title": "Log",
176
181
  "club_data": "Club data:",
177
182
  "addressCaption": "Address:",
178
- "themeSystem": "System",
179
- "themeLight": "Light",
180
- "themeDark": "Dark",
181
183
  "networkCaption": "Ports (HTTP/WS):",
182
184
  "displayOptionsCaption": "Lane to open:",
183
185
  "muteLabel": "Muted",
@@ -317,7 +319,7 @@ class FletchTimeApp(ctk.CTk):
317
319
 
318
320
  super().__init__()
319
321
 
320
- self.language = "fr"
322
+ self.language = gui_config["language"]
321
323
  self.log_queue: queue.Queue[str] = queue.Queue()
322
324
  self.status_queue: queue.Queue = queue.Queue()
323
325
  # Sources de vérité pour le journal et le statut technique --
@@ -458,23 +460,23 @@ class FletchTimeApp(ctk.CTk):
458
460
  self.langue_caption = ctk.CTkLabel(self.barre_laterale, text=self._t("languageCaption"))
459
461
  self.langue_caption.grid(row=ligne, column=0, padx=20, pady=(10, 0), sticky="w")
460
462
  ligne += 1
461
- self.lang_menu = ctk.CTkOptionMenu(
463
+ self.segment_langue = ctk.CTkSegmentedButton(
462
464
  self.barre_laterale, values=["FR", "EN"], command=self._on_language_change
463
465
  )
464
- self.lang_menu.set(self.language.upper())
465
- self.lang_menu.grid(row=ligne, column=0, padx=20, pady=(5, 10), sticky="ew")
466
+ self.segment_langue.set(self.language.upper())
467
+ self.segment_langue.grid(row=ligne, column=0, padx=20, pady=(5, 10), sticky="ew")
466
468
  ligne += 1
467
469
 
468
470
  self.theme_caption = ctk.CTkLabel(self.barre_laterale, text=self._t("themeCaption"))
469
471
  self.theme_caption.grid(row=ligne, column=0, padx=20, pady=(0, 0), sticky="w")
470
472
  ligne += 1
471
- self.theme_menu = ctk.CTkOptionMenu(
473
+ self.segment_theme = ctk.CTkSegmentedButton(
472
474
  self.barre_laterale,
473
- values=[self._t("themeSystem"), self._t("themeLight"), self._t("themeDark")],
475
+ values=list(ICONES_THEME.values()),
474
476
  command=self._on_theme_change,
475
477
  )
476
- self.theme_menu.set(self._theme_label(self.theme))
477
- self.theme_menu.grid(row=ligne, column=0, padx=20, pady=(5, 15), sticky="ew")
478
+ self.segment_theme.set(ICONES_THEME[self.theme])
479
+ self.segment_theme.grid(row=ligne, column=0, padx=20, pady=(5, 15), sticky="ew")
478
480
  ligne += 1
479
481
 
480
482
  self.quit_button = ctk.CTkButton(
@@ -904,15 +906,12 @@ class FletchTimeApp(ctk.CTk):
904
906
 
905
907
  def _on_language_change(self, value: str) -> None:
906
908
  self.language = value.lower()
909
+ config_store.save_gui_config({"language": self.language})
907
910
  self.title(self._t("title"))
908
911
  for cle, bouton in self.boutons_sections.items():
909
912
  bouton.configure(text=self._libelle_section(cle))
910
913
  self.langue_caption.configure(text=self._t("languageCaption"))
911
914
  self.theme_caption.configure(text=self._t("themeCaption"))
912
- self.theme_menu.configure(
913
- values=[self._t("themeSystem"), self._t("themeLight"), self._t("themeDark")]
914
- )
915
- self.theme_menu.set(self._theme_label(self.theme))
916
915
  self.quit_button.configure(text=self._t("quit"))
917
916
  # Reconstruit l'écran actif pour retraduire tout son contenu --
918
917
  # plus simple et plus sûr que de retrouver et reconfigurer
@@ -920,20 +919,8 @@ class FletchTimeApp(ctk.CTk):
920
919
  # pas être l'écran actuellement affiché.
921
920
  self.afficher_section(self.section_active)
922
921
 
923
- def _theme_label(self, theme: str) -> str:
924
- return {
925
- "system": self._t("themeSystem"),
926
- "light": self._t("themeLight"),
927
- "dark": self._t("themeDark"),
928
- }.get(theme, self._t("themeSystem"))
929
-
930
- def _on_theme_change(self, label: str) -> None:
931
- reverse = {
932
- self._t("themeSystem"): "system",
933
- self._t("themeLight"): "light",
934
- self._t("themeDark"): "dark",
935
- }
936
- theme = reverse.get(label, "system")
922
+ def _on_theme_change(self, icone: str) -> None:
923
+ theme = _THEME_PAR_ICONE[icone]
937
924
  self.theme = theme
938
925
  ctk.set_appearance_mode(theme)
939
926
  config_store.save_gui_config({"theme": theme})
@@ -84,10 +84,16 @@ _HEX_COLOR_RE = re.compile(r"^#[0-9a-fA-F]{6}$")
84
84
 
85
85
  GUI_COMMENTS: dict[str, str] = {
86
86
  "theme": 'Thème de la fenêtre : "system" (suit le thème du système), "light" ou "dark"',
87
+ "language": 'Langue de la fenêtre : "fr" ou "en"',
87
88
  "http_port": "Port HTTP (pages web) -- change ceci pour faire tourner plusieurs salles sur le même PC",
88
89
  "ws_port": "Port WebSocket (temps réel) -- doit être différent du port HTTP",
89
90
  }
90
- DEFAULT_GUI_CONFIG: dict[str, Any] = {"theme": "system", "http_port": 8000, "ws_port": 8765}
91
+ DEFAULT_GUI_CONFIG: dict[str, Any] = {
92
+ "theme": "system",
93
+ "language": "fr",
94
+ "http_port": 8000,
95
+ "ws_port": 8765,
96
+ }
91
97
 
92
98
  AUTH_COMMENTS: dict[str, str] = {
93
99
  "password": (
@@ -201,6 +207,8 @@ def save_gui_config(overrides: dict[str, Any]) -> dict[str, Any]:
201
207
  merged.update({k: v for k, v in overrides.items() if k in DEFAULT_GUI_CONFIG})
202
208
  if merged["theme"] not in ("system", "light", "dark"):
203
209
  raise ValueError(f'theme must be "system", "light" or "dark", got {merged["theme"]!r}')
210
+ if merged["language"] not in ("fr", "en"):
211
+ raise ValueError(f'language must be "fr" or "en", got {merged["language"]!r}')
204
212
  for key in ("http_port", "ws_port"):
205
213
  port = merged[key]
206
214
  if not isinstance(port, int) or not (1 <= port <= 65535):
@@ -43,7 +43,7 @@
43
43
  }
44
44
  body {
45
45
  display: flex; flex-direction: column; align-items: center;
46
- padding: 3rem 1.25rem 2rem;
46
+ padding: 5.5rem 1.25rem 2rem;
47
47
  }
48
48
 
49
49
  .hero { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 640px; }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fletchtime
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: Chronométrage de compétitions d'archerie FFTL (Indoor, Flint) -- serveur + interfaces web incluses
5
5
  License: GPL-3.0-or-later
6
6
  Requires-Python: >=3.11
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.3.4",
3
+ "distance": 0,
4
+ "node": "g4024da1685a79283ad72fe0cb6684f9dfca2945b",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-08-17"
8
+ }
@@ -16,11 +16,13 @@ class TestConfigStore(unittest.TestCase):
16
16
  self._original_app = config_store.APP_TOML
17
17
  self._original_auth = config_store.AUTH_TOML
18
18
  self._original_match_state = config_store.MATCH_STATE_JSON
19
+ self._original_gui = config_store.GUI_TOML
19
20
  config_store.INDOOR_TOML = Path(self._tmpdir.name) / "indoor.toml"
20
21
  config_store.FLINT_TOML = Path(self._tmpdir.name) / "flint.toml"
21
22
  config_store.APP_TOML = Path(self._tmpdir.name) / "app.toml"
22
23
  config_store.AUTH_TOML = Path(self._tmpdir.name) / "auth.toml"
23
24
  config_store.MATCH_STATE_JSON = Path(self._tmpdir.name) / "match_state.json"
25
+ config_store.GUI_TOML = Path(self._tmpdir.name) / "gui.toml"
24
26
 
25
27
  def tearDown(self) -> None:
26
28
  config_store.INDOOR_TOML = self._original_indoor
@@ -28,6 +30,7 @@ class TestConfigStore(unittest.TestCase):
28
30
  config_store.APP_TOML = self._original_app
29
31
  config_store.AUTH_TOML = self._original_auth
30
32
  config_store.MATCH_STATE_JSON = self._original_match_state
33
+ config_store.GUI_TOML = self._original_gui
31
34
  self._tmpdir.cleanup()
32
35
 
33
36
  def test_missing_file_falls_back_to_dataclass_defaults(self) -> None:
@@ -63,6 +66,28 @@ class TestConfigStore(unittest.TestCase):
63
66
  cfg = config_store.load_indoor_config()
64
67
  self.assertEqual(cfg.shoot_time, 210.0)
65
68
 
69
+ def test_gui_config_defaults_to_french(self) -> None:
70
+ # issue #16 : la langue n'avait pas de valeur par défaut avant ce
71
+ # ticket -- absente de DEFAULT_GUI_CONFIG.
72
+ cfg = config_store.load_gui_config()
73
+ self.assertEqual(cfg["language"], "fr")
74
+
75
+ def test_gui_config_language_round_trip(self) -> None:
76
+ config_store.save_gui_config({"language": "en"})
77
+ self.assertEqual(config_store.load_gui_config()["language"], "en")
78
+
79
+ def test_gui_config_invalid_language_raises_and_does_not_write(self) -> None:
80
+ with self.assertRaises(ValueError):
81
+ config_store.save_gui_config({"language": "de"})
82
+ self.assertFalse(config_store.GUI_TOML.exists())
83
+
84
+ def test_gui_config_language_survives_alongside_theme(self) -> None:
85
+ config_store.save_gui_config({"theme": "dark"})
86
+ config_store.save_gui_config({"language": "en"})
87
+ cfg = config_store.load_gui_config()
88
+ self.assertEqual(cfg["theme"], "dark")
89
+ self.assertEqual(cfg["language"], "en")
90
+
66
91
  def test_flint_distances_round_trip_as_lists(self) -> None:
67
92
  custom = ["1 yard", "2 yards", "3 yards", "4 yards", "5 yards", "6 yards"]
68
93
  config_store.save_flint_config({"standard_distances": custom})
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "0.3.3",
3
- "distance": 0,
4
- "node": "g7d0212ef6380641c4bbb31a3fabffc54c18052f0",
5
- "dirty": false,
6
- "branch": "HEAD",
7
- "node_date": "2026-08-11"
8
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes