Repository navigation
Conversation
Add scripts/i18n-drift-check.mjs, the drift checker referred to by the Translation Guidelines. Each translated page records the git hash of the English page it was made from (i18n_source_sha); a translation is reported as stale when that hash no longer matches. Includes the test suite, the i18n:* npm scripts and the .gitignore entries for the generated reports. Report only: nothing blocks a PR, and no documentation page is modified. Relates to #592 Co-authored-by: MaximeNzo <[email protected]> Co-authored-by: Nounagnon02 <[email protected]>
Argulz
requested review from
JulieG19,
PaulMakinMojaloop,
bushjames,
elnyry-sam-k,
millerabel,
shashi165 and
vijayg10
as code owners
September 21, 2026 02:51
|
Preview deployment is available at: https://docs.mojaloop.io/pr/593/ |
Add scripts/i18n-drift-check.md, the usage guide referenced in the script header, and the GitHub Actions workflow that posts the drift report on pull requests and opens an issue when drift reaches master. Relates to #592 Co-authored-by: MaximeNzo <[email protected]> Co-authored-by: Nounagnon02 <[email protected]>
Translation Drift Report
No source documentation changed in this range. Nothing to translate. |
|
Preview deployment is available at: https://docs.mojaloop.io/pr/593/ |
The master job created a new issue on every push with drift. It now looks for an open issue carrying a hidden marker, as the PR job does for its comment, and adds the new report to it as a comment. A new issue is only created when none is open. Relates to #592 Co-authored-by: MaximeNzo <[email protected]> Co-authored-by: Nounagnon02 <[email protected]>
|
Preview deployment is available at: https://docs.mojaloop.io/pr/593/ |
|
Preview deployment is available at: https://docs.mojaloop.io/pr/593/ |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the translation drift checker referred to by the Translation Guidelines (sections 9 and 13), as announced in #592. As requested, everything is in a single PR.
Affected files:
scripts/i18n-drift-check.mjs- the checker, first written by @MaximeNzo and improved with @Nounagnon02. Each translated page records the git hash of the English page it was made from (i18n_source_shain its front matter); a translation is reported as stale when that hash no longer matches. Modes: check of a git range (default),--auditof the whole repository with coverage per locale and section,--explain <page>to show what changed in the source,--stampto record hashes. It only reports: nothing blocks a PR, and this PR does not modify any documentation page.scripts/i18n-drift-check.test.mjs- 20 tests, run against throwaway git repositories. No new dependency: Node built-ins only.scripts/i18n-drift-check.md- usage guide: commands, statuses, workflow by role, tests, troubleshooting..github/workflows/i18n-translation-drift.yml- GitHub Actions workflow: posts the report as a comment on PRs, and opens an issue when drift reachesmaster. It runs alongside CircleCI, independently.package.json- thei18n:*npm scripts..gitignore- the generatedi18n-report.*files.How to test:
npm run i18n:test- 20 tests passnpm run i18n:audit- prints the report; on current master it lists 2 orphaned French pages (docs/fr/product/features/CurrencyConversion/README.mdanddocs/fr/product/features/merchant-payments.md)AI Assistance Disclosure
AI tools were used in producing part of this contribution.
Tools used: Claude
Scope: bug fixes, new options, the test suite, the documentation, and this PR description.
All AI-generated content has been reviewed, understood, and validated by the author.
Relates to #592