Feat(i18n): add verification for English originals

What does this MR do and why?

1. Adds a script to verify all localized documentation pages have corresponding

English originals. This ensures translations are always based on existing content and prevents orphaned localized pages.

  • Add path verification to check English documentation equivalents exist
  • Improve error reporting with clear formatting and counts
  • Exit with error code when missing originals are found
  • Add documentation for the verification process

2. Makes a small change to the existing docs-i18n-lint markdown CI job.

It updates the function used to call the script from docs_lint_markdown to docs_i18n_lint_markdown. This is done to provide clarity that the script is for i18n functions.

3. Synchronizes translated documentation files when English originals are moved or restructured.

It ensures that properly translated content follows the new file structure while intelligently handling redirects to maintain documentation integrity. When documentation is reorganized, all translated versions need to be updated to mirror the new structure. This tool automates that process by:

  • Copying existing translations to their new locations
  • Skipping redirect files that would create redundant content
  • Preserving all existing content by handling naming conflicts
  • Providing detailed reporting of all actions taken
  • Run this script after moving English documentation files (TODO)
  • Review the summary output to verify successful migration

References

  1. Closes: gitlab-com/localization/docs-site-localization#213 (closed)
  2. Closes gitlab-com/localization/docs-site-localization#212 (closed)
  3. Related gitlab-com/localization/docs-site-localization#141 (closed)

Screenshots or screen recordings

Before After

How to set up and validate locally

Pull this branch down and add a markdown file to the /doc-locale directory. Then run this script locally to see it flag that the path does not have an english equivalent. This will fail the new docs-i18n-lint paths CI job that is added in this MR.

Example:

  1. Pull branch down
  2. Add a new file such as /doc-locale/ja-jp/test.md
  3. chmod +x ./scripts/verify_i18n_paths.sh
  4. ./scripts/verify_i18n_paths.sh
  5. Console should identify your file as not having english equivalent

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Lauren Barker

Merge request reports

Loading