Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings: Rename four custom profile fields types.

ColeBurch9917ffa2202d
diff --git a/help/custom-profile-fields.md b/help/custom-profile-fields.md
index 5b472322508..a750b40ae12 100644
--- a/help/custom-profile-fields.md
+++ b/help/custom-profile-fields.md
@@ -45,17 +45,17 @@ methods][authentication-production] documentation for details.
There are several different types of fields available.
-* **Short text**: For one line responses, like
+* **Text (short)**: For one line responses, like
"Job title". Responses are limited to 50 characters.
-* **Long text**: For multiline responses, like "Biography".
-* **Date picker**: For dates, like "Birthday".
+* **Text (long)**: For multiline responses, like "Biography".
+* **Date**: For dates, like "Birthday".
* **Link**: For links to websites.
* **External account**: For linking to GitHub, Twitter, etc.
* **Pronouns**: What pronouns should people use to refer to the user? Pronouns
are displayed in [user mention](/help/mention-a-user-or-group) autocomplete
suggestions.
* **List of options**: Creates a dropdown with a list of options.
-* **Person picker**: For selecting one or more users, like "Manager" or
+* **Users**: For selecting one or more users, like "Manager" or
"Direct reports".
## Display custom fields on user card
diff --git a/web/e2e-tests/custom-profile.test.ts b/web/e2e-tests/custom-profile.test.ts
index e2e882b68aa..5553eb89ff5 100644
--- a/web/e2e-tests/custom-profile.test.ts
+++ b/web/e2e-tests/custom-profile.test.ts
@@ -31,7 +31,7 @@ async function test_add_new_profile_field(page: Page): Promise<void> {
);
assert.strictEqual(
await common.get_text_from_selector(page, `${profile_field_row} span.profile_field_type`),
- "Short text",
+ "Text (short)",
);
}
@@ -57,7 +57,7 @@ async function test_edit_profile_field(page: Page): Promise<void> {
);
assert.strictEqual(
await common.get_text_from_selector(page, `${profile_field_row} span.profile_field_type`),
- "Short text",
+ "Text (short)",
);
}
diff --git a/zerver/migrations/0417_alter_customprofilefield_field_type.py b/zerver/migrations/0417_alter_customprofilefield_field_type.py
index e8560bc9538..beb262ac8e2 100644
--- a/zerver/migrations/0417_alter_customprofilefield_field_type.py
+++ b/zerver/migrations/0417_alter_customprofilefield_field_type.py
@@ -14,14 +14,14 @@ class Migration(migrations.Migration):
name="field_type",
field=models.PositiveSmallIntegerField(
choices=[
- (1, "Short text"),
- (2, "Long text"),
- (4, "Date picker"),
+ (1, "Text (short)"),
+ (2, "Text (long)"),
+ (4, "Date"),
(5, "Link"),
(7, "External account"),
(8, "Pronouns"),
(3, "List of options"),
- (6, "Person picker"),
+ (6, "Users"),
],
default=1,
),
diff --git a/zerver/models/custom_profile_fields.py b/zerver/models/custom_profile_fields.py
index 8c5e27a6ad6..b7083eec0a2 100644
--- a/zerver/models/custom_profile_fields.py
+++ b/zerver/models/custom_profile_fields.py
@@ -94,7 +94,7 @@ class CustomProfileField(models.Model):
(SELECT, gettext_lazy("List of options"), validate_select_field, str, "SELECT"),
]
USER_FIELD_TYPE_DATA: List[UserFieldElement] = [
- (USER, gettext_lazy("Person picker"), check_valid_user_ids, orjson.loads, "USER"),
+ (USER, gettext_lazy("Users"), check_valid_user_ids, orjson.loads, "USER"),
]
SELECT_FIELD_VALIDATORS: Dict[int, ExtendedValidator] = {
@@ -106,9 +106,9 @@ class CustomProfileField(models.Model):
FIELD_TYPE_DATA: List[FieldElement] = [
# Type, display name, validator, converter, keyword
- (SHORT_TEXT, gettext_lazy("Short text"), check_short_string, str, "SHORT_TEXT"),
- (LONG_TEXT, gettext_lazy("Long text"), check_long_string, str, "LONG_TEXT"),
- (DATE, gettext_lazy("Date picker"), check_date, str, "DATE"),
+ (SHORT_TEXT, gettext_lazy("Text (short)"), check_short_string, str, "SHORT_TEXT"),
+ (LONG_TEXT, gettext_lazy("Text (long)"), check_long_string, str, "LONG_TEXT"),
+ (DATE, gettext_lazy("Date"), check_date, str, "DATE"),
(URL, gettext_lazy("Link"), check_url, str, "URL"),
(
EXTERNAL_ACCOUNT,