diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-18 15:36:16 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-18 15:53:46 +0100 |
commit | 85d1b74ac3bbd563c35a7212069b84f8d3a6bd99 (patch) | |
tree | 5226341c1cbe8e7cf983b629577c22812056062a /app/assets/javascripts/components/features/compose/components/search.jsx | |
parent | c1be1ac7c6ebaabcd936f41d7a74ec8977625942 (diff) |
Adding german localization
Diffstat (limited to 'app/assets/javascripts/components/features/compose/components/search.jsx')
-rw-r--r-- | app/assets/javascripts/components/features/compose/components/search.jsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/assets/javascripts/components/features/compose/components/search.jsx b/app/assets/javascripts/components/features/compose/components/search.jsx index 65df336cc..b4e618820 100644 --- a/app/assets/javascripts/components/features/compose/components/search.jsx +++ b/app/assets/javascripts/components/features/compose/components/search.jsx @@ -3,7 +3,11 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import Autosuggest from 'react-autosuggest'; import AutosuggestAccountContainer from '../containers/autosuggest_account_container'; import { debounce } from 'react-decoration'; -import { injectIntl } from 'react-intl'; +import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; + +const messages = defineMessages({ + placeholder: { id: 'search.placeholder', defaultMessage: 'Search' } +}); const getSuggestionValue = suggestion => suggestion.value; @@ -16,7 +20,7 @@ const renderSuggestion = suggestion => { }; const renderSectionTitle = section => ( - <strong>{section.title}</strong> + <strong><FormattedMessage id={`search.${section.title}`} defaultMessage={section.title} /></strong> ); const getSectionSuggestions = section => section.items; @@ -95,7 +99,7 @@ const Search = React.createClass({ render () { const inputProps = { - placeholder: this.props.intl.formatMessage({ id: 'search.placeholder', defaultMessage: 'Search' }), + placeholder: this.props.intl.formatMessage(messages.placeholder), value: this.props.value, onChange: this.onChange, style: inputStyle |