Skip to content

Commit

Permalink
docs: Update file sizes.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Oct 3, 2023
1 parent 1470a09 commit 1b7ef31
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 63 deletions.
21 changes: 18 additions & 3 deletions docs/add-new-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ https://github.com/unicode-org/cldr/tree/main/common/annotations

Once you have a locale, add the locale in kebab-case to the following files:

- `packages/core/src/types.ts` (to `Locale` type)
- `packages/core/src/constants.ts` (to `SUPPORTED_LOCALES` constant)
- `packages/core/src/types.ts` (to `Locale` type)
- `packages/generator/src/constants.ts` (to `LOCALE_COUNTRIES` constant)
- `website/src/components/Filters.tsx` (to `LOCALES` constant)
- `.github/workflows/build.yml` (to `locale` matrix)

Expand Down Expand Up @@ -44,7 +45,14 @@ yarn run generate
> for any warnings and errors. If easily fixable, feel free to fix, otherwise report an issue!
If generation completed successfully, you should see the `packages/data/<locale>` directory with a
handful of files.
handful of files. Once created, create the following files:

- `packages/data/<locale>/compact.json.d.ts`
- `packages/data/<locale>/data.json.d.ts`
- `packages/data/<locale>/messages.json.d.ts`
- `packages/data/<locale>/shortcodes/<preset>.json.d.ts`

> These `.d.ts` files can be copied as-is from another locale, like English (en).
## 4) Verify data files

Expand All @@ -62,7 +70,14 @@ Although data files were generated, we should manually verify that the data is c
- Optional: Ensure that shortcodes in `shortcodes/emojibase.raw.json` align with the translations
from `po/<locale>/shortcodes.po`.

## 5) Create pull request
## 5) Update regex patterns

If applicable, when adding a non-Latin locale, you'll most likely need to update our regex pattern
to support the required Unicode range(s).

- `packages/regex/shortcode-native.js` - Add Unicode ranges.

## 6) Create pull request

Once verified, add the following files to git:

