Skip to content

Commit

Permalink
fix: fix texts in some file actions
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverDudgeon committed May 1, 2024
1 parent 7949f11 commit 254b764
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/projects/CreateProject/CreateProjectForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export const CreateProjectForm = ({
}}
>
<FormLabel component="legend" sx={{ mb: 1 }}>
Unit default privacy: {defaultPrivacy.split("_").join(" ").toLowerCase()}
Unit default privacy: {defaultPrivacy.split("_").join(" ").toLocaleLowerCase()}
</FormLabel>

<Field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const CreateProjectListItem = ({ unit }: CreateProjectListItemProps) => {
<ListItemButton onClick={() => setOpen(true)}>
<ListItemText
primary="Create Project"
secondary="Creates a new project in the currently selected context"
secondary="Create a new project in the selected unit"
/>
<ListItemIcon>
<NoteAdd color="action" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const CreateDefaultUnitListItem = () => {
<ListItemButton onClick={() => void createDefaultUnitHandler()}>
<ListItemText
primary="Create personal unit"
secondary="Creates a new unit in the default organisation"
secondary="Create a new unit in the default organisation"
/>
<ListItemIcon>
<CreateNewFolder color="action" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const EditUnitListItem = ({ unit }: EditUnitListItemProps) => {
return (
<>
<ListItemButton onClick={() => setOpen((open) => !open)}>
<ListItemText primary="Edit Unit" secondary="Add and remove unit editors" />
<ListItemText primary="Edit Unit" secondary="Modify a unit" />
<ListItemIcon>
<EditIcon color="action" />
</ListItemIcon>
Expand Down
3 changes: 3 additions & 0 deletions utils/app/language.ts
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit 254b764

Please sign in to comment.