Skip to content

Commit

Permalink
Bug 1904244: Drop using i18next.t from plugin.ts file
Browse files Browse the repository at this point in the history
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1904244

Signed-off-by: Afreen Rahman <afrahman@redhat.com>
  • Loading branch information
Afreen Rahman committed Dec 8, 2020
1 parent facdf6e commit fc6116d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
22 changes: 14 additions & 8 deletions frontend/packages/ceph-storage-plugin/src/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as _ from 'lodash';
import i18next from 'i18next';
import * as models from './models';
import {
AlertAction,
Expand Down Expand Up @@ -105,7 +104,8 @@ const plugin: Plugin<ConsumedExtensions> = [
type: 'Dashboards/Tab',
properties: {
id: 'persistent-storage',
title: i18next.t('ceph-storage-plugin~Persistent Storage'),
// t('ceph-storage-plugin~Persistent Storage')
title: '%ceph-storage-plugin~Persistent Storage%',
},
flags: {
required: [OCS_CONVERGED_FLAG],
Expand Down Expand Up @@ -254,7 +254,8 @@ const plugin: Plugin<ConsumedExtensions> = [
{
type: 'Dashboards/Overview/Health/Resource',
properties: {
title: i18next.t('ceph-storage-plugin~Storage'),
// t('ceph-storage-plugin~Storage')
title: '%ceph-storage-plugin~Storage%',
resources: {
ceph: {
kind: referenceForModel(models.CephClusterModel),
Expand All @@ -272,7 +273,8 @@ const plugin: Plugin<ConsumedExtensions> = [
type: 'ClusterServiceVersion/Action',
properties: {
kind: 'StorageCluster',
label: i18next.t('ceph-storage-plugin~Add Capacity'),
// t('ceph-storage-plugin~Add Capacity')
label: '%ceph-storage-plugin~Add Capacity%',
apiGroup: models.OCSServiceModel.apiGroup,
callback: (kind, ocsConfig) => () => {
const clusterObject = { ocsConfig };
Expand All @@ -293,7 +295,8 @@ const plugin: Plugin<ConsumedExtensions> = [
type: 'Dashboards/Tab',
properties: {
id: 'independent-dashboard',
title: i18next.t('ceph-storage-plugin~Persistent Storage'),
// t('ceph-storage-plugin~Persistent Storage')
title: '%ceph-storage-plugin~Persistent Storage%',
},
flags: {
required: [OCS_INDEPENDENT_FLAG],
Expand Down Expand Up @@ -411,7 +414,8 @@ const plugin: Plugin<ConsumedExtensions> = [
model: NodeModel,
page: {
href: 'disks',
name: i18next.t('ceph-storage-plugin~Disks'),
// t('ceph-storage-plugin~Disks')
name: '%ceph-storage-plugin~Disks%',
},
loader: () =>
import(
Expand All @@ -426,7 +430,8 @@ const plugin: Plugin<ConsumedExtensions> = [
type: 'AlertAction',
properties: {
alert: OSD_DOWN_ALERT,
text: i18next.t('ceph-storage-plugin~Troubleshoot'),
// t('ceph-storage-plugin~Troubleshoot')
text: '%ceph-storage-plugin~Troubleshoot%',
path: getAlertActionPath,
},
flags: {
Expand All @@ -437,7 +442,8 @@ const plugin: Plugin<ConsumedExtensions> = [
type: 'AlertAction',
properties: {
alert: OSD_DOWN_AND_OUT_ALERT,
text: i18next.t('ceph-storage-plugin~Troubleshoot'),
// t('ceph-storage-plugin~Troubleshoot')
text: '%ceph-storage-plugin~Troubleshoot%',
path: getAlertActionPath,
},
flags: {
Expand Down
4 changes: 2 additions & 2 deletions frontend/packages/local-storage-operator-plugin/src/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as _ from 'lodash';
import i18next from 'i18next';
import {
AlertAction,
CustomFeatureFlag,
Expand Down Expand Up @@ -75,7 +74,8 @@ const plugin: Plugin<ConsumedExtensions> = [
model: NodeModel,
page: {
href: 'disks',
name: i18next.t('lso-plugin~Disks'),
// t('lso-plugin~Disks')
name: '%lso-plugin~Disks%',
},
loader: () =>
import(
Expand Down
13 changes: 8 additions & 5 deletions frontend/packages/noobaa-storage-plugin/src/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as _ from 'lodash';
import i18next from 'i18next';
import {
DashboardsCard,
DashboardsTab,
Expand Down Expand Up @@ -106,7 +105,8 @@ const plugin: Plugin<ConsumedExtensions> = [
type: 'Dashboards/Tab',
properties: {
id: 'object-service',
title: i18next.t('noobaa-storage-plugin~Object Service'),
// t('noobaa-storage-plugin~Object Service')
title: '%noobaa-storage-plugin~Object Service%',
},
flags: {
required: [NOOBAA_FLAG, OCS_FLAG],
Expand Down Expand Up @@ -230,7 +230,8 @@ const plugin: Plugin<ConsumedExtensions> = [
id: 'objectbuckets',
section: 'storage',
componentProps: {
name: i18next.t('noobaa-storage-plugin~Object Buckets'),
// t('noobaa-storage-plugin~Object Buckets')
name: '%noobaa-storage-plugin~Object Buckets%',
resource: models.NooBaaObjectBucketModel.plural,
},
},
Expand Down Expand Up @@ -264,7 +265,8 @@ const plugin: Plugin<ConsumedExtensions> = [
id: 'objectbucketclaims',
section: 'storage',
componentProps: {
name: i18next.t('noobaa-storage-plugin~Object Bucket Claims'),
// t('noobaa-storage-plugin~Object Bucket Claims')
name: '%noobaa-storage-plugin~Object Bucket Claims%',
resource: models.NooBaaObjectBucketClaimModel.plural,
},
},
Expand Down Expand Up @@ -320,7 +322,8 @@ const plugin: Plugin<ConsumedExtensions> = [
type: 'ClusterServiceVersion/Action',
properties: {
kind: models.NooBaaBucketClassModel.kind,
label: i18next.t('noobaa-storage-plugin~Edit Bucket Class Resources'),
// t('noobaa-storage-plugin~Edit Bucket Class Resources')
label: '%noobaa-storage-plugin~Edit Bucket Class Resources%',
apiGroup: models.NooBaaBucketClassModel.apiGroup,
callback: (kind, obj) => () =>
import('./components/bucket-class/modals/edit-backingstore-modal')
Expand Down

0 comments on commit fc6116d

Please sign in to comment.