Skip to content
New issue

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

fix: PageLoading component message and translation #369

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Usmanfee
Copy link
Contributor

@Usmanfee Usmanfee commented Oct 30, 2024

Description

Added translation mapped object to PageLoading component to display messages in EN and DE.

Changelog entry:

- **PageLoading Table**
  - Added Translation support for messages in EN and DE [#368](https://github.com/eclipse-tractusx/portal-shared-components/issues/368)

Why

PageLoading component always displaying hardcoded message in case of absence of Table data and table data against user typed search keywords.

Issue

#368

Checklist

  • I have performed a self-review of my own code
  • I have successfully tested my changes locally

@Usmanfee Usmanfee changed the title fix: pageloading component message and translation fix: PageLoading component message and translation Oct 30, 2024
Copy link

Copy link
Contributor

@ss-nikunj ss-nikunj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@MaximilianHauer MaximilianHauer added this to the Release 25.03 milestone Nov 18, 2024
Copy link
Contributor

@oyo oyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should handle I18n the same way in all components. This solution is different from other components. For sake of uniformity I suggest to simply expose the noRowsMessage prop

@@ -53,6 +53,7 @@ export interface PageLoadingTableProps<Row, Args>
allItems?: Row[]
callbackToPage?: (data: PaginResult<Row>) => void
allItemsLoadedHint?: string
mappedTableSearchTranslation?: Record<string, string>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Usmanfee In the existing components we simply pass the message in the current language, so the suggested solution works differently. See my comment in the ticket: #368 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: IN PROGRESS
Development

Successfully merging this pull request may close these issues.

4 participants