Migrate more strings to translation keys (#11522)

This commit is contained in:
Michael Telatynski 2023-09-04 19:41:39 +01:00 committed by GitHub
parent e650397bac
commit bf68e4afb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 4870 additions and 3876 deletions

View file

@ -93,7 +93,7 @@ export type { VectorPushRuleDefinition };
export const VectorPushRulesDefinitions: Record<string, VectorPushRuleDefinition> = {
// Messages containing user's display name
".m.rule.contains_display_name": new VectorPushRuleDefinition({
description: _td("Messages containing my display name"), // passed through _t() translation in src/components/views/settings/Notifications.js
description: _td("settings|notifications|rule_contains_display_name"), // passed through _t() translation in src/components/views/settings/Notifications.js
vectorStateToActions: {
// The actions for each vector state, or null to disable the rule.
[VectorState.On]: StandardActions.ACTION_NOTIFY,
@ -104,7 +104,7 @@ export const VectorPushRulesDefinitions: Record<string, VectorPushRuleDefinition
// Messages containing user's username (localpart/MXID)
".m.rule.contains_user_name": new VectorPushRuleDefinition({
description: _td("Messages containing my username"), // passed through _t() translation in src/components/views/settings/Notifications.js
description: _td("settings|notifications|rule_contains_user_name"), // passed through _t() translation in src/components/views/settings/Notifications.js
vectorStateToActions: {
// The actions for each vector state, or null to disable the rule.
[VectorState.On]: StandardActions.ACTION_NOTIFY,
@ -115,7 +115,7 @@ export const VectorPushRulesDefinitions: Record<string, VectorPushRuleDefinition
// Messages containing @room
".m.rule.roomnotif": new VectorPushRuleDefinition({
description: _td("Messages containing @room"), // passed through _t() translation in src/components/views/settings/Notifications.js
description: _td("settings|notifications|rule_roomnotif"), // passed through _t() translation in src/components/views/settings/Notifications.js
vectorStateToActions: {
// The actions for each vector state, or null to disable the rule.
[VectorState.On]: StandardActions.ACTION_NOTIFY,
@ -126,7 +126,7 @@ export const VectorPushRulesDefinitions: Record<string, VectorPushRuleDefinition
// Messages just sent to the user in a 1:1 room
".m.rule.room_one_to_one": new VectorPushRuleDefinition({
description: _td("Messages in one-to-one chats"), // passed through _t() translation in src/components/views/settings/Notifications.js
description: _td("settings|notifications|rule_room_one_to_one"), // passed through _t() translation in src/components/views/settings/Notifications.js
vectorStateToActions: {
[VectorState.On]: StandardActions.ACTION_NOTIFY,
[VectorState.Loud]: StandardActions.ACTION_NOTIFY_DEFAULT_SOUND,
@ -142,7 +142,7 @@ export const VectorPushRulesDefinitions: Record<string, VectorPushRuleDefinition
// Encrypted messages just sent to the user in a 1:1 room
".m.rule.encrypted_room_one_to_one": new VectorPushRuleDefinition({
description: _td("Encrypted messages in one-to-one chats"), // passed through _t() translation in src/components/views/settings/Notifications.js
description: _td("settings|notifications|rule_encrypted_room_one_to_one"), // passed through _t() translation in src/components/views/settings/Notifications.js
vectorStateToActions: {
[VectorState.On]: StandardActions.ACTION_NOTIFY,
[VectorState.Loud]: StandardActions.ACTION_NOTIFY_DEFAULT_SOUND,
@ -154,7 +154,7 @@ export const VectorPushRulesDefinitions: Record<string, VectorPushRuleDefinition
// 1:1 room messages are caught by the .m.rule.room_one_to_one rule if any defined
// By opposition, all other room messages are from group chat rooms.
".m.rule.message": new VectorPushRuleDefinition({
description: _td("Messages in group chats"), // passed through _t() translation in src/components/views/settings/Notifications.js
description: _td("settings|notifications|rule_message"), // passed through _t() translation in src/components/views/settings/Notifications.js
vectorStateToActions: {
[VectorState.On]: StandardActions.ACTION_NOTIFY,
[VectorState.Loud]: StandardActions.ACTION_NOTIFY_DEFAULT_SOUND,
@ -167,7 +167,7 @@ export const VectorPushRulesDefinitions: Record<string, VectorPushRuleDefinition
// Encrypted 1:1 room messages are caught by the .m.rule.encrypted_room_one_to_one rule if any defined
// By opposition, all other room messages are from group chat rooms.
".m.rule.encrypted": new VectorPushRuleDefinition({
description: _td("Encrypted messages in group chats"), // passed through _t() translation in src/components/views/settings/Notifications.js
description: _td("settings|notifications|rule_encrypted"), // passed through _t() translation in src/components/views/settings/Notifications.js
vectorStateToActions: {
[VectorState.On]: StandardActions.ACTION_NOTIFY,
[VectorState.Loud]: StandardActions.ACTION_NOTIFY_DEFAULT_SOUND,
@ -177,7 +177,7 @@ export const VectorPushRulesDefinitions: Record<string, VectorPushRuleDefinition
// Invitation for the user
".m.rule.invite_for_me": new VectorPushRuleDefinition({
description: _td("When I'm invited to a room"), // passed through _t() translation in src/components/views/settings/Notifications.js
description: _td("settings|notifications|rule_invite_for_me"), // passed through _t() translation in src/components/views/settings/Notifications.js
vectorStateToActions: {
[VectorState.On]: StandardActions.ACTION_NOTIFY,
[VectorState.Loud]: StandardActions.ACTION_NOTIFY_DEFAULT_SOUND,
@ -187,7 +187,7 @@ export const VectorPushRulesDefinitions: Record<string, VectorPushRuleDefinition
// Incoming call
".m.rule.call": new VectorPushRuleDefinition({
description: _td("Call invitation"), // passed through _t() translation in src/components/views/settings/Notifications.js
description: _td("settings|notifications|rule_call"), // passed through _t() translation in src/components/views/settings/Notifications.js
vectorStateToActions: {
[VectorState.On]: StandardActions.ACTION_NOTIFY,
[VectorState.Loud]: StandardActions.ACTION_NOTIFY_RING_SOUND,
@ -197,7 +197,7 @@ export const VectorPushRulesDefinitions: Record<string, VectorPushRuleDefinition
// Notifications from bots
".m.rule.suppress_notices": new VectorPushRuleDefinition({
description: _td("Messages sent by bot"), // passed through _t() translation in src/components/views/settings/Notifications.js
description: _td("settings|notifications|rule_suppress_notices"), // passed through _t() translation in src/components/views/settings/Notifications.js
vectorStateToActions: {
// .m.rule.suppress_notices is a "negative" rule, we have to invert its enabled value for vector UI
[VectorState.On]: StandardActions.ACTION_DISABLED,
@ -208,7 +208,7 @@ export const VectorPushRulesDefinitions: Record<string, VectorPushRuleDefinition
// Room upgrades (tombstones)
".m.rule.tombstone": new VectorPushRuleDefinition({
description: _td("When rooms are upgraded"), // passed through _t() translation in src/components/views/settings/Notifications.js
description: _td("settings|notifications|rule_tombstone"), // passed through _t() translation in src/components/views/settings/Notifications.js
vectorStateToActions: {
// The actions for each vector state, or null to disable the rule.
[VectorState.On]: StandardActions.ACTION_NOTIFY,