Merge pull request #7499 from nixocio/ui_translations_issues

Add strings to be translated

Reviewed-by: Kersom
             https://github.com/nixocio
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-07-01 15:31:59 +00:00 committed by GitHub
commit e3e69b4c6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 49 additions and 41 deletions

View File

@ -89,9 +89,9 @@ function Application({ setBreadcrumb, i18n }) {
<ContentError error={error}>
{error.response?.status === 404 && (
<span>
{i18n._(`Application not found.`)}{' '}
{i18n._(t`Application not found.`)}{' '}
<Link to="/applications">
{i18n._(`View all applications.`)}
{i18n._(t`View all applications.`)}
</Link>
</span>
)}

View File

@ -79,8 +79,10 @@ function Credential({ i18n, setBreadcrumb }) {
<ContentError error={contentError}>
{contentError.response && contentError.response.status === 404 && (
<span>
{i18n._(`Credential not found.`)}{' '}
<Link to="/credentials">{i18n._(`View all Credentials.`)}</Link>
{i18n._(t`Credential not found.`)}{' '}
<Link to="/credentials">
{i18n._(t`View all Credentials.`)}
</Link>
</span>
)}
</ContentError>
@ -119,7 +121,7 @@ function Credential({ i18n, setBreadcrumb }) {
<ContentError isNotFound>
{match.params.id && (
<Link to={`/credentials/${match.params.id}/details`}>
{i18n._(`View Credential Details`)}
{i18n._(t`View Credential Details`)}
</Link>
)}
</ContentError>
@ -131,7 +133,7 @@ function Credential({ i18n, setBreadcrumb }) {
<ContentError isNotFound>
{id && (
<Link to={`/credentials/${id}/details`}>
{i18n._(`View Credential Details`)}
{i18n._(t`View Credential Details`)}
</Link>
)}
</ContentError>

View File

@ -94,8 +94,8 @@ function Host({ i18n, setBreadcrumb }) {
<ContentError error={contentError}>
{contentError?.response?.status === 404 && (
<span>
{i18n._(`Host not found.`)}{' '}
<Link to="/hosts">{i18n._(`View all Hosts.`)}</Link>
{i18n._(t`Host not found.`)}{' '}
<Link to="/hosts">{i18n._(t`View all Hosts.`)}</Link>
</span>
)}
</ContentError>
@ -136,7 +136,7 @@ function Host({ i18n, setBreadcrumb }) {
<Route key="not-found" path="*">
<ContentError isNotFound>
<Link to={`${match.url}/details`}>
{i18n._(`View Host Details`)}
{i18n._(t`View Host Details`)}
</Link>
</ContentError>
</Route>

View File

@ -88,8 +88,10 @@ function Inventory({ i18n, setBreadcrumb }) {
<ContentError error={contentError}>
{contentError.response?.status === 404 && (
<span>
{i18n._(`Inventory not found.`)}{' '}
<Link to="/inventories">{i18n._(`View all Inventories.`)}</Link>
{i18n._(t`Inventory not found.`)}{' '}
<Link to="/inventories">
{i18n._(t`View all Inventories.`)}
</Link>
</span>
)}
</ContentError>
@ -178,7 +180,7 @@ function Inventory({ i18n, setBreadcrumb }) {
<Link
to={`/inventories/inventory/${match.params.id}/details`}
>
{i18n._(`View Inventory Details`)}
{i18n._(t`View Inventory Details`)}
</Link>
)}
</ContentError>

View File

@ -97,9 +97,9 @@ function InventoryHost({ i18n, setBreadcrumb, inventory }) {
<ContentError error={contentError}>
{contentError.response && contentError.response.status === 404 && (
<span>
{i18n._(`Host not found.`)}{' '}
{i18n._(t`Host not found.`)}{' '}
<Link to={hostListUrl}>
{i18n._(`View all Inventory Hosts.`)}
{i18n._(t`View all Inventory Hosts.`)}
</Link>
</span>
)}
@ -159,7 +159,7 @@ function InventoryHost({ i18n, setBreadcrumb, inventory }) {
<Route key="not-found" path="*">
<ContentError isNotFound>
<Link to={`${match.url}/details`}>
{i18n._(`View Inventory Host Details`)}
{i18n._(t`View Inventory Host Details`)}
</Link>
</ContentError>
</Route>

View File

@ -167,7 +167,7 @@ function InventorySource({ i18n, inventory, setBreadcrumb, me }) {
<Route key="not-found" path="*">
<ContentError isNotFound>
<Link to={`${match.url}/details`}>
{i18n._(`View inventory source details`)}
{i18n._(t`View inventory source details`)}
</Link>
</ContentError>
</Route>

View File

@ -93,8 +93,10 @@ function SmartInventory({ i18n, setBreadcrumb }) {
<ContentError error={contentError}>
{contentError?.response?.status === 404 && (
<span>
{i18n._(`Smart Inventory not found.`)}{' '}
<Link to="/inventories">{i18n._(`View all Inventories.`)}</Link>
{i18n._(t`Smart Inventory not found.`)}{' '}
<Link to="/inventories">
{i18n._(t`View all Inventories.`)}
</Link>
</span>
)}
</ContentError>
@ -166,7 +168,7 @@ function SmartInventory({ i18n, setBreadcrumb }) {
<Link
to={`/inventories/smart_inventory/${match.params.id}/details`}
>
{i18n._(`View Inventory Details`)}
{i18n._(t`View Inventory Details`)}
</Link>
)}
</ContentError>

View File

@ -93,8 +93,8 @@ class Job extends Component {
<ContentError error={contentError}>
{contentError.response.status === 404 && (
<span>
{i18n._(`The page you requested could not be found.`)}{' '}
<Link to="/jobs">{i18n._(`View all Jobs.`)}</Link>
{i18n._(t`The page you requested could not be found.`)}{' '}
<Link to="/jobs">{i18n._(t`View all Jobs.`)}</Link>
</span>
)}
</ContentError>
@ -149,7 +149,7 @@ class Job extends Component {
<Link
to={`/jobs/${match.params.type}/${match.params.id}/details`}
>
{i18n._(`View Job Details`)}
{i18n._(t`View Job Details`)}
</Link>
</ContentError>
)}

View File

@ -2,6 +2,8 @@ import React, { Component } from 'react';
import { Redirect, Link } from 'react-router-dom';
import { PageSection, Card } from '@patternfly/react-core';
import { withI18n } from '@lingui/react';
import { t } from '@lingui/macro';
import { UnifiedJobsAPI } from '../../api';
import ContentError from '../../components/ContentError';
import { JOB_TYPE_URL_SEGMENTS } from '../../constants';
@ -57,7 +59,7 @@ class JobTypeRedirect extends Component {
<Card>
{error === NOT_FOUND ? (
<ContentError isNotFound>
<Link to="/jobs">{i18n._(`View all Jobs`)}</Link>
<Link to="/jobs">{i18n._(t`View all Jobs`)}</Link>
</ContentError>
) : (
<ContentError error={error} />

View File

@ -151,9 +151,9 @@ class Organization extends Component {
<ContentError error={contentError}>
{contentError.response.status === 404 && (
<span>
{i18n._(`Organization not found.`)}{' '}
{i18n._(t`Organization not found.`)}{' '}
<Link to="/organizations">
{i18n._(`View all Organizations.`)}
{i18n._(t`View all Organizations.`)}
</Link>
</span>
)}
@ -208,7 +208,7 @@ class Organization extends Component {
<ContentError isNotFound>
{match.params.id && (
<Link to={`/organizations/${match.params.id}/details`}>
{i18n._(`View Organization Details`)}
{i18n._(t`View Organization Details`)}
</Link>
)}
</ContentError>

View File

@ -174,8 +174,8 @@ class Project extends Component {
<ContentError error={contentError}>
{contentError.response.status === 404 && (
<span>
{i18n._(`Project not found.`)}{' '}
<Link to="/projects">{i18n._(`View all Projects.`)}</Link>
{i18n._(t`Project not found.`)}{' '}
<Link to="/projects">{i18n._(t`View all Projects.`)}</Link>
</span>
)}
</ContentError>
@ -233,7 +233,7 @@ class Project extends Component {
<ContentError isNotFound>
{match.params.id && (
<Link to={`/projects/${match.params.id}/details`}>
{i18n._(`View Project Details`)}
{i18n._(t`View Project Details`)}
</Link>
)}
</ContentError>

View File

@ -68,8 +68,8 @@ function Team({ i18n, setBreadcrumb }) {
<ContentError error={contentError}>
{contentError.response.status === 404 && (
<span>
{i18n._(`Team not found.`)}{' '}
<Link to="/teams">{i18n._(`View all Teams.`)}</Link>
{i18n._(t`Team not found.`)}{' '}
<Link to="/teams">{i18n._(t`View all Teams.`)}</Link>
</span>
)}
</ContentError>
@ -109,7 +109,7 @@ function Team({ i18n, setBreadcrumb }) {
<ContentError isNotFound>
{id && (
<Link to={`/teams/${id}/details`}>
{i18n._(`View Team Details`)}
{i18n._(t`View Team Details`)}
</Link>
)}
</ContentError>

View File

@ -140,8 +140,8 @@ function Template({ i18n, me, setBreadcrumb }) {
<ContentError error={contentError}>
{contentError.response.status === 404 && (
<span>
{i18n._(`Template not found.`)}{' '}
<Link to="/templates">{i18n._(`View all Templates.`)}</Link>
{i18n._(t`Template not found.`)}{' '}
<Link to="/templates">{i18n._(t`View all Templates.`)}</Link>
</span>
)}
</ContentError>
@ -224,7 +224,7 @@ function Template({ i18n, me, setBreadcrumb }) {
<Link
to={`/templates/${match.params.templateType}/${match.params.id}/details`}
>
{i18n._(`View Template Details`)}
{i18n._(t`View Template Details`)}
</Link>
)}
</ContentError>

View File

@ -182,8 +182,8 @@ class WorkflowJobTemplate extends Component {
<ContentError error={contentError}>
{contentError.response.status === 404 && (
<span>
{i18n._(`Template not found.`)}{' '}
<Link to="/templates">{i18n._(`View all Templates.`)}</Link>
{i18n._(t`Template not found.`)}{' '}
<Link to="/templates">{i18n._(t`View all Templates.`)}</Link>
</span>
)}
</ContentError>
@ -290,7 +290,7 @@ class WorkflowJobTemplate extends Component {
<Link
to={`/templates/workflow_job_template/${match.params.id}/details`}
>
{i18n._(`View Template Details`)}
{i18n._(t`View Template Details`)}
</Link>
)}
</ContentError>

View File

@ -91,8 +91,8 @@ function User({ i18n, setBreadcrumb, me }) {
<ContentError error={contentError}>
{contentError.response && contentError.response.status === 404 && (
<span>
{i18n._(`User not found.`)}{' '}
<Link to={userListUrl}>{i18n._(`View all Users.`)}</Link>
{i18n._(t`User not found.`)}{' '}
<Link to={userListUrl}>{i18n._(t`View all Users.`)}</Link>
</span>
)}
</ContentError>
@ -137,7 +137,7 @@ function User({ i18n, setBreadcrumb, me }) {
<ContentError isNotFound>
{match.params.id && (
<Link to={`/users/${match.params.id}/details`}>
{i18n._(`View User Details`)}
{i18n._(t`View User Details`)}
</Link>
)}
</ContentError>