Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 141
    • Merge requests 141
  • 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
  • nexedi
  • erp5erp5
  • Merge requests
  • !1001

Merged
Created Dec 11, 2019 by Georgios Dagkakis@georgios.dagkakisDeveloper

Validation message translation

  • Overview 16
  • Commits 3
  • 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
Reviewer
Request review from
Time tracking
Source branch: validation_message_translation
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7