Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
docs: Add missing space in “emoji set”.
Anders Kaseorg1376feda93a8
diff --git a/static/js/emojisets.js b/static/js/emojisets.jsindex 35a5ca3da8b..25eb8b2c3c8 100644--- a/static/js/emojisets.js+++ b/static/js/emojisets.js@@ -16,7 +16,7 @@ const emojisets = new Map([["twitter", {css: twitter_css, sheet: twitter_sheet}],]);-// For `text` emojiset we fallback to `google-blob` emojiset+// For `text` emoji set we fallback to `google-blob` emoji set// for displaying emojis in emoji picker and typeahead.emojisets.set("text", emojisets.get("google-blob"));diff --git a/static/js/settings_display.js b/static/js/settings_display.jsindex 68e5c14fe7f..4c3973dd1d2 100644--- a/static/js/settings_display.js+++ b/static/js/settings_display.js@@ -194,7 +194,7 @@ export async function report_emojiset_change() {if (spinner.length) {loading.destroy_indicator(spinner);ui_report.success(- $t_html({defaultMessage: "Emojiset changed successfully!"}),+ $t_html({defaultMessage: "Emoji set changed successfully!"}),spinner.expectOne(),);spinner.expectOne();@@ -213,7 +213,7 @@ export function update_page() {container.find(".setting_color_scheme").val(JSON.stringify(user_settings.color_scheme));container.find(".setting_default_view").val(user_settings.default_view);- // TODO: Set emojiset selector here.+ // TODO: Set emoji set selector here.// Longer term, we'll want to automate this function}diff --git a/tools/setup/emoji/build_emoji b/tools/setup/emoji/build_emojiindex 0b7d0f2facb..2657d7c99f4 100755--- a/tools/setup/emoji/build_emoji+++ b/tools/setup/emoji/build_emoji@@ -248,10 +248,10 @@ def setup_emoji_farms(cache_path: str, emoji_data: List[Dict[str, Any]]) -> Noneemojiset: str, emoji_data: List[Dict[str, Any]], alt_name: Optional[str] = None) -> None:# `alt_name` is an optional parameter that we use to avoid duplicating below- # code. It is only used while setting up google-blob emojiset as it is just+ # code. It is only used while setting up google-blob emoji set as it is just# a wrapper for an older version of emoji-datasource package due to which we# need to use 'google' at some places in this code. It has no meaning for other- # emojisets and is just equivalent to `emojiset`.+ # emoji sets and is just equivalent to `emojiset`.alt_name = alt_name or emojiset# Copy individual emoji images from npm packages.@@ -274,7 +274,7 @@ def setup_emoji_farms(cache_path: str, emoji_data: List[Dict[str, Any]]) -> Nonefor f in os.listdir(zulip_image):shutil.copy2(os.path.join(zulip_image, f), target_emoji_farm, follow_symlinks=False)- # We hardcode octopus emoji image to Google emojiset's old+ # We hardcode octopus emoji image to Google emoji set's old# "cute octopus" image. Copy it to the emoji farms.input_img_file = os.path.join(EMOJI_SCRIPT_DIR_PATH, "1f419.png")output_img_file = os.path.join(cache_path, "images-" + emojiset + "-64", "1f419.png")@@ -282,11 +282,11 @@ def setup_emoji_farms(cache_path: str, emoji_data: List[Dict[str, Any]]) -> Nonegenerate_sprite_css_files(cache_path, emoji_data, emojiset, alt_name)- # Set up standard emojisets.+ # Set up standard emoji sets.for emojiset in ["google", "twitter"]:setup_emoji_farm(emojiset, emoji_data)- # Set up old Google "blobs" emojiset.+ # Set up old Google "blobs" emoji set.GOOGLE_BLOB_EMOJI_DATA_PATH = os.path.join(NODE_MODULES_PATH, "emoji-datasource-google-blob", "emoji.json")@@ -355,7 +355,7 @@ def dump_emojis(cache_path: str) -> None:emoji_map = orjson.loads(emoji_map_file.read())# `emoji.json` or any other data file can be sourced from any of the supported- # emojiset packages, they all contain the same data files.+ # emoji set packages, they all contain the same data files.EMOJI_DATA_FILE_PATH = os.path.join(NODE_MODULES_PATH, "emoji-datasource-google", "emoji.json")with open(EMOJI_DATA_FILE_PATH, "rb") as emoji_data_file:emoji_data = orjson.loads(emoji_data_file.read())diff --git a/tools/setup/emoji/emoji_setup_utils.py b/tools/setup/emoji/emoji_setup_utils.pyindex 6732533ed03..96d11008da1 100644--- a/tools/setup/emoji/emoji_setup_utils.py+++ b/tools/setup/emoji/emoji_setup_utils.py@@ -3,7 +3,7 @@from collections import defaultdictfrom typing import Any, Dict, List-# Emojisets that we currently support.+# Emoji sets that we currently support.EMOJISETS = ["google", "twitter"]# Some image files in the old emoji farm had a different name than in the new emojidiff --git a/zerver/migrations/0130_text_choice_in_emojiset.py b/zerver/migrations/0130_text_choice_in_emojiset.pyindex 6201d0ce07b..3010c2aa76b 100644--- a/zerver/migrations/0130_text_choice_in_emojiset.py+++ b/zerver/migrations/0130_text_choice_in_emojiset.py@@ -3,7 +3,7 @@ from django.db.backends.postgresql.schema import DatabaseSchemaEditorfrom django.db.migrations.state import StateApps-# change emojiset to text if emoji_alt_code is true.+# change emoji set to text if emoji_alt_code is true.def change_emojiset(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None:UserProfile = apps.get_model("zerver", "UserProfile")for user in UserProfile.objects.filter(emoji_alt_code=True):diff --git a/zerver/models.py b/zerver/models.pyindex fe4bf1706f6..cfa323c35b3 100644--- a/zerver/models.py+++ b/zerver/models.py@@ -1310,7 +1310,7 @@ class UserBaseSettings(models.Model):default=DEMOTE_STREAMS_AUTOMATIC)- # Emojisets+ # Emoji setsGOOGLE_EMOJISET = "google"GOOGLE_BLOB_EMOJISET = "google-blob"TEXT_EMOJISET = "text"diff --git a/zerver/openapi/python_examples.py b/zerver/openapi/python_examples.pyindex c570cbb5456..ab041966f44 100644--- a/zerver/openapi/python_examples.py+++ b/zerver/openapi/python_examples.py@@ -1178,7 +1178,7 @@ def get_server_settings(client: Client) -> None:def update_settings(client: Client) -> None:# {code_example|start}- # Enable push notifications even when online and change emojiset+ # Enable push notifications even when online and change emoji setrequest = {"enable_offline_push_notifications": True,"enable_online_push_notifications": True,diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yamlindex 5433abd3270..d342542b340 100644--- a/zerver/openapi/zulip.yaml+++ b/zerver/openapi/zulip.yaml@@ -9261,11 +9261,11 @@ paths:for configuring notification sounds.emojiset_choices:description: |- Array of dictionaries where each dictionary describes an emojiset+ Array of dictionaries where each dictionary describes an emoji setsupported by this version of the Zulip server.- Only relevant to clients with configuration UI for choosing an emojiset;- the currently selected emojiset is available in the `emojiset` key.+ Only relevant to clients with configuration UI for choosing an emoji set;+ the currently selected emoji set is available in the `emojiset` key.See [PATCH /settings](/api/update-settings) for details onthe meaning of this setting.@@ -9273,18 +9273,18 @@ paths:items:type: objectdescription: |- Object describing a emojiset.+ Object describing a emoji set.additionalProperties: falseproperties:key:type: stringdescription: |- The key or the name of the emojiset which will be the value- of `emojiset` if this emojiset is chosen.+ The key or the name of the emoji set which will be the value+ of `emojiset` if this emoji set is chosen.text:type: stringdescription: |- The text describing the emojiset.+ The text describing the emoji set.has_zoom_token:type: booleandescription: |@@ -9698,7 +9698,7 @@ paths:and only for clients that did not include `user_settings_object` intheir client_capabilities` when registering the event queue.- The name of the emojiset that the user has chosen.+ The name of the emoji set that the user has chosen.See [PATCH /settings](/api/update-settings) for details onthe meaning of this setting.@@ -9867,11 +9867,11 @@ paths:and only for clients that did not include `user_settings_object` intheir client_capabilities` when registering the event queue.- Array of dictionaries where each dictionary describes an emojiset+ Array of dictionaries where each dictionary describes an emoji setsupported by this version of the Zulip server.- Only relevant to clients with configuration UI for choosing an emojiset;- the currently selected emojiset is available in the `emojiset` key.+ Only relevant to clients with configuration UI for choosing an emoji set;+ the currently selected emoji set is available in the `emojiset` key.See [PATCH /settings](/api/update-settings) for details onthe meaning of this setting.@@ -9883,18 +9883,18 @@ paths:items:type: objectdescription: |- Object describing a emojiset.+ Object describing a emoji set.additionalProperties: falseproperties:key:type: stringdescription: |- The key or the name of the emojiset which will be the value- of `emojiset` if this emojiset is chosen.+ The key or the name of the emoji set which will be the value+ of `emojiset` if this emoji set is chosen.text:type: stringdescription: |- The text describing the emojiset.+ The text describing the emoji set.realm_add_custom_emoji_policy:type: integerdescription: |diff --git a/zerver/tests/test_settings.py b/zerver/tests/test_settings.pyindex a7d89edb750..7a9718d4407 100644--- a/zerver/tests/test_settings.py+++ b/zerver/tests/test_settings.py@@ -360,7 +360,7 @@ class ChangeSettingsTest(ZulipTestCase):return resultdef test_emojiset(self) -> None:- """Test banned emojisets are not accepted."""+ """Test banned emoji sets are not accepted."""banned_emojisets = ["apple", "emojione"]valid_emojisets = ["google", "google-blob", "text", "twitter"]