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

Add script to find old source and translations content #10111

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

yanthomasdev
Copy link
Member

@yanthomasdev yanthomasdev commented Nov 27, 2024

Description (required)

This PR adds a new lunaria:old-translations and lunaria:old-source script to the docs site that by default logs every page that hasn't been updated in 180 days or more (for translations, its based on the time since the last source update was made, from source content the current time).

The default number of days can be changed to an arbitrary amount by passing a number as the first parameter. You can also automatically remove all outdated translations by passing the -r parameter in the lunaria:old-translations script.

Example image:
image

I also took the opportunity to update Lunaria to the latest prerelease version (which fixes a few mistrackings when using tracker directives) and fix a small dashboard paragraph with accidental quotes.

Related issues & labels (optional)

  • Closes #
  • Suggested label:

Copy link

netlify bot commented Nov 27, 2024

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 258fe76
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/675b424eedeed90008c9182b
😎 Deploy Preview https://deploy-preview-10111--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 configuration.

Copy link
Contributor

@trueberryless trueberryless left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

I have tested running the script locally and I have to say it took much longer than expected, but it works eventually! Remove option also works fine!

Also, it feels rough to be the translator for a language that's kinda outdated:

image

These are great additions if you ask me. Makes removing very old pages a lot easier... Good job!

@yanthomasdev yanthomasdev changed the title Add script to find and remove old translations Add script for old source and translations content Dec 12, 2024
@yanthomasdev yanthomasdev changed the title Add script for old source and translations content Add script to find old source and translations content Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants