Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !1001

Validation message translation

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Georgios Dagkakis requested to merge georgios.dagkakis/erp5:validation_message_translation into master Dec 11, 2019
  • Overview 16
  • Commits 3
  • Pipelines 0
  • Changes 3

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
Edited Jan 06, 2021 by Georgios Dagkakis
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: validation_message_translation
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7