private-messages: Update frontend strings to use "direct message" or "DM".

Updates frontend user-facing strings with "private message" or "PM" to
use "direct message" or "DM" respectively instead.

Note that this updates translated strings as well as a few that
are not translated like search suggestions.

Updates `tools/lib/capitalization.py` for some specific strings
that are impacted by these changes, and removes "PM" and "PMs"
from checked strings.
This commit is contained in:
Lauryn Menard
2023-01-24 19:49:56 +01:00
committed by Tim Abbott
parent 017b05fd84
commit 42775219b3
31 changed files with 95 additions and 95 deletions

View File

@@ -703,7 +703,7 @@ export class Filter {
case "is-mentioned":
return $t({defaultMessage: "Mentions"});
case "is-private":
return $t({defaultMessage: "Private messages"});
return $t({defaultMessage: "Direct messages"});
case "is-resolved":
return $t({defaultMessage: "Topics marked as resolved"});
// These cases return false for is_common_narrow, and therefore are not
@@ -981,7 +981,7 @@ export class Filter {
return verb + "sent by";
case "pm-with":
return verb + "private messages with";
return verb + "direct messages with";
case "in":
return verb + "messages in";
@@ -991,7 +991,7 @@ export class Filter {
return verb + "messages that are";
case "group-pm-with":
return verb + "group private messages including";
return verb + "group direct messages including";
}
return "";
}
@@ -999,11 +999,13 @@ export class Filter {
static describe_is_operator(operator) {
const verb = operator.negated ? "exclude " : "";
const operand = operator.operand;
const operand_list = ["private", "starred", "alerted", "unread"];
const operand_list = ["starred", "alerted", "unread"];
if (operand_list.includes(operand)) {
return verb + operand + " messages";
} else if (operand === "mentioned") {
return verb + "@-mentions";
} else if (operand === "private") {
return verb + "direct messages";
}
return "invalid " + operand + " operand for is operator";
}