Skip to content

Commit

Permalink
don't save language files with utf8 bom
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNailDev committed Feb 24, 2025
1 parent e06c834 commit 8b7370b
Show file tree
Hide file tree
Showing 31 changed files with 30 additions and 33 deletions.
2 changes: 1 addition & 1 deletion game/languages/Catalan.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Català (Catalan)

OPTION_VALUE_EASY=Fàcil
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Chinese.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=普通话 (Chinese)

OPTION_VALUE_EASY=简单
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Croatian.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Hrvatski (Croatian)

OPTION_VALUE_EASY=Lako
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Czech.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Čeština (Czech)

OPTION_VALUE_EASY=Snadná
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Danish.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Dansk (Danish)

OPTION_VALUE_EASY=Let
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Dutch.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Nederlands (Dutch)

OPTION_VALUE_EASY=Gemakkelijk
Expand Down
2 changes: 1 addition & 1 deletion game/languages/English.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=English

OPTION_VALUE_EASY=Easy
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Euskara.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Euskara (Basque)

OPTION_VALUE_EASY=Erraza
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Finnish.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Suomi (Finnish)

OPTION_VALUE_EASY=Helppo
Expand Down
2 changes: 1 addition & 1 deletion game/languages/French.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Français (French)

OPTION_VALUE_EASY=Facile
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Gaelic.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Gàidhlig (Gaelic)

OPTION_VALUE_EASY=Furasta
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Galician.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Galego (Galician)

OPTION_VALUE_EASY=Fácil
Expand Down
2 changes: 1 addition & 1 deletion game/languages/German.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Deutsch (German)

OPTION_VALUE_EASY=Einfach
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Greek.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Ελληνικά (Greek)

OPTION_VALUE_EASY=Εύκολο
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Hungarian.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Magyar (Hungarian)

OPTION_VALUE_EASY=Könnyű
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Icelandic.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Íslenska (Icelandic)

OPTION_VALUE_EASY=Auðvelt
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Italian.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Italiano (Italian)

OPTION_VALUE_EASY=Facile
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Japanese.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=日本語 (Japanese)

OPTION_VALUE_EASY=簡単
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Language.new
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
;TODO: LANGUAGE=English

;TODO: OPTION_VALUE_EASY=Easy
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Luxembourgish.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Lëtzebuergesch (Luxemboourgish)

OPTION_VALUE_EASY=Einfach
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Norwegian.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Norsk (Norwegian)

OPTION_VALUE_EASY=Lett
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Polish.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Polski (Polish)

OPTION_VALUE_EASY=Łatwo
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Portuguese.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Português (Portuguese)

OPTION_VALUE_EASY=Fácil
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Romanian.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Română (Romanian)

OPTION_VALUE_EASY=Uşor
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Russian.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Pу́сский (Russian)

OPTION_VALUE_EASY=Простой
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Serbian.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Српски (Serbian)

OPTION_VALUE_EASY=Lako
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Slovak.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Slovenčina (Slovak)

OPTION_VALUE_EASY=Ľahká
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Slovenian.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Slovenščina (Slovenian)

OPTION_VALUE_EASY=Enostavno
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Spanish.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Español (Spanish)

OPTION_VALUE_EASY=Fácil
Expand Down
2 changes: 1 addition & 1 deletion game/languages/Swedish.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Text]
[Text]
LANGUAGE=Svenska (Swedish)

OPTION_VALUE_EASY=Lätt
Expand Down
3 changes: 0 additions & 3 deletions game/languages/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

transPattern = re.compile("\s*(\w+)\s*=(.+)$")


def update(lang):
print("\nUpdate " + lang)

Expand Down Expand Up @@ -130,8 +129,6 @@ def update(lang):
os.remove(oldLang)
os.rename(lang, oldLang)

with open(lang, 'wb') as f:
f.write(codecs.BOM_UTF8)
with open(lang, 'a', encoding='utf-8', newline='\n') as f:
for line in outList:
f.write(line + "\n")
Expand Down

0 comments on commit 8b7370b

Please sign in to comment.