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(DataTable): datatable language Closes #1309 #1353

Conversation

kaminderpal
Copy link
Contributor

@kaminderpal kaminderpal commented Oct 2, 2023

Description

Update language of data table components like filter mode, filter message, toggle density.

Fixes # (1309)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Add the URL for your deploy!
https://kaminderpal.github.io/geoview/raw-data-table.html

Checklist:

  • I have build (rush build) and deploy (rush host) my PR
  • I have connected the issues(s) to this PR
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have created new issue(s) related to the outcome of this PR is needed
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

This change is Reviewable

@kaminderpal kaminderpal marked this pull request as draft October 2, 2023 22:40
@kaminderpal kaminderpal marked this pull request as ready for review October 4, 2023 17:12
Copy link
Member

@jolevesq jolevesq left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 6 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @kaminderpal)


packages/geoview-core/src/core/components/data-table/map-data-table.tsx line 136 at r2 (raw file):

  const { t, i18n } = useTranslation();

  const locale = i18n.language === 'fr' ? 'fr-ca' : 'en';

You should get language by api.maps[mapId].currentLanguage I think


packages/geoview-core/src/core/components/data-table/map-data-table.tsx line 366 at r2 (raw file):

        <DatePicker
          timezone="UTC"
          format={locale === 'fr-ca' ? 'DD/MM/YYYY' : 'YYYY-MM-DD'}

format should always be YYYY/MM/DD as it is the ISO format for date. For French it should be AAAA/MM/JJ

Copy link
Contributor Author

@kaminderpal kaminderpal left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 6 files reviewed, 2 unresolved discussions (waiting on @jolevesq)


packages/geoview-core/src/core/components/data-table/map-data-table.tsx line 136 at r2 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

You should get language by api.maps[mapId].currentLanguage I think

Done.


packages/geoview-core/src/core/components/data-table/map-data-table.tsx line 366 at r2 (raw file):

Previously, jolevesq (Johann Levesque) wrote…

format should always be YYYY/MM/DD as it is the ISO format for date. For French it should be AAAA/MM/JJ

Done.

Copy link
Member

@jolevesq jolevesq left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @kaminderpal)

@jolevesq jolevesq merged commit a80ae30 into Canadian-Geospatial-Platform:develop Oct 4, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants