Browse Source

Chore: simplify wording for person entities

- Replaced all instances of "Unnamed Member" with "Someone Unnamed"
- Removed unused UNNAMED_MEMBER constant
- Renamed UNNAMED_PERSON to THAT_UNNAMED_PERSON to match its value
- Renamed UNNAMED_USER to UNNAMED_PERSON and changed the value to "unnamed person"
pull/155/head
Jose Olarte III 1 week ago
parent
commit
cc50c38d13
  1. 4
      src/components/MembersList.vue
  2. 5
      src/constants/entities.ts
  3. 6
      src/constants/notifications.ts
  4. 4
      src/libs/util.ts
  5. 4
      src/views/DIDView.vue

4
src/components/MembersList.vue

@ -177,7 +177,7 @@ import {
NOTIFY_ADD_CONTACT_FIRST,
NOTIFY_CONTINUE_WITHOUT_ADDING,
} from "@/constants/notifications";
import { UNNAMED_MEMBER } from "@/constants/entities";
import { SOMEONE_UNNAMED } from "@/constants/entities";
interface Member {
admitted: boolean;
@ -225,7 +225,7 @@ export default class MembersList extends Vue {
* Get the unnamed member constant
*/
get unnamedMember(): string {
return UNNAMED_MEMBER;
return SOMEONE_UNNAMED;
}
async created() {

5
src/constants/entities.ts

@ -7,9 +7,8 @@ export const UNNAMED_ENTITY_NAME = "Unnamed";
// Descriptive phrases for unnamed entities
export const SOMEONE_UNNAMED = "Someone Unnamed";
export const UNNAMED_MEMBER = "Unnamed Member";
export const UNNAMED_PERSON = "That unnamed person";
export const UNNAMED_USER = "unnamed user";
export const THAT_UNNAMED_PERSON = "That unnamed person";
export const UNNAMED_PERSON = "unnamed person";
// Project-related unnamed entities
export const UNNAMED_PROJECT = "Unnamed Project";

6
src/constants/notifications.ts

@ -1,5 +1,5 @@
import axios from "axios";
import { UNNAMED_PERSON } from "./entities";
import { THAT_UNNAMED_PERSON } from "./entities";
// Notification message constants for user-facing notifications
// Add new notification messages here as needed
@ -868,7 +868,7 @@ export const NOTIFY_CONTACT_LINK_COPIED = {
// Template for registration success message
// Used in: ContactsView.vue (register method - registration success with contact name)
export const getRegisterPersonSuccessMessage = (name?: string): string =>
`${name || UNNAMED_PERSON} ${NOTIFY_REGISTER_PERSON_SUCCESS.message}`;
`${name || THAT_UNNAMED_PERSON} ${NOTIFY_REGISTER_PERSON_SUCCESS.message}`;
// Template for visibility success message
// Used in: ContactsView.vue (setVisibility method - visibility success with contact name)
@ -1373,7 +1373,7 @@ export function createQRContactAddedMessage(hasVisibility: boolean): string {
export function createQRRegistrationSuccessMessage(
contactName: string,
): string {
return `${contactName || UNNAMED_PERSON}${NOTIFY_QR_REGISTRATION_SUCCESS.message}`;
return `${contactName || THAT_UNNAMED_PERSON}${NOTIFY_QR_REGISTRATION_SUCCESS.message}`;
}
// ContactQRScanShowView.vue timeout constants

4
src/libs/util.ts

@ -33,7 +33,7 @@ import { logger } from "../utils/logger";
import { PlatformServiceFactory } from "../services/PlatformServiceFactory";
import { IIdentifier } from "@veramo/core";
import { DEFAULT_ROOT_DERIVATION_PATH } from "./crypto";
import { UNNAMED_USER } from "@/constants/entities";
import { UNNAMED_PERSON } from "@/constants/entities";
// Consolidate this with src/utils/PlatformServiceMixin.mapQueryResultToValues
function mapQueryResultToValues(
@ -193,7 +193,7 @@ export const nameForContact = (
): string => {
return (
(contact?.name as string) ||
(capitalize ? "This" : "this") + " " + UNNAMED_USER
(capitalize ? "This" : "this") + " " + UNNAMED_PERSON
);
};

4
src/views/DIDView.vue

@ -290,7 +290,7 @@ import {
NOTIFY_SERVER_ACCESS_ERROR,
NOTIFY_NO_IDENTITY_ERROR,
} from "@/constants/notifications";
import { UNNAMED_PERSON } from "@/constants/entities";
import { THAT_UNNAMED_PERSON } from "@/constants/entities";
/**
* DIDView Component
@ -550,7 +550,7 @@ export default class DIDView extends Vue {
contact.registered = true;
await this.$updateContact(contact.did, { registered: true });
const name = contact.name || UNNAMED_PERSON;
const name = contact.name || THAT_UNNAMED_PERSON;
this.notify.success(
`${name} ${NOTIFY_REGISTRATION_SUCCESS.message}`,
TIMEOUTS.LONG,

Loading…
Cancel
Save