Skip to content

Commit

Permalink
Merge pull request ddnet#8849 from furo321/fix-twlang-endline
Browse files Browse the repository at this point in the history
Set correct end line in `twlang.py` for strings with context
  • Loading branch information
def- authored Aug 30, 2024
2 parents f754054 + d40cc86 commit 914867d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/languages/twlang.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def decode(fileobj, elements_per_key):
if current_key:
if len(data[current_key]) != 1+elements_per_key:
raise LanguageDecodeError("Wrong number of elements per key", fileobj.name, index)
data[current_key].append(index)
data[current_key].append(index - 1 if current_context else index)
if line in data:
raise LanguageDecodeError("Key defined multiple times: " + line, fileobj.name, index)
data[(line, current_context)] = [index - 1 if current_context else index]
Expand Down

0 comments on commit 914867d

Please sign in to comment.