Skip to content

Updates to `.po` & `.pot` linting

Bob Van Landuyt requested to merge bvl-i18n-validation into master

What does this MR do?

This adjusts the PO linting to warn developers about the usage of %d style interpolation in combination with %{style} interpolation. The latter would break when using ruby's sprintf with an argument error.

We need this to merge translations for %10.8: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5281

We didn't pick up on this because we weren't checking variable usage within message ids, only in translations itself. Now we also validate the message ids.

Furthermore, I added a check to see if the latest changes to gitlab.pot are checked in.

Does this MR meet the acceptance criteria?

  • Tests added for this feature/bug
  • Review
    • Has been reviewed by Backend

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/46096

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/39292

Edited by Bob Van Landuyt

Merge request reports