@nyris/nyris-webapp 0.3.26 → 0.3.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyris/nyris-webapp",
3
- "version": "0.3.26",
3
+ "version": "0.3.27",
4
4
  "homepage": "./",
5
5
  "dependencies": {
6
6
  "@algolia/autocomplete-js": "^1.7.1",
@@ -12,8 +12,8 @@
12
12
  "@material-ui/data-grid": "^4.0.0-alpha.37",
13
13
  "@material-ui/icons": "^4.4.1",
14
14
  "@material-ui/lab": "^4.0.0-alpha.60",
15
- "@nyris/nyris-api": "^0.3.26",
16
- "@nyris/nyris-react-components": "^0.3.26",
15
+ "@nyris/nyris-api": "^0.3.27",
16
+ "@nyris/nyris-react-components": "^0.3.27",
17
17
  "@reduxjs/toolkit": "^1.6.1",
18
18
  "@splidejs/react-splide": "^0.7.12",
19
19
  "@types/blueimp-load-image": "^2.23.4",
@@ -349,17 +349,13 @@ function DetailItem(props: Props) {
349
349
  >
350
350
  <Grid
351
351
  container
352
- justifyContent="space-between"
352
+ justifyContent={
353
+ settings.shareOption ? 'space-between' : 'space-around'
354
+ }
353
355
  alignItems="center"
354
356
  >
355
357
  <Grid item>
356
- <Box
357
- display={'flex'}
358
- justifyContent={
359
- settings.shareOption ? 'space-between' : 'space-around'
360
- }
361
- alignItems={'center'}
362
- >
358
+ <Box display={'flex'} alignItems={'center'}>
363
359
  <Button
364
360
  className="btn-item"
365
361
  onClick={() => {
@@ -281,7 +281,11 @@ const SearchBox = (props: any) => {
281
281
  history.push('/');
282
282
  }}
283
283
  >
284
- <Tooltip title="clear text search" placement="top" arrow={true}>
284
+ <Tooltip
285
+ title={t('Clear text search')}
286
+ placement="top"
287
+ arrow={true}
288
+ >
285
289
  <ClearOutlinedIcon style={{ fontSize: 16, color: '#2B2C46' }} />
286
290
  </Tooltip>
287
291
  </Button>
@@ -321,7 +325,7 @@ const SearchBox = (props: any) => {
321
325
  })}
322
326
  />
323
327
  <Tooltip
324
- title="Search with an image"
328
+ title={t('Search with an image')}
325
329
  placement="top"
326
330
  arrow={true}
327
331
  >
@@ -39,6 +39,7 @@ import {
39
39
  import { useAppDispatch, useAppSelector } from 'Store/Store';
40
40
  import { showHits } from '../../constants';
41
41
  import { DEFAULT_REGION } from '../../constants';
42
+ import { useTranslation } from 'react-i18next';
42
43
 
43
44
  interface Props {
44
45
  allSearchResults: any;
@@ -56,7 +57,7 @@ function ResultComponent(props: Props) {
56
57
  const [imageSelection, setImageSelection] = useState<any>(null);
57
58
  const executeScroll = () => refBoxResult.current.scrollIntoView('-100px');
58
59
  const [filterString, setFilterString] = useState<string>();
59
-
60
+ const { t } = useTranslation();
60
61
  useEffect(() => {
61
62
  if (selectedRegion) {
62
63
  setImageSelection(selectedRegion);
@@ -312,7 +313,10 @@ function ResultComponent(props: Props) {
312
313
  </Box>
313
314
  <Box className="box-title_col-left">
314
315
  <Typography style={{ fontSize: 11, color: '#fff' }}>
315
- Adjust the selection frame for better results.
316
+ {t(
317
+ 'Adjust the selection frame for better results',
318
+ )}
319
+ .
316
320
  </Typography>
317
321
  </Box>
318
322
  </Box>
@@ -447,7 +451,7 @@ function ResultComponent(props: Props) {
447
451
  className="box-change-hit-items"
448
452
  >
449
453
  <span style={{ paddingRight: '10px' }}>
450
- Items per page:
454
+ {t('Items per page')}:
451
455
  </span>
452
456
  <HitsPerPage items={showHits} defaultRefinement={20} />
453
457
  </Box>
@@ -7,6 +7,11 @@ export const translations = {
7
7
  'Manufacturer Number': 'Manufacturer Number',
8
8
  'Close group': 'Close group',
9
9
  'Show group': 'Show group',
10
+ 'Adjust the selection frame for better results':
11
+ 'Adjust the selection frame for better results',
12
+ 'Items per page': 'Items per page',
13
+ 'Search with an image': 'Search with an image',
14
+ 'Clear text search': 'Clear text search',
10
15
  },
11
16
  },
12
17
  de: {
@@ -17,6 +22,11 @@ export const translations = {
17
22
  'Manufacturer Number': 'Herst. Teile-Nr.',
18
23
  'Close group': 'Schließe Gruppe',
19
24
  'Show group': 'Zeige Gruppe',
25
+ 'Adjust the selection frame for better results':
26
+ 'Anpassen des Rahmens für bessere Ergebnisse',
27
+ 'Items per page': 'Artikel pro Seite',
28
+ 'Search with an image': 'Bildsuche',
29
+ 'Clear text search': 'Suchtext löschen',
20
30
  },
21
31
  },
22
32
  };