Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Emoji] Add the gitlab locale#19736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletionsstring.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -560,7 +560,7 @@ textual representation in all languages based on the `Unicode CLDR dataset`_::


The ``EmojiTransliterator`` also provides special locales that convert emojis to
short codes and vice versa in specific platforms, such as GitHub and Slack.
short codes and vice versa in specific platforms, such as GitHub, Gitlab and Slack.

GitHub Emoji Transliteration
............................
Expand All@@ -577,6 +577,21 @@ Convert GitHub short codes to emojis with the ``github-emoji`` locale::
$transliterator->transliterate('Teenage :turtle: really love :pizza:');
// => 'Teenage 🐢 really love 🍕'

Gitlab Emoji Transliteration
............................

Convert Gitlab emojis to short codes with the ``emoji-gitlab`` locale::

$transliterator = EmojiTransliterator::create('emoji-gitlab');
$transliterator->transliterate('Breakfast with 🥝 or 🥛');
// => 'Breakfast with :kiwi: or :milk:'

Convert Gitlab short codes to emojis with the ``gitlab-emoji`` locale::

$transliterator = EmojiTransliterator::create('gitlab-emoji');
$transliterator->transliterate('Breakfast with :kiwi: or :milk:');
// => 'Breakfast with 🥝 or 🥛'

Slack Emoji Transliteration
...........................

Expand DownExpand Up@@ -693,7 +708,7 @@ with the slugger to transform any emojis into their textual representation::
// $slug = 'un-chat-qui-sourit-chat-noir-et-un-tete-de-lion-vont-au-parc-national';

If you want to use a specific locale for the emoji, or to use the short codes
from GitHub or Slack, use the first argument of ``withEmoji()`` method::
from GitHub, Gitlab or Slack, use the first argument of ``withEmoji()`` method::

use Symfony\Component\String\Slugger\AsciiSlugger;

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp