Skip to content

Commit

Permalink
fix: add translation for icon text and error message in input compone…
Browse files Browse the repository at this point in the history
…nt. Add codeclimate config yml
  • Loading branch information
jlison committed Aug 24, 2019
1 parent 6c55869 commit faaec26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: "2"
plugins:
tslint:
enabled: true
config: tslint.json
4 changes: 2 additions & 2 deletions src/components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default ({
<InputGroupAddon addonType={addon.type as 'prepend' | 'append'}>
<InputGroupText>
{addon.icon && <>{addon.icon}</>}{' '}
{addon.text && <>{addon.text}</>}
{addon.text && <>{t(addon.text)}</>}
</InputGroupText>
</InputGroupAddon>
)}
Expand Down Expand Up @@ -88,7 +88,7 @@ export default ({
{errors[name] && (
<FormFeedback
className={`rfb-feedback ${!!errors[name] ? 'rfb-invalid' : ''}`}>
<span>{errors[name].message}</span>
<span>{t(errors[name].message)}</span>
</FormFeedback>
)}
</InputGroup>
Expand Down

0 comments on commit faaec26

Please sign in to comment.