Closed Bug 1698636 Opened 4 years ago Closed 3 years ago

Pontoon picks the wrong folder format for locales (underscore instead of hyphens)

Categories

(Webtools Graveyard :: Pontoon, defect, P3)

Tracking

(Not tracked)

RESOLVED MOVED

People

(Reporter: flod, Unassigned, Mentored)

Details

I created the repository with the source in en-US folder.
https://github.com/mozilla-l10n/mozilla-vpn-website-l10n/

Pontoon then synced pt-BR as pt_BR. One possible explanation is the presence of a file with underscores (CODE_OF_CONDUCT.md) in the repository. If that's the case, it's a bug, because we really care about folders, not files.

I then renamed pt_BR to use hyphens, synced translations for en-CA and it still used the wrong format (en_CA). Fixed this one too, synced a string for en-GB, and again wrong format.

At this point, I don't know if it will keep using _ for the next locales.

We count the number of underscores and dashes in all files and folders within and the parent folder of the source locale folder. Character with the higher count wins:
https://github.com/mozilla/pontoon/blob/f52d415/pontoon/sync/utils.py#L49

We should only count characters in (locale) folders.

Mentor: m
Priority: -- → P3
*This bug has been moved to GitHub.* *Please check it out on https://github.com/mozilla/pontoon/issues.*
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → MOVED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.