Add strings to be translated

Add strings to be translated

See: https://github.com/ansible/awx/issues/10971
This commit is contained in:
nixocio 2021-09-02 11:23:33 -04:00
parent baf37e94eb
commit 07cc75f6d4
13 changed files with 17 additions and 1 deletions

View File

@ -131,6 +131,7 @@ function MultipleChoiceField({ question }) {
helpers.setTouched(true);
helpers.setValue('');
}}
noResultsFoundText={t`No results found`}
>
{options.map((opt) => (
<SelectOption key={opt} value={opt} />
@ -189,6 +190,7 @@ function MultiSelectField({ question }) {
helpers.setTouched(true);
helpers.setValue([]);
}}
noResultsFoundText={t`No results found`}
>
{options.map((opt) => (
<SelectOption key={opt} value={opt} />

View File

@ -57,6 +57,7 @@ function TagMultiSelect({ onChange, value }) {
selections={selections}
isOpen={isExpanded}
typeAheadAriaLabel={t`Select tags`}
noResultsFoundText={t`No results found`}
>
{renderOptions(options)}
</Select>

View File

@ -129,6 +129,7 @@ function Search({
isOpen={isSearchDropdownOpen}
ouiaId="simple-key-select"
isDisabled={isDisabled}
noResultsFoundText={t`No results found`}
>
{searchOptions}
</Select>
@ -176,6 +177,7 @@ function Search({
ouiaId={`filter-by-${key}`}
isDisabled={isDisabled}
maxHeight={maxSelectHeight}
noResultsFoundText={t`No results found`}
>
{options.map(([optionKey, optionLabel]) => (
<SelectOption
@ -200,6 +202,7 @@ function Search({
ouiaId={`filter-by-${key}`}
isDisabled={isDisabled}
maxHeight={maxSelectHeight}
noResultsFoundText={t`No results found`}
>
<SelectOption key="true" value="true">
{booleanLabels.true || t`Yes`}

View File

@ -131,6 +131,7 @@ function ActivityStream() {
selections={activityStreamType}
isOpen={isTypeDropdownOpen}
isGrouped
noResultsFoundText={t`No results found`}
>
<SelectGroup label={t`Views`} key="views">
<SelectOption key="all_activity" value="all">

View File

@ -140,6 +140,7 @@ function CredentialFormFields({ initialTypeId, credentialTypes }) {
isCreatable={false}
maxHeight="300px"
width="100%"
noResultsFoundText={t`No results found`}
>
{credentialTypeOptions.map((credType) => (
<SelectOption

View File

@ -1,6 +1,7 @@
import React, { useState } from 'react';
import { useField } from 'formik';
import { bool, shape, string } from 'prop-types';
import { t } from '@lingui/macro';
import {
FormGroup,
Select,
@ -61,6 +62,7 @@ function BecomeMethodField({ fieldOptions, isRequired }) {
onCreateOption={(option) => {
setOptions([...options, { value: option }]);
}}
noResultsFoundText={t`No results found`}
>
{options.map((option) => (
<SelectOption key={option.value} value={option.value} />

View File

@ -103,6 +103,7 @@ function DashboardGraph() {
}}
selections={periodSelection}
isOpen={isPeriodDropdownOpen}
noResultsFoundText={t`No results found`}
>
<SelectOption key="month" value="month">
{t`Past month`}

View File

@ -135,6 +135,7 @@ const SCMSubForm = ({ autoPopulateProject }) => {
value.trim();
setSourcePath([...sourcePath, value]);
}}
noResultsFoundText={t`No results found`}
>
{sourcePath.map((path) => (
<SelectOption key={path} id={path} value={path} />

View File

@ -190,7 +190,7 @@ function Metrics() {
setRenderedData([]);
}}
selections={instance}
placeholderText={t`Select a instance`}
placeholderText={t`Select an instance`}
>
{instances.map((inst) => (
<SelectOption value={inst} key={inst} />

View File

@ -151,6 +151,7 @@ function SurveyReorderModal({
aria-label={t`Multi-Select`}
typeAheadAriaLabel={t`Multi-Select`}
id={`survey-preview-multiSelect-${q.variable}`}
noResultsFoundText={t`No results found`}
>
{q.choices.length > 0 &&
q.choices

View File

@ -248,6 +248,7 @@ function NodeTypeStep({ isIdentifierRequired }) {
typeAheadAriaLabel={t`Convergence select`}
className="convergenceSelect"
ouiaId="convergenceSelect"
noResultsFoundText={t`No results found`}
>
<SelectOption key="any" value="any" id="select-option-any">
{t`Any`}

View File

@ -99,6 +99,7 @@ function LabelSelect({ value, placeholder, onChange, onError, createText }) {
typeAheadAriaLabel={t`Select Labels`}
placeholderText={placeholder}
createText={createText}
noResultsFoundText={t`No results found`}
>
{renderOptions(options)}
</Select>

View File

@ -66,6 +66,7 @@ function PlaybookSelect({
onBlur={onBlur}
isDisabled={isLoading || isDisabled}
maxHeight="1000%"
noResultsFoundText={t`No results found`}
>
{options.map((opt) => (
<SelectOption key={opt} value={opt} />