mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 18:37:39 -02:30
Add strings to be translated
Add strings to be translated See: https://github.com/ansible/awx/issues/10971
This commit is contained in:
@@ -131,6 +131,7 @@ function MultipleChoiceField({ question }) {
|
|||||||
helpers.setTouched(true);
|
helpers.setTouched(true);
|
||||||
helpers.setValue('');
|
helpers.setValue('');
|
||||||
}}
|
}}
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
{options.map((opt) => (
|
{options.map((opt) => (
|
||||||
<SelectOption key={opt} value={opt} />
|
<SelectOption key={opt} value={opt} />
|
||||||
@@ -189,6 +190,7 @@ function MultiSelectField({ question }) {
|
|||||||
helpers.setTouched(true);
|
helpers.setTouched(true);
|
||||||
helpers.setValue([]);
|
helpers.setValue([]);
|
||||||
}}
|
}}
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
{options.map((opt) => (
|
{options.map((opt) => (
|
||||||
<SelectOption key={opt} value={opt} />
|
<SelectOption key={opt} value={opt} />
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ function TagMultiSelect({ onChange, value }) {
|
|||||||
selections={selections}
|
selections={selections}
|
||||||
isOpen={isExpanded}
|
isOpen={isExpanded}
|
||||||
typeAheadAriaLabel={t`Select tags`}
|
typeAheadAriaLabel={t`Select tags`}
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
{renderOptions(options)}
|
{renderOptions(options)}
|
||||||
</Select>
|
</Select>
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ function Search({
|
|||||||
isOpen={isSearchDropdownOpen}
|
isOpen={isSearchDropdownOpen}
|
||||||
ouiaId="simple-key-select"
|
ouiaId="simple-key-select"
|
||||||
isDisabled={isDisabled}
|
isDisabled={isDisabled}
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
{searchOptions}
|
{searchOptions}
|
||||||
</Select>
|
</Select>
|
||||||
@@ -176,6 +177,7 @@ function Search({
|
|||||||
ouiaId={`filter-by-${key}`}
|
ouiaId={`filter-by-${key}`}
|
||||||
isDisabled={isDisabled}
|
isDisabled={isDisabled}
|
||||||
maxHeight={maxSelectHeight}
|
maxHeight={maxSelectHeight}
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
{options.map(([optionKey, optionLabel]) => (
|
{options.map(([optionKey, optionLabel]) => (
|
||||||
<SelectOption
|
<SelectOption
|
||||||
@@ -200,6 +202,7 @@ function Search({
|
|||||||
ouiaId={`filter-by-${key}`}
|
ouiaId={`filter-by-${key}`}
|
||||||
isDisabled={isDisabled}
|
isDisabled={isDisabled}
|
||||||
maxHeight={maxSelectHeight}
|
maxHeight={maxSelectHeight}
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
<SelectOption key="true" value="true">
|
<SelectOption key="true" value="true">
|
||||||
{booleanLabels.true || t`Yes`}
|
{booleanLabels.true || t`Yes`}
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ function ActivityStream() {
|
|||||||
selections={activityStreamType}
|
selections={activityStreamType}
|
||||||
isOpen={isTypeDropdownOpen}
|
isOpen={isTypeDropdownOpen}
|
||||||
isGrouped
|
isGrouped
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
<SelectGroup label={t`Views`} key="views">
|
<SelectGroup label={t`Views`} key="views">
|
||||||
<SelectOption key="all_activity" value="all">
|
<SelectOption key="all_activity" value="all">
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ function CredentialFormFields({ initialTypeId, credentialTypes }) {
|
|||||||
isCreatable={false}
|
isCreatable={false}
|
||||||
maxHeight="300px"
|
maxHeight="300px"
|
||||||
width="100%"
|
width="100%"
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
{credentialTypeOptions.map((credType) => (
|
{credentialTypeOptions.map((credType) => (
|
||||||
<SelectOption
|
<SelectOption
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useField } from 'formik';
|
import { useField } from 'formik';
|
||||||
import { bool, shape, string } from 'prop-types';
|
import { bool, shape, string } from 'prop-types';
|
||||||
|
import { t } from '@lingui/macro';
|
||||||
import {
|
import {
|
||||||
FormGroup,
|
FormGroup,
|
||||||
Select,
|
Select,
|
||||||
@@ -61,6 +62,7 @@ function BecomeMethodField({ fieldOptions, isRequired }) {
|
|||||||
onCreateOption={(option) => {
|
onCreateOption={(option) => {
|
||||||
setOptions([...options, { value: option }]);
|
setOptions([...options, { value: option }]);
|
||||||
}}
|
}}
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
{options.map((option) => (
|
{options.map((option) => (
|
||||||
<SelectOption key={option.value} value={option.value} />
|
<SelectOption key={option.value} value={option.value} />
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ function DashboardGraph() {
|
|||||||
}}
|
}}
|
||||||
selections={periodSelection}
|
selections={periodSelection}
|
||||||
isOpen={isPeriodDropdownOpen}
|
isOpen={isPeriodDropdownOpen}
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
<SelectOption key="month" value="month">
|
<SelectOption key="month" value="month">
|
||||||
{t`Past month`}
|
{t`Past month`}
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ const SCMSubForm = ({ autoPopulateProject }) => {
|
|||||||
value.trim();
|
value.trim();
|
||||||
setSourcePath([...sourcePath, value]);
|
setSourcePath([...sourcePath, value]);
|
||||||
}}
|
}}
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
{sourcePath.map((path) => (
|
{sourcePath.map((path) => (
|
||||||
<SelectOption key={path} id={path} value={path} />
|
<SelectOption key={path} id={path} value={path} />
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ function Metrics() {
|
|||||||
setRenderedData([]);
|
setRenderedData([]);
|
||||||
}}
|
}}
|
||||||
selections={instance}
|
selections={instance}
|
||||||
placeholderText={t`Select a instance`}
|
placeholderText={t`Select an instance`}
|
||||||
>
|
>
|
||||||
{instances.map((inst) => (
|
{instances.map((inst) => (
|
||||||
<SelectOption value={inst} key={inst} />
|
<SelectOption value={inst} key={inst} />
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ function SurveyReorderModal({
|
|||||||
aria-label={t`Multi-Select`}
|
aria-label={t`Multi-Select`}
|
||||||
typeAheadAriaLabel={t`Multi-Select`}
|
typeAheadAriaLabel={t`Multi-Select`}
|
||||||
id={`survey-preview-multiSelect-${q.variable}`}
|
id={`survey-preview-multiSelect-${q.variable}`}
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
{q.choices.length > 0 &&
|
{q.choices.length > 0 &&
|
||||||
q.choices
|
q.choices
|
||||||
|
|||||||
@@ -248,6 +248,7 @@ function NodeTypeStep({ isIdentifierRequired }) {
|
|||||||
typeAheadAriaLabel={t`Convergence select`}
|
typeAheadAriaLabel={t`Convergence select`}
|
||||||
className="convergenceSelect"
|
className="convergenceSelect"
|
||||||
ouiaId="convergenceSelect"
|
ouiaId="convergenceSelect"
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
<SelectOption key="any" value="any" id="select-option-any">
|
<SelectOption key="any" value="any" id="select-option-any">
|
||||||
{t`Any`}
|
{t`Any`}
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ function LabelSelect({ value, placeholder, onChange, onError, createText }) {
|
|||||||
typeAheadAriaLabel={t`Select Labels`}
|
typeAheadAriaLabel={t`Select Labels`}
|
||||||
placeholderText={placeholder}
|
placeholderText={placeholder}
|
||||||
createText={createText}
|
createText={createText}
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
{renderOptions(options)}
|
{renderOptions(options)}
|
||||||
</Select>
|
</Select>
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ function PlaybookSelect({
|
|||||||
onBlur={onBlur}
|
onBlur={onBlur}
|
||||||
isDisabled={isLoading || isDisabled}
|
isDisabled={isLoading || isDisabled}
|
||||||
maxHeight="1000%"
|
maxHeight="1000%"
|
||||||
|
noResultsFoundText={t`No results found`}
|
||||||
>
|
>
|
||||||
{options.map((opt) => (
|
{options.map((opt) => (
|
||||||
<SelectOption key={opt} value={opt} />
|
<SelectOption key={opt} value={opt} />
|
||||||
|
|||||||
Reference in New Issue
Block a user