Skip to content

Commit

Permalink
fix: add interationalization to added changes
Browse files Browse the repository at this point in the history
  • Loading branch information
harshpatel-crest committed Mar 22, 2021
1 parent f1c2545 commit cf70a0f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useRef, useEffect, useState } from 'react';
import PropTypes from 'prop-types';

import { _ } from '@splunk/ui-utils/i18n';
import Button from '@splunk/react-ui/Button';
import ControlGroup from '@splunk/react-ui/ControlGroup';

Expand Down Expand Up @@ -50,7 +51,7 @@ function ConfigurationFormView({ serviceName }) {
/>
<ControlGroup label="">
<div style={{ flexGrow: 0 }}>
<Button appearance="primary" label="Save" />
<Button appearance="primary" label={_('Save')} />
</div>
</ControlGroup>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function TableHeader({ page, services, totalElement, handleRequestModalOpen }) {
setSearchType(value);
}}
>
arr
{arr}
</Select>
);
};
Expand Down Expand Up @@ -73,9 +73,21 @@ function TableHeader({ page, services, totalElement, handleRequestModalOpen }) {
setPageSize(value);
}}
>
<Select.Option key="10" label="10 Per Page" value={10} />
<Select.Option key="25" label="25 Per Page" value={25} />
<Select.Option key="50" label="50 Per Page" value={50} />
<Select.Option
key="10"
label={_('10 Per Page')}
value={10}
/>
<Select.Option
key="25"
label={_('25 Per Page')}
value={25}
/>
<Select.Option
key="50"
label={_('50 Per Page')}
value={50}
/>
</Select>
{getSearchTypeDropdown()}
</TableSelectBoxWrapper>
Expand Down Expand Up @@ -107,7 +119,11 @@ function TableHeader({ page, services, totalElement, handleRequestModalOpen }) {
}}
/>
{page === 'inputs' ? null : (
<Button label="Add" appearance="primary" onClick={handleRequestModalOpen} />
<Button
label={_('Add')}
appearance="primary"
onClick={handleRequestModalOpen}
/>
)}
</ColumnLayout.Column>
</ColumnLayout.Row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function ConfigurationPage() {
</ColumnLayout>
<TabBar activeTabId={activeTabId} onChange={handleChange}>
{tabs.map((tab) => (
<TabBar.Tab key={tab.name} label={tab.title} tabId={tab.name} />
<TabBar.Tab key={tab.name} label={_(tab.title)} tabId={tab.name} />
))}
</TabBar>
{tabs.map((tab) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function InputPage() {
const [serviceLabel, setserviceLabel] = useState(null);
const unifiedConfigs = getUnifiedConfigs();
const { services, title, description } = unifiedConfigs.pages.inputs;
const toggle = <Button appearance="primary" label="Create New Input" isMenu />;
const toggle = <Button appearance="primary" label={_('Create New Input')} isMenu />;

const getInputMenu = () => {
let arr = [];
Expand Down

0 comments on commit cf70a0f

Please sign in to comment.