### Install Emojibase Data Source: https://github.com/milesj/emojibase/blob/master/packages/data/README.md Install the emojibase-data package using Yarn. ```bash yarn add emojibase-data ``` -------------------------------- ### Install Emojibase Regex Source: https://github.com/milesj/emojibase/blob/master/packages/regex/README.md Installs the emojibase-regex package using Yarn. ```bash yarn add emojibase-regex ``` -------------------------------- ### Install Emojibase Test Utils Source: https://github.com/milesj/emojibase/blob/master/packages/test-utils/README.md Instructions for installing the emojibase-test-utils package as a development dependency using either Yarn or npm. ```bash yarn add emojibase-test-utils --dev // Or npm install emojibase-test-utils --save-dev ``` -------------------------------- ### Install Emojibase Data Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Installs the emojibase-data package using either Yarn or NPM. This package contains the JSON datasets for emojis. ```bash yarn add emojibase-data ``` ```bash npm install emojibase-data ``` -------------------------------- ### Install emojibase-regex Source: https://github.com/milesj/emojibase/blob/master/website/docs/regex.mdx Installs the emojibase-regex package using either Yarn or NPM. This package provides pre-built regular expressions for matching emoji characters, shortcodes, and emoticons. ```yarn yarn add emojibase-regex ``` ```npm npm install emojibase-regex ``` -------------------------------- ### Fetching Emojibase Data from CDN Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Shows how to import and use functions like `fetchFromCDN`, `fetchEmojis`, `fetchMessages`, and `fetchShortcodes` to retrieve Emojibase data from a CDN. It includes examples with various options. ```ts import { fetchFromCDN, fetchEmojis, fetchMessages, fetchShortcodes } from 'emojibase'; const englishEmojis = await fetchFromCDN('en/data.json', { shortcodes: ['github'] }); const japaneseCompactEmojis = await fetchEmojis('ja', { compact: true }); const germanCldrShortcodes = await fetchShortcodes('de', 'cldr'); const chineseTranslations = await fetchMessages('zh'); ``` -------------------------------- ### Update Documentation Files Source: https://github.com/milesj/emojibase/blob/master/docs/new-major-checklist.md Update emoji, Unicode, and CLDR version information and links across various documentation files, including READMEs, dataset descriptions, and sidebars. Add new entries to all `CHANGELOG.md` files to reflect the updates. ```markdown Update README.md Update packages/core/README.md Update website/docs/index.md Update website/docs/datasets.mdx Update website/docs/shortcodes.md Update website/sidebars.js Add entries to all CHANGELOG.md's. ``` -------------------------------- ### Update Localization Files Source: https://github.com/milesj/emojibase/blob/master/docs/new-major-checklist.md Gather new shortcode entries by running `generate:shortcodes`. Then, update the base `.po` files and apply these changes to all locale-specific `messages.po` files, ensuring all entries without a message are localized. ```shell yarn generate:shortcodes # Apply pot changes to all po//messages.po files ``` -------------------------------- ### CLDR Shortcodes Example Source: https://github.com/milesj/emojibase/blob/master/website/docs/shortcodes.md Demonstrates localized shortcodes derived from Unicode CLDR annotations, including transliterated versions for non-Latin languages. ```en // 😁 beaming face with smiling eyes :beaming_face_with_smiling_eyes: // English :ni_yatto_warau: // Japanese :svetitsya_ot_schastya: // Russian ``` -------------------------------- ### Generate Emojibase Data and Types Source: https://github.com/milesj/emojibase/blob/master/docs/new-major-checklist.md Run the emojibase-generator to create new data based on updated Unicode and emoji versions. This process generates essential data files and updates type definitions for group and subgroup keys. ```shell yarn generate yarn generate:types ``` -------------------------------- ### Emojibase Messages Format Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Demonstrates the structure of the messages.json file used for emoji metadata translations. It includes examples for groups, subgroups, and skin tones, aligning with TypeScript type aliases. ```ts import data from 'emojibase-data/en/messages.json'; ``` ```js { groups: [ { key: 'smileys-emotion', message: 'smileys & emotion', order: 0, }, // ... ], subgroups: [ { key: 'face-smiling', message: 'smiling', order: 0, }, // ... ], skinTones: [ { key: 'light', message: 'light skin tone', }, // ... ], } ``` -------------------------------- ### Full Emoji Data Structure Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Example of the full data structure for an emoji object within the emojibase datasets. Includes properties like annotation, emoji, gender, hexcode, shortcodes, and skin tone variations. ```javascript { annotation: 'man lifting weights', emoji: 'πŸ‹οΈβ€β™‚οΈ', gender: 1, group: 0, hexcode: '1F3CB-FE0F-200D-2642-FE0F', order: 1518, shortcodes: [ 'man_lifting_weights', ], subgroup: 0, tags: [ 'weight lifter', 'man', ], type: 1, version: 4, skins: [ { annotation: 'man lifting weights: light skin tone', emoji: 'πŸ‹πŸ»β€β™‚οΈ', gender: 1, group: 0, hexcode: '1F3CB-1F3FB-200D-2642-FE0F', order: 1522, shortcodes: [ 'man_lifting_weights_tone1', ], subgroup: 0, type: 1, tone: 1, version: 4, }, // ... ], } ``` -------------------------------- ### Update Group and Subgroup Types and Constants Source: https://github.com/milesj/emojibase/blob/master/docs/new-major-checklist.md After generating new data, copy the updated `GroupKey` and `SubgroupKey` types from the generator output to `packages/core/src/types.ts`. Subsequently, update the `GROUP_KEY_*` constants in `packages/core/src/constants.ts`. ```javascript // packages/core/src/types.ts export type GroupKey = "..."; export type SubgroupKey = "..."; // packages/core/src/constants.ts export const GROUP_KEY_PEOPLE = "..."; ``` -------------------------------- ### CLDR-Native Shortcodes Example Source: https://github.com/milesj/emojibase/blob/master/website/docs/shortcodes.md Showcases CLDR-native shortcodes which are not transliterated to Latin characters and avoid conflicts with the standard CLDR preset. ```en // 😁 beaming face with smiling eyes :λ―Έμ†Œ_μ§“λŠ”_눈으둜_μ›ƒλŠ”_μ–Όκ΅΄: // Korean :осяйно_всміхнСнС_обличчя_ΠΉ_ΠΎΡ‡Ρ–: // Ukrainian ``` -------------------------------- ### Compact Emoji Data Structure Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Example of the compact data structure for an emoji object. This format omits certain properties to reduce file size, focusing on essential information like annotation, group, hexcode, and unicode. ```javascript { annotation: 'man lifting weights', group: 0, hexcode: '1F3CB-FE0F-200D-2642-FE0F', order: 1518, shortcodes: [ 'man_lifting_weights', ], tags: [ 'weight lifter', 'man', ], unicode: 'πŸ‹οΈβ€β™‚οΈ', skins: [ { annotation: 'man lifting weights: light skin tone', group: 0, hexcode: '1F3CB-1F3FB-200D-2642-FE0F', order: 1522, shortcodes: [ 'man_lifting_weights_tone1', ], unicode: 'πŸ‹πŸ»β€β™‚οΈ', }, // ... ], } ``` -------------------------------- ### Update Emojibase Package Version Constants Source: https://github.com/milesj/emojibase/blob/master/docs/new-major-checklist.md Update the version constants within the emojibase package to reflect the latest emoji, Unicode, and CLDR versions. Ensure version formats are correct: 'x.x' for emoji and EMJOI_VERSIONS, 'x.x.x' for UNICODE_VERSIONS, and 'x' for CLDR. ```javascript const LATEST_EMOJI_VERSION = "x.x"; const LATEST_UNICODE_VERSION = "x.x.x"; const LATEST_CLDR_VERSION = "x"; const EMOJI_VERSIONS = ["x.x", ...]; const UNICODE_VERSIONS = ["x.x", ...]; ``` -------------------------------- ### Update Regex Patterns Source: https://github.com/milesj/emojibase/blob/master/docs/add-new-language.md Example of updating regex patterns to support non-Latin locales by adding Unicode ranges. ```javascript // packages/regex/shortcode-native.js // Add Unicode ranges here ``` -------------------------------- ### Run Emojibase Generator Source: https://github.com/milesj/emojibase/blob/master/packages/generator/README.md This command initiates the Emojibase generator process using Yarn. ```bash yarn run generate ``` -------------------------------- ### Add Locale to Constants Source: https://github.com/milesj/emojibase/blob/master/docs/add-new-language.md Example of adding a new locale to the SUPPORTED_LOCALES constant in TypeScript. ```typescript // packages/core/src/constants.ts const SUPPORTED_LOCALES = [ // ... other locales 'your-locale' ]; ``` -------------------------------- ### Import and Use Regex Patterns Source: https://github.com/milesj/emojibase/blob/master/packages/regex/README.md Demonstrates how to import and use different regular expression patterns provided by the emojibase-regex package to match emojis, emoticons, and shortcodes. ```typescript import EMOJI_REGEX from 'emojibase-regex'; import EMOTICON_REGEX from 'emojibase-regex/emoticon'; import SHORTCODE_REGEX from 'emojibase-regex/shortcode'; import SHORTCODE_NATIVE_REGEX from 'emojibase-regex/shortcode-native'; `🏰`.match(EMOJI_REGEX); ':)'.match(EMOTICON_REGEX); ':castle:'.match(SHORTCODE_REGEX); ':гвинСя:'.match(SHORTCODE_NATIVE_REGEX); ``` -------------------------------- ### Fetch Emojis from CDN Source: https://github.com/milesj/emojibase/blob/master/packages/data/README.md Fetch emoji datasets from the Emojibase CDN using various options like shortcodes, compact mode, and CLDR shortcodes. ```typescript import { fetchFromCDN, fetchEmojis, fetchShortcodes } from 'emojibase'; const englishEmojis = await fetchFromCDN('en/data.json', { shortcodes: ['github'] }); const japaneseCompactEmojis = await fetchEmojis('ja', { compact: true }); const germanCldrShortcodes = await fetchShortcodes('de', 'cldr'); ``` -------------------------------- ### Build Packages Source: https://github.com/milesj/emojibase/blob/master/docs/add-new-language.md Command to rebuild all packages after adding a new locale to configuration files. ```shell yarn run build ``` -------------------------------- ### Import and Use Regex Patterns Source: https://github.com/milesj/emojibase/blob/master/website/docs/regex.mdx Demonstrates how to import and use various regex patterns from the emojibase-regex package to match emoji characters, emoticons, and shortcodes in strings. It highlights the use of default patterns and specific imports for emoticons and shortcodes. ```ts import EMOJI_REGEX from 'emojibase-regex'; import EMOTICON_REGEX from 'emojibase-regex/emoticon'; import SHORTCODE_REGEX from 'emojibase-regex/shortcode'; import SHORTCODE_NATIVE_REGEX from 'emojibase-regex/shortcode-native'; `πŸ™‚`.match(EMOJI_REGEX); ':)'.match(EMOTICON_REGEX); ':pleased:'.match(SHORTCODE_REGEX); ':гвинСя:'.match(SHORTCODE_NATIVE_REGEX); ``` -------------------------------- ### Fetching Emojibase Data from Custom CDN (Function URL) Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Demonstrates fetching Emojibase data from a custom CDN using a function for `cdnUrl`. This provides granular control over URL formatting, accepting `path` and `version` as arguments. ```ts import { fetchFromCDN, fetchEmojis, fetchMessages, fetchShortcodes } from 'emojibase'; function cdnUrl(path: string, version: string): string { return `https://example.com/cdn/emojidata/${version}/${path}`; } const englishEmojis = await fetchFromCDN('en/data.json', { shortcodes: ['github'], cdnUrl }); const japaneseCompactEmojis = await fetchEmojis('ja', { compact: true, cdnUrl }); const germanCldrShortcodes = await fetchShortcodes('de', 'cldr', { cdnUrl }); const chineseTranslations = await fetchMessages('zh', { cdnUrl }); ``` -------------------------------- ### Load Emoji Data (Flat) Source: https://github.com/milesj/emojibase/blob/master/packages/test-utils/README.md Loads emoji data using the `loadFlatEmojiData` function, returning a flat array of emoji data. Skin tone modifications are moved to the root level for easier access. ```typescript import { loadFlatEmojiData } from 'emojibase-test-utils'; ``` -------------------------------- ### Fetching Emojibase Data from Custom CDN (String URL) Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Illustrates how to fetch Emojibase data from a custom CDN by providing a string URL for the `cdnUrl` option. This allows users to specify their own CDN base path. ```ts import { fetchFromCDN, fetchEmojis, fetchMessages, fetchShortcodes } from 'emojibase'; const cdnUrl = 'https://example.com/cdn/emojidata/latest'; const englishEmojis = await fetchFromCDN('en/data.json', { shortcodes: ['github'], cdnUrl }); const japaneseCompactEmojis = await fetchEmojis('ja', { compact: true, cdnUrl }); const germanCldrShortcodes = await fetchShortcodes('de', 'cldr', { cdnUrl }); const chineseTranslations = await fetchMessages('zh', { cdnUrl }); ``` -------------------------------- ### Import Property Regex Source: https://github.com/milesj/emojibase/blob/master/website/docs/regex.mdx Demonstrates importing regex patterns that leverage ECMAScript Unicode property escapes (e.g., `\p{Emoji}`). These patterns are located in the 'property' directory and offer a more accurate and potentially smaller alternative, but should be used with caution as the feature is still a proposal. ```ts import PROPERTY_EMOJI_REGEX from 'emojibase-regex/property'; ``` -------------------------------- ### Import Codepoint Regex Source: https://github.com/milesj/emojibase/blob/master/website/docs/regex.mdx Shows how to import regex patterns that utilize ES2015+ Unicode codepoint aware syntax. These patterns are found in the 'codepoint' directory and require the 'u' flag, which is defined by default. ```ts import CODEPOINT_EMOJI_REGEX from 'emojibase-regex/codepoint'; ``` -------------------------------- ### Import Localized JSON Dataset Source: https://github.com/milesj/emojibase/blob/master/packages/data/README.md Import the localized JSON dataset for a specific language (e.g., English). ```typescript import data from 'emojibase-data/en/data.json'; ``` -------------------------------- ### Load Emoji Data (Standard) Source: https://github.com/milesj/emojibase/blob/master/packages/test-utils/README.md Loads emoji data using the `loadEmojiData` function, returning an array of English emoji data. This is useful for iterating through all available emoji entries. ```typescript import { loadEmojiData } from 'emojibase-test-utils'; loadEmojiData().forEach((emoji) => { // Do something }); ``` -------------------------------- ### Emojibase Shortcodes Filesizes (JSON) Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Details the original and gzipped file sizes for Emojibase shortcode data in JSON format across various languages and sources. This includes data from CLDR, Emojibase, GitHub, and IAM.CAL. ```json { "fr/shortcodes/emojibase.json": {"size": "42 B", "gzipped": "62 B"}, "en/shortcodes/cldr-native.json": {"size": "258 B", "gzipped": "184 B"}, "en-gb/shortcodes/cldr-native.json": {"size": "258 B", "gzipped": "184 B"}, "zh/shortcodes/emojibase-native.json": {"size": "298 B", "gzipped": "202 B"}, "zh/shortcodes/emojibase.json": {"size": "347 B", "gzipped": "186 B"}, "ja/shortcodes/emojibase.json": {"size": "1.02 kB", "gzipped": "472 B"}, "ja/shortcodes/emojibase-native.json": {"size": "1.09 kB", "gzipped": "571 B"}, "it/shortcodes/cldr-native.json": {"size": "1.18 kB", "gzipped": "496 B"}, "nl/shortcodes/cldr-native.json": {"size": "2.39 kB", "gzipped": "725 B"}, "ru/shortcodes/emojibase.json": {"size": "19.23 kB", "gzipped": "5.9 kB"}, "ru/shortcodes/emojibase-native.json": {"size": "25.23 kB", "gzipped": "6.59 kB"}, "da/shortcodes/emojibase-native.json": {"size": "36.68 kB", "gzipped": "6.7 kB"}, "es/shortcodes/cldr-native.json": {"size": "42.73 kB", "gzipped": "8.38 kB"}, "es-mx/shortcodes/cldr-native.json": {"size": "42.76 kB", "gzipped": "8.47 kB"}, "de/shortcodes/cldr-native.json": {"size": "43.33 kB", "gzipped": "6.84 kB"}, "nb/shortcodes/cldr-native.json": {"size": "44.34 kB", "gzipped": "7.4 kB"}, "en/shortcodes/github.json": {"size": "45.31 kB", "gzipped": "15.6 kB"}, "en/shortcodes/iamcal.json": {"size": "47.83 kB", "gzipped": "15.11 kB"}, "pt/shortcodes/cldr-native.json": {"size": "53.2 kB", "gzipped": "10.53 kB"}, "sv/shortcodes/emojibase-native.json": {"size": "54.62 kB", "gzipped": "10.14 kB"}, "fr/shortcodes/cldr-native.json": {"size": "55.89 kB", "gzipped": "10.4 kB"}, "da/shortcodes/cldr-native.json": {"size": "56.77 kB", "gzipped": "9.1 kB"}, "fi/shortcodes/cldr-native.json": {"size": "69.88 kB", "gzipped": "10.7 kB"}, "et/shortcodes/cldr-native.json": {"size": "71.04 kB", "gzipped": "12.06 kB"}, "sv/shortcodes/cldr-native.json": {"size": "72.39 kB", "gzipped": "11.97 kB"} } ``` -------------------------------- ### Import Localized Emoji Data Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Imports localized emoji data from the emojibase-data package. Supports full data, compact data, and message data for specific locales. ```typescript import emojis from 'emojibase-data//data.json'; import compactEmojis from 'emojibase-data//compact.json'; import groupsSubgroups from 'emojibase-data//messages.json'; ``` -------------------------------- ### Import Emojibase Types Source: https://github.com/milesj/emojibase/blob/master/website/docs/typescript.md Demonstrates how to import essential types like Emoji, Emoticon, and Shortcode from the Emojibase library. These types are crucial for working with Emojibase data structures in TypeScript projects. ```typescript import { Emoji, Emoticon, Shortcode } from 'emojibase'; ``` -------------------------------- ### Shortcode Caveats Source: https://github.com/milesj/emojibase/blob/master/website/docs/shortcodes.md A list of important caveats and limitations to consider when using emoji shortcodes, including non-standard naming, potential missing shortcodes, duplicates, conflicts, and outdated specifications. ```markdown - Shortcodes are non-standard and the names/terminology will differ between presets. - Some emojis may be missing shortcodes depending on the preset. - There may be duplicate and/or conflicting shortcodes when using multiple presets. - Presets may not provide shortcodes for the latest emoji/Unicode specifications. ``` -------------------------------- ### Emojibase Compact Filesizes (JSON) Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Presents the original and gzipped file sizes for Emojibase compact emoji data in JSON format across various languages. This format is optimized for smaller file sizes. ```json { "zh-hant/compact.json": {"size": "479.62 kB", "gzipped": "75.38 kB"}, "sv/compact.json": {"size": "503.7 kB", "gzipped": "73.14 kB"}, "nb/compact.json": {"size": "507.44 kB", "gzipped": "76.07 kB"}, "zh/compact.json": {"size": "514.3 kB", "gzipped": "83.42 kB"}, "da/compact.json": {"size": "515.63 kB", "gzipped": "76.4 kB"}, "fi/compact.json": {"size": "520.68 kB", "gzipped": "76.38 kB"}, "et/compact.json": {"size": "527.67 kB", "gzipped": "76.11 kB"}, "es/compact.json": {"size": "536.42 kB", "gzipped": "73.51 kB"}, "es-mx/compact.json": {"size": "537.61 kB", "gzipped": "73.8 kB"}, "lt/compact.json": {"size": "540.68 kB", "gzipped": "78.71 kB"}, "en/compact.json": {"size": "541.14 kB", "gzipped": "80.05 kB"}, "en-gb/compact.json": {"size": "541.14 kB", "gzipped": "80.05 kB"}, "ja/compact.json": {"size": "542.17 kB", "gzipped": "81.14 kB"}, "ms/compact.json": {"size": "548.73 kB", "gzipped": "77.29 kB"}, "nl/compact.json": {"size": "553.9 kB", "gzipped": "82.72 kB"}, "pt/compact.json": {"size": "556.57 kB", "gzipped": "84.61 kB"}, "hu/compact.json": {"size": "566.57 kB", "gzipped": "83.95 kB"}, "ko/compact.json": {"size": "567.17 kB", "gzipped": "89.51 kB"}, "vi/compact.json": {"size": "567.72 kB", "gzipped": "78.07 kB"}, "fr/compact.json": {"size": "570.22 kB", "gzipped": "85.5 kB"}, "de/compact.json": {"size": "574.13 kB", "gzipped": "87.44 kB"}, "pl/compact.json": {"size": "578.34 kB", "gzipped": "86.66 kB"}, "it/compact.json": {"size": "604.74 kB", "gzipped": "92.63 kB"}, "ru/compact.json": {"size": "703.02 kB", "gzipped": "93.93 kB"}, "th/compact.json": {"size": "718.67 kB", "gzipped": "82.66 kB"}, "uk/compact.json": {"size": "737.03 kB", "gzipped": "95.63 kB"}, "hi/compact.json": {"size": "783.04 kB", "gzipped": "92.86 kB"}, "bn/compact.json": {"size": "821.3 kB", "gzipped": "92.12 kB"} } ``` -------------------------------- ### Emoji Shortcode Translation Entry Source: https://github.com/milesj/emojibase/blob/master/website/docs/translations.md This snippet illustrates the structure of a translation entry in the shortcodes.po file for an emoji. It shows the emoji hexcode, context (emoji and annotation), English shortcode, and its localized translation. ```python # 1F40D msgctxt "EMOJI: 🐍 snake" msgid "snake" msgstr "змСя" ``` -------------------------------- ### Group Definitions Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Defines groups of emojis, likely for categorization or display purposes. This file helps organize emojis into logical sets. ```json { "groups": { "smileys_and_people": { "name": "Smileys & People", "order": 1 } } } ``` -------------------------------- ### Import Metadata Emoji Data Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Imports metadata related to emojis from the emojibase-data package. This includes data on emoji groups, subgroups, hierarchy, hexcodes, and Unicode names. ```typescript import { groups, subgroups, hierarchy } from 'emojibase-data/meta/groups.json'; ``` -------------------------------- ### Combination Skin Tones for Multi-Person Emojis (v12.0) Source: https://github.com/milesj/emojibase/blob/master/website/docs/spec.md Illustrates the JSON structure for representing multi-person emojis with combined skin tones, as introduced in Emojibase v12.0. It shows how individual skin tones are mapped and how the 'tone' property can be an array to represent multiple skin tones within a single emoji variant. ```json { "label": "people holding hands", "hexcode": "1F9D1-200D-1F91D-200D-1F9D1", "skins": [ { "label": "people holding hands: light skin tone", "hexcode": "1F9D1-1F3FB-200D-1F91D-200D-1F9D1-1F3FB", "tone": 1 }, { "label": "people holding hands: medium-light skin tone, light skin tone", "hexcode": "1F9D1-1F3FC-200D-1F91D-200D-1F9D1-1F3FB", "tone": [2, 1] }, { "label": "people holding hands: medium-light skin tone", "hexcode": "1F9D1-1F3FC-200D-1F91D-200D-1F9D1-1F3FC", "tone": 2 }, { "label": "people holding hands: medium skin tone, light skin tone", "hexcode": "1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FB", "tone": [3, 1] }, { "label": "people holding hands: medium skin tone, medium-light skin tone", "hexcode": "1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FC", "tone": [3, 2] }, { "label": "people holding hands: medium skin tone", "hexcode": "1F9D1-1F3FD-200D-1F91D-200D-1F9D1-1F3FD", "tone": 3 }, { "label": "people holding hands: medium-dark skin tone, light skin tone", "hexcode": "1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FB", "tone": [4, 1] }, { "label": "people holding hands: medium-dark skin tone, medium-light skin tone", "hexcode": "1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FC", "tone": [4, 2] }, { "label": "people holding hands: medium-dark skin tone, medium skin tone", "hexcode": "1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FD", "tone": [4, 3] }, { "label": "people holding hands: medium-dark skin tone", "hexcode": "1F9D1-1F3FE-200D-1F91D-200D-1F9D1-1F3FE", "tone": 4 }, { "label": "people holding hands: dark skin tone, light skin tone", "hexcode": "1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FB", "tone": [5, 1] }, { "label": "people holding hands: dark skin tone, medium-light skin tone", "hexcode": "1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FC", "tone": [5, 2] }, { "label": "people holding hands: dark skin tone, medium skin tone", "hexcode": "1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FD", "tone": [5, 3] }, { "label": "people holding hands: dark skin tone, medium-dark skin tone", "hexcode": "1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FE", "tone": [5, 4] }, { "label": "people holding hands: dark skin tone", "hexcode": "1F9D1-1F3FF-200D-1F91D-200D-1F9D1-1F3FF", "tone": 5 } ] } ``` -------------------------------- ### Emoji Version Definitions Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Details the versions of Unicode or emoji standards associated with specific emojis. This helps track compatibility and feature availability. ```json { "emoji_versions": { "1F600": { "version": "6.0" } } } ``` -------------------------------- ### Emojibase Legacy Shortcodes Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Contains shortcode definitions in the Emojibase legacy format. This format might be used for compatibility with older versions or systems. ```json { "shortcodes": { "1F600": [ "grinning face" ] } } ``` -------------------------------- ### Emojibase Data Filesizes (JSON) Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Displays the original and gzipped file sizes for Emojibase emoji data in JSON format across various languages. This data is useful for understanding the storage and transfer footprint of the emoji dataset. ```json { "zh-hant/data.json": {"size": "674.07 kB", "gzipped": "84.59 kB"}, "sv/data.json": {"size": "698.15 kB", "gzipped": "82.79 kB"}, "nb/data.json": {"size": "701.89 kB", "gzipped": "84.36 kB"}, "zh/data.json": {"size": "708.75 kB", "gzipped": "93.53 kB"}, "da/data.json": {"size": "710.08 kB", "gzipped": "86 kB"}, "fi/data.json": {"size": "715.13 kB", "gzipped": "86.26 kB"}, "et/data.json": {"size": "722.12 kB", "gzipped": "85.51 kB"}, "es/data.json": {"size": "730.87 kB", "gzipped": "83 kB"}, "es-mx/data.json": {"size": "732.06 kB", "gzipped": "83.39 kB"}, "lt/data.json": {"size": "735.13 kB", "gzipped": "88.48 kB"}, "en/data.json": {"size": "735.59 kB", "gzipped": "89.22 kB"}, "en-gb/data.json": {"size": "735.59 kB", "gzipped": "89.22 kB"}, "ja/data.json": {"size": "736.62 kB", "gzipped": "91.25 kB"}, "ms/data.json": {"size": "743.18 kB", "gzipped": "86.71 kB"}, "nl/data.json": {"size": "748.35 kB", "gzipped": "92.29 kB"}, "pt/data.json": {"size": "751.02 kB", "gzipped": "94.34 kB"}, "hu/data.json": {"size": "761.02 kB", "gzipped": "93.98 kB"}, "ko/data.json": {"size": "761.63 kB", "gzipped": "100.11 kB"}, "vi/data.json": {"size": "762.17 kB", "gzipped": "87.89 kB"}, "fr/data.json": {"size": "764.67 kB", "gzipped": "95.29 kB"}, "de/data.json": {"size": "768.58 kB", "gzipped": "97.99 kB"}, "pl/data.json": {"size": "772.79 kB", "gzipped": "96.72 kB"}, "it/data.json": {"size": "799.19 kB", "gzipped": "102.82 kB"}, "ru/data.json": {"size": "897.47 kB", "gzipped": "104.02 kB"}, "th/data.json": {"size": "913.12 kB", "gzipped": "92.7 kB"}, "uk/data.json": {"size": "931.48 kB", "gzipped": "106 kB"}, "hi/data.json": {"size": "977.49 kB", "gzipped": "103.19 kB"}, "bn/data.json": {"size": "1.02 MB", "gzipped": "102.24 kB"} } ``` -------------------------------- ### Unicode Names Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Provides a mapping of Unicode code points to their official names. This is useful for understanding and referencing specific characters. ```json { "unicode_names": { "1F600": "GRINNING FACE" } } ``` -------------------------------- ### CLDR Shortcodes Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Contains shortcode definitions for various languages using the CLDR format. These files map emoji shortcodes to their CLDR-defined representations. ```json { "shortcodes": { "1F600": [ "grinning face" ] } } ``` -------------------------------- ### CLDR Native Shortcodes Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Contains shortcode definitions for various languages using the CLDR native format. These files map emoji shortcodes to their native language representations. ```json { "shortcodes": { "1F600": [ "grinning face" ] } } ``` -------------------------------- ### Emoji Data with Variation Selectors (Before v12) Source: https://github.com/milesj/emojibase/blob/master/website/docs/spec.md Illustrates the raw dataset structure before version 12, where emoji characters with and without variation selectors were duplicated. ```json { "00A9": { "description": "copyright", "hexcode": "00A9" // ... }, "00A9-FE0F": { "description": "copyright", "hexcode": "00A9-FE0F" // ... } } ``` -------------------------------- ### Import Versioned Emoji Data Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Imports versioned emoji data, specifically Unicode versions, from the emojibase-data package. This allows access to emoji characters grouped by Unicode release versions. ```typescript import unicodeVersions from 'emojibase-data/versions/unicode.json'; ``` -------------------------------- ### Combination Genders in Emoji Data Source: https://github.com/milesj/emojibase/blob/master/website/docs/spec.md Illustrates how single emojis supporting multiple genders are represented as unique emojis with their own hexcodes, including gender-specific combinations. ```json { "label": "kiss", "hexcode": "1F48F" // ... }, { "label": "kiss: woman, man", "hexcode": "1F469-200D-2764-FE0F-200D-1F48B-200D-1F468" // ... }, { "label": "kiss: man, man", "hexcode": "1F468-200D-2764-FE0F-200D-1F48B-200D-1F468", // ... }, { "label": "kiss: woman, woman", "hexcode": "1F469-200D-2764-FE0F-200D-1F48B-200D-1F469", // ... } ``` -------------------------------- ### Unicode Definitions Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Contains definitions related to Unicode characters, potentially including emoji properties, names, and other relevant information. ```json { "unicode": { "1F600": { "name": "GRINNING FACE", "category": "So" } } } ``` -------------------------------- ### Generate Data Files Source: https://github.com/milesj/emojibase/blob/master/docs/add-new-language.md Command to generate data files after translations are complete. This process can be lengthy and logs should be monitored for warnings or errors. ```shell yarn run generate ``` -------------------------------- ### Emoji Data with Merged Variation Selectors (After v12) Source: https://github.com/milesj/emojibase/blob/master/website/docs/spec.md Shows the optimized dataset structure after version 12, where emoji with variation selectors are merged into the non-variation selector entries. ```json { "label": "copyright", "hexcode": "00A9", "emoji": "©️", // 00A9-FE0F "text": "©︎" // 00A9-FE0E // ... } ``` -------------------------------- ### Emoji Group Translation Entry Source: https://github.com/milesj/emojibase/blob/master/website/docs/translations.md This snippet demonstrates the structure of a translation entry in the messages.po file for an emoji group. It includes the order/key, context, English message, and its localized translation. ```python # 1: people-body msgctxt "EMOJI GROUP: people-body" msgid "people & body" msgstr "Menschen & KΓΆrper" ``` -------------------------------- ### Emojibase Shortcodes Source: https://github.com/milesj/emojibase/blob/master/website/docs/datasets.mdx Contains shortcode definitions in the Emojibase format. This is likely the primary format for emoji shortcodes within the project. ```json { "shortcodes": { "1F600": [ "grinning face" ] } } ``` -------------------------------- ### Localization Status Table Source: https://github.com/milesj/emojibase/blob/master/website/docs/shortcodes.md A table showing the localization status of Emojibase for various locales across different data sources like CLDR, CLDR-native, Emojibase, Emojibase-legacy, GitHub, IAM.AI, and JoyPixels. It uses symbols to indicate full translation (βœ…), partial translation (✳️), and in-progress (✴️). ```markdown | Locale | `cldr` | `cldr-native` | `emojibase` | `emojibase-legacy` | `github` | `iamcal` | `joypixels` | | ------------------------ | :----: | :-----------: | :---------: | :----------------: | :------: | :------: | :---------: | | Bengali (bn) | βœ… | βœ… | ✴️ | | | | | | Chinese (zh) | βœ… | βœ… | ✴️ | | | | | | Chinese, Trad. (zh-hant) | βœ… | βœ… | ✴️ | | | | | | Danish (da) | βœ… | βœ… | ✴️ | | | | | | Dutch (nl) | βœ… | βœ… | ✴️ | | | | | | English (en) | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | βœ… | | English, GB (en-gb) | βœ… | βœ… | ✴️ | | | | | | Estonian (et) | βœ… | βœ… | ✴️ | | | | | | Finnish (fi) | βœ… | βœ… | ✴️ | | | | | | French (fr) | βœ… | βœ… | ✴️ | | | | | | German (de) | βœ… | βœ… | ✴️ | | | | | | Hindu (hi) | βœ… | βœ… | ✴️ | | | | | | Hungarian (hu) | βœ… | βœ… | ✴️ | | | | | | Italian (it) | βœ… | βœ… | ✴️ | | | | | | Japanese (ja) | βœ… | βœ… | ✴️ | | | | | | Korean (ko) | βœ… | βœ… | ✴️ | | | | | | Lithuanian (lt) | βœ… | βœ… | ✴️ | | | | | | Malay (ms) | βœ… | | ✴️ | | | | | | Norwegian (nb) | βœ… | βœ… | ✴️ | | | | | | Polish (pl) | βœ… | βœ… | ✴️ | | | | | | Portuguese (pt) | βœ… | βœ… | ✴️ | | | | | | Russian (ru) | βœ… | βœ… | ✴️ | | | | | | Spanish (es) | βœ… | βœ… | ✴️ | | | | | | Spanish, Mexico (es-mx) | βœ… | βœ… | ✴️ | | | | | | Swedish (sv) | βœ… | βœ… | ✴️ | | | | | | Thai (th) | βœ… | βœ… | ✴️ | | | | | | Ukrainian (uk) | βœ… | βœ… | ✴️ | | | | | ```