api-platform / api-platform/admin

"Label" of "SelectInput" has field value instead of translating

オープン
#283 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
516
フォーク
134
PR マージ指標
30日以内にマージされた PR はありません

説明

**API Platform version(s) affected**: 2.0.1

**Description**
Fields "SelectInput" are not substituted by translation. Instead of translating "label" they always have a field name

**How to reproduce**
The problem is in the lines:
https://github.com/api-platform/admin/blob/v2.0.1/src/InputGuesser.js#L44
https://github.com/api-platform/admin/blob/v2.0.1/src/InputGuesser.js#L60

the next step
https://github.com/marmelab/react-admin/blob/v3.3.3/packages/ra-ui-materialui/src/input/SelectInput.tsx#L218

the next step
https://github.com/marmelab/react-admin/blob/v3.3.3/packages/ra-core/src/util/FieldTitle.tsx

the next step
https://github.com/marmelab/react-admin/blob/v3.3.3/packages/ra-core/src/util/getFieldLabelTranslationArgs.ts#L28
That's why the name of the field is displayed instead of the translation.

And this condition must be fulfilled.
https://github.com/marmelab/react-admin/blob/v3.3.3/packages/ra-core/src/util/getFieldLabelTranslationArgs.ts#L31

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。