[18.0][FIX] base_substate: missing space in substate validation message - #1323
Open
bosd wants to merge 1 commit into
Open
[18.0][FIX] base_substate: missing space in substate validation message#1323bosd wants to merge 1 commit into
bosd wants to merge 1 commit into
Conversation
The message was built with f-strings inside self.env._(), so: - "is not defined for" and "the state" were concatenated without a space, producing "... is not defined forthe state Done but for ..."; - the interpolated msgid could never be extracted nor matched against a .po file, so the error was always shown in English. Restore the named placeholders used up to 17.0, which fixes the missing space and makes the message translatable again (the existing es/it translations for this msgid apply once more).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The substate validation error currently reads:
Problem
The message is built with f-strings inside
self.env._():Two consequences:
"... is not defined for"and"the state ..."are concatenated with nospace in between →
forthe;nor matched against a
.poentry. The string is indeed absent fromi18n/base_substate.pot, and the message is always rendered in Englishregardless of the user language.
Change
Restore the named placeholders that were used up to 17.0. This fixes the
missing space and makes the message translatable again — as a bonus the
existing
es/ittranslations for this msgid apply once more.The trailing space at the end of the msgid is kept deliberately: it is what
es.po/it.poalready carry, so keeping it preserves those translations.No functional change beyond the message text.