Author: bkuhn
Date: Tue Aug 26 23:25:06 2008
New Revision: 4379

URL: http://svn.gna.org/viewcvs/pokersource?rev=4379&view=rev
Log:
 [EMAIL PROTECTED]:  bkuhn | 2008-08-26 17:24:51 -0400
 Implementation of server-side locale changes for dumb clients.
 
   * PokerAvatar instance variable, 'localeFunc' now exists.  This is a
     gettext function to be used for a particular locale.
 
   * PoketAvatar.setLocale() assigns the above variable, using the lookup
     function provided by PokerService, 'locale2translationFunc'
 
   * PokerAvatar.handlePacketLogic() now accepts PacketPokerSetLocale(),
     following the Sematics as described in its doc string.
 
   * PokerAvatar.sendPacket() now does some seriously diddling to force
     localeFunc to be used for gettext, should localeFunc be set.  It
     changes its own _() (just in case, see comment in code), and uses
     pokergame.init_i18n() to force poker-engine strings to use the desired
     localeFunc.  When it's done sending packets, it restores the locale to
     its previous state.
 
   # Tests are implemented in test-pokeravatar.py.in to cover these
     scenarios.  Note that the tests can handle the case where the
     fr_FR.UTF-8 locale is not available, the tests should still function,
     but will print warning messages and will probably not provide full
     coverage.
 
   # Minor improvements to test-pokeravatar.py.in's
     startHandAndReceiveCards, since I was in there anyway to implement
     locale strings.

Modified:
    trunk/   (props changed)
    trunk/poker-network/ChangeLog
    trunk/poker-network/pokernetwork/pokeravatar.py
    trunk/poker-network/tests/test-pokeravatar.py.in


_______________________________________________
Pokersource-commits mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-commits

Reply via email to