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

* improved solitaire wizard

* updated russin translation


git-svn-id: file:///home/shlomif/Backup/svn-dumps/PySolFC/svnsync-repos/pysolfc/PySolFC/trunk@163 efabe8c0-fbe8-4139-b769-b5e6d273206e
This commit is contained in:
skomoroh 2007-05-10 21:16:12 +00:00
parent 2022dbe599
commit 7601a8a27d
11 changed files with 1893 additions and 1008 deletions

View file

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PySol 0.0.1\n"
"POT-Creation-Date: Mon Mar 5 17:55:43 2007\n"
"POT-Creation-Date: Thu May 10 14:22:52 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"
@ -111,9 +111,6 @@ msgstr ""
msgid "Alternation"
msgstr ""
msgid "Alternations"
msgstr ""
msgid "Amazons"
msgstr ""
@ -213,6 +210,9 @@ msgstr ""
msgid "Balarama"
msgstr ""
msgid "Banner"
msgstr ""
msgid "Baroness"
msgstr ""
@ -723,6 +723,9 @@ msgstr ""
msgid "Deuces"
msgstr ""
msgid "Devil's Solitaire"
msgstr ""
msgid "Dhanpati"
msgstr ""
@ -948,6 +951,9 @@ msgstr ""
msgid "Eight Off"
msgstr ""
msgid "Eight Sages"
msgstr ""
msgid "Eight Squares"
msgstr ""
@ -1161,6 +1167,9 @@ msgstr ""
msgid "Four Leaf Clovers"
msgstr ""
msgid "Four Packs"
msgstr ""
msgid "Four Seasons"
msgstr ""
@ -1791,6 +1800,9 @@ msgstr ""
msgid "Lobachevsky"
msgstr ""
msgid "Locked Cards"
msgstr ""
msgid "Long Braid"
msgstr ""
@ -1800,6 +1812,9 @@ msgstr ""
msgid "Long Tail"
msgstr ""
msgid "Long Trip"
msgstr ""
msgid "Loose Ends"
msgstr ""
@ -2010,9 +2025,6 @@ msgstr ""
msgid "Mahjongg Hurdles"
msgstr ""
msgid "Mahjongg Hurricane"
msgstr ""
msgid "Mahjongg IloveU"
msgstr ""
@ -2304,6 +2316,9 @@ msgstr ""
msgid "Mahjongg Tomb"
msgstr ""
msgid "Mahjongg Tornado"
msgstr ""
msgid "Mahjongg Totally Random-Made"
msgstr ""
@ -2526,6 +2541,12 @@ msgstr ""
msgid "Napoleon"
msgstr ""
msgid "Napoleon Leaves Moscow"
msgstr ""
msgid "Napoleon Takes Moscow"
msgstr ""
msgid "Napoleon at St.Helena"
msgstr ""
@ -2721,6 +2742,9 @@ msgstr ""
msgid "Peek"
msgstr ""
msgid "Peek II"
msgstr ""
msgid "Pegged"
msgstr ""
@ -2757,6 +2781,12 @@ msgstr ""
msgid "Perseverance"
msgstr ""
msgid "Persian Patience"
msgstr ""
msgid "Phalanx"
msgstr ""
msgid "Phantom Blockade"
msgstr ""
@ -2943,6 +2973,9 @@ msgstr ""
msgid "Right Triangle"
msgstr ""
msgid "Right and Left"
msgstr ""
msgid "Rings"
msgstr ""
@ -3057,6 +3090,9 @@ msgstr ""
msgid "Scheidungsgrund"
msgstr ""
msgid "School"
msgstr ""
msgid "Scorpion"
msgstr ""
@ -3507,12 +3543,21 @@ msgstr ""
msgid "Thirteens"
msgstr ""
msgid "Thirty"
msgstr ""
msgid "Thirty Six"
msgstr ""
msgid "Thirty Two Cards"
msgstr ""
msgid "Three Blind Mice"
msgstr ""
msgid "Three Fir-trees"
msgstr ""
msgid "Three Peaks"
msgstr ""
@ -3552,6 +3597,12 @@ msgstr ""
msgid "Toni"
msgstr ""
msgid "Topsy-Turvy Queens"
msgstr ""
msgid "Tornado"
msgstr ""
msgid "Totally Random-Made"
msgstr ""
@ -3636,6 +3687,9 @@ msgstr ""
msgid "Tuxedo"
msgstr ""
msgid "Twelve Sleeping Maids"
msgstr ""
msgid "Twenty"
msgstr ""
@ -3660,6 +3714,9 @@ msgstr ""
msgid "Two Pyramids"
msgstr ""
msgid "Two Rings"
msgstr ""
msgid "Two Squares"
msgstr ""
@ -3678,6 +3735,9 @@ msgstr ""
msgid "Usk"
msgstr ""
msgid "Vague"
msgstr ""
msgid "Vagues"
msgstr ""
@ -3741,6 +3801,9 @@ msgstr ""
msgid "Waterloo"
msgstr ""
msgid "Wave"
msgstr ""
msgid "Wave Motion"
msgstr ""

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PySol 0.0.1\n"
"POT-Creation-Date: Mon Mar 5 17:55:43 2007\n"
"POT-Creation-Date: Thu May 10 14:22:52 2007\n"
"PO-Revision-Date: 2007-03-05 18:01+0300\n"
"Last-Translator: Скоморох <skomoroh@gmail.com>\n"
"Language-Team: Russian <ru@li.org>\n"
@ -110,9 +110,6 @@ msgstr "Алтарь"
msgid "Alternation"
msgstr "Чередование"
msgid "Alternations"
msgstr "Чередования"
msgid "Amazons"
msgstr "Амазонки"
@ -214,6 +211,10 @@ msgstr "Баланс"
msgid "Balarama"
msgstr "Баларама"
#, fuzzy
msgid "Banner"
msgstr "Баланс"
msgid "Baroness"
msgstr "Баронесса"
@ -728,6 +729,10 @@ msgstr "Der letzte Monarch"
msgid "Deuces"
msgstr "Двойки"
#, fuzzy
msgid "Devil's Solitaire"
msgstr "Китайский пасьянс"
msgid "Dhanpati"
msgstr "Dhanpati"
@ -957,6 +962,10 @@ msgstr "Восемь легионов"
msgid "Eight Off"
msgstr "Восемь удалённых"
#, fuzzy
msgid "Eight Sages"
msgstr "Восемь квадратов"
msgid "Eight Squares"
msgstr "Восемь квадратов"
@ -1175,6 +1184,10 @@ msgstr "Четыре короля"
msgid "Four Leaf Clovers"
msgstr "Четырёхлистный клевер"
#, fuzzy
msgid "Four Packs"
msgstr "Четыре кучи"
msgid "Four Seasons"
msgstr "Четыре сезона"
@ -1817,6 +1830,10 @@ msgstr "Маленький Наполеон"
msgid "Lobachevsky"
msgstr "Лобачевский"
#, fuzzy
msgid "Locked Cards"
msgstr "Угловая карта"
msgid "Long Braid"
msgstr "Долгая коса"
@ -1826,6 +1843,10 @@ msgstr "Долгое путешествие в Куддапах"
msgid "Long Tail"
msgstr "Длинный хвост"
#, fuzzy
msgid "Long Trip"
msgstr "Длинный хвост"
msgid "Loose Ends"
msgstr "Свободные концы"
@ -2036,9 +2057,6 @@ msgstr "Маджонг Ховеркрафт"
msgid "Mahjongg Hurdles"
msgstr "Маджонг Барьеры"
msgid "Mahjongg Hurricane"
msgstr "Маджонг Ураган"
msgid "Mahjongg IloveU"
msgstr "Маджонг IloveU"
@ -2330,6 +2348,10 @@ msgstr "Маджонг Time Tunnel"
msgid "Mahjongg Tomb"
msgstr "Маджонг Гробница"
#, fuzzy
msgid "Mahjongg Tornado"
msgstr "Маджонг Арена"
msgid "Mahjongg Totally Random-Made"
msgstr "Маджонг Totally Random-Made"
@ -2558,6 +2580,13 @@ msgstr "Маджонг N for Namida"
msgid "Napoleon"
msgstr "Наполеон"
msgid "Napoleon Leaves Moscow"
msgstr ""
#, fuzzy
msgid "Napoleon Takes Moscow"
msgstr "Гробница Наполеона"
msgid "Napoleon at St.Helena"
msgstr "Наполеон на острове св.Елена"
@ -2756,6 +2785,10 @@ msgstr ""
msgid "Peek"
msgstr "Взгляд"
#, fuzzy
msgid "Peek II"
msgstr "Взгляд"
msgid "Pegged"
msgstr ""
@ -2792,6 +2825,14 @@ msgstr "Перпетуум-мобиле"
msgid "Perseverance"
msgstr "Настойчивость"
#, fuzzy
msgid "Persian Patience"
msgstr "Алжирский пасьянс"
#, fuzzy
msgid "Phalanx"
msgstr "Реглан"
msgid "Phantom Blockade"
msgstr "Призрачная блокада"
@ -2978,6 +3019,10 @@ msgstr "Свита"
msgid "Right Triangle"
msgstr "Правый треугольник"
#, fuzzy
msgid "Right and Left"
msgstr "Верхний и нижний"
msgid "Rings"
msgstr "Круги"
@ -3093,6 +3138,9 @@ msgstr "Откос"
msgid "Scheidungsgrund"
msgstr "Scheidungsgrund"
msgid "School"
msgstr ""
msgid "Scorpion"
msgstr "Скорпион"
@ -3554,12 +3602,23 @@ msgstr "Тринадцать вверх"
msgid "Thirteens"
msgstr "По тринадцать"
#, fuzzy
msgid "Thirty"
msgstr "Тридцать шесть"
msgid "Thirty Six"
msgstr "Тридцать шесть"
msgid "Thirty Two Cards"
msgstr ""
msgid "Three Blind Mice"
msgstr "Три слепые мышки"
#, fuzzy
msgid "Three Fir-trees"
msgstr "Три пирата"
msgid "Three Peaks"
msgstr "Три вершины"
@ -3603,6 +3662,13 @@ msgstr "Гробница"
msgid "Toni"
msgstr ""
msgid "Topsy-Turvy Queens"
msgstr ""
#, fuzzy
msgid "Tornado"
msgstr "Жаба"
#, fuzzy
msgid "Totally Random-Made"
msgstr "Маджонг Totally Random-Made"
@ -3690,6 +3756,9 @@ msgstr "Верные двенадцать"
msgid "Tuxedo"
msgstr "Смокинг"
msgid "Twelve Sleeping Maids"
msgstr ""
msgid "Twenty"
msgstr "Двенадцать"
@ -3715,6 +3784,10 @@ msgstr "Два знакомца"
msgid "Two Pyramids"
msgstr "Две пирамиды"
#, fuzzy
msgid "Two Rings"
msgstr "Круги"
msgid "Two Squares"
msgstr "Два квадрата"
@ -3733,6 +3806,10 @@ msgstr "Вверх и вниз"
msgid "Usk"
msgstr ""
#, fuzzy
msgid "Vague"
msgstr "Смутный"
msgid "Vagues"
msgstr "Смутный"
@ -3801,6 +3878,10 @@ msgstr "Ватерлоо"
msgid "Waterloo"
msgstr "Ватерлоо"
#, fuzzy
msgid "Wave"
msgstr "Волны"
msgid "Wave Motion"
msgstr "Волновое движение"
@ -3895,3 +3976,9 @@ msgstr "Зигзагообразный курс"
msgid "Zodiac"
msgstr "Зодиак"
#~ msgid "Alternations"
#~ msgstr "Чередования"
#~ msgid "Mahjongg Hurricane"
#~ msgstr "Маджонг Ураган"

File diff suppressed because it is too large Load diff

View file

@ -222,6 +222,22 @@ class CustomGame(Game):
self.Hint_Class = Yukon_Hint
def _shuffleHook(self, cards):
s = get_settings(self.SETTINGS)
if not s['deal_found']:
return cards
if s['found_type'] in (Spider_SS_Foundation,
Spider_AC_Foundation,):
return cards
base_card = s['found_base_card']
if base_card == ANY_RANK:
base_card = cards[0].rank
# move base_card to top of the Talon (i.e. first cards to be dealt)
return self._shuffleHookMoveToTop(
cards,
lambda c, rank=base_card: (c.rank == rank, c.suit))
def startGame(self):
def deal(rows, flip, frames, max_cards):
@ -232,11 +248,18 @@ class CustomGame(Game):
frames = 0
s = get_settings(self.SETTINGS)
max_cards = s['deal_max_cards'] - len(self.s.rows)
if isinstance(self.s.talon, InitialDealTalonStack):
max_cards = 52 * s['decks'] - len(self.s.rows)
else:
max_cards = s['deal_max_cards'] - len(self.s.rows)
if self.s.waste:
max_cards -= 1
anim_frames = -1
# deal to foundations
if s['deal_found']:
max_cards -= deal(self.s.foundations, True, frames, max_cards)
# deal to reserves
n = s['deal_to_reserves']
for i in range(n):

