Skip to content

fix(docs): check freshness for all translations - #4766

Open
sylvesterkaczmarek wants to merge 1 commit into
openai:mainfrom
sylvesterkaczmarek:fix/docs-translation-freshness-all-languages
Open

fix(docs): check freshness for all translations#4766
sylvesterkaczmarek wants to merge 1 commit into
openai:mainfrom
sylvesterkaczmarek:fix/docs-translation-freshness-all-languages

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request fixes --mode only-changes in the documentation translation script so freshness is checked across every configured translation instead of Japanese only.

should_translate_based_on_translation() currently compares the English source timestamp with docs/ja/... and uses that single result to decide whether translate_single_source_file() should skip the page for all configured languages. If Japanese is current while Korean or Chinese is missing or stale, the source is incorrectly treated as fully up to date.

The freshness check now walks the configured languages mapping and requests translation when any target file is missing, has no Git timestamp, or is older than the English source. The filesystem check deliberately happens before Git history lookup because git log can still return the deletion commit for a missing tracked file. The script skips only when every configured translation exists and is current. The CLI help text is updated to describe that behaviour. Generated translated pages are not changed by this PR.

Test plan

  • Added parametrized coverage for stale or history-less translations in each configured language (ja, ko, zh).
  • Added regression coverage for a deleted translation whose Git deletion timestamp is newer than the English source, proving filesystem existence takes precedence over Git history.
  • Added a negative control confirming the source is skipped when all configured translations exist and are current.

Closes #4763.

Checks

  • I've added new tests, if relevant
  • I've run .agents/skills/code-change-verification/scripts/run.sh
  • I've confirmed all verification steps pass
  • If using Codex, I've run /review before submitting this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T18:26:27.852238Z 808bf17 Manual request
🔒 Security Review Completed 2026-08-29T18:38:19.219378Z 808bf17 Manual 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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.

Reviewed commit: d2cebb725b

ℹ️ 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 "@codex address that feedback".

Comment thread docs/scripts/translate_docs.py

Copy link
Copy Markdown
Contributor Author

@codex address that feedback

@chatgpt-codex-connector

Copy link
Copy Markdown

Note

To use Codex here, create an environment for this repo.

@sylvesterkaczmarek
sylvesterkaczmarek force-pushed the fix/docs-translation-freshness-all-languages branch from e502898 to 808bf17 Compare August 29, 2026 18:23

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 808bf17d85

ℹ️ 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 "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 808bf17d85

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

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.

Docs translation freshness check ignores stale non-Japanese translations

1 participant