diff options
author | nokoe <nokoe@mailbox.org> | 2024-11-27 15:40:47 +0100 |
---|---|---|
committer | nokoe <nokoe@mailbox.org> | 2024-11-27 15:40:47 +0100 |
commit | e427546f8827dd14c899cba07ecf5a603a6783d9 (patch) | |
tree | 7c9097a7388f10c03e1212372b105018a380f78b | |
parent | e7360752a59b78b43eaec567e27522d695750ba2 (diff) | |
download | hurrycurry-dist-extra-e427546f8827dd14c899cba07ecf5a603a6783d9.tar hurrycurry-dist-extra-e427546f8827dd14c899cba07ecf5a603a6783d9.tar.bz2 hurrycurry-dist-extra-e427546f8827dd14c899cba07ecf5a603a6783d9.tar.zst |
ini parser: ignore `[hurrycurry]` and empty lines
-rw-r--r-- | translate.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/translate.py b/translate.py index ccfa7d2..dbb4c2a 100644 --- a/translate.py +++ b/translate.py @@ -70,8 +70,9 @@ for i in [ lang = i.name.removesuffix(".ini") translations = {} f = open(i) - next(f) for line in f: + if line.strip() == "" or line.strip() == "[hurrycurry]": + continue key, value = line.split("=", 1) translations[key.strip()] = value.strip() langs[lang] = translations |