This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pontoon/base/admin.py b/pontoon/base/admin.py | |
| index d5a79e7..60f2d56 100644 | |
| --- a/pontoon/base/admin.py | |
| +++ b/pontoon/base/admin.py | |
| @@ -181,3 +181,4 @@ admin.site.register(models.Entity, EntityAdmin) | |
| admin.site.register(models.Translation, TranslationAdmin) | |
| admin.site.register(models.TranslationMemoryEntry, TranslationMemoryEntryAdmin) | |
| admin.site.register(models.ChangedEntityLocale, ChangedEntityLocaleAdmin) | |
| +admin.site.register(models.ActiveTranslation) | |
| diff --git a/pontoon/base/migrations/0095_activetranslation.py b/pontoon/base/migrations/0095_activetranslation.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pontoon/base/views.py b/pontoon/base/views.py | |
| index dd503ad..15fc6ec 100755 | |
| --- a/pontoon/base/views.py | |
| +++ b/pontoon/base/views.py | |
| @@ -583,8 +583,9 @@ def update_translation(request): | |
| if len(translations) > 0: | |
| # Same translation exists | |
| - try: | |
| - t = translations.get(string=string) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pontoon/teams/static/css/team.css b/pontoon/teams/static/css/team.css | |
| index b7ece35..456ab36 100644 | |
| --- a/pontoon/teams/static/css/team.css | |
| +++ b/pontoon/teams/static/css/team.css | |
| @@ -123,25 +123,37 @@ | |
| color: #7BC876; | |
| } | |
| -.info { | |
| - text-align: center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pontoon/sync/core.py b/pontoon/sync/core.py | |
| index 90c86ec..dc002da 100644 | |
| --- a/pontoon/sync/core.py | |
| +++ b/pontoon/sync/core.py | |
| @@ -264,7 +264,7 @@ def get_changed_locales(db_project, locales): | |
| # Requirement: all translation repositories must have API configured. | |
| for repo in repos: | |
| if not repo.api_config: | |
| - return None | |
| + return locales |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pontoon/sync/tasks.py b/pontoon/sync/tasks.py | |
| index 5ac9c2d..77c2243 100644 | |
| --- a/pontoon/sync/tasks.py | |
| +++ b/pontoon/sync/tasks.py | |
| @@ -249,10 +249,10 @@ def sync_translations( | |
| updated_entity_pks.append(db_entity.pk) | |
| obsolete_entity_pks = project_changes['obsolete_db'] | |
| - changed_resources = db_project.resources.filter( | |
| + changed_resources = list(db_project.resources.filter( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pontoon/base/models.py b/pontoon/base/models.py | |
| index f28c0ec..03437a9 100644 | |
| --- a/pontoon/base/models.py | |
| +++ b/pontoon/base/models.py | |
| @@ -2026,14 +2026,30 @@ class Entity(DirtyFieldsMixin, models.Model): | |
| if search: | |
| # https://docs.djangoproject.com/en/dev/topics/db/queries/#spanning-multi-valued-relationships | |
| search_query = (search, locale.db_collation) | |
| - entities = ( | |
| - Entity.objects.filter( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example 1: | |
| { | |
| "comment": null, | |
| "span": { | |
| "start": 0, | |
| "end": 42, | |
| "type": "Span" | |
| }, | |
| "tags": [], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pontoon/base/context_processors.py b/pontoon/base/context_processors.py | |
| index 7eb31dc..a974c21 100644 | |
| --- a/pontoon/base/context_processors.py | |
| +++ b/pontoon/base/context_processors.py | |
| @@ -1,4 +1,11 @@ | |
| from django.conf import settings | |
| +from django.utils import translation | |
| + | |
| + | |
| +def i18n(request): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pontoon/teams/views.py b/pontoon/teams/views.py | |
| index 647d95a..c74d83e 100644 | |
| --- a/pontoon/teams/views.py | |
| +++ b/pontoon/teams/views.py | |
| @@ -122,12 +122,9 @@ def ajax_permissions(request, locale): | |
| translators = l.translators_group.user_set.exclude(pk__in=managers).all() | |
| all_users = User.objects.exclude(pk__in=managers).exclude(pk__in=translators).exclude(email='') | |
| - contributors = ( | |
| - User.translators |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function serializeExpression(expression) { | |
| if (expression.type === 'MessageReference') { | |
| return expression.id.name; | |
| } | |
| if (expression.type === 'ExternalArgument') { | |
| return '$' + expression.id.name; | |
| } | |
| if (expression.type === 'NumberExpression') { |