Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: 6c46595774
...
compare: 8574816b86
Checking mergeability… Don't worry, you can still create the pull request.
  • 15 commits
  • 13 files changed
  • 17 commit comments
  • 4 contributors
View
2  apps/messages/tasks.py
@@ -509,7 +509,7 @@ def approved_notification(task_pk, published=False):
template_name = template_html
email_res = send_templated_email(user, subject, template_name, context)
- Action.create_rejected_video_handler(task.subtitle_version, reviewer)
+ Action.create_approved_video_handler(task.subtitle_version, reviewer)
return msg, email_res
@task
View
302 apps/teams/migrations/0094_add_index_on_tasks_for_team_and_complete.py
@@ -0,0 +1,302 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ db.create_index('teams_task', ['team_id', 'completed'])
+
+
+ def backwards(self, orm):
+ db.delete_index('teams_task', ['team_id', 'completed'])
+
+
+ models = {
+ 'accountlinker.thirdpartyaccount': {
+ 'Meta': {'unique_together': "(('type', 'username'),)", 'object_name': 'ThirdPartyAccount'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'oauth_access_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
+ 'oauth_refresh_token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
+ 'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
+ 'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
+ },
+ 'auth.customuser': {
+ 'Meta': {'object_name': 'CustomUser', '_ormbases': ['auth.User']},
+ 'autoplay_preferences': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'award_points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'full_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '63', 'blank': 'True'}),
+ 'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'last_ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ 'notify_by_email': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'notify_by_message': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'partner': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '32', 'null': 'True', 'blank': 'True'}),
+ 'picture': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'blank': 'True'}),
+ 'preferred_language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
+ 'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
+ 'valid_email': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'teams.application': {
+ 'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'Application'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'applications'", 'to': "orm['teams.Team']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_applications'", 'to': "orm['auth.CustomUser']"})
+ },
+ 'teams.invite': {
+ 'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'Invite'},
+ 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'note': ('django.db.models.fields.TextField', [], {'max_length': '200', 'blank': 'True'}),
+ 'role': ('django.db.models.fields.CharField', [], {'default': "'contributor'", 'max_length': '16'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitations'", 'to': "orm['teams.Team']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_invitations'", 'to': "orm['auth.CustomUser']"})
+ },
+ 'teams.membershipnarrowing': {
+ 'Meta': {'object_name': 'MembershipNarrowing'},
+ 'added_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'narrowing_includer'", 'null': 'True', 'to': "orm['teams.TeamMember']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language': ('django.db.models.fields.CharField', [], {'max_length': '24', 'blank': 'True'}),
+ 'member': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'narrowings'", 'to': "orm['teams.TeamMember']"}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Project']", 'null': 'True', 'blank': 'True'})
+ },
+ 'teams.project': {
+ 'Meta': {'unique_together': "(('team', 'name'), ('team', 'slug'))", 'object_name': 'Project'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
+ 'guidelines': ('django.db.models.fields.TextField', [], {'max_length': '2048', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'blank': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
+ 'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
+ },
+ 'teams.setting': {
+ 'Meta': {'unique_together': "(('key', 'team'),)", 'object_name': 'Setting'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'key': ('django.db.models.fields.PositiveIntegerField', [], {}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'settings'", 'to': "orm['teams.Team']"})
+ },
+ 'teams.task': {
+ 'Meta': {'object_name': 'Task'},
+ 'approved': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'assignee': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
+ 'body': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
+ 'completed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'public': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'review_base_version': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'tasks_based_on'", 'null': 'True', 'to': "orm['videos.SubtitleVersion']"}),
+ 'subtitle_version': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleVersion']", 'null': 'True', 'blank': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
+ 'team_video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.TeamVideo']"}),
+ 'type': ('django.db.models.fields.PositiveIntegerField', [], {})
+ },
+ 'teams.team': {
+ 'Meta': {'object_name': 'Team'},
+ 'applicants': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'applicated_teams'", 'symmetrical': 'False', 'through': "orm['teams.Application']", 'to': "orm['auth.CustomUser']"}),
+ 'application_text': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'auth_provider_code': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '24', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'header_html_text': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
+ 'highlight': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'last_notification_time': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'logo': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'autocrop': True}", 'max_length': '100', 'blank': 'True'}),
+ 'max_tasks_per_member': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
+ 'membership_policy': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '250'}),
+ 'page_content': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'points': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'projects_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
+ 'subtitle_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'task_assign_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'task_expiration': ('django.db.models.fields.PositiveIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
+ 'third_party_accounts': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'tseams'", 'symmetrical': 'False', 'to': "orm['accountlinker.ThirdPartyAccount']"}),
+ 'translate_policy': ('django.db.models.fields.IntegerField', [], {'default': '10'}),
+ 'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'teams'", 'symmetrical': 'False', 'through': "orm['teams.TeamMember']", 'to': "orm['auth.CustomUser']"}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'intro_for_teams'", 'null': 'True', 'to': "orm['videos.Video']"}),
+ 'video_policy': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'videos': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.Video']", 'through': "orm['teams.TeamVideo']", 'symmetrical': 'False'}),
+ 'workflow_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
+ },
+ 'teams.teamlanguagepreference': {
+ 'Meta': {'unique_together': "(('team', 'language_code'),)", 'object_name': 'TeamLanguagePreference'},
+ 'allow_reads': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'allow_writes': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language_code': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
+ 'preferred': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'lang_preferences'", 'to': "orm['teams.Team']"})
+ },
+ 'teams.teammember': {
+ 'Meta': {'unique_together': "(('team', 'user'),)", 'object_name': 'TeamMember'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'role': ('django.db.models.fields.CharField', [], {'default': "'contributor'", 'max_length': '16', 'db_index': 'True'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['teams.Team']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'team_members'", 'to': "orm['auth.CustomUser']"})
+ },
+ 'teams.teamnotificationsetting': {
+ 'Meta': {'object_name': 'TeamNotificationSetting'},
+ 'basic_auth_password': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'basic_auth_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'notification_class': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
+ 'request_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'team': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'notification_settings'", 'unique': 'True', 'to': "orm['teams.Team']"})
+ },
+ 'teams.teamvideo': {
+ 'Meta': {'unique_together': "(('team', 'video'),)", 'object_name': 'TeamVideo'},
+ 'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
+ 'all_languages': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'completed_languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['videos.SubtitleLanguage']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Project']"}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
+ 'thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'max_length': '100', 'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'null': 'True', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'video': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['videos.Video']", 'unique': 'True'})
+ },
+ 'teams.workflow': {
+ 'Meta': {'unique_together': "(('team', 'project', 'team_video'),)", 'object_name': 'Workflow'},
+ 'approve_allowed': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'autocreate_subtitle': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'autocreate_translate': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Project']", 'null': 'True', 'blank': 'True'}),
+ 'review_allowed': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
+ 'team': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.Team']"}),
+ 'team_video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['teams.TeamVideo']", 'null': 'True', 'blank': 'True'})
+ },
+ 'videos.subtitlelanguage': {
+ 'Meta': {'unique_together': "(('video', 'language', 'standard_language'),)", 'object_name': 'SubtitleLanguage'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_languages'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'had_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'has_version': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_forked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'is_original': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'language': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
+ 'percent_done': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'standard_language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleLanguage']", 'null': 'True', 'blank': 'True'}),
+ 'subtitle_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'video': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.Video']"}),
+ 'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
+ 'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
+ },
+ 'videos.subtitleversion': {
+ 'Meta': {'unique_together': "(('language', 'version_no'),)", 'object_name': 'SubtitleVersion'},
+ 'datetime_started': ('django.db.models.fields.DateTimeField', [], {}),
+ 'forked_from': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleVersion']", 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_forked': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['videos.SubtitleLanguage']"}),
+ 'moderation_status': ('django.db.models.fields.CharField', [], {'default': "'not__under_moderation'", 'max_length': '32', 'db_index': 'True'}),
+ 'note': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
+ 'notification_sent': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'result_of_rollback': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'text_change': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
+ 'time_change': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']"}),
+ 'version_no': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
+ },
+ 'videos.video': {
+ 'Meta': {'object_name': 'Video'},
+ 'allow_community_edits': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'allow_video_urls_edit': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'complete_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'duration': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'edited': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
+ 'featured': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'followers': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'followed_videos'", 'blank': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
+ 'is_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
+ 'languages_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'moderated_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'moderating'", 'null': 'True', 'to': "orm['teams.Team']"}),
+ 's3_thumbnail': ('utils.amazon.fields.S3EnabledImageField', [], {'thumb_options': "{'upscale': True, 'crop': 'smart'}", 'max_length': '100', 'thumb_sizes': '((290, 165), (120, 90))', 'blank': 'True'}),
+ 'small_thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
+ 'subtitles_fetched_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'thumbnail': ('django.db.models.fields.CharField', [], {'max_length': '500', 'blank': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '2048', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.CustomUser']", 'null': 'True', 'blank': 'True'}),
+ 'video_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
+ 'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'was_subtitled': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
+ 'widget_views_count': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
+ 'writelock_owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'writelock_owners'", 'null': 'True', 'to': "orm['auth.CustomUser']"}),
+ 'writelock_session_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'writelock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
+ }
+ }
+
+ complete_apps = ['teams']
View
2  apps/teams/tasks.py
@@ -57,7 +57,7 @@ def expire_tasks():
task.save()
-@periodic_task(run_every=crontab(minute=0, hour=12))
+@periodic_task(run_every=crontab(minute=0, hour=23))
def add_videos_notification(*args, **kwargs):
from teams.models import TeamVideo, Team
domain = Site.objects.get_current().domain
View
5 apps/teams/views.py
@@ -1094,7 +1094,10 @@ def _tasks_list(request, team, project, filters, user):
tasks = tasks.filter(completed=None)
if filters.get('language'):
- tasks = tasks.filter(language=filters['language'])
+ if filters.get('language') == 'mine':
+ tasks = tasks.filter(language__in=[ul.language for ul in request.user.get_languages()])
+ else:
+ tasks = tasks.filter(language=filters['language'])
if filters.get('q'):
terms = get_terms(filters['q'])
View
5 media/js/widget/howtovideopanel.js
@@ -46,9 +46,12 @@ goog.inherits(unisubs.HowToVideoPanel, goog.ui.Component);
unisubs.HowToVideoPanel.CONTINUE = 'continue';
unisubs.HowToVideoPanel.VideoChoice = {
+ // If storing OGV files on S3, make sure you upload the videos with the correct headers:
+ // http://supergeekery.com/geekblog/comments/why_isnt_ogg_video_playing_in_firefox_from_amazon_s3
+ // Content-Type: video/ogg
TRANSCRIBE: {
videos: {
- ogg: 'https://s3.www.universalsubtitles.org.s3.amazonaws.com/howto/step-1.ogv',
+ ogg: 'http://s3.www.universalsubtitles.org.s3.amazonaws.com/howto/step-1.ogv',
h264: 'http://s3.www.universalsubtitles.org.s3.amazonaws.com/howto/step-1.mp4',
yt: '0MCpmace_lc'
},
View
2  optional/unisubs-integration
@@ -1 +1 @@
-41625ec20423aab87c85627591235bb6dc149d71
+e8f64182b43e862ecbb06c44cee9e30ed2940c28
View
10 templates/demo.html
@@ -43,15 +43,7 @@ <h2 class="centered">{% trans 'Amara Editor Demo' %}</h2>
</script>
<p style="clear: both">
{% blocktrans %}
- <strong>Got feedback?</strong> Use the form at the bottom of
- this page to give us your feedback, bugs, and opinions.
- {% endblocktrans %}
- </p>
- <p>
- {% blocktrans %}
- <strong>What's next?</strong> We’re working on an alpha
- version of our community website that will enable basic
- collaboration on subtitles and translations. Stay tuned!
+ <strong>Feedback is welcome.</strong> Choose "Help" from the main menu to report bugs or to leave comments for the team.
{% endblocktrans %}
</p>
</div>
View
4 templates/enterprise.html
@@ -105,7 +105,7 @@ <h2 id="benefits">{% trans "Amara Does What No Other Platform Can" %}</h2>
<h3>{% trans "Work with Any Video Platform" %}</h3>
<p>
{% blocktrans %}
- Universal Subtitles works with all the most popular video hosting services and video players. Integrate and embed videos with subtitles without changing your current publishing workflow.
+ Amara works with all the most popular video hosting services and video players. Integrate and embed videos with subtitles without changing your current publishing workflow.
{% endblocktrans %}
</p>
</div>
@@ -146,7 +146,7 @@ <h2 id="benefits">{% trans "Amara Does What No Other Platform Can" %}</h2>
</li>
{% endif %}
<li>
- <a href="http://blog.universalsubtitles.org/translating-state-of-the-union-2011/"><img src="{{ STATIC_URL }}images/partners/new_partner_pbs.png" alt="PBS" /></a>
+ <a href="http://www.universalsubtitles.org/en/teams/newshour"><img src="{{ STATIC_URL }}images/partners/new_partner_pbs.png" alt="PBS" /></a>
<p><a href="http://www.universalsubtitles.org/en/teams/newshour">PBS NewsHour</a><p>
</li>
<li>
View
2  templates/index.html
@@ -67,7 +67,7 @@
style: "width:460px;height:348px;",
play_to_click: true
},
- video_url: "http://www.youtube.com/watch?v=Y2IJb1YnAmQ",
+ video_url: "http://vimeo.com/39734142",
alternate_video_urls: []});
</script>
{% endblock %}
View
10 templates/teams/_context_project.html
@@ -52,11 +52,15 @@ <h2 class="main-title">
</li>
{% with user.get_languages as langs %}
{% if langs %}
- {% for l in langs %}
<li>
- <a href="{% url teams:team_tasks team.slug %}?lang={{ l.language }}">{% trans 'Tasks for' %} {{ l.get_language_display }}</a>
+ <a href="{% url teams:project_tasks slug=team.slug, project_slug=project.slug %}?lang=mine">{% trans 'Tasks in my languages' %}</a>
+ </li>
+ {% else %}
+ <li class="set-languages">
+ {% blocktrans %}
+ See tasks in <a href="#" data-modal="language_modal">your languages</a>
+ {% endblocktrans %}
</li>
- {% endfor %}
{% endif %}
{% endwith %}
<li>
View
4 templates/teams/_context_team.html
@@ -85,11 +85,9 @@ <h2 class="main-title">
</li>
{% with user.get_languages as langs %}
{% if langs %}
- {% for l in langs %}
<li>
- <a href="{% url teams:team_tasks team.slug %}?lang={{ l.language }}">{% trans 'Tasks for' %} {{ l.get_language_display }}</a>
+ <a href="{% url teams:team_tasks team.slug %}?lang=mine">{% trans 'Tasks in my languages' %}</a>
</li>
- {% endfor %}
{% else %}
<li class="set-languages">
{% blocktrans %}
View
1  templates/teams/tasks.html
@@ -69,6 +69,7 @@
<span class="inner">{% trans 'tasks for' %}</span>
<select id="id_task_language" name="language" class="lang-filter chosen">
<option id="lang-opt-any" value="{{ request.path }}{% query_string request.GET lang="" page='' %}">{% trans 'all languages' %}</option>
+ <option id="lang-opt-mine" value="{{ request.path }}{% query_string request.GET lang="mine" page='' %}">{% trans 'my languages' %}</option>
{% for language in languages %}
<option id="lang-opt-{{ language.code }}" value="{% query_string request.GET lang=language.code page='' %}"
{% if request.GET.lang == language.code %}
View
2  templates/videos/subtitle-view.html
@@ -144,7 +144,7 @@ <h2 class="main-title">
</ul>
<div class="tab" id="transcripts-tab">
<div class="tools">
- {% if request.user|can_unpublish:video %}
+ {% if request.user|can_unpublish:video and last_version.is_public %}
<a href="#unpublish-modal" class="button open-modal">{% trans 'Unpublish' %}</a>
{% endif %}
{% if language.is_original and request.user|can_create_subtitles_for:video or not language.is_original and request.user|can_create_translations_for:video %}

Showing you all comments on commits in this comparison.

@sjl

k

@sjl

Is this going to break if the user isn't logged in?

@sjl

k

@sjl

I think, technically, the HTML tag shouldn't be part of the blocktrans. But I think translators will know to leave it in English so it's probably not a huge deal.

@sjl

Makes sense.

@sjl

Hmm, okay.

@sjl

lol, okay

@sjl

Hmm, is this going to mess with our "all https" serving?

@sjl

k

@arthur-debert

This hostname's certificate is not valid, we'll need to use the other form (s3.amazonaws.com/buck-name/), we'll need to revisit full https soon

@sjl

Makes sense, we still need a way to view the older versions and their unpublish buttons though.

@sjl

k

@sjl

Does this mean that if the user doesn't have any languages set, a modal dialog will pop up when they click this choice?

@nicksergeant

Yes. Fixed in 5dac9d4

@cz

Oh, I see... So what's they way to handle that? Just do a trans inside each HTML element?

@sjl

Yep, otherwise the translators will actually be able to change that HTML tag, I think.

@cz

Noted.

Something went wrong with that request. Please try again.