Expand Down
2 changes: 1 addition & 1 deletion packages/data/bn/messages.raw.json
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@
},
{
"key": "light-video",
"message": "light, film & video",
"message": "আলো, ফিল্ম এবং ভিডিও",
"order": 71
},
{
Expand Down
122 changes: 64 additions & 58 deletions website/docs/datasets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -309,62 +309,64 @@ Sorted by original size in ascending order.

| File | Size | Gzipped |
| ----------------- | --------: | -------: |
| zh-hant/data.json | 618.51 kB | 70.87 kB |
| zh/data.json | 644.31 kB | 77.6 kB |
| sv/data.json | 655.71 kB | 76.61 kB |
| nb/data.json | 656.88 kB | 77.11 kB |
| da/data.json | 662.03 kB | 76.79 kB |
| en/data.json | 663.71 kB | 75.37 kB |
| en-gb/data.json | 664.55 kB | 75.76 kB |
| et/data.json | 668.66 kB | 76.04 kB |
| fi/data.json | 672.37 kB | 79.93 kB |
| fr/data.json | 676.05 kB | 76.21 kB |
| ko/data.json | 676.8 kB | 80.19 kB |
| nl/data.json | 677.16 kB | 77.06 kB |
| lt/data.json | 677.57 kB | 79.59 kB |
| pt/data.json | 678.34 kB | 79.25 kB |
| ja/data.json | 682.64 kB | 80.75 kB |
| ms/data.json | 687.95 kB | 76.79 kB |
| hu/data.json | 689.29 kB | 79.48 kB |
| es/data.json | 696.81 kB | 79.55 kB |
| pl/data.json | 697.16 kB | 83.29 kB |
| es-mx/data.json | 697.81 kB | 80.03 kB |
| it/data.json | 700 kB | 81.31 kB |
| de/data.json | 702.08 kB | 84.69 kB |
| ru/data.json | 813.49 kB | 90.15 kB |
| th/data.json | 829.6 kB | 81.09 kB |
| uk/data.json | 832.55 kB | 89.41 kB |
| zh-hant/data.json | 623.94 kB | 71.93 kB |
| zh/data.json | 649.54 kB | 78.48 kB |
| sv/data.json | 661.26 kB | 77.51 kB |
| nb/data.json | 662.25 kB | 77.91 kB |
| da/data.json | 667.38 kB | 77.6 kB |
| en/data.json | 669.12 kB | 76.2 kB |
| en-gb/data.json | 669.78 kB | 76.55 kB |
| et/data.json | 674.23 kB | 76.97 kB |
| fi/data.json | 678.06 kB | 80.86 kB |
| fr/data.json | 681.72 kB | 77.14 kB |
| ko/data.json | 682.57 kB | 81.2 kB |
| nl/data.json | 682.76 kB | 77.89 kB |
| lt/data.json | 683.25 kB | 80.51 kB |
| pt/data.json | 683.99 kB | 80.14 kB |
| ja/data.json | 688.5 kB | 81.74 kB |
| ms/data.json | 693.49 kB | 77.7 kB |
| hu/data.json | 694.91 kB | 80.44 kB |
| es/data.json | 701.52 kB | 80.37 kB |
| pl/data.json | 703.05 kB | 84.31 kB |
| es-mx/data.json | 703.29 kB | 80.9 kB |
| it/data.json | 705.65 kB | 82.21 kB |
| de/data.json | 707.7 kB | 85.53 kB |
| ru/data.json | 820.21 kB | 91.16 kB |
| th/data.json | 837.09 kB | 82.18 kB |
| uk/data.json | 838.77 kB | 90.47 kB |
| bn/data.json | 901.68 kB | 86.84 kB |

</TabItem>
<TabItem value="compact">

| File | Size | Gzipped |
| -------------------- | --------: | -------: |
| zh-hant/compact.json | 432.61 kB | 61.95 kB |
| zh/compact.json | 458.41 kB | 68.35 kB |
| sv/compact.json | 469.8 kB | 67.48 kB |
| nb/compact.json | 470.98 kB | 69.29 kB |
| da/compact.json | 476.12 kB | 67.7 kB |
| en/compact.json | 477.8 kB | 66.55 kB |
| en-gb/compact.json | 478.65 kB | 66.94 kB |
| et/compact.json | 482.76 kB | 66.97 kB |
| fi/compact.json | 486.46 kB | 70.42 kB |
| fr/compact.json | 490.15 kB | 67.17 kB |
| ko/compact.json | 490.89 kB | 70.46 kB |
| nl/compact.json | 491.25 kB | 67.92 kB |
| lt/compact.json | 491.66 kB | 70.12 kB |
| pt/compact.json | 492.44 kB | 70.17 kB |
| ja/compact.json | 496.73 kB | 71.02 kB |
| ms/compact.json | 502.05 kB | 67.89 kB |
| hu/compact.json | 503.38 kB | 69.87 kB |
| es/compact.json | 510.9 kB | 70.55 kB |
| pl/compact.json | 511.25 kB | 73.97 kB |
| es-mx/compact.json | 511.9 kB | 70.97 kB |
| it/compact.json | 514.09 kB | 72.14 kB |
| de/compact.json | 516.18 kB | 74.97 kB |
| ru/compact.json | 627.58 kB | 80.59 kB |
| th/compact.json | 643.69 kB | 71.89 kB |
| uk/compact.json | 646.65 kB | 79.62 kB |
| zh-hant/compact.json | 436.57 kB | 63.09 kB |
| zh/compact.json | 462.18 kB | 69.27 kB |
| sv/compact.json | 473.9 kB | 68.4 kB |
| nb/compact.json | 474.89 kB | 70.08 kB |
| da/compact.json | 480.01 kB | 68.59 kB |
| en/compact.json | 481.76 kB | 67.38 kB |
| en-gb/compact.json | 482.41 kB | 67.76 kB |
| et/compact.json | 486.86 kB | 67.94 kB |
| fi/compact.json | 490.69 kB | 71.4 kB |
| fr/compact.json | 494.35 kB | 68.11 kB |
| ko/compact.json | 495.2 kB | 71.43 kB |
| nl/compact.json | 495.4 kB | 68.77 kB |
| lt/compact.json | 495.88 kB | 71 kB |
| pt/compact.json | 496.62 kB | 71.1 kB |
| ja/compact.json | 501.13 kB | 72.02 kB |
| ms/compact.json | 506.12 kB | 68.78 kB |
| hu/compact.json | 507.55 kB | 70.81 kB |
| es/compact.json | 514.15 kB | 71.38 kB |
| pl/compact.json | 515.68 kB | 75 kB |
| es-mx/compact.json | 515.92 kB | 71.82 kB |
| it/compact.json | 518.28 kB | 73.11 kB |
| de/compact.json | 520.33 kB | 75.84 kB |
| ru/compact.json | 632.84 kB | 81.53 kB |
| th/compact.json | 649.72 kB | 72.93 kB |
| uk/compact.json | 651.41 kB | 80.7 kB |
| bn/compact.json | 714.31 kB | 77.21 kB |

</TabItem>
<TabItem value="shortcodes">
Expand All @@ -383,6 +385,7 @@ Sorted by original size in ascending order.
| ru/shortcodes/emojibase.json | 19.23 kB | 5.93 kB |
| ru/shortcodes/emojibase-native.json | 25.23 kB | 6.56 kB |
| nb/shortcodes/cldr-native.json | 35.13 kB | 6.66 kB |
| da/shortcodes/emojibase-native.json | 36.68 kB | 6.69 kB |
| es-mx/shortcodes/cldr-native.json | 38.87 kB | 8.1 kB |
| es/shortcodes/cldr-native.json | 39.03 kB | 8.05 kB |
| de/shortcodes/cldr-native.json | 41.96 kB | 6.68 kB |
Expand Down Expand Up @@ -413,14 +416,16 @@ Sorted by original size in ascending order.
| et/shortcodes/cldr.json | 142.76 kB | 26.43 kB |
| da/shortcodes/cldr.json | 143.09 kB | 26.15 kB |
| fi/shortcodes/cldr.json | 144.43 kB | 26.77 kB |
| en-gb/shortcodes/emojibase.json | 144.86 kB | 28.54 kB |
| nl/shortcodes/cldr.json | 147.05 kB | 26.84 kB |
| zh/shortcodes/cldr.json | 147.37 kB | 24.83 kB |
| ru/shortcodes/cldr.json | 147.76 kB | 27.41 kB |
| pt/shortcodes/cldr.json | 147.81 kB | 27.03 kB |
| de/shortcodes/cldr.json | 148.09 kB | 27.02 kB |
| ja/shortcodes/cldr-native.json | 148.39 kB | 27.98 kB |
| en-gb/shortcodes/emojibase.json | 148.6 kB | 29.3 kB |
| en/shortcodes/emojibase.json | 149.51 kB | 29.52 kB |
| da/shortcodes/emojibase.json | 150.69 kB | 30.24 kB |
| bn/shortcodes/cldr.json | 151.07 kB | 27.71 kB |
| ms/shortcodes/cldr.json | 154.59 kB | 27.13 kB |
| lt/shortcodes/cldr.json | 154.8 kB | 27.92 kB |
| pl/shortcodes/cldr.json | 154.82 kB | 27.99 kB |
Expand All @@ -435,6 +440,7 @@ Sorted by original size in ascending order.
| en/shortcodes/joypixels.json | 207.8 kB | 33.35 kB |
| th/shortcodes/cldr-native.json | 221.23 kB | 30.44 kB |
| uk/shortcodes/cldr-native.json | 223.98 kB | 32.08 kB |
| bn/shortcodes/cldr-native.json | 261.25 kB | 31.63 kB |

</TabItem>
<TabItem value="messages">
Expand Down Expand Up @@ -465,20 +471,20 @@ Sorted by original size in ascending order.
| lt/messages.json | 6.8 kB | 1.97 kB |
| ru/messages.json | 7.79 kB | 2.31 kB |
| uk/messages.json | 7.86 kB | 2.35 kB |
| bn/messages.json | 8.6 kB | 2.31 kB |
| th/messages.json | 9.05 kB | 2.4 kB |

</TabItem>
<TabItem value="other">

| File | Size | Gzipped |
| ----------------------- | --------: | -------: |
| index.js | 44 B | 62 B |
| meta/groups.json | 3.87 kB | 1.24 kB |
| meta/unicode.json | 68.39 kB | 12.05 kB |
| versions/unicode.json | 89.46 kB | 11.45 kB |
| versions/emoji.json | 89.5 kB | 11.56 kB |
| meta/unicode-names.json | 222.32 kB | 27.68 kB |
| meta/hexcodes.json | 238.07 kB | 26.85 kB |
| meta/groups.json | 3.9 kB | 1.26 kB |
| meta/unicode.json | 68.74 kB | 12.12 kB |
| versions/unicode.json | 89.95 kB | 11.54 kB |
| versions/emoji.json | 89.99 kB | 11.65 kB |
| meta/unicode-names.json | 223.66 kB | 27.88 kB |
| meta/hexcodes.json | 239.23 kB | 27.06 kB |

</TabItem>
</Tabs>
Expand Down
2 changes: 1 addition & 1 deletion website/docs/regex.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ import PROPERTY_EMOJI_REGEX from 'emojibase-regex/property';
| property/emoji.js | 103 B | 93 B |
| property/index.js | 115 B | 102 B |
| emoticon.js | 463 B | 249 B |
| shortcode-native.js | 567 B | 378 B |
| shortcode-native.js | 616 B | 393 B |
| text.js | 1.52 kB | 609 B |
| codepoint/text.js | 1.87 kB | 639 B |
| emoji.js | 10.55 kB | 2.26 kB |
Expand Down

0 comments on commit 1b7ef31

Please sign in to comment.