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

Task translations #2020

Merged
merged 5 commits into from
Mar 7, 2024
Merged

Task translations #2020

merged 5 commits into from
Mar 7, 2024

Conversation

actlikewill
Copy link
Contributor

task translations

@actlikewill actlikewill changed the base branch from master to translations March 7, 2024 12:52
@actlikewill actlikewill marked this pull request as ready for review March 7, 2024 12:53
CANCELLED = 'cancelled'
DONE = 'done'
BLOCKED = 'blocked'
OPEN = __('open')
Copy link
Contributor

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


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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing

@@ -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 _
Copy link
Contributor Author

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?

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)
Copy link
Contributor Author

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

Copy link
Contributor

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

@actlikewill actlikewill merged commit 560b11f into translations Mar 7, 2024
6 checks passed
@actlikewill actlikewill deleted the task-translations branch March 7, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants