Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark all strings in models as translation strings #1409

Merged
merged 1 commit into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions judge/models/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,14 @@ def save(self, *args, **kwargs):

class Meta:
permissions = (
('see_private_problem', 'See hidden problems'),
('edit_own_problem', 'Edit own problems'),
('edit_all_problem', 'Edit all problems'),
('edit_public_problem', 'Edit all public problems'),
('clone_problem', 'Clone problem'),
('change_public_visibility', 'Change is_public field'),
('change_manually_managed', 'Change is_manually_managed field'),
('see_organization_problem', 'See organization-private problems'),
('see_private_problem', _('See hidden problems')),
('edit_own_problem', _('Edit own problems')),
('edit_all_problem', _('Edit all problems')),
('edit_public_problem', _('Edit all public problems')),
('clone_problem', _('Clone problem')),
('change_public_visibility', _('Change is_public field')),
('change_manually_managed', _('Change is_manually_managed field')),
('see_organization_problem', _('See organization-private problems')),
)
verbose_name = _('problem')
verbose_name_plural = _('problems')
Expand Down Expand Up @@ -461,7 +461,7 @@ def __str__(self):

class Meta:
permissions = (
('see_private_solution', 'See hidden solutions'),
('see_private_solution', _('See hidden solutions')),
)
verbose_name = _('solution')
verbose_name_plural = _('solutions')
13 changes: 8 additions & 5 deletions judge/models/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def get_users_url(self):
class Meta:
ordering = ['name']
permissions = (
('organization_admin', 'Administer organizations'),
('edit_all_organization', 'Edit all organizations'),
('organization_admin', _('Administer organizations')),
('edit_all_organization', _('Edit all organizations')),
)
verbose_name = _('organization')
verbose_name_plural = _('organizations')
Expand All @@ -100,7 +100,10 @@ class Profile(models.Model):
organizations = SortedManyToManyField(Organization, verbose_name=_('organization'), blank=True,
related_name='members', related_query_name='member')
display_rank = models.CharField(max_length=10, default='user', verbose_name=_('display rank'),
choices=(('user', 'Normal User'), ('setter', 'Problem Setter'), ('admin', 'Admin')))
choices=(
('user', _('Normal User')),
('setter', _('Problem Setter')),
('admin', _('Admin'))))
mute = models.BooleanField(verbose_name=_('comment mute'), help_text=_('Some users are at their best when silent.'),
default=False)
is_unlisted = models.BooleanField(verbose_name=_('unlisted user'), help_text=_('User will not be ranked.'),
Expand Down Expand Up @@ -210,8 +213,8 @@ def webauthn_id(self):

class Meta:
permissions = (
('test_site', 'Shows in-progress development stuff'),
('totp', 'Edit TOTP settings'),
('test_site', _('Shows in-progress development stuff')),
('totp', _('Edit TOTP settings')),
)
verbose_name = _('user profile')
verbose_name_plural = _('user profiles')
Expand Down
14 changes: 7 additions & 7 deletions judge/models/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ def id_secret(self):

class Meta:
permissions = (
('abort_any_submission', 'Abort any submission'),
('rejudge_submission', 'Rejudge the submission'),
('rejudge_submission_lot', 'Rejudge a lot of submissions'),
('spam_submission', 'Submit without limit'),
('view_all_submission', 'View all submission'),
('resubmit_other', "Resubmit others' submission"),
('lock_submission', 'Change lock status of submission'),
('abort_any_submission', _('Abort any submission')),
('rejudge_submission', _('Rejudge the submission')),
('rejudge_submission_lot', _('Rejudge a lot of submissions')),
('spam_submission', _('Submit without limit')),
('view_all_submission', _('View all submission')),
('resubmit_other', _("Resubmit others' submission")),
('lock_submission', _('Change lock status of submission')),
)
verbose_name = _('submission')
verbose_name_plural = _('submissions')
Expand Down