Commits

Andreas Loupasakis  committed 766df44

Fixed choicefield values in Resource model.

  • Participants
  • Parent commits 1bcbf97

Comments (0)

Files changed (2)

File transifex/resources/models.py

         help_text=_("A local file used to extract the strings to be "
                     "translated."))
     i18n_type = models.CharField(_('I18n type'), max_length=20,
-        choices=((v,k) for k,v in settings.I18N_METHODS.items()),
+        choices=((k,settings.I18N_METHODS[k]['description']) for k,v in settings.I18N_METHODS.items()),
         help_text=_("The type of i18n method used in this resource (%s)" %
                     ', '.join(settings.TRANS_CHOICES.keys())))
     #FIXME: Add accept_translations BoolField.

File transifex/txcommon/tests/base.py

 
         # Create a resources
         self.resource = Resource.objects.create(slug="resource1", name="Resource1",
-            project=self.project, source_language=self.language_en)
+            project=self.project, source_language=self.language_en,
+            i18n_type='PO')
         self.source_entity = SourceEntity.objects.create(string='String1',
             context='Context1', occurrences='Occurrences1', resource=self.resource)