[sync] Changes to folders that are symlinks not committed
Categories
(Webtools Graveyard :: Pontoon, defect, P1)
Tracking
(Not tracked)
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.
Assignee | ||
Comment 1•5 years ago
|
||
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?
Comment 2•5 years ago
|
||
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)
Comment 3•5 years ago
|
||
(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.
Assignee | ||
Comment 4•5 years ago
|
||
I looked into our projects and found two, which use symlinks:
- MDN (fy-NL, ga-IE, pt-PT)
- 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:
- "Invert" symlink directions on the MDN project.
- Document how symlinks can be used to overcome locale mismatches.
Comment 5•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
The docs have been updated:
https://github.com/mozilla/pontoon/commit/a5ace13f6b0ba8cb804b10e1830d1c9e76ea1393
Assignee | ||
Comment 7•5 years ago
|
||
Things work as documented and that should be sufficient.
Updated•3 years ago
|
Description
•