Undo the split sentence in "...because %{reason}" to make text localizable
Problem at a high level:
This error message, that is composed of 2 fragments, when resolved into one sentence on the UI, will create readability and translatability problems in non-English languages. In other words, it will not sound correct in non-English.
msgid "Your comment could not be submitted because %{reason}."
msgid "Maximum number of comments exceeded"
Resolving these fragments into one sentence looks OK in English, but will sound grammatically and syntactically incorrect in non-English languages.
Proposed solution:
The error message should be reformatted into one English sentence. For example: Your comment could not be submitted because maximum number of comments exceeded
.
Or, split into 2 sentences and associated with one msgid
. For example, Your comment could not be submitted. The maximum number of comments has been exceeded.
And associated code should be refactored, to undo the injecting of %{reason}
.
Localizability best practices requirements are described in the following Mozilla resource: https://mozilla-l10n.github.io/documentation/localization/dev_best_practices.html#splitting-and-composing-sentences