絵文字の英語および翻訳エイリアスの追加

Add alias support to emoji picker の議論を継続します:

英語および翻訳された検索エイリアスのサポートを追加することで、絵文字ピッカーを大幅に改善できます。Unicode コンソーシアムは、必要なすべてのデータを提供しています:

この機能は以下の 2 つの部分で構成されます:

  1. 英語のエイリアスを適切に実装する
  2. ロケールごとのエイリアスサポートを追加し、フランス語のサイトで :sourire と入力するとウィンドウに :smile: が表示されるようにする

これを私のタスクリストに追加しました。

「いいね!」 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:

image

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

これはここで再度報告されました(現在はクローズ済み):

この件を優先し、次のリリースで対応いたします。

「いいね!」 4

@j.jaffeux 当社の emoji-db リポジトリに検索エイリアスを含めるための PR を作成しました。

「いいね!」 5

この機能は以下の PR で実装しました。

その過程で、emojis.json のペイロードを 160KB 削減するバグ修正も行いました :smiling_face_with_sunglasses:

これにより、完全なローカライズされた検索エイリアスが利用可能になりました。

「いいね!」 4

いくつかの言語でローカライズされた絵文字エイリアスのサポートをマージしました。これにより、ついに

また、

も可能です。

「いいね!」 3