forked from VoxeLibre/VoxeLibre
Remove more spellcheck stuff
This commit is contained in:
parent
559270c9a3
commit
be213aa4b9
|
@ -1,65 +0,0 @@
|
|||
# Output indicator
|
||||
# !< Indicates a text line without '=' in template.txt
|
||||
# << Indicates an untranslated line in template.txt or an extra line in translate file (.tr)
|
||||
# !> Indicates a text line without '=' in translate file (.tr)
|
||||
# >> Indicates an unknown translated line in translate file (.tr)
|
||||
# >= Indicate an untrannslated entry in translate file (.tr)
|
||||
# >> Missing file: Indicates a missing translate file (.tr)
|
||||
|
||||
import os
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(description='Check translation file with template.txt for a given language.')
|
||||
parser.add_argument("language", help='language code')
|
||||
args = parser.parse_args()
|
||||
|
||||
path = "../mods/"
|
||||
code_lang = args.language
|
||||
|
||||
def LoadTranslateFile(filename, direction, ref=None):
|
||||
result = set()
|
||||
file = open(filename, 'r', encoding="utf-8")
|
||||
for line in file:
|
||||
line = line.strip()
|
||||
if line.startswith('#') or line == '':
|
||||
continue
|
||||
if '=' in line:
|
||||
parts = line.split('=')
|
||||
result.add(parts[0])
|
||||
if ref is not None and parts[1] == '' and parts[1] not in ref :
|
||||
print ('>= ' + parts[0])
|
||||
else:
|
||||
print (direction + line)
|
||||
|
||||
return result
|
||||
|
||||
def CompareFiles(f1, f2):
|
||||
r1 = LoadTranslateFile(f1, "!< ")
|
||||
r2 = LoadTranslateFile(f2, "!> ", r1)
|
||||
|
||||
for key in r1.difference(r2):
|
||||
print (">> " + key )
|
||||
for key in r2.difference(r1):
|
||||
print ("<< " + key )
|
||||
|
||||
for root, directories, files in os.walk(path):
|
||||
if root.endswith('locale'):
|
||||
template = None
|
||||
language = None
|
||||
|
||||
for name in files:
|
||||
if name == 'template.txt':
|
||||
template = os.path.join(root, name)
|
||||
if name.endswith("." + code_lang + ".tr"):
|
||||
language = os.path.join(root, name)
|
||||
|
||||
if template is not None:
|
||||
if language is None:
|
||||
language = os.path.join(root, os.path.basename(os.path.dirname(root))) + "." + code_lang + ".tr"
|
||||
|
||||
if os.path.exists(language) and os.path.isfile(language):
|
||||
print("Compare files %s with %s" % (template, language))
|
||||
CompareFiles(template, language)
|
||||
else:
|
||||
LoadTranslateFile(template, "!< ")
|
||||
print(">> Missing file = " + language)
|
|
@ -1,176 +0,0 @@
|
|||
1s
|
||||
1f
|
||||
Badlandach
|
||||
biomeinfo
|
||||
creeper
|
||||
Creeper
|
||||
creepera
|
||||
czerwienit
|
||||
czerwienitem
|
||||
czerwienitowych
|
||||
czerwienitu
|
||||
czerwienitowa
|
||||
czerwienitowe
|
||||
czerwienitowej
|
||||
czerwienitowego
|
||||
czerwienitową
|
||||
czerwienitowy
|
||||
czerwienitowym
|
||||
czerwienitowymi
|
||||
enchant
|
||||
Enderman
|
||||
Endermit
|
||||
endermitom
|
||||
forceenchant
|
||||
Ghast
|
||||
ghasta
|
||||
Ghasta
|
||||
kresomysz
|
||||
kresomyszę
|
||||
przywoływacza
|
||||
endermana
|
||||
pigmana
|
||||
szlama
|
||||
enable
|
||||
disable
|
||||
awards
|
||||
Dozuj
|
||||
wskazywalne
|
||||
zderzalne
|
||||
Zderzalne
|
||||
zderzalnego
|
||||
Minetest
|
||||
doc_basics
|
||||
doc_identifier
|
||||
help_reveal
|
||||
doc_items
|
||||
doc_encyclopedia
|
||||
F1
|
||||
shout
|
||||
Minetesta
|
||||
voxelach
|
||||
InfiniMinera
|
||||
F10
|
||||
F9
|
||||
celeron55
|
||||
F2
|
||||
Ahola
|
||||
debug
|
||||
Perttu
|
||||
F8
|
||||
F3
|
||||
F7
|
||||
F5
|
||||
F12
|
||||
noclip
|
||||
F6
|
||||
https
|
||||
viewforum
|
||||
php
|
||||
minetest
|
||||
Houstonia
|
||||
houstonią
|
||||
wskazywalna
|
||||
MineClone
|
||||
voxeli
|
||||
niewskazywalne
|
||||
wskazywalnych
|
||||
github
|
||||
Wuzzy2
|
||||
MineClone2
|
||||
Minetestem
|
||||
freenode
|
||||
irc
|
||||
Bugs
|
||||
viewtopic
|
||||
forums
|
||||
iskrzyłuda
|
||||
Spawnowanie
|
||||
Griefowanie
|
||||
PvP
|
||||
enable_pvp
|
||||
creative_mode
|
||||
msg
|
||||
enable_damage
|
||||
boats
|
||||
privs
|
||||
give
|
||||
tekst3
|
||||
tekst1
|
||||
tekst2
|
||||
słowo1
|
||||
słowo2
|
||||
słowo3
|
||||
slesz
|
||||
slesza
|
||||
mcl_core
|
||||
giveme
|
||||
spawnentity
|
||||
spawnowaniem
|
||||
grantme
|
||||
interact
|
||||
spawnuje
|
||||
revoke
|
||||
spawnują
|
||||
jasnogłazu
|
||||
Netherowego
|
||||
Netherowych
|
||||
Netherowy
|
||||
jasnogłazy
|
||||
Iskrzyłuda
|
||||
iskrzyłudzie
|
||||
jasnogłazie
|
||||
Jasnogłaz
|
||||
Kolcze
|
||||
Kolczy
|
||||
Łuczarz
|
||||
maphack
|
||||
międzywymiarowego
|
||||
międzywymiarowych
|
||||
moba
|
||||
Muuuchomor
|
||||
Nether
|
||||
netherowej
|
||||
Netherowa
|
||||
Netherowe
|
||||
Netheru
|
||||
Netherze
|
||||
półbloku
|
||||
Prastrażnik
|
||||
pryzmaryn
|
||||
pryzmarynowe
|
||||
pryzmarynowa
|
||||
Pryzmaryn
|
||||
Pryzmarynowa
|
||||
Pryzmarynowe
|
||||
Przywoływacz
|
||||
setblock
|
||||
Shulker
|
||||
shulkera
|
||||
shulkerów
|
||||
shulkerowa
|
||||
Shulkerowa
|
||||
shulkerową
|
||||
Shulkerowe
|
||||
shulkerowej
|
||||
shulkerowych
|
||||
shulkerowymi
|
||||
spawner
|
||||
spawnowania
|
||||
spawnery
|
||||
spawnerze
|
||||
spawnstruct
|
||||
szkieleta
|
||||
v6
|
||||
Wielostrzał
|
||||
Wither
|
||||
witherowego
|
||||
withera
|
||||
Witherowy
|
||||
zakłuta
|
||||
refrenusu
|
||||
refrenusowych
|
||||
thunder
|
||||
clear
|
||||
snow
|
||||
rain
|
Loading…
Reference in New Issue