Commit b139e846 authored by Michael Herold's avatar Michael Herold
Browse files

Fixes generation of global l10n domain (#16).

parent 13f69bda
- Fixes missing generation of global gettext .mo-files.
This fixes missing l10n in top bar also.
- Fixes crash on missing 'Accept-Language' HTTP header.
# generate l10n
./gettextfmtall . ./locale edentata
......@@ -9,9 +9,10 @@ parser = argparse.ArgumentParser(
prog = "gettextfmtall"
parser.add_argument("dir", metavar="<dir>", type=str)
parser.add_argument("main_dir", metavar="<./locale>", type=str)
parser.add_argument("main_domain", metavar="<edentata.po>", type=str)
parser.add_argument("dir", metavar="<dir>", type=str, help="Search directory for .po files")
parser.add_argument("main_dir", metavar="<./locale>", type=str, help="Base directory for global translation")
parser.add_argument("main_domain", metavar="<edentata>", type=str, help="Global name of domain")
parser.add_argument("-v", "--verbose", action="store_true")
args = parser.parse_args()
......@@ -37,4 +38,7 @@ for root,x,files in os.walk(args.dir):
if path != mainpath:
ps = subprocess.Popen(['msgcat','--use-first',path,mainpath], stdout=subprocess.PIPE)
output = subprocess.check_output(["msgfmt", "-o", newpath, "-"], stdin=ps.stdout)
subprocess.check_output(["msgfmt", "-o", newpath, mainpath])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment