mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-17 21:48:19 +00:00
Merge pull request #8849 from furo321/fix-twlang-endline
Set correct end line in `twlang.py` for strings with context
This commit is contained in:
commit
914867d980
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue