Skip to content

Commit

Permalink
Allowed the emoji picker 'Search...' string to be localized (#2294)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashley authored and Gargron committed Apr 22, 2017
1 parent 9d3be55 commit 6af21da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -4,7 +4,8 @@ import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';

const messages = defineMessages({
emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' }
emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' },
emoji_search: { id: 'emoji_button.search', defaultMessage: 'Search...' }
});

const settings = {
Expand Down Expand Up @@ -46,7 +47,7 @@ class EmojiPickerDropdown extends React.PureComponent {
</DropdownTrigger>

<DropdownContent className='dropdown__left light'>
<EmojiPicker emojione={settings} onChange={this.handleChange} search={true} />
<EmojiPicker emojione={settings} onChange={this.handleChange} searchPlaceholder={intl.formatMessage(messages.emoji_search)} search={true} />
</DropdownContent>
</Dropdown>
);
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/components/locales/en.jsx
Expand Up @@ -41,6 +41,7 @@ const en = {
"compose_form.spoiler_placeholder": "Content warning",
"compose_form.spoiler": "Hide text behind warning",
"emoji_button.label": "Insert emoji",
"emoji_button.search": "Search...",
"empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!",
"empty_column.hashtag": "There is nothing in this hashtag yet.",
"empty_column.home.public_timeline": "the public timeline",
Expand Down

0 comments on commit 6af21da

Please sign in to comment.