Browse Source

[oozie] Translate setup app popups

Popups were not being translated because management commands
reset language to english.
abec 13 years ago
parent
commit
8260d261ea
1 changed files with 2 additions and 1 deletions
  1. 2 1
      apps/oozie/src/oozie/views/editor.py

+ 2 - 1
apps/oozie/src/oozie/views/editor.py

@@ -28,7 +28,7 @@ from django.forms.models import inlineformset_factory
 from django.http import HttpResponse
 from django.shortcuts import redirect
 from django.utils.functional import curry
-from django.utils.translation import ugettext as _
+from django.utils.translation import ugettext as _, activate as activate_translation
 
 from desktop.lib.django_util import render, extract_field_data
 from desktop.lib.exceptions_renderable import PopupException
@@ -529,6 +529,7 @@ def setup_app(request):
     raise PopupException(_('A POST request is required.'))
   try:
     oozie_setup.Command().handle_noargs()
+    activate_translation(request.LANGUAGE_CODE)
     request.info(_('Workspaces and examples installed.'))
   except WebHdfsException, e:
     raise PopupException(_('The app setup could complete.'), detail=e)