Skip to content

SimpleShowLayout does not pass resource to Labeled Component, translation fails #9965

@glauff

Description

@glauff

What you were expecting:
When nesting Field Components into a SimpleShowLayout the Label should be correctly translated.
What happened instead:
After migration to react-admin v5 the Fields in a SimpleShow Layout have not the correct translation
Steps to reproduce:
Just nest Fields into a SimpleShowLayout with a translation of fields to a resource in place
Related code:

SimpleShowLayout is not passing resource to Labeled
https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/detail/SimpleShowLayout.tsx
Labeled ist only using the passed resource prop and not also the ResourceContext
https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/Labeled.tsx

Environment

  • React-admin version: 5.0.2
  • Last version that did not exhibit the issue (if applicable): 4.x.x
  • React version: 18
  • Browser: Chrome

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions