Error occurred when fetching sidebar data
Validation message translation
- Loading...
Before this MR, translation happened typically in higher level, where the error message was rendered. but this imposed translation in everything, including mapped messages, pollluting Localizer with unneeded messages.
This MR introduces to ValidationError getMessage, the logic is:
- If the message is defined in the code that raises, then it should be translated there
- If the message is defined in the field (in 'manage_messagesForm') then we need to translate in ValidationError class. Caller should pass translation_service, because we do not want to import it in Formulator
Check out, review, and merge locally
Step 1. Fetch and check out the branch for this merge request
git fetch "https://lab.nexedi.com/georgios.dagkakis/erp5.git" "validation_message_translation" git checkout -b "georgios.dagkakis/erp5-validation_message_translation" FETCH_HEAD
Step 2. Review the changes locally
Step 3. Merge the branch and fix any conflicts that come up
git fetch origin git checkout "origin/master" git merge --no-ff "georgios.dagkakis/erp5-validation_message_translation"
Step 4. Push the result of the merge to GitLab
git push origin "master"
Note that pushing to GitLab requires write access to this repository.
Tip: You can also checkout merge requests locally by following these guidelines.
- You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Revert this merge request
This will create a new commit in order to revert the existing changes.