1. Daniel Greenfeld
  2. transifex

Commits

Diego Búrigo Zacarão  committed 9f575f2

Making msgfmt checking optional

  • Participants
  • Parent commits f8835c8
  • Branches default

Comments (0)

Files changed (2)

File projects/views.py

View file
  • Ignore whitespace
 from django.contrib.auth.decorators import login_required
 from django.contrib.syndication.views import feed
 
+import settings
+
 from projects.models import Project, Component
 from projects.forms import ProjectForm, ComponentForm, UnitForm
 from transifex.log import logger
 
         try:
 
-            logger.debug("Checking %s with msgfmt -c for component %s" % 
-                         (filename, component.full_name))
-            for contents in request.FILES['submited_file'].chunks():
-                component.trans.msgfmt_check(contents)
+            if settings.MSGFMT_CHECK:
+                logger.debug("Checking %s with msgfmt -c for component %s" % 
+                            (filename, component.full_name))
+                for contents in request.FILES['submited_file'].chunks():
+                    component.trans.msgfmt_check(contents)
 
             logger.debug("Checking out for component %s" % component.full_name)
             component.prepare_repo()

File settings.py

View file
  • Ignore whitespace
 # msgmerge settings
 MSGMERGE_DIR = os.path.join(SCRATCH_DIR, 'msgmerge_files')
 
+# Enable msgfmt -c check for submission file
+MSGFMT_CHECK = True
+
 #####################
 # ADDITIONAL VCS OPTIONS