mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-12 04:53:52 -06:00
refactor: keep one region word table on the site
_REGION_WORDS was bound twice in generate_site. The second table won at import, so the first, read by _region_word, was never used. The region lines now read the one table through _region_words.
This commit is contained in:
1 parent
b6b7856e97
commit
17538bcddf
2 files changed
+26
-8
No files matched your search
@@ -6443,13 +6443,6 @@ def _region_order() -> dict[str, int]:
|
||||
return {region: index for index, region in enumerate(ordered)}
|
||||
|
||||
|
||||
_REGION_WORDS = {"uk": "UK", "asia-ntsc": "Asia (NTSC)", "asia-pal": "Asia (PAL)"}
|
||||
|
||||
|
||||
def _region_word(region: str) -> str:
|
||||
return _REGION_WORDS.get(region) or region.replace("-", " ").title()
|
||||
|
||||
|
||||
def _reading_pairs(sha1: str, consumers: FileConsumers) -> list[tuple[str, dict]]:
|
||||
"""The profile entries that read a file, each with its emulator."""
|
||||
files_of = getattr(consumers, "emulator_files", {})
|
||||
@@ -7031,7 +7024,7 @@ def _group_start(group: _StartGroup, first_below: bool) -> list[tuple[str, str]]
|
||||
else:
|
||||
regional[(*same, region)] = regional.pop(same)
|
||||
|
||||
out = [(", ".join(_region_word(r) for r in regions), regional[regions])
|
||||
out = [(", ".join(_region_words(r) for r in regions), regional[regions])
|
||||
for regions in sorted(regional, key=lambda rs: (order.get(rs[0], len(order)), rs))]
|
||||
# A name a region line gives already is no "also", and one only
|
||||
# emulators no region line answers reads is an "instead": armsx1 reads
|
||||
|
||||
Reference in new issue
Block a user