Add path verification for localized files - Operator

What does this MR do?

Implements path verification for all of the localized files to make sure there's no orphaned localized files.

Currently GitLab and GitLab Omnibus has basic path verification through docs-i18n-lint paths. In this MR, we'd like to implement a similar verification here for GitLab Operator.

The goal of this Merge Request is to fail the pipeline when orphaned translation files are detected, providing clear guidance for localization engineering team on cleanup actions needed. To know more about all the other project implementations, individual merge requests for each project and for further information please checkout this issue.

What's the best way to test this MR?

The following would be a great way to test out his MR:

  1. Checkout this branch in your local,
  2. Introduce a new japanese translation file in your docs-locale directory. It can be under a sub-directory or at the root of docs-locale.
  3. Make sure you give execution rights to the docs_i18n_verify_paths: chmod +x scripts/docs_i18n_verify_paths
  4. Run the docs_i18n_verify_paths using the following command: ./scripts/docs_i18n_verify_paths
  5. You will get an error on the terminal indicating the new orphaned localized file you just added: ❌ Path verification failed: Found 34 localized files without matching English originals.
  6. Remove the orphaned file and run the command again.
  7. You will see the error disappear and it will tell you: ✅ Verification successful! All localized files have matching English originals.

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.

Related issues

Related: gitlab-com/localization/docs-site-localization#334 (closed)

Edited by Rasam Hossain

Merge request reports

Loading