Skip to content

Commit

Permalink
added language duplicate detection
Browse files Browse the repository at this point in the history
  • Loading branch information
piterson05 committed Sep 14, 2023
1 parent 4c70367 commit a8aa223
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion jobs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,6 @@
<String xml:lang="nl-NL">De ~o~verdacht ~s~is een andere agent aan het volgen.</String>
<String xml:lang="it-IT">Il ~o~sospettato ~s~sta seguendo un altro agente.</String>
<String xml:lang="es-ES">El ~o~sospechoso ~s~está siguiendo a otro oficial de policia.</String>
<String xml:lang="es-ES">El ~o~sospechoso ~s~está siguiendo a otro oficial de policia.</String>
<String xml:lang="pl-PL">~o~Podejrzany ~s~idzie za innym policjantem.</String>
<String xml:lang="pt-BR">O ~o~suspeito ~s~está seguindo outro policial..</String>
<String xml:lang="zh-Hant">這名 ~o~嫌犯 ~s~正在跟隨其他警員.</String>
Expand Down
2 changes: 2 additions & 0 deletions validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@ def check_entries(entry: xml.dom.minidom.Element, path: list[str]):
required_text_formatting = set(found_formats)
should_end_with_format = found_formats[-1]
required_variables = re.findall(VARIABLE_REGEX, get_text_from_node(string_entry))
if value in found_langs:
Validator.print_error(f"Found duplicate string for {value}", path, string_entry.parse_position)
found_langs.append(value)
else:
Validator.print_error(f"Unknown attribute: {repr(key)}", path, string_entry.parse_position)
Expand Down

0 comments on commit a8aa223

Please sign in to comment.