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

Create check for out of date translated files #2726

Merged
merged 16 commits into from
Jun 21, 2021

Conversation

LizBaker
Copy link
Contributor

@LizBaker LizBaker commented Jun 16, 2021

This PR includes a workflow job which will add a required check on PRs to develop and main.
The check will find translated files that don't have an english counterpart, for instance: if an english file is deleted, any translations for the file should also be deleted.
Instead of deleting the files via the workflow we decided to make a failable check which will remind contributors to clean up any translated files that should no longer exist.

TODO:

  • remove previous WIP code in add-to-translation-queue
  • write tests
  • add job to required checks
  • settle on check name with docs friends

Closes #2323

@gatsby-cloud
Copy link

gatsby-cloud bot commented Jun 16, 2021

Gatsby Cloud Build Report

docs-website-develop

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 11m

aswanson-nr
aswanson-nr previously approved these changes Jun 17, 2021
Copy link
Contributor

@aswanson-nr aswanson-nr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks great! I added 2 small comments, but neither of them are required.

scripts/actions/check-for-outdated-translations.js Outdated Show resolved Hide resolved
aswanson-nr
aswanson-nr previously approved these changes Jun 17, 2021
Copy link
Contributor

@aswanson-nr aswanson-nr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@LizBaker LizBaker marked this pull request as draft June 17, 2021 21:55
zstix
zstix previously approved these changes Jun 21, 2021
@LizBaker LizBaker marked this pull request as ready for review June 21, 2021 20:26
aswanson-nr
aswanson-nr previously approved these changes Jun 21, 2021
@zstix zstix merged commit bca1b65 into develop Jun 21, 2021
@zstix zstix deleted the campfire/translate-deletions branch June 21, 2021 23:43
Docs Site Localization PRs and Issues automation moved this from Needs Triage to Done Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Remove the translated MDX file when a locale is removed or file is deleted
3 participants