mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge branch 'master' of http://github.com/oy/teeworlds
Conflicts: data/languages/dutch.txt
This commit is contained in:
commit
3da1860654
|
@ -1,4 +1,3 @@
|
|||
|
||||
##### translated strings #####
|
||||
|
||||
%d of %d servers, %d players
|
||||
|
@ -10,6 +9,19 @@
|
|||
%ds left
|
||||
== %ds over
|
||||
|
||||
%i minute left
|
||||
== nog %i minuut
|
||||
|
||||
%i minutes left
|
||||
== nog %i minuten
|
||||
|
||||
%i second left
|
||||
== nog %i seconde
|
||||
|
||||
%i seconds left
|
||||
== nog %i seconden
|
||||
|
||||
|
||||
%s Right click for context menu.
|
||||
== %s Rechtermuisknop voor context menu.
|
||||
|
||||
|
@ -487,6 +499,9 @@ Name
|
|||
Name:
|
||||
== Naam:
|
||||
|
||||
Name plates size
|
||||
== Grootte naamplaat
|
||||
|
||||
New
|
||||
== Nieuw
|
||||
|
||||
|
@ -763,6 +778,9 @@ Skins
|
|||
Sound
|
||||
== Geluid
|
||||
|
||||
Sound error
|
||||
== Geluidsfout
|
||||
|
||||
Sound volume
|
||||
== Volume
|
||||
|
||||
|
@ -811,6 +829,9 @@ Teeworlds %s is out! Download it at www.teeworlds.com!
|
|||
Texture Compression
|
||||
== Structuurscompressie
|
||||
|
||||
The audio device couldn't be initialised.
|
||||
== Het geluid kon niet worden geladen.
|
||||
|
||||
The server is running a non-standard tuning on a pure game type.
|
||||
== The server draait geen standaard spel type.
|
||||
|
||||
|
@ -841,6 +862,9 @@ Type
|
|||
UI Color
|
||||
== UI kleur
|
||||
|
||||
Unable to delete the demo
|
||||
== Demo kon niet worden verwijderd
|
||||
|
||||
Up
|
||||
== Omhoog
|
||||
|
||||
|
@ -948,30 +972,6 @@ no limit
|
|||
|
||||
##### needs translation #####
|
||||
|
||||
%i minute left
|
||||
==
|
||||
|
||||
%i minutes left
|
||||
==
|
||||
|
||||
%i second left
|
||||
==
|
||||
|
||||
%i seconds left
|
||||
==
|
||||
|
||||
Name plates size
|
||||
==
|
||||
|
||||
Sound error
|
||||
==
|
||||
|
||||
The audio device couldn't be initialised.
|
||||
==
|
||||
|
||||
Unable to delete the demo
|
||||
==
|
||||
|
||||
##### old translations #####
|
||||
|
||||
##### DDRace #####
|
||||
|
|
|
@ -69,8 +69,8 @@ if gen_client_content_header or gen_server_content_header:
|
|||
order = []
|
||||
for line in contentlines:
|
||||
line = line.strip()
|
||||
if line[:6] == "class " and '(Struct)' in line:
|
||||
order += [line.split()[1].split("(")[0]]
|
||||
if line[:6] == "class ".encode() and "(Struct)".encode() in line:
|
||||
order += [line.split()[1].split("(".encode())[0].decode("ascii")]
|
||||
for name in order:
|
||||
EmitTypeDeclaration(content.__dict__[name])
|
||||
|
||||
|
|
|
@ -3,32 +3,32 @@ import hashlib, sys, re
|
|||
alphanum = "0123456789abcdefghijklmnopqrstuvwzyxABCDEFGHIJKLMNOPQRSTUVWXYZ_"
|
||||
|
||||
def cstrip(lines):
|
||||
d = ""
|
||||
d = "".encode()
|
||||
for l in lines:
|
||||
l = re.sub("#.*", "", l)
|
||||
l = re.sub("//.*", "", l)
|
||||
d += l + " "
|
||||
d = re.sub("\/\*.*?\*/", "", d) # remove /* */ comments
|
||||
d = d.replace("\t", " ") # tab to space
|
||||
d = re.sub(" *", " ", d) # remove double spaces
|
||||
d = re.sub("", "", d) # remove /* */ comments
|
||||
l = re.sub("#.*".encode(), "".encode(), l)
|
||||
l = re.sub("//.*".encode(), "".encode(), l)
|
||||
d += l + " ".encode()
|
||||
d = re.sub("\/\*.*?\*/".encode(), "".encode(), d) # remove /* */ comments
|
||||
d = d.replace("\t".encode(), " ".encode()) # tab to space
|
||||
d = re.sub(" *".encode(), " ".encode(), d) # remove double spaces
|
||||
d = re.sub("".encode(), "".encode(), d) # remove /* */ comments
|
||||
|
||||
d = d.strip()
|
||||
|
||||
# this eats up cases like 'n {'
|
||||
i = 1
|
||||
while i < len(d)-2:
|
||||
if d[i] == ' ':
|
||||
if not (d[i-1] in alphanum and d[i+1] in alphanum):
|
||||
if d[i:i + 1] == " ":
|
||||
if not (d[i-1:i] in alphanum and d[i+1:i + 2] in alphanum):
|
||||
d = d[:i] + d[i+1:]
|
||||
i += 1
|
||||
return d
|
||||
|
||||
f = ""
|
||||
f = "".encode()
|
||||
for filename in sys.argv[1:]:
|
||||
f += cstrip([l.strip() for l in open(filename, "rb")])
|
||||
|
||||
hash = hashlib.md5(f.encode()).hexdigest().lower()[16:]
|
||||
hash = hashlib.md5(f).hexdigest().lower()[16:]
|
||||
# TODO: refactor hash that is equal to the 0.5 hash, remove when we
|
||||
# TODO: remove when we don't need it any more
|
||||
if hash == "f16c2456fc487748":
|
||||
|
|
|
@ -8,8 +8,8 @@ source_exts = [".c", ".cpp", ".h"]
|
|||
def parse_source():
|
||||
stringtable = {}
|
||||
def process_line(line):
|
||||
if b'Localize("' in line:
|
||||
fields = line.split(b'Localize("', 1)[1].split(b'"', 1)
|
||||
if 'Localize("'.encode() in line:
|
||||
fields = line.split('Localize("'.encode(), 1)[1].split('"'.encode(), 1)
|
||||
stringtable[fields[0]] = ""
|
||||
process_line(fields[1])
|
||||
|
||||
|
@ -35,7 +35,7 @@ def load_languagefile(filename):
|
|||
|
||||
for i in range(0, len(lines)-1):
|
||||
l = lines[i].strip()
|
||||
if len(l) and not l[0:1] == b"=" and not l[0:1] == b"#":
|
||||
if len(l) and not l[0:1] == "=".encode() and not l[0:1] == "#".encode():
|
||||
stringtable[l] = lines[i+1][3:].rstrip()
|
||||
|
||||
return stringtable
|
||||
|
@ -52,23 +52,23 @@ def generate_languagefile(outputfilename, srctable, loctable):
|
|||
srctable_keys.append(key)
|
||||
srctable_keys.sort()
|
||||
|
||||
content = b"\n##### translated strings #####\n\n"
|
||||
content = "\n##### translated strings #####\n\n".encode()
|
||||
for k in srctable_keys:
|
||||
if k in loctable and len(loctable[k]):
|
||||
content += k + b"\n== " + loctable[k] + b"\n\n"
|
||||
content += k + "\n== ".encode() + loctable[k] + "\n\n".encode()
|
||||
num_items += 1
|
||||
|
||||
content += b"##### needs translation #####\n\n"
|
||||
content += "##### needs translation #####\n\n".encode()
|
||||
for k in srctable_keys:
|
||||
if not k in loctable or len(loctable[k]) == 0:
|
||||
content += k + b"\n== \n\n"
|
||||
content += k + "\n== \n\n".encode()
|
||||
num_items += 1
|
||||
new_items += 1
|
||||
|
||||
content += b"##### old translations #####\n\n"
|
||||
content += "##### old translations #####\n\n".encode()
|
||||
for k in loctable:
|
||||
if not k in srctable:
|
||||
content += k + b"\n== " + loctable[k] + b"\n\n"
|
||||
content += k + "\n== ".encode() + loctable[k] + "\n\n".encode()
|
||||
num_items += 1
|
||||
old_items += 1
|
||||
|
||||
|
|
|
@ -178,13 +178,13 @@ class CTextRender : public IEngineTextRender
|
|||
mem_free(pMem);
|
||||
}
|
||||
|
||||
int AdjustOutlineThicknessToFontSize(int OutlineThickness, int FontSize)
|
||||
{
|
||||
if(FontSize > 36)
|
||||
OutlineThickness *= 4;
|
||||
else if(FontSize >= 18)
|
||||
OutlineThickness *= 2;
|
||||
return OutlineThickness;
|
||||
int AdjustOutlineThicknessToFontSize(int OutlineThickness, int FontSize)
|
||||
{
|
||||
if(FontSize > 36)
|
||||
OutlineThickness *= 4;
|
||||
else if(FontSize >= 18)
|
||||
OutlineThickness *= 2;
|
||||
return OutlineThickness;
|
||||
}
|
||||
|
||||
void IncreaseTextureSize(CFontSizeData *pSizeData)
|
||||
|
|
|
@ -424,7 +424,7 @@ int CEditor::DoButton_MenuItem(const void *pID, const char *pText, int Checked,
|
|||
CUIRect t = *pRect;
|
||||
t.VMargin(5.0f, &t);
|
||||
UI()->DoLabel(&t, pText, 10, -1, -1);
|
||||
return DoButton_Editor_Common(pID, pText, Checked, pRect, 0, 0);
|
||||
return DoButton_Editor_Common(pID, pText, Checked, pRect, Flags, pToolTip);
|
||||
}
|
||||
|
||||
int CEditor::DoButton_Tab(const void *pID, const char *pText, int Checked, const CUIRect *pRect, int Flags, const char *pToolTip)
|
||||
|
@ -3435,4 +3435,4 @@ void CEditor::UpdateAndRender()
|
|||
Input()->ClearEvents();
|
||||
}
|
||||
|
||||
IEditor *CreateEditor() { return new CEditor; }
|
||||
IEditor *CreateEditor() { return new CEditor; }
|
||||
|
|
Loading…
Reference in a new issue