View file

@ -64,7 +64,7 @@ class Osmosis_Foundation(AbstractFoundationStack):
return 1
def getHelp(self):
return _('Build in suit regardless of rank.')
return _('Foundation. Build in suit regardless of rank.')
class Osmosis(Game):
@ -164,7 +164,7 @@ class OsmosisII_Foundation(AbstractFoundationStack):
return False
def getHelp(self):
return _('Build in suit regardless of rank.')
return _('Foundation. Build in suit regardless of rank.')
class OsmosisII(Osmosis):

View file

@ -64,7 +64,6 @@ from findcarddialog import connect_game_find_card_dialog, destroy_find_card_dial
from solverdialog import connect_game_solver_dialog
from tkwrap import MfxRadioMenuItem, MfxCheckMenuItem, StringVar
from tkwidget import MfxMessageDialog
from wizarddialog import WizardDialog
#from toolbar import TOOLBAR_BUTTONS
from tkconst import TOOLBAR_BUTTONS
@ -1376,6 +1375,8 @@ the next time you restart """)+PACKAGE,
def wizardDialog(self, edit=False):
from pysollib.wizardutil import write_game, reset_wizard
from wizarddialog import WizardDialog
if edit:
reset_wizard(self.game)
else:

View file

@ -112,9 +112,12 @@ class WizardDialog(MfxDialog):
ch.grid(row=row, column=1, sticky='ew', padx=2, pady=2)
if w.current_value is None:
w.variable.set(gettext(w.default))
v = w.default
else:
w.variable.set(gettext(w.current_value))
v = w.current_value
if w.widget in ('menu', 'preset'):
v = gettext(v)
w.variable.set(v)
row += 1

View file

@ -62,7 +62,6 @@ from selecttile import SelectTileDialogWithPreview
from findcarddialog import connect_game_find_card_dialog, destroy_find_card_dialog
from solverdialog import connect_game_solver_dialog
from tkwrap import MfxRadioMenuItem, MfxCheckMenuItem, StringVar
from wizarddialog import WizardDialog
#from toolbar import TOOLBAR_BUTTONS
from tkconst import TOOLBAR_BUTTONS
@ -1361,6 +1360,8 @@ class PysolMenubar(PysolMenubarActions):
def wizardDialog(self, edit=False):
from pysollib.wizardutil import write_game, reset_wizard
from wizarddialog import WizardDialog
if edit:
reset_wizard(self.game)
else:

View file

@ -104,9 +104,12 @@ class WizardDialog(MfxDialog):
ch.grid(row=row, column=1, sticky='ew', padx=2, pady=2)
if w.current_value is None:
w.variable.set(gettext(w.default))
v = w.default
else:
w.variable.set(gettext(w.current_value))
v = w.current_value
if w.widget in ('menu', 'preset'):
v = gettext(v)
w.variable.set(v)
row += 1

View file

@ -133,7 +133,7 @@ DealToWaste = WizSetting(
values_map = (1, 5),
default = 1,
widget = 'spin',
label = _('# of cards dealt to waste:'),
label = _('# of cards dealt to the waste:'),
var_name = 'deal_to_waste',
)
TalonShuffle = WizSetting(
@ -224,7 +224,7 @@ RowsBaseCard = WizSetting(
values_map = ((n_('Ace'), ACE),
(n_('King'), KING),
(n_('Any'), ANY_RANK),
(n_('No'), NO_RANK),
(n_('None'), NO_RANK),
),
default = n_('Any'),
label = _('Base card:'),
@ -282,21 +282,21 @@ DealFaceDown = WizSetting(
values_map = (0, 20),
default = 0,
widget = 'spin',
label = _('# of face-down cards dealt to tableau pile:'),
label = _('# of face-down cards dealt to the tableau pile:'),
var_name = 'deal_face_down',
)
DealFaceUp = WizSetting(
values_map = (0, 20),
default = 8,
widget = 'spin',
label = _('# of face-up cards dealt to tableau pile:'),
label = _('# of face-up cards dealt to the tableau pile:'),
var_name = 'deal_face_up',
)
DealToReseves = WizSetting(
values_map = (0, 20),
default = 0,
widget = 'spin',
label = _('# of cards dealt to reserve:'),
label = _('# of cards dealt to the reserve:'),
var_name = 'deal_to_reserves',
)
DealMaxCards = WizSetting(
@ -306,6 +306,13 @@ DealMaxCards = WizSetting(
label = _('Max # of dealt cards:'),
var_name = 'deal_max_cards',
)
DealToFound = WizSetting(
values_map = (0, 1),
default = 0,
label = _('Deal first cards to the foundations:'),
var_name = 'deal_found',
widget = 'check',
)
WizardWidgets = (
_('General'),
@ -343,6 +350,7 @@ WizardWidgets = (
DealFaceUp,
DealToReseves,
DealMaxCards,
DealToFound,
)
@ -387,7 +395,7 @@ class MyCustomGame(CustomGame):
if isinstance(w, basestring):
continue
v = w.variable.get()
if w.widget in ('menu', 'presets'):
if w.widget in ('menu', 'preset'):
v = w.translation_map[v]
if v == w.default:
# save only unique values