incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pe...@apache.org
Subject svn commit: r1417340 - /incubator/bloodhound/trunk/installer/bloodhound_setup.py
Date Wed, 05 Dec 2012 10:20:32 GMT
Author: peter
Date: Wed Dec  5 10:20:31 2012
New Revision: 1417340

URL: http://svn.apache.org/viewvc?rev=1417340&view=rev
Log:
#268 - Whitelabeling/detracify: Automatically detracify wiki documentation

Modified:
    incubator/bloodhound/trunk/installer/bloodhound_setup.py

Modified: incubator/bloodhound/trunk/installer/bloodhound_setup.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/installer/bloodhound_setup.py?rev=1417340&r1=1417339&r2=1417340&view=diff
==============================================================================
--- incubator/bloodhound/trunk/installer/bloodhound_setup.py (original)
+++ incubator/bloodhound/trunk/installer/bloodhound_setup.py Wed Dec  5 10:20:31 2012
@@ -31,6 +31,10 @@ import time
 
 from createdigest import htdigest_create
 
+from trac.util import translation
+from trac.util.translation import _, get_negotiated_locale, has_babel
+LANG = os.environ.get('LANG')
+
 try:
     from trac.admin.console import TracAdmin
     from trac.config import Configuration
@@ -146,6 +150,16 @@ class BloodhoundSetup(object):
     def setup(self, **kwargs):
         """Do the setup. A kwargs dictionary may be passed to override base
         options, potentially allowing for multiple environment creation."""
+        
+        if has_babel:
+            import babel
+            try:
+                locale = get_negotiated_locale([LANG]) 
+                locale = locale or babel.Locale.default()
+            except babel.UnknownLocaleError:
+                pass
+            translation.activate(locale)
+        
         options = dict(self.options)
         options.update(kwargs)
         if psycopg2 is None and options.get('dbtype') == 'postgres':
@@ -220,6 +234,9 @@ class BloodhoundSetup(object):
 
         print "Running wiki upgrades"
         bloodhound.onecmd('wiki upgrade')
+        
+        print "Running wiki bh upgrades"
+        bloodhound.onecmd('wiki bh-upgrade')
 
         print """
 You can now start Bloodhound by running:



Mime
View raw message