Skip to content

Commit

Permalink
[i18n] Externalize strings in olm root components
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealJon committed Jan 8, 2021
1 parent d94fdb9 commit b95a54d
Show file tree
Hide file tree
Showing 23 changed files with 1,577 additions and 1,267 deletions.
7 changes: 7 additions & 0 deletions frontend/packages/console-shared/src/hooks/redux-selectors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore: FIXME missing exports due to out-of-sync @types/react-redux version
import { useSelector } from 'react-redux';

export const useActiveNamespace = (): string => {
return useSelector(({ UI }) => UI.get('activeNamespace'));
};
1 change: 1 addition & 0 deletions frontend/packages/console-shared/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ export * from './helm-utils';
export * from './hpa-utils';
export * from './sample-utils';
export * from './multiselectdropdown';
export * from './annotations';
161 changes: 157 additions & 4 deletions frontend/packages/operator-lifecycle-manager/locales/en/olm.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,108 @@
{
"Disable": "Disable",
"Enable": "Enable",
"CatalogSource details": "CatalogSource details",
"Publisher": "Publisher",
"Availability": "Availability",
"Denotes whether this CatalogSource provides operators to a specific namespace, or the entire cluster.": "Denotes whether this CatalogSource provides operators to a specific namespace, or the entire cluster.",
"The ConfigMap, image, or address for this CatalogSource's registry.": "The ConfigMap, image, or address for this CatalogSource's registry.",
"Registry poll interval": "Registry poll interval",
"Number of Operators": "Number of Operators",
"The number of packages this CatalogSource provides.": "The number of packages this CatalogSource provides.",
"Operators": "Operators",
"Package not found": "Package not found",
"Cannot create a Subscription to a non-existent package.": "Cannot create a Subscription to a non-existent package.",
"Endpoint": "Endpoint",
"# of Operators": "# of Operators",
"Disabled": "Disabled",
"Operators provided by this source will not appear in OperatorHub and any operators installed from this source will not receive updates until this source is re-enabled.": "Operators provided by this source will not appear in OperatorHub and any operators installed from this source will not receive updates until this source is re-enabled.",
"Enable source": "Enable source",
"Cluster wide": "Cluster wide",
"Create {{item}}": "Create {{item}}",
"Edit Subscription": "Edit Subscription",
"Uninstall Operator": "Uninstall Operator",
"Cannot update": "Cannot update",
"CatalogSource was removed.": "CatalogSource was removed.",
"Unknown": "Unknown",
"All Namespaces": "All Namespaces",
"Managed Namespaces": "Managed Namespaces",
"{{count}} Namespaces": "{{count}} Namespaces",
"{{count}} Namespaces_plural": "{{count}} Namespaces",
"None": "None",
"No Operators found": "No Operators found",
"No Operators are availalble for project {{project}}.": "No Operators are availalble for project {{project}}.",
"No Operators are availalble.": "No Operators are availalble.",
"Discover and install Operators from the <1>OperatorHub</1>.": "Discover and install Operators from the <1>OperatorHub</1>.",
"Name": "Name",
"Namespace": "Namespace",
"Status": "Status",
"Last updated": "Last updated",
"Provided APIs": "Provided APIs",
"Installed Operators": "Installed Operators",
"Installed Operators are represented by ClusterServiceVersions within this Namespace. For more information, see the <2>Understanding Operators documentation</2>. Or create an Operator and ClusterServiceVersion using the <5>Operator SDK</5>.": "Installed Operators are represented by ClusterServiceVersions within this Namespace. For more information, see the <2>Understanding Operators documentation</2>. Or create an Operator and ClusterServiceVersion using the <5>Operator SDK</5>.",
"Required": "Required",
"Create instance": "Create instance",
"{{initializationResourceKind}} required": "{{initializationResourceKind}} required",
"Create a {{initializationResourceKind}} instance to use this Operator.": "Create a {{initializationResourceKind}} instance to use this Operator.",
"Description": "Description",
"Not available": "Not available",
"Provider": "Provider",
"Support": "Support",
"Get support": "Get support",
"Created at": "Created at",
"Links": "Links",
"Maintainers": "Maintainers",
"ClusterServiceVersion details": "ClusterServiceVersion details",
"Operands in this Namespace are managed by the Operator.": "Operands in this Namespace are managed by the Operator.",
"Status reason": "Status reason",
"Operator Deployments": "Operator Deployments",
"Operator ServiceAccounts": "Operator ServiceAccounts",
"OperatorGroup": "OperatorGroup",
"Conditions": "Conditions",
"No Operator Subscription": "No Operator Subscription",
"This Operator will not receive updates.": "This Operator will not receive updates.",
"Subscription": "Subscription",
"All instances": "All instances",
"{{item}} details": "{{item}} details",
"Cluster-wide {{resource}}": "Cluster-wide {{resource}}",
"Catalog will be available in all namespaces": "Catalog will be available in all namespaces",
"Namespace {{resource}}": "Namespace {{resource}}",
"Catalog will only be available in a single namespace": "Catalog will only be available in a single namespace",
"Create {{resource}}": "Create {{resource}}",
"Create a CatalogSource in order to make operators available in OperatorHub.": "Create a CatalogSource in order to make operators available in OperatorHub.",
"{{resource}} name": "{{resource}} name",
"Display name": "Display name",
"Publisher name": "Publisher name",
"Image (URL of container image)": "Image (URL of container image)",
"URL of container image hosted on a registry": "URL of container image hosted on a registry",
"Create": "Create",
"Cancel": "Cancel",
"operator": "operator",
"operator_plural": "operators",
"Installation namespace <1>{{namespace}}</1> contains <4></4> installed with manual approval, and all operators installed in the same namespace will function as manual approval strategy. To allow automatic approval, all operators installed in the namespace must use automatic approval strategy.": "Installation namespace <1>{{namespace}}</1> contains <4></4> installed with manual approval, and all operators installed in the same namespace will function as manual approval strategy. To allow automatic approval, all operators installed in the namespace must use automatic approval strategy.",
"Review the manual install plan for operators <1></1>. Once approved, the following resources will be created in order to satisfy the requirements for the components specified in the plan. Click the resource name to view the resource in detail.": "Review the manual install plan for operators <1></1>. Once approved, the following resources will be created in order to satisfy the requirements for the components specified in the plan. Click the resource name to view the resource in detail.",
"No InstallPlans found": "No InstallPlans found",
"InstallPlans are created automatically by subscriptions or manually using the CLI.": "InstallPlans are created automatically by subscriptions or manually using the CLI.",
"Components": "Components",
"Subscriptions": "Subscriptions",
"InstallPlans": "InstallPlans",
"Review manual InstallPlan": "Review manual InstallPlan",
"Inspect the requirements for the components specified in this InstallPlan before approving.": "Inspect the requirements for the components specified in this InstallPlan before approving.",
"Preview InstallPlan": "Preview InstallPlan",
"InstallPlan details": "InstallPlan details",
"CatalogSources": "CatalogSources",
"Approve": "Approve",
"Approved": "Approved",
"Deny": "Deny",
"Kind": "Kind",
"API version": "API version",
"No components resolved": "No components resolved",
"This InstallPlan has not been fully resolved yet.": "This InstallPlan has not been fully resolved yet.",
"Created": "Created",
"Operand Resources": "Operand Resources",
"No resources found": "No resources found",
"There are no Kubernetes resources used by this operand.": "There are no Kubernetes resources used by this operand.",
"Resources by name": "Resources by name",
"Delete CatalogSource?": "Delete CatalogSource?",
"By deleting a CatalogSource, any Operator that has been installed from this source will no longer receive updates.": "By deleting a CatalogSource, any Operator that has been installed from this source will no longer receive updates.",
"Confirm deletion by typing <2>{{name}}</2> below:": "Confirm deletion by typing <2>{{name}}</2> below:",
Expand All @@ -18,6 +122,59 @@
"This will remove Operator <1>{{name}}</1> from <4>{{namespace}}</4>. Removing the Operator will not remove any of its custom resource definitions or managed resources. If your Operator has deployed applications on the cluster or configured off-cluster resources, these will continue to run and need to be cleaned up manually.": "This will remove Operator <1>{{name}}</1> from <4>{{namespace}}</4>. Removing the Operator will not remove any of its custom resource definitions or managed resources. If your Operator has deployed applications on the cluster or configured off-cluster resources, these will continue to run and need to be cleaned up manually.",
"Message from Operator developer": "Message from Operator developer",
"Uninstall": "Uninstall",
"The Operator Lifecycle Manager will not watch this Namespace because it is not configured with an OperatorGroup.": "The Operator Lifecycle Manager will not watch this Namespace because it is not configured with an OperatorGroup.",
"Create one here.": "Create one here.",
"Select OperatorGroup": "Select OperatorGroup",
"View installed Operators in Namespace {{namespace}}": "View installed Operators in Namespace {{namespace}}",
"View installed Operators in all Namespaces": "View installed Operators in all Namespaces",
"Operator installation failed": "Operator installation failed",
"The operator did not install successfully.": "The operator did not install successfully.",
"The required custom resource can be created in the Operator's details view.": "The required custom resource can be created in the Operator's details view.",
"View error": "View error",
"Manual approval required": "Manual approval required",
"Installed operator": "Installed operator",
"operand required": "operand required",
"ready for use": "ready for use",
"The operator has installed successfully. Create the required custom resource to be able to use this operator.": "The operator has installed successfully. Create the required custom resource to be able to use this operator.",
"View Operator": "View Operator",
"Installing operator": "Installing operator",
"The operator is being installed. This may take a few minutes.": "The operator is being installed. This may take a few minutes.",
"Once the operator is installed the required custom resource will be available for creation.": "Once the operator is installed the required custom resource will be available for creation.",
"Installing Operator": "Installing Operator",
"Installing...": "Installing...",
"CatalogSource": "CatalogSource",
"No PackageManifests Found": "No PackageManifests Found",
"The CatalogSource author has not added any packages.": "The CatalogSource author has not added any packages.",
"Catalogs are groups of Operators you can make available on the cluster. Use&nbsp;<1>OperatorHub</1>&nbsp;to subscribe and grant namespaces access to use installed Operators.": "Catalogs are groups of Operators you can make available on the cluster. Use&nbsp;<1>OperatorHub</1>&nbsp;to subscribe and grant namespaces access to use installed Operators.",
"Upgrade available": "Upgrade available",
"Upgrading": "Upgrading",
"Up to date": "Up to date",
"Unknown failure": "Unknown failure",
"Remove Subscription": "Remove Subscription",
"View ClusterServiceVersion...": "View ClusterServiceVersion...",
"Channel": "Channel",
"Approval strategy": "Approval strategy",
"Operator Subscriptions": "Operator Subscriptions",
"No Subscriptions found": "No Subscriptions found",
"Each Namespace can subscribe to a single channel of a package for automatic updates.": "Each Namespace can subscribe to a single channel of a package for automatic updates.",
"Create Subscription": "Create Subscription",
"Subscriptions by package": "Subscriptions by package",
"InstalPlan failed": "InstalPlan failed",
"CatalogSource removed": "CatalogSource removed",
"The CatalogSource for this Operator has been removed. The CatalogSource must be added back in order for this Operator to receive any updates.": "The CatalogSource for this Operator has been removed. The CatalogSource must be added back in order for this Operator to receive any updates.",
"Subscription details": "Subscription details",
"Installed version": "Installed version",
"Starting version": "Starting version",
"InstallPlan": "InstallPlan",
"1 requires approval": "1 requires approval",
"1 failed": "1 failed",
"1 installing": "1 installing",
"Approval": "Approval",
"Upgrade status": "Upgrade status",
"CatalogSource was removed": "CatalogSource was removed",
"1 installed": "1 installed",
"0 installed": "0 installed",
"0 installing": "0 installing",
"Operator description": "Operator description",
"This resource is provided by {{displayName}}, a Kubernetes Operator enabled by the Operator Lifecycle Manager.": "This resource is provided by {{displayName}}, a Kubernetes Operator enabled by the Operator Lifecycle Manager.",
"Operator Backed": "Operator Backed",
Expand All @@ -26,10 +183,6 @@
"Pending": "Pending",
"OK": "OK",
"Failed": "Failed",
"Unknown": "Unknown",
"Upgrade available": "Upgrade available",
"Upgrading": "Upgrading",
"Up to date": "Up to date",
"Hide operator description": "Hide operator description",
"Show operator description": "Show operator description",
"This resource is provided by {{operatorName}}, a Kubernetes Operator enabled by the Operator Lifecycle Manager.": "This resource is provided by {{operatorName}}, a Kubernetes Operator enabled by the Operator Lifecycle Manager.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"operator": "operator",
"operator_plural": "operators",
"Installation namespace <1>{{namespace}}</1> contains <4></4> installed with manual approval, and all operators installed in the same namespace will function as manual approval strategy. To allow automatic approval, all operators installed in the namespace must use automatic approval strategy.": "Installation namespace <1>{{namespace}}</1> contains <4></4> installed with manual approval, and all operators installed in the same namespace will function as manual approval strategy. To allow automatic approval, all operators installed in the namespace must use automatic approval strategy.",
"Will function as manual approval strategy": "Will function as manual approval strategy",
"Manual approval applies to all operators in a namespace": "Manual approval applies to all operators in a namespace",
"Installing an operator with manual approval causes all operators installed in namespace <1>{{selectedTargetNamespace}}</1> to function as manual approval strategy. To allow automatic approval, all operators installed in the namespace must use automatic approval strategy.": "Installing an operator with manual approval causes all operators installed in namespace <1>{{selectedTargetNamespace}}</1> to function as manual approval strategy. To allow automatic approval, all operators installed in the namespace must use automatic approval strategy."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe(CatalogSourceDetailsPage.displayName, () => {
expect(pages.length).toEqual(3);
expect(pages[0].nameKey).toEqual(`${i18nNS}~Details`);
expect(pages[1].nameKey).toEqual(`${i18nNS}~YAML`);
expect(pages[2].nameKey).toEqual(`catalog-source~Operators`);
expect(pages[2].nameKey).toEqual(`olm~Operators`);

expect(pages[0].component).toEqual(CatalogSourceDetails);
expect(pages[2].component).toEqual(CatalogSourceOperatorsPage);
Expand Down

0 comments on commit b95a54d

Please sign in to comment.