Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Issues
  • #1242
Closed
Open
Issue created Nov 27, 2018 by Administrator@rootContributor

Resource names are not being translated properly on notice messages

Created by: rscardinho

The resource model name isn't being translated when you execute a DB transaction (create, for example). The whole message is translated according to the yml file but the resource model name.

I believe the problem relies on ResourceReolver#resource_title, which just parses the current path and returns a joined string. The #translate_with_resource (the method that translated the message itself) should use ResourceReolver#resource_class combined with ActiveRecord locale methods to return the resource model name already localized to the message translator method

This is the message that I'm getting image

And my yml file does have that model translation entry

pt-BR:
  activerecord:
    models:
      transaction_category:
        one: 'Natureza de Transação'
        other: 'Naturezas de Transação'

This problem is happening with other resources around my admin section

Assignee
Assign to
Time tracking