-
Notifications
You must be signed in to change notification settings - Fork 27
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
Task translations #2020
Task translations #2020
Conversation
indigo_api/models/tasks.py
Outdated
CANCELLED = 'cancelled' | ||
DONE = 'done' | ||
BLOCKED = 'blocked' | ||
OPEN = __('open') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are used in the db and must not be translated, otherwise the codes in the db will differ
indigo_api/models/tasks.py
Outdated
|
||
objects = TaskManager.from_queryset(TaskQuerySet)() | ||
|
||
title = models.CharField(max_length=256, null=False, blank=False) | ||
title = models.CharField(__('title'), max_length=256, null=False, blank=False) | ||
description = models.TextField(null=True, blank=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing
indigo_api/models/tasks.py
Outdated
@@ -4,7 +4,7 @@ | |||
|
|||
from actstream import action | |||
from django.core.files.uploadedfile import UploadedFile | |||
from django.utils.translation import gettext_lazy as __, gettext as _ | |||
from django.utils.translation import ugettext_lazy as __, ugettext as _ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@longhotsummer some other strings are marked with ugettext, instead of ugettext_lazy. Is there a reason?
indigo_api/models/tasks.py
Outdated
locality = models.ForeignKey('indigo_api.Locality', verbose_name=__('locality'), related_name='tasks', null=True, blank=True, on_delete=models.CASCADE) | ||
work = models.ForeignKey('indigo_api.Work', verbose_name=__('work'), related_name='tasks', null=True, blank=True, on_delete=models.CASCADE) | ||
document = models.ForeignKey('indigo_api.Document', verbose_name=__('document'), related_name='tasks', null=True, blank=True, on_delete=models.CASCADE) | ||
timeline_date = models.DateField(__('timeline date'), null=True, blank=True, help_text=__("A date on the timeline of work-related tasks, e.g. the date at which an amendment should be applied.")) | ||
|
||
state = FSMField(default=OPEN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@longhotsummer also there is this guy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
treat it like a CharField, so just add the name at the start before default
task translations