Skip to content

Commit

Permalink
Enable to recognize MT
Browse files Browse the repository at this point in the history
  • Loading branch information
ranhai613 committed Apr 17, 2024
1 parent ccffb92 commit 7d6a85d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mvinstaller/multiverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)

_TRANSLATION_FN_PATTERN = re.compile(
r'^(?P<id>.+)-(?P<version>v?[0-9\.]+(?:-.*)?)-(?P<locale>[a-zA-Z_]+)\+(?P<commitid>[a-fA-F0-9xX]+)\.ftl$',
r'^(?P<id>.+)-(?P<version>v?[0-9\.]+(?:-.*)?)-(?P<locale>[a-zA-Z_]+)(?P<machine>\.machine)?\+(?P<commitid>[a-fA-F0-9xX]+)\.ftl$',
re.IGNORECASE
)

Expand All @@ -35,12 +35,14 @@ def _parse_release(path, priority):
if match is None:
continue
match = match.groupdict()
if match['machine'] == None:
match['machine'] = ''

mod = Mod(
id=f"{match['id']}/{match['locale']}",
id=f"{match['id']}/{match['locale']}{match['machine']}",
download_targets={url: fn},
locale=match['locale'],
version=f"{match['version']}+{match['commitid']}",
version=f"{match['version']}+{match['commitid']}{match['machine']}",
metadata_url=url.replace(
urllib.parse.quote_plus(fn),
urllib.parse.quote_plus(f"metadata-{match['locale']}.xml")
Expand Down

0 comments on commit 7d6a85d

Please sign in to comment.