-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i18n support in devconsole Gitops and Guided tour components
- Loading branch information
1 parent
3150016
commit e7ee949
Showing
12 changed files
with
153 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,35 @@ | ||
{ | ||
"Select application": "Select application", | ||
"Application": "Application", | ||
"Application Name": "Application Name", | ||
" by ": " by ", | ||
"Commit details not available": "Commit details not available", | ||
"Cluster URL not available": "Cluster URL not available", | ||
"Application Stages": "Application Stages", | ||
"Application Details": "Application Details", | ||
"Manifest File Repo": "Manifest File Repo", | ||
"Image not available": "Image not available", | ||
"Service source URL not available": "Service source URL not available", | ||
"Pod Info Not Available": "Pod Info Not Available", | ||
"Info not available": "Info not available", | ||
"Environment details were not found. Try reloading the page or contacting an administrator.": "Environment details were not found. Try reloading the page or contacting an administrator.", | ||
"{{appName}} · Details": "{{appName}} · Details", | ||
"{{appGroupsSize, number}} items": "{{appGroupsSize, number}} items", | ||
"{{enviromentSize, number}} Environments": "{{enviromentSize, number}} Environments", | ||
"Get started with a tour of some of the key areas in OpenShift": "Get started with a tour of some of the key areas in OpenShift", | ||
"Developer perspective that can help you complete workflows and be more productive.": "Developer perspective that can help you complete workflows and be more productive.", | ||
"Switch between the Developer and Administrator perspectives.": "Switch between the Developer and Administrator perspectives.", | ||
"Use the Administrator perspective to manage workload storage, networking, cluster settings, and more. This may require additional user access.": "Use the Administrator perspective to manage workload storage, networking, cluster settings, and more. This may require additional user access.", | ||
"Use the Developer perspective to build applications and associated components and services, define how they work together, and monitor their health over time.": "Use the Developer perspective to build applications and associated components and services, define how they work together, and monitor their health over time.", | ||
"Search for resources in your project by simply starting to type or scrolling through a list of existing resources.": "Search for resources in your project by simply starting to type or scrolling through a list of existing resources.", | ||
"Add frequently accessed resources to your side navigation for quick access. Look for the": "Add frequently accessed resources to your side navigation for quick access. Look for the", | ||
"Add to navigation": "Add to navigation", | ||
"link next to your search result.": "link next to your search result.", | ||
"Stay up-to-date with everything OpenShift on our": "Stay up-to-date with everything OpenShift on our", | ||
"blog": "blog", | ||
"or continue to learn more in our": "or continue to learn more in our", | ||
"documentation": "documentation", | ||
"Warning: the application grouping already exists.": "Warning: the application grouping already exists.", | ||
"A unique name given to the application grouping to label your resources.": "A unique name given to the application grouping to label your resources.", | ||
"Select an application for your grouping or {{UNASSIGNED_LABEL}} to not use an application grouping.": "Select an application for your grouping or {{UNASSIGNED_LABEL}} to not use an application grouping." | ||
} | ||
"Application": "Application", | ||
"Select an application for your grouping or {{UNASSIGNED_LABEL}} to not use an application grouping.": "Select an application for your grouping or {{UNASSIGNED_LABEL}} to not use an application grouping.", | ||
"Application Name": "Application Name" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 29 additions & 21 deletions
50
frontend/packages/dev-console/src/components/gitops/list/GitOpsList.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,44 @@ | ||
import * as React from 'react'; | ||
import * as _ from 'lodash'; | ||
import { useTranslation } from 'react-i18next'; | ||
import GitOpsListItem from './GitOpsListItem'; | ||
import { Stack, StackItem, Split, SplitItem } from '@patternfly/react-core'; | ||
import { GitOpsAppGroupData } from '../utils/gitops-types'; | ||
import './GitOpsList.scss'; | ||
import GitOpsEmptyState from '../GitOpsEmptyState'; | ||
import './GitOpsList.scss'; | ||
|
||
interface GitOpsListProps { | ||
appGroups: GitOpsAppGroupData[]; | ||
emptyStateMsg: string; | ||
} | ||
|
||
const GitOpsList: React.FC<GitOpsListProps> = ({ appGroups, emptyStateMsg }) => ( | ||
<div className="odc-gitops-list"> | ||
{!emptyStateMsg ? ( | ||
<Stack hasGutter> | ||
<StackItem> | ||
<Split> | ||
<SplitItem isFilled /> | ||
<SplitItem>{`${_.size(appGroups)} items`}</SplitItem> | ||
</Split> | ||
</StackItem> | ||
{_.map(appGroups, (appGroup) => ( | ||
<StackItem key={`${appGroup.name}-${appGroup.repo_url}`}> | ||
<GitOpsListItem appGroup={appGroup} /> | ||
const GitOpsList: React.FC<GitOpsListProps> = ({ appGroups, emptyStateMsg }) => { | ||
const { t } = useTranslation(); | ||
return ( | ||
<div className="odc-gitops-list"> | ||
{!emptyStateMsg ? ( | ||
<Stack hasGutter> | ||
<StackItem> | ||
<Split> | ||
<SplitItem isFilled /> | ||
<SplitItem> | ||
{t('devconsole~{{appGroupsSize, number}} items', { | ||
appGroupsSize: _.size(appGroups), | ||
})} | ||
</SplitItem> | ||
</Split> | ||
</StackItem> | ||
))} | ||
</Stack> | ||
) : ( | ||
<GitOpsEmptyState emptyStateMsg={emptyStateMsg} /> | ||
)} | ||
</div> | ||
); | ||
{_.map(appGroups, (appGroup) => ( | ||
<StackItem key={`${appGroup.name}-${appGroup.repo_url}`}> | ||
<GitOpsListItem appGroup={appGroup} /> | ||
</StackItem> | ||
))} | ||
</Stack> | ||
) : ( | ||
<GitOpsEmptyState emptyStateMsg={emptyStateMsg} /> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default GitOpsList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.