Skip to content

Commit

Permalink
Support translation for ODF sub tab items
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Asir Jeyasingh <[email protected]>
  • Loading branch information
TimothyAsirJeyasing committed Aug 31, 2023
1 parent 5a3eba9 commit aa769bc
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 25 deletions.
8 changes: 8 additions & 0 deletions locales/en/plugin__odf-console.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@
"StorageSystem details": "StorageSystem details",
"Edit BlockPool": "Edit BlockPool",
"Delete BlockPool": "Delete BlockPool",
"YAML": "YAML",
"Events": "Events",
"StorageClasses": "StorageClasses",
"Replicas": "Replicas",
"Used capacity": "Used capacity",
Expand Down Expand Up @@ -987,6 +989,12 @@
"Attach OBC to a Deployment": "Attach OBC to a Deployment",
"Deployment Name": "Deployment Name",
"Attach": "Attach",
"Backing Store": "Backing Store",
"Object Buckets": "Object Buckets",
"Object Bucket Claims": "Object Bucket Claims",
"Namespace Store": "Namespace Store",
"Bucket Class": "Bucket Class",
"Topology": "Topology",
"hr": "hr",
"min": "min",
"Select at least 2 Backing Store resources": "Select at least 2 Backing Store resources",
Expand Down
6 changes: 3 additions & 3 deletions packages/ocs/block-pool/BlockPoolDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@ export const BlockPoolDetailsPage: React.FC<BlockPoolDetailsPageProps> = ({
pages={[
{
href: '',
name: 'Details',
name: t('Details'),
component: BlockPoolDashboard as any,
},
{
href: 'yaml',
name: 'YAML',
name: t('YAML'),
component: YAMLEditorWrapped,
},
{
href: 'events',
name: 'Events',
name: t('Events'),
component: EventStreamWrapped,
},
]}
Expand Down
6 changes: 3 additions & 3 deletions packages/odf/components/mcg/ObjectBucketClaim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -435,17 +435,17 @@ export const OBCDetailsPage: React.FC<ObjectBucketClaimDetailsPageProps> = ({
pages={[
{
href: '',
name: 'Details',
name: t('Details'),
component: OBCDetails as any,
},
{
href: 'yaml',
name: 'YAML',
name: t('YAML'),
component: YAMLEditorWrapped,
},
{
href: 'events',
name: 'Events',
name: t('Events'),
component: EventStreamWrapped,
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,17 @@ const BackingStoreDetailsPage: React.FC<BackingStoreDetilsPageProps> = ({
pages={[
{
href: '',
name: 'Details',
name: t('Details'),
component: BSDetails,
},
{
href: 'yaml',
name: 'YAML',
name: t('YAML'),
component: YAMLEditorWrapped,
},
{
href: 'events',
name: 'Events',
name: t('Events'),
component: EventStreamWrapped,
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,17 @@ const BucketClassDetailsPage: React.FC<BucketClassDetailsPageProps> = ({
pages={[
{
href: '',
name: 'Details',
name: t('Details'),
component: BCDetails,
},
{
href: 'yaml',
name: 'YAML',
name: t('YAML'),
component: YAMLEditorWrapped,
},
{
href: 'events',
name: 'Events',
name: t('Events'),
component: EventStreamWrapped,
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ const NamespaceStoreDetailsPage: React.FC<BackingStoreDetilsPageProps> = ({
pages={[
{
href: '',
name: 'Details',
name: t('Details'),
component: NSDetails,
},
{
href: 'yaml',
name: 'YAML',
name: t('YAML'),
component: YAMLEditorWrapped,
},
{
href: 'events',
name: 'Events',
name: t('Events'),
component: EventStreamWrapped,
},
]}
Expand Down
8 changes: 8 additions & 0 deletions packages/odf/utils/horizontal-nav-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ import {
import { ResolvedCodeRefProperties } from '@openshift-console/dynamic-plugin-sdk/lib/types';
import * as _ from 'lodash-es';

// t('plugin__odf-console~Backing Store')
// t('plugin__odf-console~Object Storage')
// t('plugin__odf-console~Object Buckets')
// t('plugin__odf-console~Object Bucket Claims')
// t('plugin__odf-console~Namespace Store')
// t('plugin__odf-console~Bucket Class')
// t('plugin__odf-console~Topology')

type SortPagesProps = {
extensions: ResolvedExtension<HorizontalNavTab>[];
haveExtensionsResolved: boolean;
Expand Down
20 changes: 10 additions & 10 deletions plugins/odf/console-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"id": "odfdashboard",
"insertBefore": "persistentvolumes",
"section": "storage",
"name": "Data Foundation",
"name": "%plugin__odf-console~Data Foundation%",
"href": "/odf/cluster"
},
"flags": {
Expand Down Expand Up @@ -486,7 +486,7 @@
"type": "odf.horizontalNav/tab",
"properties": {
"id": "topology",
"name": "Topology",
"name": "%plugin__odf-console~Topology%",
"contextId": "odf-dashboard",
"before": "systems",
"href": "topology",
Expand Down Expand Up @@ -538,7 +538,7 @@
"insertBefore": "persistentvolumes",
"insertAfter": "odfdashboard",
"section": "storage",
"name": "Object Storage",
"name": "%plugin__odf-console~Object Storage%",
"href": "/odf/object-storage"
},
"flags": {
Expand All @@ -561,7 +561,7 @@
"type": "odf.horizontalNav/tab",
"properties": {
"id": "backing-store",
"name": "Backing Store",
"name": "%plugin__odf-console~Backing Store%",
"contextId": "odf-object-service",
"href": "resource/noobaa.io~v1alpha1~BackingStore",
"component": {
Expand All @@ -576,7 +576,7 @@
"type": "odf.horizontalNav/tab",
"properties": {
"id": "bucket-class",
"name": "Bucket Class",
"name": "%plugin__odf-console~Bucket Class%",
"contextId": "odf-object-service",
"after": "backing-store",
"href": "resource/noobaa.io~v1alpha1~BucketClass",
Expand All @@ -592,7 +592,7 @@
"type": "odf.horizontalNav/tab",
"properties": {
"id": "namespace-store",
"name": "Namespace Store",
"name": "%plugin__odf-console~Namespace Store%",
"contextId": "odf-object-service",
"after": "bucket-class",
"href": "resource/noobaa.io~v1alpha1~NamespaceStore",
Expand All @@ -608,7 +608,7 @@
"type": "odf.horizontalNav/tab",
"properties": {
"id": "objectbuckets",
"name": "Object Buckets",
"name": "%plugin__odf-console~Object Buckets%",
"contextId": "odf-object-service",
"after": "namespace-store",
"href": "resource/objectbucket.io~v1alpha1~ObjectBucket",
Expand All @@ -624,7 +624,7 @@
"type": "odf.horizontalNav/tab",
"properties": {
"id": "objectbuckets",
"name": "Object Buckets",
"name": "%plugin__odf-console~Object Buckets%",
"contextId": "odf-object-service",
"after": "namespace-store",
"href": "resource/objectbucket.io~v1alpha1~ObjectBucket",
Expand All @@ -651,7 +651,7 @@
"type": "odf.horizontalNav/tab",
"properties": {
"id": "objectbucketclaims",
"name": "Object Bucket Claims",
"name": "%plugin__odf-console~Object Bucket Claims%",
"contextId": "odf-object-service",
"after": "objectbuckets",
"href": "resource/objectbucket.io~v1alpha1~ObjectBucketClaim",
Expand All @@ -667,7 +667,7 @@
"type": "odf.horizontalNav/tab",
"properties": {
"id": "objectbucketclaims",
"name": "Object Bucket Claims",
"name": "%plugin__odf-console~Object Bucket Claims%",
"contextId": "odf-object-service",
"after": "objectbuckets",
"href": "resource/objectbucket.io~v1alpha1~ObjectBucketClaim",
Expand Down

0 comments on commit aa769bc

Please sign in to comment.