diff --git a/components/projects/CreateProject/CreateProjectForm.tsx b/components/projects/CreateProject/CreateProjectForm.tsx index 23bac02ff..b41a24f1e 100644 --- a/components/projects/CreateProject/CreateProjectForm.tsx +++ b/components/projects/CreateProject/CreateProjectForm.tsx @@ -176,7 +176,7 @@ export const CreateProjectForm = ({ }} > - Unit default privacy: {defaultPrivacy.split("_").join(" ").toLowerCase()} + Unit default privacy: {defaultPrivacy.split("_").join(" ").toLocaleLowerCase()} { setOpen(true)}> diff --git a/features/userSettings/UserSettingsContent/ContextSection/contextActions/CreateDefaultUnitListItem.tsx b/features/userSettings/UserSettingsContent/ContextSection/contextActions/CreateDefaultUnitListItem.tsx index 6d189cf34..72b6abb1e 100644 --- a/features/userSettings/UserSettingsContent/ContextSection/contextActions/CreateDefaultUnitListItem.tsx +++ b/features/userSettings/UserSettingsContent/ContextSection/contextActions/CreateDefaultUnitListItem.tsx @@ -37,7 +37,7 @@ export const CreateDefaultUnitListItem = () => { void createDefaultUnitHandler()}> diff --git a/features/userSettings/UserSettingsContent/ContextSection/contextActions/EditUnitListItem.tsx b/features/userSettings/UserSettingsContent/ContextSection/contextActions/EditUnitListItem.tsx index ddfd8a213..c60130e79 100644 --- a/features/userSettings/UserSettingsContent/ContextSection/contextActions/EditUnitListItem.tsx +++ b/features/userSettings/UserSettingsContent/ContextSection/contextActions/EditUnitListItem.tsx @@ -19,7 +19,7 @@ export const EditUnitListItem = ({ unit }: EditUnitListItemProps) => { return ( <> setOpen((open) => !open)}> - + diff --git a/utils/app/language.ts b/utils/app/language.ts index 2bdd4071a..47f1be2cb 100644 --- a/utils/app/language.ts +++ b/utils/app/language.ts @@ -1 +1,4 @@ export const capitalise = (text: string) => text.replace(/\b\w/gu, (l) => l.toLocaleUpperCase()); + +export const shoutSnakeToLowerCase = (text: string) => + text.split("_").join(" ").toLocaleLowerCase();