Compare commits
No commits in common. "master" and "mtg-i18" have entirely different histories.
1638
locale/be.po
1638
locale/be.po
File diff suppressed because it is too large
Load Diff
1737
locale/cs.po
1737
locale/cs.po
File diff suppressed because it is too large
Load Diff
1638
locale/de.po
1638
locale/de.po
File diff suppressed because it is too large
Load Diff
|
@ -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)
|
1613
locale/el.po
1613
locale/el.po
File diff suppressed because it is too large
Load Diff
1637
locale/eo.po
1637
locale/eo.po
File diff suppressed because it is too large
Load Diff
1638
locale/es.po
1638
locale/es.po
File diff suppressed because it is too large
Load Diff
1637
locale/fr.po
1637
locale/fr.po
File diff suppressed because it is too large
Load Diff
1639
locale/hu.po
1639
locale/hu.po
File diff suppressed because it is too large
Load Diff
1637
locale/id.po
1637
locale/id.po
File diff suppressed because it is too large
Load Diff
1681
locale/it.po
1681
locale/it.po
File diff suppressed because it is too large
Load Diff
1637
locale/ja.po
1637
locale/ja.po
File diff suppressed because it is too large
Load Diff
1674
locale/jbo.po
1674
locale/jbo.po
File diff suppressed because it is too large
Load Diff
1637
locale/ms.po
1637
locale/ms.po
File diff suppressed because it is too large
Load Diff
1826
locale/nl.po
1826
locale/nl.po
File diff suppressed because it is too large
Load Diff
1718
locale/pl.po
1718
locale/pl.po
File diff suppressed because it is too large
Load Diff
1642
locale/pt.po
1642
locale/pt.po
File diff suppressed because it is too large
Load Diff
1642
locale/pt_BR.po
1642
locale/pt_BR.po
File diff suppressed because it is too large
Load Diff
1655
locale/ro.po
1655
locale/ro.po
File diff suppressed because it is too large
Load Diff
1638
locale/ru.po
1638
locale/ru.po
File diff suppressed because it is too large
Load Diff
1686
locale/sr.po
1686
locale/sr.po
File diff suppressed because it is too large
Load Diff
1614
locale/template.pot
1614
locale/template.pot
File diff suppressed because it is too large
Load Diff
1637
locale/tr.po
1637
locale/tr.po
File diff suppressed because it is too large
Load Diff
1682
locale/uk.po
1682
locale/uk.po
File diff suppressed because it is too large
Load Diff
1644
locale/zh_Hans.po
1644
locale/zh_Hans.po
File diff suppressed because it is too large
Load Diff
1613
locale/zh_Hant.po
1613
locale/zh_Hant.po
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Незвычайны ложак
|
||||
|
||||
Simple Bed=Просты ложак
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Zdobená postel
|
||||
|
||||
Simple Bed=Prostá postel
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Schönes Bett
|
||||
|
||||
Simple Bed=Schlichtes Bett
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=
|
||||
|
||||
Simple Bed=
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Luksa lito
|
||||
|
||||
Simple Bed=Simpla lito
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Cama sofisticada
|
||||
|
||||
Simple Bed=Cama sencilla
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Lit fantaisie
|
||||
|
||||
Simple Bed=Lit Simple
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Csinos ágy
|
||||
|
||||
Simple Bed=Egyszerű ágy
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Dipan Mewah
|
||||
|
||||
Simple Bed=Dipan Sederhana
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Letto elegante
|
||||
|
||||
Simple Bed=Letto semplice
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=お洒落なベッド
|
||||
|
||||
Simple Bed=簡素なベッド
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=se jadni ckana
|
||||
|
||||
Simple Bed=sampu ckana
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Katil Beragam
|
||||
|
||||
Simple Bed=Katil Biasa
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Mooi Bed
|
||||
|
||||
Simple Bed=Simpel bed
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Łóżko ozdobne
|
||||
|
||||
Simple Bed=Proste łóżko
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Cama com Cabeceira
|
||||
|
||||
Simple Bed=Cama Simples
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Cama com Cabeceira
|
||||
|
||||
Simple Bed=Cama Simples
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Pat Luxos
|
||||
|
||||
Simple Bed=Pat Simplu
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Необычная кровать
|
||||
|
||||
Simple Bed=Обычная кровать
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Китњаст кревет
|
||||
|
||||
Simple Bed=Једноставан кревет
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Süslü Yatak
|
||||
|
||||
Simple Bed=Basit Yatak
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=Чепурне Ліжко
|
||||
|
||||
Simple Bed=Просте Ліжко
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=豪华大床
|
||||
|
||||
Simple Bed=简单的床
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
# textdomain: beds
|
||||
|
||||
Fancy Bed=
|
||||
|
||||
Simple Bed=
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# textdomain: binoculars
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Човен
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Loďka
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Boot
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Boato
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Bote
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Bateau
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Csónak
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Kapal
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=zattera
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=ボート
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=bloti
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Bot
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Boot
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Łódka
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Bote de Madeira
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Bote de Madeira
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Barcă
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Лодка
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Брод
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Tekne
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=Човен
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=船
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: boats
|
||||
|
||||
Boat=
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: bones
|
||||
|
||||
Bones=Косці
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# textdomain: bones
|
||||
|
||||
Bones=Kosti
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue