From 98ec943dc47d2cbb50fec1cc005eaf27cc7c81a4 Mon Sep 17 00:00:00 2001
From: str4d <str4d@mail.i2p>
Date: Tue, 16 May 2017 12:26:51 +0000
Subject: [PATCH] Add override for etc/translation.vars

---
 README.md             | 6 ++++++
 compile-messages.sh   | 1 +
 extract-messages.sh   | 1 +
 init-new-po.sh        | 1 +
 update-existing-po.sh | 1 +
 5 files changed, 10 insertions(+)

diff --git a/README.md b/README.md
index 7e8d22563..f844e8369 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,12 @@ If you want to mirror the I2P website, thanks! Here is a checklist:
   (look in `etc/update.vars` for the filename, your webserver should restart
   WSGI when the timestamp of this file changes).
 
+## Configuration
+
+Configuration files for the various scripts are in `etc/`. Environment variables
+in `etc/translation.vars` can be overridden by creating the file
+`etc/translation.vars.custom` and re-defining the environment variables there.
+
 ## Updating translations
 
 1. Pull new and updated translations from Transifex:
diff --git a/compile-messages.sh b/compile-messages.sh
index f3f2eb3a2..40192ae91 100755
--- a/compile-messages.sh
+++ b/compile-messages.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
 . ./etc/translation.vars
+[ -f ./etc/translation.vars.custom ] && . ./etc/translation.vars.custom
 
 export TZ=UTC
 
diff --git a/extract-messages.sh b/extract-messages.sh
index bdb277be3..8ed9b88f6 100755
--- a/extract-messages.sh
+++ b/extract-messages.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
 . ./etc/translation.vars
+[ -f ./etc/translation.vars.custom ] && . ./etc/translation.vars.custom
 
 export TZ=UTC
 
diff --git a/init-new-po.sh b/init-new-po.sh
index e8395ac23..43c6c0a14 100755
--- a/init-new-po.sh
+++ b/init-new-po.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
 . ./etc/translation.vars
+[ -f ./etc/translation.vars.custom ] && . ./etc/translation.vars.custom
 
 export TZ=UTC
 
diff --git a/update-existing-po.sh b/update-existing-po.sh
index decca88de..49584c185 100755
--- a/update-existing-po.sh
+++ b/update-existing-po.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
 . ./etc/translation.vars
+[ -f ./etc/translation.vars.custom ] && . ./etc/translation.vars.custom
 export TZ=UTC
 
 if [ $# -ge 1 ]
-- 
GitLab