Skip to content

Conversation

@stevenle
Copy link
Member

Summary

  • attach a BatchRequest to the RouteContext provided by createRoute
  • migrate SSR and SSG doc/translation fetching to the shared batch request
  • expose the resulting batch response to downstream hooks

Testing

  • not run (not requested)

https://chatgpt.com/codex/tasks/task_e_68d44b3855c48323a7dec7ba4e8a5a68

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +257 to +262
const shouldLoadTranslations = siteLocales.length > 1;
if (shouldLoadTranslations) {
translationsTags.forEach((tag) => {
if (tag !== docTranslationsId) {
batchRequest.addTranslations(tag);
}

Choose a reason for hiding this comment

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

[P1] SSG skips translations when only one locale configured

The new batch request logic now gates translation fetching behind siteLocales.length > 1, so single‑locale static builds no longer load their common or doc translations and return {} from generateProps. Previously getStaticProps always loaded translations regardless of the number of locales, meaning single‑locale sites still received the localized strings for their default language. This regression will cause translation helpers to miss strings on SSG pages for single‑locale sites. Consider always fetching the configured translation tags for SSG or restoring the previous behaviour so one‑locale sites keep their translations.

Useful? React with 👍 / 👎.

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