Fix Czech characters in Sahana and SAMBRO PDF exports, closes #8
This commit is contained in:
parent
684f57de8c
commit
f3fd928977
12
02-sahana.sh
12
02-sahana.sh
@ -31,11 +31,19 @@ mkdir -p /srv/sahana/applications/eden/static/cache/chart
|
||||
mkdir -p /srv/sahana/applications/eden/uploads/{gis_cache,images,tracks}
|
||||
export SAHANA_HMAC=$(head -c 18 /dev/urandom | base64)
|
||||
envsubst <${SOURCE_DIR}/sahana/srv/sahana/applications/eden/models/000_config.py >/srv/sahana/applications/eden/models/000_config.py
|
||||
cp ${SOURCE_DIR}/sahana/srv/sahana/applications/eden/modules/templates/default/config.py /srv/sahana/applications/eden/modules/templates/default/config.py
|
||||
|
||||
# Copy Czech language file
|
||||
cp ${SOURCE_DIR}/sahana/srv/sahana/applications/eden/languages/cs.py /srv/sahana/applications/eden/languages/cs.py
|
||||
|
||||
# Symlink fonts with Czech glyphs
|
||||
ln -s /usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf /srv/sahana/applications/eden/static/fonts/DejaVuSerif-Bold.ttf
|
||||
ln -s /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf /srv/sahana/applications/eden/static/fonts/DejaVuSerif.ttf
|
||||
|
||||
# Prepare template
|
||||
export SAHANA_ADMIN_USER=admin@example.com
|
||||
export SAHANA_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
|
||||
cp ${SOURCE_DIR}/sahana/srv/sahana/applications/eden/modules/templates/default/config.py /srv/sahana/applications/eden/modules/templates/default/config.py
|
||||
envsubst <${SOURCE_DIR}/sahana/srv/sahana/applications/eden/modules/templates/default/users/masterUsers.csv >/srv/sahana/applications/eden/modules/templates/default/users/masterUsers.csv
|
||||
cp ${SOURCE_DIR}/sahana/srv/sahana/applications/eden/languages/cs.py /srv/sahana/applications/eden/languages/cs.py
|
||||
|
||||
# Create OS user
|
||||
adduser --system --group --home /srv/sahana --shell /bin/false sahana
|
||||
|
12
03-sambro.sh
12
03-sambro.sh
@ -31,11 +31,19 @@ mkdir -p /srv/sambro/applications/eden/static/cache/chart
|
||||
mkdir -p /srv/sambro/applications/eden/uploads/{gis_cache,images,tracks}
|
||||
export SAMBRO_HMAC=$(head -c 18 /dev/urandom | base64)
|
||||
envsubst <${SOURCE_DIR}/sambro/srv/sambro/applications/eden/models/000_config.py >/srv/sambro/applications/eden/models/000_config.py
|
||||
cp ${SOURCE_DIR}/sambro/srv/sambro/applications/eden/modules/templates/SAMBRO/config.py /srv/sambro/applications/eden/modules/templates/SAMBRO/config.py
|
||||
|
||||
# Copy Czech language file
|
||||
cp ${SOURCE_DIR}/sambro/srv/sambro/applications/eden/languages/cs.py /srv/sambro/applications/eden/languages/cs.py
|
||||
|
||||
# Symlink fonts with Czech glyphs
|
||||
ln -s /usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf /srv/sambro/applications/eden/static/fonts/DejaVuSerif-Bold.ttf
|
||||
ln -s /usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf /srv/sambro/applications/eden/static/fonts/DejaVuSerif.ttf
|
||||
|
||||
# Prepare template
|
||||
export SAMBRO_ADMIN_USER=admin@example.com
|
||||
export SAMBRO_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
|
||||
cp ${SOURCE_DIR}/sambro/srv/sambro/applications/eden/modules/templates/SAMBRO/config.py /srv/sambro/applications/eden/modules/templates/SAMBRO/config.py
|
||||
envsubst <${SOURCE_DIR}/sambro/srv/sambro/applications/eden/modules/templates/default/users/masterUsers.csv >/srv/sambro/applications/eden/modules/templates/default/users/masterUsers.csv
|
||||
cp ${SOURCE_DIR}/sambro/srv/sambro/applications/eden/languages/cs.py /srv/sambro/applications/eden/languages/cs.py
|
||||
|
||||
# Create OS user
|
||||
adduser --system --group --home /srv/sambro --shell /bin/false sambro
|
||||
|
@ -171,6 +171,8 @@ def config(settings):
|
||||
#settings.L10n.translate_org_organisation = True
|
||||
# Uncomment this to Translate Site Names
|
||||
#settings.L10n.translate_org_site = True
|
||||
# PDF font
|
||||
settings.L10n.pdf_export_font = ['DejaVuSerif', 'DejaVuSerif-Bold']
|
||||
|
||||
# Finance settings
|
||||
settings.fin.currencies = {
|
||||
|
@ -127,6 +127,9 @@ def config(settings):
|
||||
# Time Format
|
||||
settings.L10n.time_format = "%H:%M:%S"
|
||||
|
||||
# PDF font
|
||||
settings.L10n.pdf_export_font = ['DejaVuSerif', 'DejaVuSerif-Bold']
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Messaging
|
||||
# Parser
|
||||
|
Loading…
Reference in New Issue
Block a user