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

fix(docs-i18n-tracker): update translations import #1025

Merged
merged 3 commits into from
Nov 2, 2023

Conversation

HiDeoo
Copy link
Member

@HiDeoo HiDeoo commented Nov 2, 2023

What kind of changes does this PR include?

  • Something else!

Description

This PR fixes an issue with the Starlight Docs Translation Status. Following the changes in #1003, it now errors with the following:

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'starlight/packages/starlight/translations' is not supported resolving ES modules imported from starlight/packages/starlight/utils/createTranslationSystem.ts

Note: I got this error locally after noticing that the tracker was not updating, I have no idea where to check the logs for the production one.

This is due to the Node import specifiers spec:

Directory indexes (e.g. './startup/index.js') must also be fully specified.

And tsm not handling this case specifically.

This PR specifies the index file in the import statement, which fixes the issue.

Another approach to avoid the change could be:

Copy link

changeset-bot bot commented Nov 2, 2023

🦋 Changeset detected

Latest commit: f21476a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Nov 2, 2023

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit f21476a
🔍 Latest deploy log https://app.netlify.com/sites/astro-starlight/deploys/6543c081aaf9890008277447
😎 Deploy Preview https://deploy-preview-1025--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Nov 2, 2023
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.

Note: I got this error locally after noticing that the tracker was not updating, I have no idea where to check the logs for the production one.

The deployment logs are on Netlify and I can confirm they match your local error — good catch! I think you should be able to see them, although not easily find them. Here’s a recent run: https://app.netlify.com/sites/starlight-i18n-dashboard/deploys/6543a2ce75e62e000845952e

This change looks good to me. I guess hypothetically this could impact Starlight users, so we should probably add a patch changeset to release this fix?

@HiDeoo
Copy link
Member Author

HiDeoo commented Nov 2, 2023

I think you should be able to see them, although not easily find them.

Ah thanks, I can indeed see them.

I guess hypothetically this could impact Starlight users, so we should probably add a patch changeset to release this fix?

Yeah, thought about that, but was not sure what to say or what the scenario could be (that's also why I included an alternative without the change ^^). I just pushed one with "Internal: fix import issue in translation string loading mechanism" but feel free to change it if you have a better idea.

Note: I am also not sure if merging this is enough to trigger a rebuild?

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 adding the changeset — I think this will do!

Note: I am also not sure if merging this is enough to trigger a rebuild?

Yeah, we very aggressively rebuild that site to keep it up to date by hitting the rebuild webhook for each pull_request event on GitHub (only really need to do it when PRs are opened but GitHub’s webhook UI only supports triggering for all PR events) as well as for commits to main.

@HiDeoo HiDeoo merged commit 0d1e75e into withastro:main Nov 2, 2023
9 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Nov 2, 2023
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Nov 2, 2023
* main: (22 commits)
  fix(docs-i18n-tracker): update `translations` import (withastro#1025)
  [ci] format
  i18n(zh-cn): Update css-and-tailwind.mdx (withastro#1018)
  [ci] format
  i18n(zh-cn): Update authoring-content.md (withastro#1016)
  i18n(ko-KR): update `configuration.mdx` (withastro#1015)
  i18n(ko-KR): update `sidebar.mdx` (withastro#1014)
  i18n(ko-KR): update `i18n.mdx` (withastro#1013)
  [ci] format
  i18n(ko-KR): update `frontmatter.md` (withastro#1017)
  [ci] format
  i18n(pt-BR): Update `css-and-tailwind.mdx`, `authoring-content.md` and `overrides.md` (withastro#1009)
  [ci] format
  [ci] release (withastro#996)
  Fix Prettier-compatibility of i18n test fixture
  Refactor translation system to be reusable in non-Astro code (withastro#1003)
  Add social icons to mobile menu footer (withastro#988)
  [ci] format
  Add Galician language support (withastro#1004)
  feat: add support for light / dark hero images (withastro#280)
  ...
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Nov 5, 2023
* main: (103 commits)
  i18n(fr): update `guides/sidebar.mdx` (withastro#1033)
  i18n(fr): update `reference/configuration.mdx` (withastro#1034)
  i18n(fr): update `reference/frontmatter.md` (withastro#1035)
  Fix docs component details (withastro#1031)
  Overhaul getting started guide (withastro#1026)
  i18n(zh-cn): Update sidebar.mdx & configuration.mdx (withastro#1022)
  i18n(es): Update `configuration` & `sidebar` (withastro#1029)
  [ci] format
  i18n(zh-cn): Update frontmatter.md (withastro#1020)
  i18n(zh-cn): Update overrides.md (withastro#1021)
  i18n(zh-cn): Update i18n.mdx (withastro#1019)
  fix(docs-i18n-tracker): update `translations` import (withastro#1025)
  [ci] format
  i18n(zh-cn): Update css-and-tailwind.mdx (withastro#1018)
  [ci] format
  i18n(zh-cn): Update authoring-content.md (withastro#1016)
  i18n(ko-KR): update `configuration.mdx` (withastro#1015)
  i18n(ko-KR): update `sidebar.mdx` (withastro#1014)
  i18n(ko-KR): update `i18n.mdx` (withastro#1013)
  [ci] format
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants