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

Migrate i18n Translation Status from GitHub issue to HTML output #2731

Merged

Conversation

hippotastic
Copy link
Contributor

What kind of changes does this PR include?

  • Changes to the docs site code

Description

  • Fixes [i18n] Translation Status Overview #438 (which no longer updates due to GitHub issue size limitations) by replacing it with a new HTML-based version. All obsolete GitHub issue handling was removed from the script, it was converted to TypeScript and refactored.
  • Here's a preview of the new HTML output: https://gleaming-salmiakki-01db8d.netlify.app/
  • Removes the outdated GitHub workflow that was previously running the script.
  • To automatically build this new version of the translation status whenever Astro Docs is updated, the following additional steps must be performed by @delucis after merging this PR:
    • An additional Netlify site must be created and connected to this repository.
    • In the additional Netlify site's configuration, an environment variable named NETLIFY_BUILD_SCRIPT must be added and set to the value translation-status. If this variable is missing, a regular Astro Docs build will run instead.
    • Additionally, in the Netlify GUI under Site settings > Build & deploy > Continuous deployment > Build settings, the Publish directory must be set to /dist/translation-status to make the output available at the Netlify site's root URL. This subdirectory is a precaution to prevent the translation status from accidentally overwriting a regular Astro Docs build index page if being called manually or from a script.

@netlify
Copy link

netlify bot commented Feb 24, 2023

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit dd256cc
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/63f94a162adf3700072a4892
😎 Deploy Preview https://deploy-preview-2731--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

This looks great @hippotastic! I’ve made one small suggestion but otherwise I think it looks good and have a Netlify site ready to use this when we merge.

scripts/translation-status.ts Outdated Show resolved Hide resolved
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Thanks for figuring this out @hippotastic! Glad to get the ball rolling on this and excited for what moving to an HTML page unlocks in terms of future improvements.

@delucis delucis merged commit cef574d into withastro:main Feb 24, 2023
@hippotastic hippotastic deleted the hippotastic/html-translation-status branch February 24, 2023 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[i18n] Translation Status Overview
2 participants