diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-06-08 03:39:43 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-06-08 04:02:48 +0100 |
commit | 9d7f0754ff9db1645635647f4acd63aa38c173c5 (patch) | |
tree | 35568829567ec507204043112e77f26cbe2fbb55 /CAO_Cards.py | |
parent | 520f8417ef94ef48e1273d7b0636a738faab80cc (diff) |
server: multilingual/french support
moved the card files in a per-language directory as follows.
* $LANG/cards/white
* $LANG/cards/black
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'CAO_Cards.py')
-rw-r--r-- | CAO_Cards.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CAO_Cards.py b/CAO_Cards.py index 615c685..537abe7 100644 --- a/CAO_Cards.py +++ b/CAO_Cards.py @@ -1,13 +1,13 @@ class CAO_Cards(): @staticmethod - def get_white_cards(): + def get_white_cards(lang='en'): ''' Read the file containing the white cards and return a list of cards ''' - with open('white_cards') as fd: + with open('lang/' + lang + '/cards/white') as fd: return [line.strip() for line in fd] @staticmethod - def get_black_cards(): + def get_black_cards(lang='en'): ''' Read the file containing the black cards and return a list of cards ''' - with open('black_cards') as fd: + with open('lang/' + lang + '/cards/black') as fd: return [line.strip() for line in fd] |