1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Enable log for demo games

This commit is contained in:
Joe R 2025-01-28 23:32:15 -05:00
parent 487d1c52f3
commit 054c0f0368
10 changed files with 55 additions and 13 deletions

View file

@ -4370,6 +4370,9 @@ msgstr "Aktuelle Sitzung"
msgid "Log" msgid "Log"
msgstr "Protokoll" msgstr "Protokoll"
msgid "Demo Log"
msgstr ""
#: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404 #: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404
msgid "Full log" msgid "Full log"
msgstr "Volles Protokoll" msgstr "Volles Protokoll"
@ -5171,6 +5174,9 @@ msgstr "Kommentare..."
msgid "Log..." msgid "Log..."
msgstr "" msgstr ""
msgid "Demo Log..."
msgstr ""
#: pysollib/ui/tktile/menubar.py:427 #: pysollib/ui/tktile/menubar.py:427
msgid "D&emo statistics..." msgid "D&emo statistics..."
msgstr "D&emo Statistiken..." msgstr "D&emo Statistiken..."

View file

@ -4421,6 +4421,9 @@ msgstr "Session en cours"
msgid "Log" msgid "Log"
msgstr "Journal" msgstr "Journal"
msgid "Demo Log"
msgstr ""
#: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404 #: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404
msgid "Full log" msgid "Full log"
msgstr "Journal complet" msgstr "Journal complet"
@ -5222,6 +5225,9 @@ msgstr "&Commentaires..."
msgid "Log..." msgid "Log..."
msgstr "Journal..." msgstr "Journal..."
msgid "Demo Log..."
msgstr ""
#: pysollib/ui/tktile/menubar.py:427 #: pysollib/ui/tktile/menubar.py:427
msgid "D&emo statistics..." msgid "D&emo statistics..."
msgstr "Statistiques d&émo..." msgstr "Statistiques d&émo..."

View file

@ -4485,6 +4485,9 @@ msgstr "Questa sessione"
msgid "Log" msgid "Log"
msgstr "Log" msgstr "Log"
msgid "Demo Log"
msgstr ""
#: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404 #: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404
msgid "Full log" msgid "Full log"
msgstr "Log completo" msgstr "Log completo"
@ -5288,6 +5291,9 @@ msgstr "&Commenti..."
msgid "Log..." msgid "Log..."
msgstr "Log..." msgstr "Log..."
msgid "Demo Log..."
msgstr ""
#: pysollib/ui/tktile/menubar.py:427 #: pysollib/ui/tktile/menubar.py:427
msgid "D&emo statistics..." msgid "D&emo statistics..."
msgstr "Statistiche d&emo..." msgstr "Statistiche d&emo..."

View file

@ -4438,6 +4438,9 @@ msgstr "Bieżąca sesja"
msgid "Log" msgid "Log"
msgstr "Log" msgstr "Log"
msgid "Demo Log"
msgstr ""
#: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404 #: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404
msgid "Full log" msgid "Full log"
msgstr "Kompletny log" msgstr "Kompletny log"
@ -5242,6 +5245,9 @@ msgstr "Komentarze..."
msgid "Log..." msgid "Log..."
msgstr "Log..." msgstr "Log..."
msgid "Demo Log..."
msgstr ""
#: pysollib/ui/tktile/menubar.py:427 #: pysollib/ui/tktile/menubar.py:427
msgid "D&emo statistics..." msgid "D&emo statistics..."
msgstr "D&emo statystyk..." msgstr "D&emo statystyk..."

View file

@ -4444,6 +4444,9 @@ msgstr "Sessão atual"
msgid "Log" msgid "Log"
msgstr "registro" msgstr "registro"
msgid "Demo Log"
msgstr ""
#: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404 #: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404
msgid "Full log" msgid "Full log"
msgstr "Registro completo" msgstr "Registro completo"
@ -5244,6 +5247,9 @@ msgstr "&Comentários..."
msgid "Log..." msgid "Log..."
msgstr "Registro" msgstr "Registro"
msgid "Demo Log..."
msgstr ""
#: pysollib/ui/tktile/menubar.py:427 #: pysollib/ui/tktile/menubar.py:427
msgid "D&emo statistics..." msgid "D&emo statistics..."
msgstr "Estatísticas de D&emo..." msgstr "Estatísticas de D&emo..."

