Pontoon picks the wrong folder format for locales (underscore instead of hyphens)
Categories
(Webtools Graveyard :: Pontoon, defect, P3)
Tracking
(Not tracked)
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.
Comment 1•4 years ago
|
||
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.
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Description
•