Compare commits

..

No commits in common. "master" and "mtg-i18" have entirely different histories.

746 changed files with 0 additions and 56959 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,63 +0,0 @@
# Transforms the generic po file produced by weblate into a series of
# locale/[modname].ja.tr files.
# TODO: make it work for all languages!
import os
import re
from collections import defaultdict
strings=dict()
modstr=defaultdict(list)
for modname in os.listdir("../mods/"):
for fn in os.listdir("../mods/"+modname):
if fn.endswith(".lua"):
s=open("../mods/"+modname+"/"+fn).read()
for gtstring in re.findall("S\(.*\)", s):
k=gtstring[3:-2]
strings[k]=modname
modstr[modname].append(k)
"""
for m in modstr.keys():
print(m)
for v in modstr[m]:
print("\t"+v)
"""
locales = list()
for fn in os.listdir("."):
if fn .endswith(".po"):
locales.append(fn[:-3])
print(locales)
notused=set()
for loc in locales:
matches = 0
nom = 0
msgid = None
translation = dict()
for line in open(loc+".po"):
match = re.match('[^#]*msgstr[ \t]+"(.*)"', line)
if match and msgid is not None:
translation[msgid]=match.group(1)
match = re.match('[^#]*msgid[ \t]+"(.*)"', line)
if match:
msgid = match.group(1)
if msgid in strings:
matches+=1
else:
nom+=1
notused.add(msgid)
else:
msgid=None
print("{}: {}/{}".format(loc, matches, matches+nom))
for modname in os.listdir("../mods/"):
os.makedirs("../mods/{0}/locale".format(modname), exist_ok=True)
localefile = open("../mods/{0}/locale/{0}.{1}.tr".format(modname, loc), "w")
localefile.write("# textdomain: "+modname+"\n\n")
for k in modstr[modname]:
if k in translation:
localefile.write("{}={}\n\n".format(k,translation[k]))
localefile.close()
print(notused)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Незвычайны ложак
Simple Bed=Просты ложак

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Zdobená postel
Simple Bed=Prostá postel

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Schönes Bett
Simple Bed=Schlichtes Bett

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=
Simple Bed=

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Luksa lito
Simple Bed=Simpla lito

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Cama sofisticada
Simple Bed=Cama sencilla

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Lit fantaisie
Simple Bed=Lit Simple

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Csinos ágy
Simple Bed=Egyszerű ágy

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Dipan Mewah
Simple Bed=Dipan Sederhana

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Letto elegante
Simple Bed=Letto semplice

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=お洒落なベッド
Simple Bed=簡素なベッド

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=se jadni ckana
Simple Bed=sampu ckana

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Katil Beragam
Simple Bed=Katil Biasa

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Mooi Bed
Simple Bed=Simpel bed

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Łóżko ozdobne
Simple Bed=Proste łóżko

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Cama com Cabeceira
Simple Bed=Cama Simples

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Cama com Cabeceira
Simple Bed=Cama Simples

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Pat Luxos
Simple Bed=Pat Simplu

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Необычная кровать
Simple Bed=Обычная кровать

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Китњаст кревет
Simple Bed=Једноставан кревет

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Süslü Yatak
Simple Bed=Basit Yatak

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Чепурне Ліжко
Simple Bed=Просте Ліжко

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=豪华大床
Simple Bed=简单的床

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=
Simple Bed=

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Човен

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Loďka

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Boot

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Boato

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Bote

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Bateau

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Csónak

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Kapal

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=zattera

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=ボート

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=bloti

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Bot

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Boot

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Łódka

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Bote de Madeira

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Bote de Madeira

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Barcă

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Лодка

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Брод

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Tekne

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Човен

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=船

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=

View File

@ -1,4 +0,0 @@
# textdomain: bones
Bones=Косці

View File

@ -1,4 +0,0 @@
# textdomain: bones
Bones=Kosti

Some files were not shown because too many files have changed in this diff Show More