Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more strings/texts in the strings.en.yaml file and replace all the occurences with getString() in frontend #4917

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chaoscenter/web/src/components/SideNav/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default function SideNav(): ReactElement {
>
<Icon name="log-out" color={Color.WHITE} />
<Text font={{ variation: FontVariation.BODY }} color={Color.WHITE}>
Sign Out
{getString('signOut')}
</Text>
</Layout.Horizontal>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function StatusHeatMap(props: StatusHeatMapProps): React.ReactElement {
{execution.executedBy?.username !== 'pipeline' ? (
<>
{execution.executedBy?.username ?? getString('chaosController')}
{execution.executedBy?.username && ' | Manually'}
{execution.executedBy?.username && getString('manually')}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{execution.executedBy?.username && getString('manually')}
{execution.executedBy?.username && `| ${getString('manually')}`}

NIT: Update strings file to just contain the text and then use in the component.

</>
) : (
toSentenceCase(execution.executedBy?.username)
Expand Down
1 change: 1 addition & 0 deletions chaoscenter/web/src/strings/strings.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ executedBy: Executed by
executedOn: Executed on
executionDetails: Execution details goes here
executionError: Execution Error
expand: expand
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please clarify if there’s a specific reason this has been included, as it doesn't appear to be in use currently?

executionHistory: Execution History
executionID: Execution ID
executionOverview: Execution Overview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function MemoizedUserCreatedProjectsTable({
},
{
id: 'members',
Header: 'Members',
Header: getString('members'),
Cell: ({ row: { original: data } }: { row: Row<Project> }) => {
return (
<AvatarGroup
Expand Down
Loading