1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-24 07:06:18 +09:00

Allowed the emoji picker 'Search...' string to be localized (#2294)

This commit is contained in:
Ashley 2017-04-22 13:36:33 +12:00 committed by Eugen
parent 9d3be5579a
commit 6af21daac9
2 changed files with 4 additions and 2 deletions

View File

@ -4,7 +4,8 @@ import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
const messages = defineMessages({ 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 = { const settings = {
@ -46,7 +47,7 @@ class EmojiPickerDropdown extends React.PureComponent {
</DropdownTrigger> </DropdownTrigger>
<DropdownContent className='dropdown__left light'> <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> </DropdownContent>
</Dropdown> </Dropdown>
); );

View File

@ -41,6 +41,7 @@ const en = {
"compose_form.spoiler_placeholder": "Content warning", "compose_form.spoiler_placeholder": "Content warning",
"compose_form.spoiler": "Hide text behind warning", "compose_form.spoiler": "Hide text behind warning",
"emoji_button.label": "Insert emoji", "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.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.hashtag": "There is nothing in this hashtag yet.",
"empty_column.home.public_timeline": "the public timeline", "empty_column.home.public_timeline": "the public timeline",