Archived
2
0
Fork 0

Adding german localization

This commit is contained in:
Eugen Rochko 2016-11-18 15:36:16 +01:00
parent c1be1ac7c6
commit 85d1b74ac3
26 changed files with 488 additions and 51 deletions

View file

@ -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