Skip to content

Commit

Permalink
localized SelectImageByTag
Browse files Browse the repository at this point in the history
  • Loading branch information
citizen-dror committed Apr 30, 2020
1 parent 19f0b7c commit 4d84fc9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/components/molecules/FormImageDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const GroupTextEn: React.FC<IGroupProps> = observer(({ name }) => {
<Form.Control
as="textarea"
value={myVal}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setCurrImageVal('texthe', e.target.value)}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setCurrImageVal('texten', e.target.value)}
/>
</Form.Group>
);
Expand Down
43 changes: 23 additions & 20 deletions src/components/organisms/MyImageGallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,28 +100,31 @@ interface PropsSelectImageByTag {
const styleSelect = {
width: '150px',
};
const SelectImageByTag: React.FC<PropsSelectImageByTag> = observer(({ onChange }) => (
<div>
<Form.Group as={Col} controlId="exampleForm.SelectTag">
{/* <Form.Label>
const SelectImageByTag: React.FC<PropsSelectImageByTag> = observer(({ onChange }) => {
const { t } = useTranslation();
return (
<div>
<Form.Group as={Col} controlId="exampleForm.SelectTag">
{/* <Form.Label>
tags
</Form.Label> */}
<Form.Control
as="select"
style={styleSelect}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => { onChange(e.target.value); }}
>
<option>כללי</option>
<option>הולכי רגל</option>
<option>רוכבי אופניים</option>
<option>רוכבי אופנוע</option>
<option>מכוניות</option>
<option>אוטובוסים</option>
<option>ילדים</option>
</Form.Control>
</Form.Group>
</div>
));
<Form.Control
as="select"
style={styleSelect}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => { onChange(e.target.value); }}
>
<option value="כללי">{t('general')}</option>
<option value="הולכי רגל">{t('pedestrian')}</option>
<option value="רוכבי אופניים">{t('cyclist')}</option>
<option value="רוכבי אופנוע">{t('motorcycle')}</option>
<option value="מכוניות">{t('car')}</option>
<option value="אוטובוסים">{t('bus')}</option>
<option value="ילדים">{t('kids')}</option>
</Form.Control>
</Form.Group>
</div>
);
});

const styleTitle: React.CSSProperties = {
textAlign: 'center',
Expand Down
2 changes: 2 additions & 0 deletions src/lng/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@
"resize": "Resize",
"NoResultsFound": "No results found",
"export-to-csv": "Export to CSV",
"general": "General",
"kids": "Kids",
"hide-description": "Hide Text",
"show-description": "Show Text",
"not-found-images" : "No photos found for this category"
Expand Down
2 changes: 2 additions & 0 deletions src/lng/he/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
"resize": "הגדלה",
"NoResultsFound": "לא נמצאו תוצאות",
"export-to-csv": "יצוא לקובץ CSV",
"general": "כללי",
"kids": "ילדים",
"hide-description": "הסתר תאור",
"show-description": "הצג תאור",
"not-found-images" : "לא נמצאו תמונות לקטגוריה זו"
Expand Down

0 comments on commit 4d84fc9

Please sign in to comment.