View file

@ -4224,6 +4224,9 @@ msgstr ""
msgid "Log" msgid "Log"
msgstr "" msgstr ""
msgid "Demo Log"
msgstr ""
#: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404 #: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404
msgid "Full log" msgid "Full log"
msgstr "" msgstr ""
@ -4974,6 +4977,9 @@ msgstr ""
msgid "Log..." msgid "Log..."
msgstr "" msgstr ""
msgid "Demo Log..."
msgstr ""
#: pysollib/ui/tktile/menubar.py:427 #: pysollib/ui/tktile/menubar.py:427
msgid "D&emo statistics..." msgid "D&emo statistics..."
msgstr "" msgstr ""

View file

@ -4494,6 +4494,9 @@ msgstr "Текущая сессия"
msgid "Log" msgid "Log"
msgstr "Лог" msgstr "Лог"
msgid "Demo Log"
msgstr ""
#: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404 #: pysollib/tile/tkstats.py:523 data/pysolfc.glade:1404
msgid "Full log" msgid "Full log"
msgstr "Полный лог" msgstr "Полный лог"
@ -5311,6 +5314,9 @@ msgstr "&Комментарии..."
msgid "Log..." msgid "Log..."
msgstr "Лог..." msgstr "Лог..."
msgid "Demo Log..."
msgstr ""
#: pysollib/ui/tktile/menubar.py:427 #: pysollib/ui/tktile/menubar.py:427
msgid "D&emo statistics..." msgid "D&emo statistics..."
msgstr "Статистика демо..." msgstr "Статистика демо..."

View file

@ -115,18 +115,13 @@ class Statistics:
game.GAME_VERSION) game.GAME_VERSION)
# full log # full log
if status >= 0: if status >= 0:
if player is None: if player not in self.prev_games:
# demo self.prev_games[player] = []
ret = self.updateGameStat(player, game, status) self.prev_games[player].append(log)
else: if player not in self.all_prev_games:
# player self.all_prev_games[player] = []
if player not in self.prev_games: self.all_prev_games[player].append(log)
self.prev_games[player] = [] ret = self.updateGameStat(player, game, status)
self.prev_games[player].append(log)
if player not in self.all_prev_games:
self.all_prev_games[player] = []
self.all_prev_games[player].append(log)
ret = self.updateGameStat(player, game, status)
# session log # session log
if player not in self.session_games: if player not in self.session_games:
self.session_games[player] = [] self.session_games[player] = []

View file

@ -377,7 +377,7 @@ class TreeFormatter(PysolStatsFormatter):
return 1 return 1
def writeLog(self, player, prev_games, sort_by='date'): def writeLog(self, player, prev_games, sort_by='date'):
if not player or not prev_games: if not prev_games:
return 0 return 0
num_rows = 0 num_rows = 0
results = self.getLogResults(player, prev_games) results = self.getLogResults(player, prev_games)
@ -520,6 +520,8 @@ class LogDialog(MfxDialog):
kw = self.initKw(kw) kw = self.initKw(kw)
title = _('Log') title = _('Log')
if player is None:
title = _('Demo Log')
MfxDialog.__init__(self, parent, title, kw.resizable, kw.default) MfxDialog.__init__(self, parent, title, kw.resizable, kw.default)
self.top.wm_minsize(400, 200) self.top.wm_minsize(400, 200)

View file

@ -620,6 +620,9 @@ class PysolMenubarTkCommon:
menu.add_command( menu.add_command(
label=n_("Log..."), label=n_("Log..."),
command=lambda: self.mPlayerStats(mode=103)) command=lambda: self.mPlayerStats(mode=103))
menu.add_command(
label=n_("Demo Log..."),
command=lambda: self.mPlayerStats(mode=1103))
menu.add_separator() menu.add_separator()
menu.add_command( menu.add_command(
label=n_("&Comments..."), label=n_("&Comments..."),