Skip to content

Commit

Permalink
Fix crasher in EDMC 5.7.x
Browse files Browse the repository at this point in the history
Python 3.11 removed codeset in translation.
  • Loading branch information
lekeno committed Dec 16, 2022
1 parent c18fd04 commit 7c3c1f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions edr/edrfssinsights.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def __init__(self):
"$MULTIPLAYER_SCENARIO80_TITLE;": {"count": 0, "short_name": _("Compromised Nav Beacon") },
"$MULTIPLAYER_SCENARIO81_TITLE;": {"count": 0, "short_name": _("Salvageable Wreckage")},
"$FIXED_EVENT_NUMBERSTATION;": {"count": 0, "short_name": _("Anomalous Signal - Numbers Station") },
# TODO "$Warzone_TG_...:#index=1; ... = High, Low, Med, VeryHigh
"$Warzone_TG;": {"count": 0, "short_name": _("CZ [AX]") },
"$FIXED_EVENT_CAPSHIP;": {"count": 0, "short_name": _("CAPITAL SHIP") },
"$NumberStation:#index=1;": {"count": 0, "short_name": _("Unreg. Comms - Numbers Station (Ⅰ)") },
Expand Down
6 changes: 3 additions & 3 deletions edr/edri18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
CONTEXT_SEPARATOR = u"|"
L10N_DIR = utils2to3.abspathmaker(__file__, 'l10n')
language = None
translate = gettext.translation('edr', L10N_DIR, fallback=True, codeset="utf-8")
translate = gettext.translation('edr', L10N_DIR, fallback=True)

def set_language(lang):
global language, translate
language = lang
if language:
translate = gettext.translation('edr', L10N_DIR, fallback=True, languages=[language], codeset="utf-8")
translate = gettext.translation('edr', L10N_DIR, fallback=True, languages=[language])
else:
translate = gettext.translation('edr', L10N_DIR, fallback=True, codeset="utf-8")
translate = gettext.translation('edr', L10N_DIR, fallback=True)

def ugettext(message):
if sys.version_info.major == 2:
Expand Down

0 comments on commit 7c3c1f7

Please sign in to comment.