Rephrase URL sentences in CE token and SSH key plain-text emails

What does this MR do and why?

In nine CE plain-text notification emails, the sentence pointing to the settings page ends with a colon followed by a bare URL, for example:

You can create a new one or check them in your personal access tokens settings: https://gitlab.example.com/-/user_settings/personal_access_tokens

This form was introduced in !254859 (merged) to avoid a trailing period being picked up as part of the link. During Technical Writing review of the EE counterpart !255638 (merged), @eread suggested rephrasing such sentences instead so the URL sits mid-sentence and the sentence keeps its closing period, and asked to apply the same to the CE emails.

Each of the nine strings now reads like Go to %{pat_link} to check your personal access tokens or create a new one. The placeholder names and the Ruby side of each template are unchanged. locale/gitlab.pot is updated: seven old msgids are removed and six new ones added, since the expired and revoked emails now share a sentence.

Affected templates, all under app/views/notify/:

  • access_token_about_to_expire_email.text.erb, access_token_expired_email.text.erb, access_token_revoked_email.text.erb, access_token_created_email.text.erb, access_token_rotated_email.text.erb
  • bot_resource_access_token_about_to_expire_email.text.erb, deploy_token_about_to_expire_email.text.erb
  • ssh_key_expired_email.text.erb, ssh_key_expiring_soon_email.text.erb

The HTML versions of these emails use separate strings with link markup and are not changed.

References

Screenshots or screen recordings

Rendered plain-text excerpt. The domain is an example.

Before:

You can create a new one or check them in your personal access tokens settings: https://gitlab.example.com/-/user_settings/personal_access_tokens

After:

Go to https://gitlab.example.com/-/user_settings/personal_access_tokens to check your personal access tokens or create a new one.

How to set up and validate locally

The existing mailer specs assert that the plain-text part contains the settings URL and that no punctuation character directly follows it. They need no change, since the URL is now followed by a space.

bundle exec rspec spec/mailers/emails/profile_spec.rb

Locally, the nine templates were checked with an ERB compile check and every msgid in the templates was verified to exist in locale/gitlab.pot. RSpec was not run locally; the MR pipeline runs it.

MR acceptance checklist

  • I have evaluated the impact of this change against the guidelines in the merge request acceptance checklist
  • I have self-reviewed this MR per code review guidelines
  • I have added or updated tests to cover the change
  • I have confirmed this change passes the CI/CD pipeline
Edited by Torben Buck

Merge request reports

Loading
Loading