Skip to content

Commit 28f2100

Browse files
committed
OCPBUGS-65887: Update i18n strings
1 parent d3a98e7 commit 28f2100

4 files changed

Lines changed: 22 additions & 23 deletions

File tree

console-extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"type": "console.navigation/href",
1212
"properties": {
1313
"id": "example",
14-
"name": "%plugin__console-plugin-template~Plugin Example%",
14+
"name": "%plugin__console-plugin-template~Plugin example%",
1515
"href": "/example",
1616
"perspective": "admin",
1717
"section": "home"

integration-tests/tests/example-page.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ describe('Console plugin template test', () => {
6666

6767
it('Verify the example page title', () => {
6868
cy.get('[data-quickstart-id="qs-nav-home"]').click();
69-
cy.get('[data-test="nav"]').contains('Plugin Example').click();
69+
cy.get('[data-test="nav"]').contains('Plugin example').click();
7070
cy.url().should('include', '/example');
71-
cy.get('title').should('contain', 'Hello, Plugin!');
71+
cy.get('title').should('contain', 'Hello, plugin!');
7272
});
7373
});
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{
2-
"After cloning this project, replace references to": "After cloning this project, replace references to",
3-
"and other plugin metadata in package.json with values for your plugin.": "and other plugin metadata in package.json with values for your plugin.",
4-
"console-template-plugin": "console-template-plugin",
5-
"exposedModules": "exposedModules",
6-
"Hello, Plugin!": "Hello, Plugin!",
7-
"in package.json mapping the reference to the module.": "in package.json mapping the reference to the module.",
8-
"Plugin Example": "Plugin Example",
2+
"After cloning this project, replace references to <1>console-template-plugin</1> and other plugin metadata in package.json with values for your plugin.": "After cloning this project, replace references to <1>console-template-plugin</1> and other plugin metadata in package.json with values for your plugin.",
3+
"Hello, plugin!": "Hello, plugin!",
4+
"Plugin example": "Plugin example",
95
"Success!": "Success!",
10-
"This is a custom page contributed by the console plugin template. The extension that adds the page is declared in console-extensions.json in the project root along with the corresponding nav item. Update console-extensions.json to change or add extensions. Code references in console-extensions.json must have a corresponding property": "This is a custom page contributed by the console plugin template. The extension that adds the page is declared in console-extensions.json in the project root along with the corresponding nav item. Update console-extensions.json to change or add extensions. Code references in console-extensions.json must have a corresponding property",
6+
"This is a custom page contributed by the console plugin template. The extension that adds the page is declared in console-extensions.json in the project root along with the corresponding nav item. Update console-extensions.json to change or add extensions. Code references in console-extensions.json must have a corresponding property <2>exposedModules</2> in package.json mapping the reference to the module.": "This is a custom page contributed by the console plugin template. The extension that adds the page is declared in console-extensions.json in the project root along with the corresponding nav item. Update console-extensions.json to change or add extensions. Code references in console-extensions.json must have a corresponding property <2>exposedModules</2> in package.json mapping the reference to the module.",
117
"Your plugin is working.": "Your plugin is working."
12-
}
8+
}

src/components/ExamplePage.tsx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DocumentTitle, ListPageHeader } from '@openshift-console/dynamic-plugin-sdk';
2-
import { useTranslation } from 'react-i18next';
2+
import { Trans, useTranslation } from 'react-i18next';
33
import { Content, PageSection } from '@patternfly/react-core';
44
import { CheckCircleIcon } from '@patternfly/react-icons';
55
import './example.css';
@@ -9,8 +9,8 @@ export default function ExamplePage() {
99

1010
return (
1111
<>
12-
<DocumentTitle>{t('Hello, Plugin!')}</DocumentTitle>
13-
<ListPageHeader title={t('Hello, Plugin!')} />
12+
<DocumentTitle>{t('Hello, plugin!')}</DocumentTitle>
13+
<ListPageHeader title={t('Hello, plugin!')} />
1414
<PageSection>
1515
<Content component="p">
1616
<span className="console-plugin-template__nice">
@@ -19,16 +19,19 @@ export default function ExamplePage() {
1919
{t('Your plugin is working.')}
2020
</Content>
2121
<Content component="p">
22-
{t(
23-
'This is a custom page contributed by the console plugin template. The extension that adds the page is declared in console-extensions.json in the project root along with the corresponding nav item. Update console-extensions.json to change or add extensions. Code references in console-extensions.json must have a corresponding property',
24-
)}
25-
<code>{t('exposedModules')}</code>{' '}
26-
{t('in package.json mapping the reference to the module.')}
22+
<Trans t={t}>
23+
This is a custom page contributed by the console plugin template. The extension that
24+
adds the page is declared in console-extensions.json in the project root along with the
25+
corresponding nav item. Update console-extensions.json to change or add extensions. Code
26+
references in console-extensions.json must have a corresponding property{' '}
27+
<code>exposedModules</code> in package.json mapping the reference to the module.
28+
</Trans>
2729
</Content>
2830
<Content component="p">
29-
{t('After cloning this project, replace references to')}{' '}
30-
<code>{t('console-template-plugin')}</code>{' '}
31-
{t('and other plugin metadata in package.json with values for your plugin.')}
31+
<Trans t={t}>
32+
After cloning this project, replace references to <code>console-template-plugin</code>{' '}
33+
and other plugin metadata in package.json with values for your plugin.
34+
</Trans>
3235
</Content>
3336
</PageSection>
3437
</>

0 commit comments

Comments
 (0)