mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
* added exception block for app.loadOptions
* updated dump/undump game * updated russian translation * bugfixes git-svn-id: file:///home/shlomif/Backup/svn-dumps/PySolFC/svnsync-repos/pysolfc/PySolFC/trunk@140 efabe8c0-fbe8-4139-b769-b5e6d273206e
This commit is contained in:
parent
4b70ba795c
commit
03037a4e80
16 changed files with 245 additions and 244 deletions
|
@ -62,6 +62,7 @@ graft data/cardset-oxymoron
|
|||
graft data/cardset-standard
|
||||
graft data/cardset-tuxedo
|
||||
graft data/cardset-vienna-2k
|
||||
graft data/cardset-dondorf
|
||||
##
|
||||
## exclude dirs
|
||||
##
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PySol 0.0.1\n"
|
||||
"POT-Creation-Date: Thu Feb 15 18:35:01 2007\n"
|
||||
"POT-Creation-Date: Wed Feb 21 17:56:30 2007\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
147
po/pysol.pot
147
po/pysol.pot
|
@ -14,7 +14,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"#-#-#-#-# pysol-1.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: Thu Feb 15 18:36:07 2007\n"
|
||||
"POT-Creation-Date: Wed Feb 21 17:57:33 2007\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -24,7 +24,7 @@ msgstr ""
|
|||
"Generated-By: pygettext.py 1.5\n"
|
||||
"#-#-#-#-# pysol-2.pot (PACKAGE VERSION) #-#-#-#-#\n"
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2007-02-15 18:36+0300\n"
|
||||
"POT-Creation-Date: 2007-02-21 17:57+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -71,7 +71,7 @@ msgid "&Next number"
|
|||
msgstr ""
|
||||
|
||||
#: pysollib/actions.py:315 pysollib/app.py:891 pysollib/app.py:1178
|
||||
#: pysollib/app.py:1190 pysollib/game.py:1010 pysollib/game.py:2245
|
||||
#: pysollib/app.py:1190 pysollib/game.py:1012 pysollib/game.py:2247
|
||||
#: pysollib/tile/colorsdialog.py:112 pysollib/tile/edittextdialog.py:83
|
||||
#: pysollib/tile/fontsdialog.py:144 pysollib/tile/fontsdialog.py:204
|
||||
#: pysollib/tile/gameinfodialog.py:155 pysollib/tile/menubar.py:1344
|
||||
|
@ -100,8 +100,8 @@ msgid "&OK"
|
|||
msgstr ""
|
||||
|
||||
#: pysollib/actions.py:315 pysollib/app.py:892 pysollib/app.py:1190
|
||||
#: pysollib/game.py:1010 pysollib/game.py:1674 pysollib/game.py:1690
|
||||
#: pysollib/game.py:1697 pysollib/game.py:1703
|
||||
#: pysollib/game.py:1012 pysollib/game.py:1676 pysollib/game.py:1692
|
||||
#: pysollib/game.py:1699 pysollib/game.py:1705
|
||||
#: pysollib/tile/colorsdialog.py:112 pysollib/tile/edittextdialog.py:83
|
||||
#: pysollib/tile/fontsdialog.py:144 pysollib/tile/fontsdialog.py:204
|
||||
#: pysollib/tile/playeroptionsdialog.py:111 pysollib/tile/selectcardset.py:237
|
||||
|
@ -270,8 +270,8 @@ msgstr ""
|
|||
msgid "Unknown"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/app.py:893 pysollib/game.py:1674 pysollib/game.py:1690
|
||||
#: pysollib/game.py:1697 pysollib/game.py:1703 pysollib/tile/menubar.py:358
|
||||
#: pysollib/app.py:893 pysollib/game.py:1676 pysollib/game.py:1692
|
||||
#: pysollib/game.py:1699 pysollib/game.py:1705 pysollib/tile/menubar.py:358
|
||||
#: pysollib/tk/menubar.py:355
|
||||
msgid "&New game"
|
||||
msgstr ""
|
||||
|
@ -305,41 +305,41 @@ msgstr ""
|
|||
msgid "Please select a %s type %s"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:929 pysollib/game.py:935
|
||||
#: pysollib/game.py:931 pysollib/game.py:937
|
||||
msgid "Player\n"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:1006
|
||||
#: pysollib/game.py:1008
|
||||
msgid "Discard current game ?"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:1627
|
||||
#: pysollib/game.py:1629
|
||||
msgid ""
|
||||
"\n"
|
||||
"You have reached\n"
|
||||
"#%d in the %s of playing time"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:1632
|
||||
#: pysollib/game.py:1634
|
||||
msgid ""
|
||||
"\n"
|
||||
"and #%d in the %s of moves"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:1635
|
||||
#: pysollib/game.py:1637
|
||||
msgid ""
|
||||
"\n"
|
||||
"You have reached\n"
|
||||
"#%d in the %s of moves"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:1665 pysollib/game.py:1682
|
||||
#: pysollib/game.py:1667 pysollib/game.py:1684
|
||||
#: pysollib/tile/soundoptionsdialog.py:102
|
||||
#: pysollib/tk/soundoptionsdialog.py:100
|
||||
msgid "Game won"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:1666
|
||||
#: pysollib/game.py:1668
|
||||
msgid ""
|
||||
"\n"
|
||||
"Congratulations, this\n"
|
||||
|
@ -350,7 +350,7 @@ msgid ""
|
|||
"%s\n"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:1683
|
||||
#: pysollib/game.py:1685
|
||||
msgid ""
|
||||
"\n"
|
||||
"Congratulations, you did it !\n"
|
||||
|
@ -360,101 +360,101 @@ msgid ""
|
|||
"%s\n"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:1695 pysollib/game.py:1701
|
||||
#: pysollib/game.py:1697 pysollib/game.py:1703
|
||||
#: pysollib/tile/soundoptionsdialog.py:100
|
||||
#: pysollib/tk/soundoptionsdialog.py:98
|
||||
msgid "Game finished"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:1696 pysollib/game.py:2246
|
||||
#: pysollib/game.py:1698 pysollib/game.py:2248
|
||||
msgid ""
|
||||
"\n"
|
||||
"Game finished\n"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:1702
|
||||
#: pysollib/game.py:1704
|
||||
msgid ""
|
||||
"\n"
|
||||
"Game finished, but not without my help...\n"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:1703
|
||||
#: pysollib/game.py:1705
|
||||
msgid "&Restart"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2135
|
||||
#: pysollib/game.py:2137
|
||||
msgid "Score %6d"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2237
|
||||
#: pysollib/game.py:2239
|
||||
msgid "&Cool"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2237
|
||||
#: pysollib/game.py:2239
|
||||
msgid "&Great"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2237
|
||||
#: pysollib/game.py:2239
|
||||
msgid "&Wow"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2237
|
||||
#: pysollib/game.py:2239
|
||||
msgid "&Yeah"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2238 pysollib/game.py:2249 pysollib/game.py:2261
|
||||
#: pysollib/game.py:2240 pysollib/game.py:2251 pysollib/game.py:2263
|
||||
msgid " Autopilot"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2239
|
||||
#: pysollib/game.py:2241
|
||||
msgid ""
|
||||
"\n"
|
||||
"Game solved in %d moves.\n"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2260
|
||||
#: pysollib/game.py:2262
|
||||
msgid "&Hmm"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2260
|
||||
#: pysollib/game.py:2262
|
||||
msgid "&Oh well"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2260
|
||||
#: pysollib/game.py:2262
|
||||
msgid "&That's life"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2262
|
||||
#: pysollib/game.py:2264
|
||||
msgid ""
|
||||
"\n"
|
||||
"This won't come out...\n"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2702
|
||||
#: pysollib/game.py:2704
|
||||
msgid "Set bookmark"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2703
|
||||
#: pysollib/game.py:2705
|
||||
msgid "Replace existing bookmark %d ?"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2725
|
||||
#: pysollib/game.py:2727
|
||||
msgid "Goto bookmark"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2726
|
||||
#: pysollib/game.py:2728
|
||||
msgid "Goto bookmark %d ?"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2757
|
||||
#: pysollib/game.py:2759
|
||||
msgid "Open game"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2768 pysollib/game.py:2777 pysollib/game.py:2782
|
||||
#: pysollib/game.py:2770 pysollib/game.py:2780 pysollib/game.py:2785
|
||||
msgid "Load game error"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2769
|
||||
#: pysollib/game.py:2771
|
||||
msgid ""
|
||||
"Error while loading game.\n"
|
||||
"\n"
|
||||
|
@ -462,25 +462,42 @@ msgid ""
|
|||
"but this could also be a bug you might want to report."
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2778
|
||||
#: pysollib/game.py:2781
|
||||
msgid "Error while loading game"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2783
|
||||
#: pysollib/game.py:2786
|
||||
msgid ""
|
||||
"Internal error while loading game.\n"
|
||||
"\n"
|
||||
"Please report this bug."
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2808
|
||||
#: pysollib/game.py:2815
|
||||
msgid "Save game error"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2809
|
||||
#: pysollib/game.py:2816
|
||||
msgid "Error while saving game"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2841
|
||||
msgid "Invalid or damaged %s save file"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2855
|
||||
msgid ""
|
||||
"Cannot load games saved with\n"
|
||||
"%s version %s"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2872
|
||||
msgid ""
|
||||
"Cannot load this game from version %s\n"
|
||||
"as the game rules have changed\n"
|
||||
"in the current implementation."
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/gamedb.py:121
|
||||
msgid "Baker's Dozen"
|
||||
msgstr ""
|
||||
|
@ -723,12 +740,12 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#: pysollib/games/canfield.py:528 pysollib/games/special/tarock.py:224
|
||||
#: pysollib/stack.py:1482 pysollib/util.py:86
|
||||
#: pysollib/stack.py:1482 pysollib/util.py:85
|
||||
msgid "King"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/games/canfield.py:531 pysollib/games/special/tarock.py:224
|
||||
#: pysollib/stack.py:1481 pysollib/util.py:86
|
||||
#: pysollib/stack.py:1481 pysollib/util.py:85
|
||||
msgid "Queen"
|
||||
msgstr ""
|
||||
|
||||
|
@ -744,6 +761,10 @@ msgstr ""
|
|||
msgid "X"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/games/fan.py:470
|
||||
msgid "Base card - Ace or King."
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/games/golf.py:114 pysollib/games/golf.py:302
|
||||
#: pysollib/stack.py:2145
|
||||
msgid "Tableau. No building."
|
||||
|
@ -754,15 +775,15 @@ msgstr ""
|
|||
msgid "Foundation. Build up regardless of suit."
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/games/klondike.py:112
|
||||
#: pysollib/games/klondike.py:113
|
||||
msgid "Balance $%d"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/games/klondike.py:169 pysollib/stack.py:2186
|
||||
#: pysollib/games/klondike.py:170 pysollib/stack.py:2186
|
||||
msgid "Tableau. Build down by color."
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/games/klondike.py:438
|
||||
#: pysollib/games/klondike.py:444
|
||||
msgid "Reserve. Only Kings are acceptable."
|
||||
msgstr ""
|
||||
|
||||
|
@ -869,7 +890,7 @@ msgstr ""
|
|||
#: pysollib/games/special/tarock.py:223
|
||||
#: pysollib/games/ultra/dashavatara.py:351
|
||||
#: pysollib/games/ultra/hexadeck.py:273 pysollib/games/ultra/mughal.py:254
|
||||
#: pysollib/stack.py:1483 pysollib/util.py:85
|
||||
#: pysollib/stack.py:1483 pysollib/util.py:84
|
||||
msgid "Ace"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1256,7 +1277,7 @@ msgstr ""
|
|||
msgid " Help"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/main.py:64 pysollib/main.py:249
|
||||
#: pysollib/main.py:64 pysollib/main.py:253
|
||||
msgid "%s installation error"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1270,7 +1291,7 @@ msgid ""
|
|||
"Please check your %s installation.\n"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/main.py:72 pysollib/main.py:257 pysollib/tile/menubar.py:378
|
||||
#: pysollib/main.py:72 pysollib/main.py:261 pysollib/tile/menubar.py:378
|
||||
#: pysollib/tk/menubar.py:375
|
||||
msgid "&Quit"
|
||||
msgstr ""
|
||||
|
@ -1308,7 +1329,7 @@ msgid ""
|
|||
"try %s --help for more information"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/main.py:250
|
||||
#: pysollib/main.py:254
|
||||
msgid ""
|
||||
"\n"
|
||||
"No games were found !!!\n"
|
||||
|
@ -1319,7 +1340,7 @@ msgid ""
|
|||
"Please check your %s installation.\n"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/main.py:319
|
||||
#: pysollib/main.py:323
|
||||
msgid "Welcome to %s"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1603,7 +1624,7 @@ msgstr ""
|
|||
msgid "any card"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/stack.py:1480 pysollib/util.py:86
|
||||
#: pysollib/stack.py:1480 pysollib/util.py:85
|
||||
msgid "Jack"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1651,7 +1672,7 @@ msgstr ""
|
|||
msgid "Talon."
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/stack.py:2008 pysollib/stack.py:2537
|
||||
#: pysollib/stack.py:2008 pysollib/stack.py:2542
|
||||
msgid "Reserve. No building."
|
||||
msgstr ""
|
||||
|
||||
|
@ -1798,7 +1819,7 @@ msgstr ""
|
|||
msgid "Waste."
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/stack.py:2538
|
||||
#: pysollib/stack.py:2543
|
||||
msgid "Free cell."
|
||||
msgstr ""
|
||||
|
||||
|
@ -2048,7 +2069,7 @@ msgid "Large icons"
|
|||
msgstr ""
|
||||
|
||||
#: pysollib/tile/menubar.py:120 pysollib/tk/menubar.py:119
|
||||
msgid "Customize toolbar"
|
||||
msgid "Visible buttons"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/tile/menubar.py:354 pysollib/tk/menubar.py:351
|
||||
|
@ -3512,7 +3533,7 @@ msgstr ""
|
|||
msgid "Player options"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/tile/toolbar.py:395 pysollib/tk/toolbar.py:436
|
||||
#: pysollib/tile/toolbar.py:399 pysollib/tk/toolbar.py:436
|
||||
msgid "Toolbar"
|
||||
msgstr ""
|
||||
|
||||
|
@ -3528,31 +3549,31 @@ msgstr ""
|
|||
msgid "Enable samles"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/util.py:81
|
||||
#: pysollib/util.py:80
|
||||
msgid "Club"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/util.py:81
|
||||
#: pysollib/util.py:80
|
||||
msgid "Diamond"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/util.py:81
|
||||
#: pysollib/util.py:80
|
||||
msgid "Heart"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/util.py:81
|
||||
#: pysollib/util.py:80
|
||||
msgid "Spade"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/util.py:82
|
||||
#: pysollib/util.py:81
|
||||
msgid "black"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/util.py:82
|
||||
#: pysollib/util.py:81
|
||||
msgid "red"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/util.py:107
|
||||
#: pysollib/util.py:106
|
||||
msgid "cardset"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PySol 0.0.1\n"
|
||||
"POT-Creation-Date: Thu Feb 15 18:35:01 2007\n"
|
||||
"POT-Creation-Date: Wed Feb 21 17:56:30 2007\n"
|
||||
"PO-Revision-Date: 2007-02-12 19:08+0300\n"
|
||||
"Last-Translator: Скоморох <skomoroh@gmail.com>\n"
|
||||
"Language-Team: Russian <ru@li.org>\n"
|
||||
|
|
153
po/ru_pysol.po
153
po/ru_pysol.po
|
@ -5,8 +5,8 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PySol 0.0.1\n"
|
||||
"POT-Creation-Date: Thu Feb 15 18:36:07 2007\n"
|
||||
"PO-Revision-Date: 2007-02-12 19:31+0300\n"
|
||||
"POT-Creation-Date: Wed Feb 21 17:57:33 2007\n"
|
||||
"PO-Revision-Date: 2007-02-19 18:56+0300\n"
|
||||
"Last-Translator: Скоморох <skomoroh@gmail.com>\n"
|
||||
"Language-Team: Russian <ru@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
@ -56,7 +56,7 @@ msgid "&Next number"
|
|||
msgstr "&Следующий номер"
|
||||
|
||||
#: pysollib/actions.py:315 pysollib/app.py:891 pysollib/app.py:1178
|
||||
#: pysollib/app.py:1190 pysollib/game.py:1010 pysollib/game.py:2245
|
||||
#: pysollib/app.py:1190 pysollib/game.py:1012 pysollib/game.py:2247
|
||||
#: pysollib/tile/colorsdialog.py:112 pysollib/tile/edittextdialog.py:83
|
||||
#: pysollib/tile/fontsdialog.py:144 pysollib/tile/fontsdialog.py:204
|
||||
#: pysollib/tile/gameinfodialog.py:155 pysollib/tile/menubar.py:1344
|
||||
|
@ -85,8 +85,8 @@ msgid "&OK"
|
|||
msgstr "&ОК"
|
||||
|
||||
#: pysollib/actions.py:315 pysollib/app.py:892 pysollib/app.py:1190
|
||||
#: pysollib/game.py:1010 pysollib/game.py:1674 pysollib/game.py:1690
|
||||
#: pysollib/game.py:1697 pysollib/game.py:1703
|
||||
#: pysollib/game.py:1012 pysollib/game.py:1676 pysollib/game.py:1692
|
||||
#: pysollib/game.py:1699 pysollib/game.py:1705
|
||||
#: pysollib/tile/colorsdialog.py:112 pysollib/tile/edittextdialog.py:83
|
||||
#: pysollib/tile/fontsdialog.py:144 pysollib/tile/fontsdialog.py:204
|
||||
#: pysollib/tile/playeroptionsdialog.py:111 pysollib/tile/selectcardset.py:237
|
||||
|
@ -267,8 +267,8 @@ msgstr "Настроить таймауты"
|
|||
msgid "Unknown"
|
||||
msgstr "Неизвестный"
|
||||
|
||||
#: pysollib/app.py:893 pysollib/game.py:1674 pysollib/game.py:1690
|
||||
#: pysollib/game.py:1697 pysollib/game.py:1703 pysollib/tile/menubar.py:358
|
||||
#: pysollib/app.py:893 pysollib/game.py:1676 pysollib/game.py:1692
|
||||
#: pysollib/game.py:1699 pysollib/game.py:1705 pysollib/tile/menubar.py:358
|
||||
#: pysollib/tk/menubar.py:355
|
||||
msgid "&New game"
|
||||
msgstr "&Новая игра"
|
||||
|
@ -307,15 +307,15 @@ msgstr ""
|
|||
msgid "Please select a %s type %s"
|
||||
msgstr "Выберите %s типа %s"
|
||||
|
||||
#: pysollib/game.py:929 pysollib/game.py:935
|
||||
#: pysollib/game.py:931 pysollib/game.py:937
|
||||
msgid "Player\n"
|
||||
msgstr "Игрок\n"
|
||||
|
||||
#: pysollib/game.py:1006
|
||||
#: pysollib/game.py:1008
|
||||
msgid "Discard current game ?"
|
||||
msgstr "Завершить текущую игру?"
|
||||
|
||||
#: pysollib/game.py:1627
|
||||
#: pysollib/game.py:1629
|
||||
msgid ""
|
||||
"\n"
|
||||
"You have reached\n"
|
||||
|
@ -325,7 +325,7 @@ msgstr ""
|
|||
"Вы достигли\n"
|
||||
"#%d в %s игрового времени"
|
||||
|
||||
#: pysollib/game.py:1632
|
||||
#: pysollib/game.py:1634
|
||||
msgid ""
|
||||
"\n"
|
||||
"and #%d in the %s of moves"
|
||||
|
@ -333,7 +333,7 @@ msgstr ""
|
|||
"\n"
|
||||
"и #%d в %s количества ходов"
|
||||
|
||||
#: pysollib/game.py:1635
|
||||
#: pysollib/game.py:1637
|
||||
msgid ""
|
||||
"\n"
|
||||
"You have reached\n"
|
||||
|
@ -343,13 +343,13 @@ msgstr ""
|
|||
"Вы достигли\n"
|
||||
"#%d в %s количества ходов"
|
||||
|
||||
#: pysollib/game.py:1665 pysollib/game.py:1682
|
||||
#: pysollib/game.py:1667 pysollib/game.py:1684
|
||||
#: pysollib/tile/soundoptionsdialog.py:102
|
||||
#: pysollib/tk/soundoptionsdialog.py:100
|
||||
msgid "Game won"
|
||||
msgstr "Игра выиграна"
|
||||
|
||||
#: pysollib/game.py:1666
|
||||
#: pysollib/game.py:1668
|
||||
msgid ""
|
||||
"\n"
|
||||
"Congratulations, this\n"
|
||||
|
@ -368,7 +368,7 @@ msgstr ""
|
|||
"Количество ходов: %s\n"
|
||||
"%s\n"
|
||||
|
||||
#: pysollib/game.py:1683
|
||||
#: pysollib/game.py:1685
|
||||
msgid ""
|
||||
"\n"
|
||||
"Congratulations, you did it !\n"
|
||||
|
@ -385,13 +385,13 @@ msgstr ""
|
|||
"Количество ходов: %s\n"
|
||||
"%s\n"
|
||||
|
||||
#: pysollib/game.py:1695 pysollib/game.py:1701
|
||||
#: pysollib/game.py:1697 pysollib/game.py:1703
|
||||
#: pysollib/tile/soundoptionsdialog.py:100
|
||||
#: pysollib/tk/soundoptionsdialog.py:98
|
||||
msgid "Game finished"
|
||||
msgstr "Игра закончена"
|
||||
|
||||
#: pysollib/game.py:1696 pysollib/game.py:2246
|
||||
#: pysollib/game.py:1698 pysollib/game.py:2248
|
||||
msgid ""
|
||||
"\n"
|
||||
"Game finished\n"
|
||||
|
@ -399,7 +399,7 @@ msgstr ""
|
|||
"\n"
|
||||
"Игра закончена\n"
|
||||
|
||||
#: pysollib/game.py:1702
|
||||
#: pysollib/game.py:1704
|
||||
msgid ""
|
||||
"\n"
|
||||
"Game finished, but not without my help...\n"
|
||||
|
@ -407,35 +407,35 @@ msgstr ""
|
|||
"\n"
|
||||
"Игра закончена, но не без моей помощи...\n"
|
||||
|
||||
#: pysollib/game.py:1703
|
||||
#: pysollib/game.py:1705
|
||||
msgid "&Restart"
|
||||
msgstr "&Начало"
|
||||
|
||||
#: pysollib/game.py:2135
|
||||
#: pysollib/game.py:2137
|
||||
msgid "Score %6d"
|
||||
msgstr "Счёт %6d"
|
||||
|
||||
#: pysollib/game.py:2237
|
||||
#: pysollib/game.py:2239
|
||||
msgid "&Cool"
|
||||
msgstr "&Отлично"
|
||||
|
||||
#: pysollib/game.py:2237
|
||||
#: pysollib/game.py:2239
|
||||
msgid "&Great"
|
||||
msgstr "&Здорово"
|
||||
|
||||
#: pysollib/game.py:2237
|
||||
#: pysollib/game.py:2239
|
||||
msgid "&Wow"
|
||||
msgstr "&Ура"
|
||||
|
||||
#: pysollib/game.py:2237
|
||||
#: pysollib/game.py:2239
|
||||
msgid "&Yeah"
|
||||
msgstr "&Ага"
|
||||
|
||||
#: pysollib/game.py:2238 pysollib/game.py:2249 pysollib/game.py:2261
|
||||
#: pysollib/game.py:2240 pysollib/game.py:2251 pysollib/game.py:2263
|
||||
msgid " Autopilot"
|
||||
msgstr " Автопилот"
|
||||
|
||||
#: pysollib/game.py:2239
|
||||
#: pysollib/game.py:2241
|
||||
msgid ""
|
||||
"\n"
|
||||
"Game solved in %d moves.\n"
|
||||
|
@ -443,19 +443,19 @@ msgstr ""
|
|||
"\n"
|
||||
"Игра решена за %d ходов\n"
|
||||
|
||||
#: pysollib/game.py:2260
|
||||
#: pysollib/game.py:2262
|
||||
msgid "&Hmm"
|
||||
msgstr "&Хмм"
|
||||
|
||||
#: pysollib/game.py:2260
|
||||
#: pysollib/game.py:2262
|
||||
msgid "&Oh well"
|
||||
msgstr "&Ох"
|
||||
|
||||
#: pysollib/game.py:2260
|
||||
#: pysollib/game.py:2262
|
||||
msgid "&That's life"
|
||||
msgstr "&Такова жизнь"
|
||||
|
||||
#: pysollib/game.py:2262
|
||||
#: pysollib/game.py:2264
|
||||
msgid ""
|
||||
"\n"
|
||||
"This won't come out...\n"
|
||||
|
@ -463,31 +463,31 @@ msgstr ""
|
|||
"\n"
|
||||
"Не удалось...\n"
|
||||
|
||||
#: pysollib/game.py:2702
|
||||
#: pysollib/game.py:2704
|
||||
msgid "Set bookmark"
|
||||
msgstr "Установить закладку"
|
||||
|
||||
#: pysollib/game.py:2703
|
||||
#: pysollib/game.py:2705
|
||||
msgid "Replace existing bookmark %d ?"
|
||||
msgstr "Заменить существующую закладку %d ?"
|
||||
|
||||
#: pysollib/game.py:2725
|
||||
#: pysollib/game.py:2727
|
||||
msgid "Goto bookmark"
|
||||
msgstr "Перейти к закладке"
|
||||
|
||||
#: pysollib/game.py:2726
|
||||
#: pysollib/game.py:2728
|
||||
msgid "Goto bookmark %d ?"
|
||||
msgstr "Перейти к закладке %d ?"
|
||||
|
||||
#: pysollib/game.py:2757
|
||||
#: pysollib/game.py:2759
|
||||
msgid "Open game"
|
||||
msgstr "Открыть игру"
|
||||
|
||||
#: pysollib/game.py:2768 pysollib/game.py:2777 pysollib/game.py:2782
|
||||
#: pysollib/game.py:2770 pysollib/game.py:2780 pysollib/game.py:2785
|
||||
msgid "Load game error"
|
||||
msgstr "Ошибка при загрузке игры"
|
||||
|
||||
#: pysollib/game.py:2769
|
||||
#: pysollib/game.py:2771
|
||||
msgid ""
|
||||
"Error while loading game.\n"
|
||||
"\n"
|
||||
|
@ -499,11 +499,11 @@ msgstr ""
|
|||
"Возможно повреждён файл,\n"
|
||||
"или ошибка в программе."
|
||||
|
||||
#: pysollib/game.py:2778
|
||||
#: pysollib/game.py:2781
|
||||
msgid "Error while loading game"
|
||||
msgstr "Ошибка при загрузке игры"
|
||||
|
||||
#: pysollib/game.py:2783
|
||||
#: pysollib/game.py:2786
|
||||
msgid ""
|
||||
"Internal error while loading game.\n"
|
||||
"\n"
|
||||
|
@ -513,14 +513,31 @@ msgstr ""
|
|||
"\n"
|
||||
"Пожалуйста сообщите об этой ошибке."
|
||||
|
||||
#: pysollib/game.py:2808
|
||||
#: pysollib/game.py:2815
|
||||
msgid "Save game error"
|
||||
msgstr "Ошибка при сохранении игры"
|
||||
|
||||
#: pysollib/game.py:2809
|
||||
#: pysollib/game.py:2816
|
||||
msgid "Error while saving game"
|
||||
msgstr "Ошибка при сохранении игры"
|
||||
|
||||
#: pysollib/game.py:2841
|
||||
msgid "Invalid or damaged %s save file"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2855
|
||||
msgid ""
|
||||
"Cannot load games saved with\n"
|
||||
"%s version %s"
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/game.py:2872
|
||||
msgid ""
|
||||
"Cannot load this game from version %s\n"
|
||||
"as the game rules have changed\n"
|
||||
"in the current implementation."
|
||||
msgstr ""
|
||||
|
||||
#: pysollib/gamedb.py:121
|
||||
msgid "Baker's Dozen"
|
||||
msgstr ""
|
||||
|
@ -768,12 +785,12 @@ msgstr ""
|
|||
"4: 8 Д 3 7 В 2 6 10 Т 5 9 К"
|
||||
|
||||
#: pysollib/games/canfield.py:528 pysollib/games/special/tarock.py:224
|
||||
#: pysollib/stack.py:1482 pysollib/util.py:86
|
||||
#: pysollib/stack.py:1482 pysollib/util.py:85
|
||||
msgid "King"
|
||||
msgstr "Король"
|
||||
|
||||
#: pysollib/games/canfield.py:531 pysollib/games/special/tarock.py:224
|
||||
#: pysollib/stack.py:1481 pysollib/util.py:86
|
||||
#: pysollib/stack.py:1481 pysollib/util.py:85
|
||||
msgid "Queen"
|
||||
msgstr "Королева"
|
||||
|
||||
|
@ -790,6 +807,11 @@ msgstr "Снять"
|
|||
msgid "X"
|
||||
msgstr "Х"
|
||||
|
||||
#: pysollib/games/fan.py:470
|
||||
#, fuzzy
|
||||
msgid "Base card - Ace or King."
|
||||
msgstr "Базовая карта - %s."
|
||||
|
||||
#: pysollib/games/golf.py:114 pysollib/games/golf.py:302
|
||||
#: pysollib/stack.py:2145
|
||||
msgid "Tableau. No building."
|
||||
|
@ -800,15 +822,15 @@ msgstr "Игровой стол. Без выкладывания."
|
|||
msgid "Foundation. Build up regardless of suit."
|
||||
msgstr "Базовая ячейка. Складывать по возрастанию не считаясь с мастью."
|
||||
|
||||
#: pysollib/games/klondike.py:112
|
||||
#: pysollib/games/klondike.py:113
|
||||
msgid "Balance $%d"
|
||||
msgstr "Баланс $%d"
|
||||
|
||||
#: pysollib/games/klondike.py:169 pysollib/stack.py:2186
|
||||
#: pysollib/games/klondike.py:170 pysollib/stack.py:2186
|
||||
msgid "Tableau. Build down by color."
|
||||
msgstr "Игровой стол. Складывать по убыванию в соответствии с цветом."
|
||||
|
||||
#: pysollib/games/klondike.py:438
|
||||
#: pysollib/games/klondike.py:444
|
||||
msgid "Reserve. Only Kings are acceptable."
|
||||
msgstr "Резерв. Только для королей."
|
||||
|
||||
|
@ -941,7 +963,7 @@ msgstr "Жезлы"
|
|||
#: pysollib/games/special/tarock.py:223
|
||||
#: pysollib/games/ultra/dashavatara.py:351
|
||||
#: pysollib/games/ultra/hexadeck.py:273 pysollib/games/ultra/mughal.py:254
|
||||
#: pysollib/stack.py:1483 pysollib/util.py:85
|
||||
#: pysollib/stack.py:1483 pysollib/util.py:84
|
||||
msgid "Ace"
|
||||
msgstr "Туз"
|
||||
|
||||
|
@ -1358,7 +1380,7 @@ msgstr "Не найден файл помощи\n"
|
|||
msgid " Help"
|
||||
msgstr " Помощь"
|
||||
|
||||
#: pysollib/main.py:64 pysollib/main.py:249
|
||||
#: pysollib/main.py:64 pysollib/main.py:253
|
||||
msgid "%s installation error"
|
||||
msgstr "%s проблема с установкой"
|
||||
|
||||
|
@ -1378,7 +1400,7 @@ msgstr ""
|
|||
"\n"
|
||||
"Пожалуйста проверьте установку %s.\n"
|
||||
|
||||
#: pysollib/main.py:72 pysollib/main.py:257 pysollib/tile/menubar.py:378
|
||||
#: pysollib/main.py:72 pysollib/main.py:261 pysollib/tile/menubar.py:378
|
||||
#: pysollib/tk/menubar.py:375
|
||||
msgid "&Quit"
|
||||
msgstr "В&ыход"
|
||||
|
@ -1433,7 +1455,7 @@ msgstr ""
|
|||
"%s: неправильное имя файла\n"
|
||||
"попробуйте %s --help для получения более подробной информации"
|
||||
|
||||
#: pysollib/main.py:250
|
||||
#: pysollib/main.py:254
|
||||
msgid ""
|
||||
"\n"
|
||||
"No games were found !!!\n"
|
||||
|
@ -1451,7 +1473,7 @@ msgstr ""
|
|||
"\n"
|
||||
"Пожалуйста проверьте установку %s.\n"
|
||||
|
||||
#: pysollib/main.py:319
|
||||
#: pysollib/main.py:323
|
||||
msgid "Welcome to %s"
|
||||
msgstr "Добро пожаловать в %s"
|
||||
|
||||
|
@ -1735,7 +1757,7 @@ msgstr "Пустой ряд не заполняется."
|
|||
msgid "any card"
|
||||
msgstr "любая карта"
|
||||
|
||||
#: pysollib/stack.py:1480 pysollib/util.py:86
|
||||
#: pysollib/stack.py:1480 pysollib/util.py:85
|
||||
msgid "Jack"
|
||||
msgstr "Валет"
|
||||
|
||||
|
@ -1783,7 +1805,7 @@ msgstr " пересдачи."
|
|||
msgid "Talon."
|
||||
msgstr "Колода."
|
||||
|
||||
#: pysollib/stack.py:2008 pysollib/stack.py:2537
|
||||
#: pysollib/stack.py:2008 pysollib/stack.py:2542
|
||||
msgid "Reserve. No building."
|
||||
msgstr "Резерв. Без выкладывания."
|
||||
|
||||
|
@ -1951,7 +1973,7 @@ msgstr ""
|
|||
msgid "Waste."
|
||||
msgstr "Сброс."
|
||||
|
||||
#: pysollib/stack.py:2538
|
||||
#: pysollib/stack.py:2543
|
||||
msgid "Free cell."
|
||||
msgstr "Свободная ячейка."
|
||||
|
||||
|
@ -2201,8 +2223,8 @@ msgid "Large icons"
|
|||
msgstr "Большие пиктограммы"
|
||||
|
||||
#: pysollib/tile/menubar.py:120 pysollib/tk/menubar.py:119
|
||||
msgid "Customize toolbar"
|
||||
msgstr "Настроить панель инструментов"
|
||||
msgid "Visible buttons"
|
||||
msgstr "Показывать кнопки"
|
||||
|
||||
#: pysollib/tile/menubar.py:354 pysollib/tk/menubar.py:351
|
||||
#, fuzzy
|
||||
|
@ -3692,7 +3714,7 @@ msgstr "Игрок"
|
|||
msgid "Player options"
|
||||
msgstr "Установки игрока"
|
||||
|
||||
#: pysollib/tile/toolbar.py:395 pysollib/tk/toolbar.py:436
|
||||
#: pysollib/tile/toolbar.py:399 pysollib/tk/toolbar.py:436
|
||||
msgid "Toolbar"
|
||||
msgstr "Панель инструментов"
|
||||
|
||||
|
@ -3708,31 +3730,31 @@ msgstr "Выбрать имя"
|
|||
msgid "Enable samles"
|
||||
msgstr "Включить звуки"
|
||||
|
||||
#: pysollib/util.py:81
|
||||
#: pysollib/util.py:80
|
||||
msgid "Club"
|
||||
msgstr "Треф"
|
||||
|
||||
#: pysollib/util.py:81
|
||||
#: pysollib/util.py:80
|
||||
msgid "Diamond"
|
||||
msgstr "Буби"
|
||||
|
||||
#: pysollib/util.py:81
|
||||
#: pysollib/util.py:80
|
||||
msgid "Heart"
|
||||
msgstr "Черви"
|
||||
|
||||
#: pysollib/util.py:81
|
||||
#: pysollib/util.py:80
|
||||
msgid "Spade"
|
||||
msgstr "Пики"
|
||||
|
||||
#: pysollib/util.py:82
|
||||
#: pysollib/util.py:81
|
||||
msgid "black"
|
||||
msgstr "чёрный"
|
||||
|
||||
#: pysollib/util.py:82
|
||||
#: pysollib/util.py:81
|
||||
msgid "red"
|
||||
msgstr "красный"
|
||||
|
||||
#: pysollib/util.py:107
|
||||
#: pysollib/util.py:106
|
||||
msgid "cardset"
|
||||
msgstr "набор карт"
|
||||
|
||||
|
@ -3752,6 +3774,9 @@ msgstr "Всего ходов"
|
|||
msgid "Set font"
|
||||
msgstr "Настроить шрифт"
|
||||
|
||||
#~ msgid "Customize toolbar"
|
||||
#~ msgstr "Настроить панель инструментов"
|
||||
|
||||
#~ msgid "&Timer based"
|
||||
#~ msgstr "Базирующаяся на &таймере"
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ class Options:
|
|||
self.mahjongg_show_removed = False
|
||||
self.mahjongg_create_solvable = True
|
||||
self.shisen_show_hint = True
|
||||
self.animations = 2 # default to Fast
|
||||
self.animations = 2 # default to Fast
|
||||
self.redeal_animation = True
|
||||
self.win_animation = True
|
||||
self.shadow = True
|
||||
|
@ -128,11 +128,11 @@ class Options:
|
|||
if WIN_SYSTEM == 'win32':
|
||||
self.toolbar_style = 'crystal'
|
||||
self.toolbar_relief = 'flat'
|
||||
self.toolbar_compound = 'none' # icons only
|
||||
self.toolbar_compound = 'none' # icons only
|
||||
self.toolbar_size = 0
|
||||
self.toolbar_vars = {}
|
||||
for w in TOOLBAR_BUTTONS:
|
||||
self.toolbar_vars[w] = True
|
||||
self.toolbar_vars[w] = True # show all buttons
|
||||
self.statusbar = True
|
||||
self.num_cards = False
|
||||
self.helpbar = False
|
||||
|
@ -219,7 +219,7 @@ class Options:
|
|||
self.mouse_undo = False # use mouse for undo/redo
|
||||
self.negative_bottom = True
|
||||
self.randomize_place = False
|
||||
self.cache_cardsets = True
|
||||
self.save_cardsets = True
|
||||
# defaults & constants
|
||||
self.setDefaults()
|
||||
self.setConstants()
|
||||
|
@ -1045,7 +1045,7 @@ class Application:
|
|||
if not images.load(app=self, progress=progress):
|
||||
raise Exception("Invalid or damaged "+CARDSET)
|
||||
simages = SubsampledImages(images)
|
||||
if self.opt.cache_cardsets:
|
||||
if self.opt.save_cardsets:
|
||||
c = self.cardsets_cache.get(cs.type)
|
||||
if c:
|
||||
##c[1].destruct()
|
||||
|
@ -1233,7 +1233,7 @@ Please select a %s type %s.
|
|||
def __saveObject(self, obj, fn):
|
||||
obj.version_tuple = VERSION_TUPLE
|
||||
obj.saved = obj.saved + 1
|
||||
pickle(obj, fn, binmode=1)
|
||||
pickle(obj, fn, protocol=-1)
|
||||
|
||||
def saveOptions(self):
|
||||
self.__saveObject(self.opt, self.fn.opt)
|
||||
|
|
121
pysollib/game.py
121
pysollib/game.py
|
@ -38,6 +38,7 @@
|
|||
import time
|
||||
import math
|
||||
import md5
|
||||
import traceback
|
||||
from cStringIO import StringIO
|
||||
|
||||
# PySol imports
|
||||
|
@ -46,8 +47,9 @@ from mfxutil import Image, ImageTk
|
|||
from mfxutil import destruct, Struct, SubclassResponsibility
|
||||
from mfxutil import uclock, usleep
|
||||
from mfxutil import format_time
|
||||
from util import get_version_tuple, Timer
|
||||
from settings import PACKAGE, TOOLKIT, TOP_TITLE, VERSION, VERSION_TUPLE
|
||||
from util import Timer
|
||||
from settings import PACKAGE, TOOLKIT, TOP_TITLE
|
||||
from settings import VERSION, VERSION_TUPLE, FC_VERSION
|
||||
from settings import DEBUG
|
||||
from gamedb import GI
|
||||
from pysolrandom import PysolRandom, LCRandom31
|
||||
|
@ -2771,6 +2773,7 @@ Error while loading game.
|
|||
|
||||
Probably the game file is damaged,
|
||||
but this could also be a bug you might want to report."""))
|
||||
traceback.print_exc()
|
||||
except (Exception, UnpicklingError), ex:
|
||||
self.updateMenus()
|
||||
self.setCursor(cursor=self.app.top_cursor)
|
||||
|
@ -2779,12 +2782,16 @@ but this could also be a bug you might want to report."""))
|
|||
except:
|
||||
self.updateMenus()
|
||||
self.setCursor(cursor=self.app.top_cursor)
|
||||
d = MfxMessageDialog(self.top, title=_("Load game error"), bitmap="error",
|
||||
text=_("""\
|
||||
d = MfxMessageDialog(self.top, title=_("Load game error"),
|
||||
bitmap="error", text=_("""\
|
||||
Internal error while loading game.
|
||||
|
||||
Please report this bug."""))
|
||||
traceback.print_exc()
|
||||
else:
|
||||
if self.pause:
|
||||
# unselect pause-button
|
||||
self.app.menubar.mPause()
|
||||
self.filename = filename
|
||||
game.filename = filename
|
||||
# now start the new game
|
||||
|
@ -2798,11 +2805,11 @@ Please report this bug."""))
|
|||
self.quitGame(game.id, loadedgame=game)
|
||||
|
||||
|
||||
def saveGame(self, filename, binmode=1):
|
||||
def saveGame(self, filename, protocol=-1):
|
||||
self.finishMove() # just in case
|
||||
self.setCursor(cursor=CURSOR_WATCH)
|
||||
try:
|
||||
self._saveGame(filename, binmode)
|
||||
self._saveGame(filename, protocol)
|
||||
except Exception, ex:
|
||||
self.setCursor(cursor=self.app.top_cursor)
|
||||
d = MfxExceptionDialog(self.top, ex, title=_("Save game error"),
|
||||
|
@ -2828,18 +2835,10 @@ Please report this bug."""))
|
|||
if f: f.close()
|
||||
return game
|
||||
|
||||
def _getUndumpVersion(self, version_tuple):
|
||||
if version_tuple > (4, 41): return 4
|
||||
if version_tuple > (4, 30): return 3
|
||||
if version_tuple > (4, 20): return 2
|
||||
if version_tuple > (3, 20): return 1
|
||||
if version_tuple >= (2, 99): return 0
|
||||
return -1
|
||||
|
||||
def _undumpGame(self, p, app):
|
||||
self.updateTime()
|
||||
#
|
||||
err_txt = "Invalid or damaged %s save file" % PACKAGE
|
||||
err_txt = _("Invalid or damaged %s save file") % PACKAGE
|
||||
#
|
||||
def pload(t=None, p=p):
|
||||
obj = p.load()
|
||||
|
@ -2847,46 +2846,37 @@ Please report this bug."""))
|
|||
assert isinstance(obj, t), err_txt
|
||||
return obj
|
||||
#
|
||||
package = pload()
|
||||
assert isinstance(package, str) and package == PACKAGE, err_txt
|
||||
version = pload()
|
||||
assert isinstance(version, str) and len(version) <= 20, err_txt
|
||||
version_tuple = get_version_tuple(version)
|
||||
v = self._getUndumpVersion(version_tuple)
|
||||
assert v >= 0 and version_tuple <= VERSION_TUPLE, \
|
||||
"Cannot load games saved with\n"+PACKAGE+" version "+version
|
||||
package = pload(str)
|
||||
assert package == PACKAGE, err_txt
|
||||
version = pload(str)
|
||||
#assert isinstance(version, str) and len(version) <= 20, err_txt
|
||||
version_tuple = pload(tuple)
|
||||
if version_tuple < (10,):
|
||||
raise UnpicklingError(_('''\
|
||||
Cannot load games saved with
|
||||
%s version %s''') % (PACKAGE, version))
|
||||
game_version = 1
|
||||
bookmark = 0
|
||||
if v >= 2:
|
||||
vt = pload()
|
||||
assert isinstance(vt, tuple) and vt == version_tuple, err_txt
|
||||
bookmark = pload()
|
||||
assert isinstance(bookmark, int) and 0 <= bookmark <= 2, \
|
||||
"Incompatible savegame format"
|
||||
game_version = pload()
|
||||
assert isinstance(game_version, int) and game_version > 0, err_txt
|
||||
if v <= 3:
|
||||
bookmark = 0
|
||||
bookmark = pload(int)
|
||||
assert 0 <= bookmark <= 2, err_txt
|
||||
game_version = pload(int)
|
||||
assert game_version > 0, err_txt
|
||||
#
|
||||
id = pload()
|
||||
assert isinstance(id, int) and id > 0, err_txt
|
||||
id = pload(int)
|
||||
assert id > 0, err_txt
|
||||
if id not in GI.PROTECTED_GAMES:
|
||||
game = app.constructGame(id)
|
||||
if game:
|
||||
if not game.canLoadGame(version_tuple, game_version):
|
||||
destruct(game)
|
||||
game = None
|
||||
assert game is not None, '''\
|
||||
assert game is not None, _('''\
|
||||
Cannot load this game from version %s
|
||||
as the game rules have changed
|
||||
in the current implementation.''' % version
|
||||
in the current implementation.''') % version
|
||||
game.version = version
|
||||
game.version_tuple = version_tuple
|
||||
#
|
||||
#game.random = pload()
|
||||
#assert isinstance(game.random, PysolRandom), err_txt
|
||||
initial_seed = pload()
|
||||
assert isinstance(initial_seed, long)
|
||||
initial_seed = pload(long)
|
||||
if initial_seed <= 32000:
|
||||
game.random = LCRandom31(initial_seed)
|
||||
else:
|
||||
|
@ -2897,12 +2887,12 @@ in the current implementation.''' % version
|
|||
# game.random.origin = game.random.ORIGIN_UNKNOWN
|
||||
game.loadinfo.stacks = []
|
||||
game.loadinfo.ncards = 0
|
||||
nstacks = pload()
|
||||
assert isinstance(nstacks, int) and 1 <= nstacks, err_txt
|
||||
nstacks = pload(int)
|
||||
assert 1 <= nstacks, err_txt
|
||||
for i in range(nstacks):
|
||||
stack = []
|
||||
ncards = pload()
|
||||
assert isinstance(ncards, int) and 0 <= ncards <= 1024, err_txt
|
||||
ncards = pload(int)
|
||||
assert 0 <= ncards <= 1024, err_txt
|
||||
for j in range(ncards):
|
||||
card_id = pload(int)
|
||||
face_up = pload(int)
|
||||
|
@ -2913,34 +2903,22 @@ in the current implementation.''' % version
|
|||
game.loadinfo.talon_round = pload()
|
||||
game.finished = pload()
|
||||
if 0 <= bookmark <= 1:
|
||||
if v >= 3:
|
||||
saveinfo = pload()
|
||||
assert isinstance(saveinfo, Struct), err_txt
|
||||
game.saveinfo.__dict__.update(saveinfo.__dict__)
|
||||
if v >= 4:
|
||||
gsaveinfo = pload()
|
||||
assert isinstance(gsaveinfo, Struct), err_txt
|
||||
game.gsaveinfo.__dict__.update(gsaveinfo.__dict__)
|
||||
elif v >= 1:
|
||||
# not used
|
||||
talon_base_cards = pload(list)
|
||||
moves = pload()
|
||||
assert isinstance(moves, Struct), err_txt
|
||||
saveinfo = pload(Struct)
|
||||
game.saveinfo.__dict__.update(saveinfo.__dict__)
|
||||
gsaveinfo = pload(Struct)
|
||||
game.gsaveinfo.__dict__.update(gsaveinfo.__dict__)
|
||||
moves = pload(Struct)
|
||||
game.moves.__dict__.update(moves.__dict__)
|
||||
snapshots = p.load()
|
||||
assert isinstance(snapshots, list), err_txt
|
||||
snapshots = pload(list)
|
||||
game.snapshots = snapshots
|
||||
if 0 <= bookmark <= 1:
|
||||
gstats = pload()
|
||||
assert isinstance(gstats, Struct), err_txt
|
||||
gstats = pload(Struct)
|
||||
game.gstats.__dict__.update(gstats.__dict__)
|
||||
stats = pload()
|
||||
assert isinstance(stats, Struct), err_txt
|
||||
stats = pload(Struct)
|
||||
game.stats.__dict__.update(stats.__dict__)
|
||||
game._loadGameHook(p)
|
||||
if v >= 4:
|
||||
dummy = pload(str)
|
||||
assert dummy == "EOF", err_txt
|
||||
dummy = pload(str)
|
||||
assert dummy == "EOF", err_txt
|
||||
if bookmark == 2:
|
||||
# copy back all variables that are not saved
|
||||
game.stats = self.stats
|
||||
|
@ -2949,13 +2927,13 @@ in the current implementation.''' % version
|
|||
game.gsaveinfo = self.gsaveinfo
|
||||
return game
|
||||
|
||||
def _saveGame(self, filename, binmode=1):
|
||||
def _saveGame(self, filename, protocol=-1):
|
||||
f = None
|
||||
try:
|
||||
if not self.canSaveGame():
|
||||
raise Exception("Cannot save this game.")
|
||||
f = open(filename, "wb")
|
||||
p = Pickler(f, binmode)
|
||||
p = Pickler(f, protocol)
|
||||
self._dumpGame(p)
|
||||
finally:
|
||||
if f: f.close()
|
||||
|
@ -2964,13 +2942,12 @@ in the current implementation.''' % version
|
|||
self.updateTime()
|
||||
assert 0 <= bookmark <= 2
|
||||
p.dump(PACKAGE)
|
||||
p.dump(VERSION)
|
||||
p.dump(FC_VERSION)
|
||||
p.dump(VERSION_TUPLE)
|
||||
p.dump(bookmark)
|
||||
p.dump(self.GAME_VERSION)
|
||||
p.dump(self.id)
|
||||
#
|
||||
#p.dump(self.random)
|
||||
p.dump(self.random.initial_seed)
|
||||
p.dump(self.random.getstate())
|
||||
#
|
||||
|
|
|
@ -204,7 +204,11 @@ def pysol_init(app, args):
|
|||
app.top_cursor = top.cget("cursor")
|
||||
|
||||
# load options
|
||||
app.loadOptions()
|
||||
try:
|
||||
app.loadOptions()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
pass
|
||||
|
||||
# init audio 1)
|
||||
app.audio = None
|
||||
|
|
|
@ -100,22 +100,6 @@ def latin1_to_ascii(n):
|
|||
.replace("\xfc", "ue"))
|
||||
return n
|
||||
|
||||
## import htmlentitydefs
|
||||
## htmlentitydefs_i = {}
|
||||
## def latin1_to_html(n):
|
||||
## global htmlentitydefs_i
|
||||
## if not htmlentitydefs_i:
|
||||
## for k, v in htmlentitydefs.entitydefs.items():
|
||||
## htmlentitydefs_i[v] = "&" + k + ";"
|
||||
## s, g = "", htmlentitydefs_i.get
|
||||
## for c in n:
|
||||
## s = s + g(c, c)
|
||||
## return s
|
||||
|
||||
|
||||
## def hexify(s):
|
||||
## return "%02x"*len(s) % tuple(map(ord, s))
|
||||
|
||||
|
||||
def format_time(t):
|
||||
##print 'format_time:', t
|
||||
|
@ -288,11 +272,11 @@ class KwStruct:
|
|||
# // pickling support
|
||||
# ************************************************************************/
|
||||
|
||||
def pickle(obj, filename, binmode=0):
|
||||
def pickle(obj, filename, protocol=0):
|
||||
f = None
|
||||
try:
|
||||
f = open(filename, "wb")
|
||||
p = Pickler(f, binmode)
|
||||
p = Pickler(f, protocol)
|
||||
p.dump(obj)
|
||||
f.close(); f = None
|
||||
##print "Pickled", filename
|
||||
|
|
|
@ -30,7 +30,7 @@ PACKAGE_URL = 'http://sourceforge.net/projects/pysolfc/'
|
|||
|
||||
VERSION = '4.82'
|
||||
FC_VERSION = '1.0'
|
||||
VERSION_TUPLE = (4, 82)
|
||||
VERSION_TUPLE = (10, 0)
|
||||
|
||||
# Tk windowing system (auto determine in init.py)
|
||||
WIN_SYSTEM = 'x11' # win32, x11, aqua, classic
|
||||
|
|
|
@ -117,7 +117,7 @@ def createToolbarMenu(menubar, menu):
|
|||
#
|
||||
#return
|
||||
menu.add_separator()
|
||||
submenu = MfxMenu(menu, label=n_('Customize toolbar'), tearoff=tearoff)
|
||||
submenu = MfxMenu(menu, label=n_('Visible buttons'), tearoff=tearoff)
|
||||
for w in TOOLBAR_BUTTONS:
|
||||
submenu.add_checkbutton(label=gettext(w.capitalize()),
|
||||
variable=menubar.tkopt.toolbar_vars[w],
|
||||
|
|
|
@ -63,10 +63,10 @@ from tkFont import Font
|
|||
|
||||
# PySol imports
|
||||
from pysollib.mfxutil import Image, ImageTk, ImageOps
|
||||
from pysollib.settings import PACKAGE, WIN_SYSTEM
|
||||
|
||||
# Toolkit imports
|
||||
from tkconst import tkversion
|
||||
from pysollib.settings import PACKAGE, WIN_SYSTEM
|
||||
|
||||
|
||||
# /***********************************************************************
|
||||
|
|
|
@ -116,7 +116,7 @@ def createToolbarMenu(menubar, menu):
|
|||
#
|
||||
#return
|
||||
menu.add_separator()
|
||||
submenu = MfxMenu(menu, label=n_('Customize toolbar'), tearoff=tearoff)
|
||||
submenu = MfxMenu(menu, label=n_('Visible buttons'), tearoff=tearoff)
|
||||
for w in TOOLBAR_BUTTONS:
|
||||
submenu.add_checkbutton(label=gettext(w.capitalize()),
|
||||
variable=menubar.tkopt.toolbar_vars[w],
|
||||
|
|
|
@ -63,10 +63,10 @@ from tkFont import Font
|
|||
|
||||
# PySol imports
|
||||
from pysollib.mfxutil import Image, ImageTk, ImageOps
|
||||
from pysollib.settings import PACKAGE, WIN_SYSTEM
|
||||
|
||||
# Toolkit imports
|
||||
from tkconst import tkversion
|
||||
from pysollib.settings import PACKAGE, WIN_SYSTEM
|
||||
|
||||
|
||||
# /***********************************************************************
|
||||
|
|
|
@ -54,7 +54,6 @@ __all__ = ['SUITS',
|
|||
'VARIABLE_REDEALS',
|
||||
'CARDSET',
|
||||
'IMAGE_EXTENSIONS',
|
||||
'get_version_tuple',
|
||||
'Timer',
|
||||
'DataLoader',
|
||||
]
|
||||
|
@ -115,17 +114,6 @@ if Image:
|
|||
IMAGE_EXTENSIONS = (".png", ".gif", ".jpg", ".ppm", ".bmp")
|
||||
|
||||
|
||||
def get_version_tuple(version_string):
|
||||
v = re.split(r"[^\d\.]", version_string)
|
||||
if not v or not v[0]:
|
||||
return (0,)
|
||||
v = v[0].split(".")
|
||||
v = filter(lambda x: x != "", v)
|
||||
if not v or not v[0]:
|
||||
return (0,)
|
||||
return tuple(map(int, v))
|
||||
|
||||
|
||||
# /***********************************************************************
|
||||
# // simple benchmarking
|
||||
# ************************************************************************/
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
|
||||
import sys, os, traceback
|
||||
|
||||
from pysollib.settings import PACKAGE, VERSION
|
||||
from pysollib.settings import PACKAGE
|
||||
from pysollib.settings import FC_VERSION as VERSION
|
||||
from pysollib.settings import TOOLKIT, USE_TILE
|
||||
from pysollib.settings import DEBUG
|
||||
from pysollib.tile import Tile
|
||||
|
|
Loading…
Add table
Reference in a new issue