Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 139
    • Merge requests 139
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • 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
None
Milestone
None
Assign milestone
Time tracking
Source branch: validation_message_translation
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7