Skip to content

Commit

Permalink
Merge pull request ansible#7499 from nixocio/ui_translations_issues
Browse files Browse the repository at this point in the history
Add strings to be translated

Reviewed-by: Kersom
             https://github.com/nixocio
  • Loading branch information
2 parents 642803e + e0ebd5d commit e3e69b4
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
)}
Expand Down
10 changes: 6 additions & 4 deletions awx/ui_next/src/screens/Credential/Credential.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions awx/ui_next/src/screens/Host/Host.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
8 changes: 5 additions & 3 deletions awx/ui_next/src/screens/Inventory/Inventory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
)}
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
8 changes: 5 additions & 3 deletions awx/ui_next/src/screens/Inventory/SmartInventory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions awx/ui_next/src/screens/Job/Job.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
)}
Expand Down
4 changes: 3 additions & 1 deletion awx/ui_next/src/screens/Job/JobTypeRedirect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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} />
Expand Down
6 changes: 3 additions & 3 deletions awx/ui_next/src/screens/Organization/Organization.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
)}
Expand Down Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions awx/ui_next/src/screens/Project/Project.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions awx/ui_next/src/screens/Team/Team.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions awx/ui_next/src/screens/Template/Template.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions awx/ui_next/src/screens/Template/WorkflowJobTemplate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions awx/ui_next/src/screens/User/User.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit e3e69b4

Please sign in to comment.