Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the gulp importl10n command to fetch the active language codes #11213

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Oct 6, 2019

  • Update the gulp importl10n command to fetch the active language codes

    Rather than having to manually maintain a static list of language codes, it's much easier to simply fetch the active ones from mozilla-central instead.

    As part of this the code in external/importL10n/locales.js was modernized slightly, by using Promises/async functions to get rid of a bunch of annoying callbacks (which shouldn't be a problem for reasonably modern Node.js versions).

  • Update l10n files

  • Have gulp importl10n list locales which may be candidates for removal

    Rather than having the script remove locales automatically, which seems like a heavy-handed approach at least initially, listing these for manual checking seems nice though.

Smaller diff with https://github.com/mozilla/pdf.js/pull/11213/files?w=1

@Snuffleupagus Snuffleupagus force-pushed the importl10n-fetch-langCodes branch 2 times, most recently from d630404 to 6c4aa70 Compare October 6, 2019 16:10
Rather than having to manually maintain a static list of language codes, it's much easier to simply fetch the active ones from `mozilla-central` instead.

As part of this the code in `external/importL10n/locales.js` was modernized slightly, by using Promises/async functions to get rid of a bunch of annoying callbacks (which shouldn't be a problem for reasonably modern Node.js versions).
Rather than having the script remove locales automatically, which seems like a heavy-handed approach at least initially, listing these for manual checking seems nice though.
@timvandermeij timvandermeij merged commit a21f604 into mozilla:master Oct 6, 2019
@timvandermeij
Copy link
Contributor

Good to see this script getting some improvements!

@Snuffleupagus
Copy link
Collaborator Author

Snuffleupagus commented Oct 6, 2019

As always, thanks for reviewing/merging this (and other PRs)!

With these changes, the following locales are listed as candidates for removal:

Consider removing the following unmaintained locales:
ak, bn-BD, bn-IN, csb, hto, kok, ks, ku, lg, meh, mn, nso, rw, sah, sat, sw, ta-LK, tn, tsz, zam, zu

It looks like most of them haven't been updated for years, but I didn't look too closely and thus wasn't sure if outright removal was the right thing to do in this PR.

@timvandermeij
Copy link
Contributor

I like that it notifies us, but allows us to take action if required. I do think removing those locales would be fine for a follow-up patch.

@Snuffleupagus Snuffleupagus deleted the importl10n-fetch-langCodes branch October 6, 2019 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants