mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Detect duplicated keys
This commit is contained in:
parent
a3806194ee
commit
148e15bca0
@ -35,11 +35,17 @@ def parse_message(message):
|
||||
|
||||
def messages(text):
|
||||
result = p.findall(text)
|
||||
seen = set()
|
||||
msg_list = []
|
||||
for msg in result:
|
||||
key, val = parse_message(msg)
|
||||
item = {'key': key, 'val': val, 'msg': msg}
|
||||
msg_list.append(item)
|
||||
if key not in seen:
|
||||
seen.add(key)
|
||||
else:
|
||||
print("Duplicate key: " + key)
|
||||
|
||||
return msg_list
|
||||
|
||||
def update(translation, template):
|
||||
|
Loading…
x
Reference in New Issue
Block a user