Closed Bug 1565674 Opened 5 years ago Closed 5 years ago

[sync] Changes to folders that are symlinks not committed

Categories

(Webtools Graveyard :: Pontoon, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mathjazz, Assigned: mathjazz)

References

Details

Attachments

(1 file)

Some projects identify locales with different locale codes than Pontoon. They make use of symlinks to make Pontoon commit files to the locale folder named by their internal locale code standards.

For example, see how MDN identifies Frisian as "fy" instead of Pontoon's "fy-NL"/"fy_NL":
https://github.com/mozilla-l10n/mdn-l10n/blob/master/fy_NL

At some point in time, Pontoon stopped committing changes for such locales. The last known commit for such locale in MDN is over a year old:
https://github.com/mozilla-l10n/mdn-l10n/commit/dc5059429278628866b3aa616264afe73a86dcc4#diff-e784ef8eb6f6494e4d6dc922420c5c8c

I looked into the issue: Pontoon properly saves changes to the file, so git status shows e.g. fy/LC_MESSAGES/django.po as modified. But before it tries to commit, it runs git add fy_NL (because it doesn't know anything about locale folder being called fy), so git push results in Everything up-to-date.

I'm not exactly sure how this worked in the past, but the code that commits changes hasn't changed for at least 2 years. I'll keep investigating.

In the meantime I'd like to figure out if we should even keep support this "symlink approach", or maybe demand projects to use configuration files in such cases.

I'm not aware of other projects using symlinks to overcome the issue. It also seems that https://developer.mozilla.org/ now actually uses the same locale codes as Pontoon on their website. So maybe they no longer need symlinks either.

Axel, Flod: do you have thoughts about this?

Flags: needinfo?(l10n)
Flags: needinfo?(francesco.lodolo)

I would assume that https://github.com/mozilla/pontoon/commit/9ad0f4ce0a6822b4e989a920d7e661f5c46ff671 is related.

I don't know anything about the actual setup on MDN, and I have to admit, I'm confused by looking at the history.

Project config doesn't have a concept of doing locale aliases (nor does it support posix locale codes -> bcp mapping)

Flags: needinfo?(l10n)

(In reply to Matjaz Horvat [:mathjazz] from comment #1)

In the meantime I'd like to figure out if we should even keep support this "symlink approach", or maybe demand projects to use configuration files in such cases.

As Axel said, I don't think project configs would solve a locale mismatch. Given that we are aware of mismatches between Mozilla locales and other software, I think it would be nice to have this still supported, unless it requires a lot of work to fix.

Flags: needinfo?(francesco.lodolo)

I looked into our projects and found two, which use symlinks:

  1. MDN (fy-NL, ga-IE, pt-PT)
  2. SUMO (ga-IE)

Pontoon is still able to commit to SUMO, though, because ga is a symlink of the ga-IE folder, and not vice versa (like on MDN).

I see two action items:

  1. "Invert" symlink directions on the MDN project.
  2. Document how symlinks can be used to overcome locale mismatches.
See Also: → 1566381
Assignee: nobody → m
Status: NEW → ASSIGNED

Things work as documented and that should be sufficient.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
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: