Skip to content

Commit

Permalink
Add de localization
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Sep 17, 2022
1 parent 4928dde commit 7cfa877
Show file tree
Hide file tree
Showing 66 changed files with 1,556 additions and 109 deletions.
57 changes: 0 additions & 57 deletions material-react-table-docs/components/mdx/LocaleExamples.tsx

This file was deleted.

61 changes: 61 additions & 0 deletions material-react-table-docs/example-groups/LocaleExamples.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import React, { Suspense, useState } from 'react';
import dynamic from 'next/dynamic';
import { Box, Skeleton, Tab, Tabs } from '@mui/material';

//Locale Examples
const CS_Table = dynamic(() => import('../examples/localization-i18n-cs'), {
suspense: true,
});
const DE_Table = dynamic(() => import('../examples/localization-i18n-de'), {
suspense: true,
});
const ES_Table = dynamic(() => import('../examples/localization-i18n-es'), {
suspense: true,
});
const PL_Table = dynamic(() => import('../examples/localization-i18n-pl'), {
suspense: true,
});
const PT_BR_Table = dynamic(
() => import('../examples/localization-i18n-pt-BR'),
{
suspense: true,
},
);

const supportedLocales = ['cs', 'de', 'es', 'pl', 'pt-BR'];

const LocaleExamples = () => {
const [currentLocale, setCurrentLocale] = useState('es');

return (
<>
<Box sx={{ width: '100%' }}>
<Tabs
textColor="secondary"
indicatorColor="secondary"
onChange={(_event, newValue: string) => setCurrentLocale(newValue)}
scrollButtons="auto"
value={currentLocale}
variant="scrollable"
>
{supportedLocales.map((locale) => (
<Tab label={locale} key={locale} value={locale} />
))}
</Tabs>
</Box>
<div style={{ minHeight: '1500px' }} lang={currentLocale}>
<Suspense
fallback={<Skeleton animation="wave" height="600px" width="100%" />}
>
{currentLocale === 'cs' && <CS_Table />}
{currentLocale === 'de' && <DE_Table />}
{currentLocale === 'es' && <ES_Table />}
{currentLocale === 'pl' && <PL_Table />}
{currentLocale === 'pt-BR' && <PT_BR_Table />}
</Suspense>
</div>
</>
);
};

export default LocaleExamples;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@mui/material": "^5.9.0",
"@mui/x-date-pickers": "^5.0.1",
"dayjs": "^1.11.5",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@faker-js/faker": "^7.3.0",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.0",
"material-react-table": "^1.0.8",
"material-react-table": "^1.0.9",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
Loading

2 comments on commit 7cfa877

@vercel
Copy link

@vercel vercel bot commented on 7cfa877 Sep 17, 2022

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 7cfa877 Sep 17, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.