We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No response
This is a follow-up to #5796.
At this point here, the word "document" is shown:
...even though the collection has labels:
labels: { singular: { de: 'Benutzer', en: 'User' }, plural: { de: 'Benutzer', en: 'Users' } }
I think the issue is here:
payload/packages/payload/src/admin/components/elements/DocumentControls/index.tsx
Lines 75 to 78 in e258866
collection.labels.singular is not a string but an object like { en: 'User', de: 'Benutzer' } , because it has multiple languages.
collection.labels.singular
{ en: 'User', de: 'Benutzer' }
It should probably be getTranslation(collection?.labels?.singular, i18n) and not directly try to access collection.labels.singular.
getTranslation(collection?.labels?.singular, i18n)
Create a collection with a multi-language label. Create a document in the colleciton.
2.12.2
db-mongodb, bundler-webpack
The text was updated successfully, but these errors were encountered:
JessChowdhury
Successfully merging a pull request may close this issue.
Link to reproduction
No response
Describe the Bug
This is a follow-up to #5796.
At this point here, the word "document" is shown:
...even though the collection has labels:
I think the issue is here:
payload/packages/payload/src/admin/components/elements/DocumentControls/index.tsx
Lines 75 to 78 in e258866
collection.labels.singular
is not a string but an object like{ en: 'User', de: 'Benutzer' }
, because it has multiple languages.It should probably be
getTranslation(collection?.labels?.singular, i18n)
and not directly try to accesscollection.labels.singular
.To Reproduce
Create a collection with a multi-language label. Create a document in the colleciton.
Payload Version
2.12.2
Adapters and Plugins
db-mongodb, bundler-webpack
The text was updated successfully, but these errors were encountered: