forked from grnet/zeus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
66 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
#!/bin/bash | ||
|
||
export DJANGO_SETTINGS_MODULE=settings | ||
export PYTHONPATH=`pwd` | ||
|
||
for d in zeus helios heliosauth server_ui; do | ||
cd $d; | ||
DJANGO_SETTINGS_MODULE=settings; | ||
PYTHONPATH=..; | ||
django-admin compilemessages; | ||
cd ..; | ||
cd $d; | ||
django-admin compilemessages; | ||
cd ..; | ||
done; | ||
|
||
cd zeus/static/booth; | ||
django-admin compilemessages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
find . -name '*.po' | xargs ./detect-empty-translations.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env python | ||
|
||
import sys | ||
|
||
po_files = sys.argv[1:] | ||
if not po_files: | ||
print "Usage: %s <path/to/some.po> ..." % sys.argv[0] | ||
raise SystemExit | ||
|
||
for po_file in po_files: | ||
state = 0 | ||
msgid = None | ||
msgstr = None | ||
msgid_line = 0 | ||
fuzzy = False | ||
|
||
for line in open(po_file): | ||
msgid_line += 1 | ||
if line.startswith('#') and 'fuzzy' in line: | ||
fuzzy = True | ||
elif state == 0 and line.startswith('msgid'): | ||
if line != 'msgid ""\n': | ||
msgid = line | ||
if fuzzy: | ||
print "%s:%d: %s" % (po_file, msgid_line, msgid), | ||
msgid = None | ||
state = 0 | ||
else: | ||
state = 1 | ||
fuzzy = False | ||
elif state == 1: | ||
fuzzy = False | ||
if line == 'msgstr ""\n': | ||
state = 2 | ||
elif line.startswith('msgstr') or line == '\n': | ||
state = 0 | ||
msgid = None | ||
fuzzy = False | ||
elif state == 2: | ||
fuzzy = False | ||
if line == '\n': | ||
print "%s:%d: %s" % (po_file, msgid_line, msgid), | ||
state = 0 | ||
msgid = None | ||
fuzzy = False | ||
|
||
if (state == 0 and fuzzy) or (state == 2 and msgid is not None): | ||
# last-in-file empty translation | ||
print "%s:%d: %s" % (po_file, msgid_line, msgid), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
#!/bin/bash | ||
|
||
export PYTHONPATH=`pwd` | ||
export DJANGO_SETTINGS_MODULE=settings; | ||
for d in zeus helios heliosauth server_ui; do | ||
cd $d; | ||
DJANGO_SETTINGS_MODULE=settings; | ||
PYTHONPATH=..; | ||
django-admin makemessages -l el -e .html -e .txt; | ||
#django-admin makemessages -l en -e .html -e .txt; | ||
cd ..; | ||
cd $d; | ||
django-admin makemessages -l el -e .html -e .txt; | ||
#django-admin makemessages -l en -e .html -e .txt; | ||
cd ..; | ||
done; | ||
|
||
python manage.py makeboothmessages -l en -l el -e .html -e .js; | ||
cd zeus/static/booth; |