diff --git a/monitor.py b/monitor.py index 8f6736fd..4aa742b9 100644 --- a/monitor.py +++ b/monitor.py @@ -1605,19 +1605,19 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below """ # TODO: Localisation ? # Stage 1: Is it in `$_Class_Name;` form ? - if m := re.fullmatch(r'^\$([^_]+)_Class([0-9]+)_Name;$', name): + if m := re.fullmatch(r'(?i)^\$([^_]+)_Class([0-9]+)_Name;$', name): n, c = m.group(1, 2) name = n # Stage 2: Is it in `_class` form ? - elif m := re.fullmatch(r'^([^_]+)_class([0-9]+)$', name): + elif m := re.fullmatch(r'(?i)^([^_]+)_class([0-9]+)$', name): n, c = m.group(1, 2) name = n # Now turn either of those into an English ' Suit' form name = edmc_suit_symbol_to_en.get(name.lower(), name) - # Stage 3: Is it in verbose ` Suit` form ? + # Finally, map that to a form without the verbose ' Suit' on the end name = edmc_suit_shortnames.get(name, name) return name