Add English and translated aliases for Emojis

Continuing the discussion from Add alias support to emoji picker:

Our Emoji picker could be greatly improved by adding support for English and translated search aliases. The Unicode Consortium provides all the data we need:

This feature consists of two parts:

  1. Doing all the aliases properly for English
  2. Adding support for per locale aliases, so you can type :sourire in French on French sites and get :smile: in the window.

I’m putting it on my list.

16개의 좋아요

Just as a note here, we need it to be lazy loaded, this is why I haven’t been doing it yet.

7개의 좋아요

I think it is fine to have alias.en and alias.de etc… files, so we can lazy load per locale.

4개의 좋아요

Isn’t this complete @gerhard?

No, not yet. I decided to work on it next month because it was moved to the next release.

5개의 좋아요

Just found out about this “public” list of translated emoji aliases: Translations

3개의 좋아요

Hey

I have a general question. I created my custom emoji group. How do I override this translation key? :slight_smile:

Thank you.

Currently you have to add translations into a theme or component, in your case it would be something like:

<script>
    I18n.translations.en.js.emoji_picker.twitch = "Twitch";
</script>

You can also add de if you need a different name for de.

@gerhard I had to ask you about this, do you see a better way to accomplish this given custom group names are set by admins ?

7개의 좋아요

The easiest solution I can think of is to use the custom group name if the translation can’t be found. The only problem I’m seeing is that group names seem to be converted to lowercase.

I18n.t("emoji_picker.twitch", { defaultValue: "twitch" })

The more involved solution would be to make SiteTextsController and TranslationOverride work with custom emoji group names (or any other custom translation that needs to be added at runtime).

2개의 좋아요

Cool might investigate the second one at some point, thanks.

2개의 좋아요

Hey I just did console.log(I18n.translations.en.js) which outputs me the following:

It seems that emoji_picker is not available for a translation for me. There are also no effects if I paste in your code into my theme head.

Thank you.

1개의 좋아요

This was reported again here: (now closed)

We will be prioritizing this and get to it in the next release.

4개의 좋아요

https://github.com/jjaffeux/emoji-db/pull/7

@j.jaffeux I created a PR to include search aliases in our emoji-db repo.

5개의 좋아요

이 내용은 다음 풀 리퀘스트에서 구현되었습니다:

이 과정에서 emojis.json 페이로드를 160KB 줄이는 버그가 해결되었습니다 :smiling_face_with_sunglasses:

이 변경사항은 포괄적인 로컬라이즈된 검색 별칭을 도입합니다.

4개의 좋아요

일부 언어에 대한 로컬라이즈된 이모지 별칭 지원을 병합했습니다. 이제 마침내

그리고

4개의 좋아요

이 주제는 13일 후 자동으로 닫혔습니다. 더 이상 답변을 남길 수 없습니다.

이를 더 확장하여

3개의 좋아요