[DRE-commits] [redmine] 03/19: postinst: handle language

Antonio Terceiro terceiro at moszumanska.debian.org
Mon Feb 15 12:31:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository redmine.

commit 3a349f2468df09701ff296a9a6c6d6256ffae3cb
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Mon Feb 15 08:12:04 2016 -0200

    postinst: handle language
---
 debian/postinst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/postinst b/debian/postinst
index b3f7017..d0b19e7 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -60,8 +60,9 @@ manage_instance() {
   cd /usr/share/redmine
   su www-data -s /bin/sh -c "REDMINE_INSTANCE=$instance SCHEMA=/dev/null bundle exec rake db:migrate"
 
-  # FIXME don't harcode language
-  su www-data -s /bin/sh -c "REDMINE_INSTANCE=$instance REDMINE_LANG=en bundle exec rake redmine:load_default_data"
+  db_get redmine/instances/$instance/default-language || true
+  REDMINE_LANG="${RET:-en}"
+  su www-data -s /bin/sh -c "REDMINE_INSTANCE=$instance REDMINE_LANG=$REDMINE_LANG bundle exec rake redmine:load_default_data"
 }
 
 remove_instance() {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/redmine.git



More information about the Pkg-ruby-extras-commits mailing list