diff --git a/packages/emoji-mart-data/i18n/en.json b/packages/emoji-mart-data/i18n/en.json index 2444f8bf..e0bd9944 100644 --- a/packages/emoji-mart-data/i18n/en.json +++ b/packages/emoji-mart-data/i18n/en.json @@ -2,10 +2,6 @@ "search": "Search", "search_no_results_1": "Oh no!", "search_no_results_2": "That emoji couldn’t be found", - "emojis_found_plural": "emojis found", - "emoji_found_singular": "emoji found", - "search_input_aria_label": "Search emojis", - "available_emojis": "Available emojis", "pick": "Pick an emoji…", "add_custom": "Add custom emoji", "categories": { @@ -31,6 +27,9 @@ "6": "Dark" }, "a11y": { - "available_emojis": "Available emojis" + "available_emojis": "Available emojis", + "emojis_found_plural": "emojis found", + "emoji_found_singular": "emoji found", + "search_input_aria_label": "Search emojis" } } diff --git a/packages/emoji-mart/src/components/Picker/Picker.tsx b/packages/emoji-mart/src/components/Picker/Picker.tsx index 8ba204df..1dc4646d 100644 --- a/packages/emoji-mart/src/components/Picker/Picker.tsx +++ b/packages/emoji-mart/src/components/Picker/Picker.tsx @@ -867,7 +867,9 @@ export default class Picker extends Component { } else { let count = searchResults.flat().length let translation = - count === 1 ? I18n.emoji_found_singular : I18n.emojis_found_plural + count === 1 + ? I18n?.a11y?.emoji_found_singular + : I18n?.a11y?.emojis_found_plural return [count, translation].join(' ') } } @@ -889,7 +891,7 @@ export default class Picker extends Component { onClick={this.handleSearchClick} onInput={this.handleSearchInput} onKeyDown={this.handleEmojisKeyDown} - aria-label={I18n.search_input_aria_label} + aria-label={I18n?.a11y?.search_input_aria_label} autocomplete="off" />