Closed Bug 1633149 Opened 5 years ago Closed 4 years ago

[project config] Changes to translated resources from the repository are not synced

Categories

(Webtools Graveyard :: Pontoon, defect, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: theo, Assigned: mathjazz)

References

Details

Attachments

(1 file)

Since offline translation doesn’t work yet for projects using project-config, I landed a couple of translated files directly in the repo, but it never made it to Pontoon:

https://github.com/mozilla-l10n/fomo-l10n/commit/1c3634ef0e99ff1c70b7343200b822bb9d730b81

This commit was supposed to update the following projects:
https://pontoon.mozilla.org/es/privacy-not-included/
https://pontoon.mozilla.org/es/mozilla-foundation-website/

Assignee: nobody → m
Status: NEW → ASSIGNED
Priority: -- → P2

Had to force sync.

I'll keep the bug open.

Assignee: m → nobody
Status: ASSIGNED → NEW

The issue is the logic for finding relevant changes in repository, which doesn't work for projects with PC:
https://github.com/mozilla/pontoon/blob/master/pontoon/sync/vcs/models.py#L266

for locale in self.db_project.locales.all():
    project_files = self.configuration.get_or_set_project_files(locale.code)
    for path in changed_files:
        absolute_path = os.path.join(self.source_directory_path, path)
        m = project_files.match(absolute_path)
        if m:
            # Use reference paths
            reference_path = m[1]
            relative_reference_path = reference_path[len(self.source_directory_path) :].lstrip(os.sep)
            files.setdefault(relative_reference_path, []).append(locale)

It also seems bug 1608045 is a duplicate of this one.

Assignee: nobody → m
Status: NEW → ASSIGNED
Blocks: 1608045
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: