Skip to content

Address require-string-literal-i18n-helpers offenses in app/assets/javascripts/design_management/utils/error_messages.js

What does this MR do?

Related to #339495 (closed), the MR addresses require-string-literal-i18n-helpers offenses in app/assets/javascripts/design_management/utils/error_messages.js (__'s only argument and s__'s and n__'s first two arguments should only ever be string-literals).

It also updates various strings to be translated in accordance with our i18n guidelines. In particular, this MR ensures there are no split sentences in the Design Management error messages (https://docs.gitlab.com/ee/development/i18n/externalization.html#avoid-splitting-sentences-when-adding-links). This does mean that we have some translation updates (not best practice), but I still think there is a net benefit to these changes.

Screenshots

Here are a few screenshots to demonstrate that the error messages are presented as expected. Note that the test coverage for these messages (error_messages_spec.js) is quite comprehensive.

Examples
Screen_Shot_2021-10-08_at_1.43.58_pm
Screen_Shot_2021-10-08_at_1.47.16_pm
Screen_Shot_2021-10-08_at_1.40.51_pm
Screen_Shot_2021-10-08_at_1.45.36_pm
Edited by Tom Quirk

Merge request reports