Skip to content

Commit

Permalink
Merge pull request #154 from eforgacs-games/vscode-fixes
Browse files Browse the repository at this point in the history
Add VSCode fixes
  • Loading branch information
eforgacs authored Jun 7, 2024
2 parents e9928a8 + e34f711 commit 6bd8d7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ def blink_arrow(self, screen: Surface, x: float, y: float, direction: str, show_


def set_gettext_language(language):
localedir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'data', 'text', 'locales'))
if language == 'Korean':
ko = gettext.translation('base', localedir=os.path.join('../data/text/locales'), languages=['ko'])
ko = gettext.translation('base', localedir=localedir, languages=['ko'])
ko.install()
_ = ko.gettext
else:
Expand Down
4 changes: 3 additions & 1 deletion src/game.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import json
import os
import sys

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import random
from typing import List, Tuple

Expand All @@ -19,7 +22,6 @@
from src.common import BLACK, accept_keys, reject_keys, Graphics, RED, WHITE, is_facing_medially, is_facing_laterally, \
set_gettext_language
from src.common import is_facing_up, is_facing_down, is_facing_left, is_facing_right
from src.config.dev_config import dev_config
from src.config.prod_config import prod_config
from src.direction import Direction
from src.directories import Directories
Expand Down

0 comments on commit 6bd8d7c

Please sign in to comment.