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

[DataGrid] Add missing TablePagination localizations #1109

Merged
merged 5 commits into from
Feb 26, 2021

Conversation

DanailH
Copy link
Member

@DanailH DanailH commented Feb 24, 2021

Fixes #1107

Some context about the discussion:

The points I wonder about:

  1. Do we need to duplicate the translation keys for the components? Do developers need to translate a differently in the context of a data grid? (DataGrid.localeText.footerPaginationRowsPerPage vs. TablePagination.labelRowsPerPage)
  2. Should we duplicate (seems we need the same translations) the maintenance of the translated locales between the two components?
  3. Should the data grid ignore the translation of the core components and ask developers to configure them independently? Basically, asking to do https://material-ui.com/guides/localization/#locale-text. And in the future, if we support importing individual translations, to cherry-pick what they need.
  4. Should the data grid work in isolation, importing its translation from the core package, avoiding the need for 3?

@DanailH DanailH added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! labels Feb 24, 2021
@DanailH DanailH self-assigned this Feb 24, 2021
@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 25, 2021

@DanailH I have fixed the build on HEAD (playwright issue). You can rebase.

@DanailH
Copy link
Member Author

DanailH commented Feb 26, 2021

@oliviertassinari I adjusted the translation. I removed the one that we had for the pagination and am now pulling the ones from the core to basically extend them with the ones specific for the grid.

@DanailH DanailH marked this pull request as ready for review February 26, 2021 10:49
@DanailH DanailH merged commit 4be9476 into mui:master Feb 26, 2021
@quocanh176
Copy link

quocanh176 commented Feb 26, 2021

Thanks a lot for the quick fixing!
Just a quick question though. I took a look at the file "localeTextConstants.ts" from the latest commit and i still see no property to localize the word "of" for the pagination footer. Am i missing something?

@oliviertassinari @DanailH could anyone help me on my question?

@MoiseScalzo
Copy link

MoiseScalzo commented Apr 21, 2021

Thanks a lot for the quick fixing!
Just a quick question though. I took a look at the file "localeTextConstants.ts" from the latest commit and i still see no property to localize the word "of" for the pagination footer. Am i missing something?

@oliviertassinari @DanailH could anyone help me on my question?

Same here, could not find how to localize pagination strings :(

@farrellp43
Copy link

Thanks a lot for the quick fixing! Just a quick question though. I took a look at the file "localeTextConstants.ts" from the latest commit and i still see no property to localize the word "of" for the pagination footer. Am i missing something?

@oliviertassinari @DanailH could anyone help me on my question?

Still waiting on how to localize the pagination

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DataGrid] Pagination localization
5 participants