Skip to content

Commit

Permalink
Capitalize help text for when expressions in the task sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
debsmita1 committed Jun 14, 2021
1 parent 93b33cb commit c1e2eeb
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 48 deletions.
40 changes: 19 additions & 21 deletions frontend/packages/pipelines-plugin/locales/en/pipelines-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"No workspaces are associated with this pipeline.": "No workspaces are associated with this pipeline.",
"{{triggerBindingLabel}} details": "{{triggerBindingLabel}} details",
"TriggerTemplate details": "TriggerTemplate details",
"Embedded Task": "Embedded Task",
"Embedded task": "Embedded task",
"Embedded PipelineResource": "Embedded PipelineResource",
"Embedded Pipeline": "Embedded Pipeline",
"Last run": "Last run",
Expand All @@ -82,10 +82,10 @@
"Select Pipeline resource": "Select Pipeline resource",
"Create Pipeline resource": "Create Pipeline resource",
"{{type}} resources": "{{type}} resources",
"Hide Credential options": "Hide Credential options",
"Show Credential options": "Show Credential options",
"Hide credential options": "Hide credential options",
"Show credential options": "Show credential options",
"The following secrets are available for all pipelines in this namespace to authenticate to the specified Git server or Image registry:": "The following secrets are available for all pipelines in this namespace to authenticate to the specified Git server or Image registry:",
"Add Secret": "Add Secret",
"Add secret": "Add secret",
"Secret": "Secret",
"Add item": "Add item",
"Config Map": "Config Map",
Expand Down Expand Up @@ -134,18 +134,18 @@
"Select TriggerTemplate": "Select TriggerTemplate",
"Remove Trigger": "Remove Trigger",
"Webhook": "Webhook",
"Select your Git provider type to be associated with the Trigger": "Select your Git provider type to be associated with the Trigger",
"Git Provider type": "Git Provider type",
"Select your Git provider type to be associated with the Trigger.": "Select your Git provider type to be associated with the Trigger.",
"Git provider type": "Git provider type",
"The following variables can be used in the Parameters or when created new Resources.": "The following variables can be used in the Parameters or when created new Resources.",
"Use this format when referencing variables in this form: ": "Use this format when referencing variables in this form: ",
"Use this format when you reference variables in this form: ": "Use this format when you reference variables in this form: ",
"Select {{label}}": "Select {{label}}",
"Are you sure you want to remove <1>{{selection}}</1> from <3>{{pipelineName}}</3>?": "Are you sure you want to remove <1>{{selection}}</1> from <3>{{pipelineName}}</3>?",
"Missing Parameters": "Missing Parameters",
"Missing Resources": "Missing Resources",
"Missing Workspaces": "Missing Workspaces",
"Invalid When Expressions": "Invalid When Expressions",
"Failed to load Tasks. {{error}}": "Failed to load Tasks. {{error}}",
"Remove Task": "Remove Task",
"Remove task": "Remove task",
"Remove {{taskName}}?": "Remove {{taskName}}?",
"Are you sure you want to remove {{taskName}}?": "Are you sure you want to remove {{taskName}}?",
"Unable to load Pipeline": "Unable to load Pipeline",
Expand All @@ -161,7 +161,7 @@
"Error loading the tasks.": "Error loading the tasks.",
"Unable to locate any tasks.": "Unable to locate any tasks.",
"Resources aren't in beta, so it is recommended to use workspaces instead.": "Resources aren't in beta, so it is recommended to use workspaces instead.",
"Use this format when referencing variables in this form: <1>$(</1>": "Use this format when referencing variables in this form: <1>$(</1>",
"Use this format when you reference variables in this form: <1>$(</1>": "Use this format when you reference variables in this form: <1>$(</1>",
"Input resources": "Input resources",
"Output resources": "Output resources",
"Display name": "Display name",
Expand All @@ -173,18 +173,17 @@
"Activate auto complete": "Activate auto complete",
"Remove when expression": "Remove when expression",
"When expressions": "When expressions",
"use this format while referencing the variables in this form: <1>$(</1>": "use this format while referencing the variables in this form: <1>$(</1>",
"No when expressions are associated with this task.": "No when expressions are associated with this task.",
"Add when expression": "Add when expression",
"Select workspace...": "Select workspace...",
"Invalid runAfter": "Invalid runAfter",
"No resources available. Add pipeline resources.": "No resources available. Add pipeline resources.",
"Resource name has changed, reselect": "Resource name has changed, reselect",
"Resource type has changed, reselect": "Resource type has changed, reselect",
"Resource name has changed, reselect.": "Resource name has changed, reselect.",
"Resource type has changed, reselect.": "Resource type has changed, reselect.",
"No workspaces available. Add pipeline workspaces.": "No workspaces available. Add pipeline workspaces.",
"Workspace name has changed, reselect": "Workspace name has changed, reselect",
"TaskSpec or TaskRef must be provided": "TaskSpec or TaskRef must be provided",
"Must define at least one Task": "Must define at least one Task",
"Workspace name has changed, reselect.": "Workspace name has changed, reselect.",
"TaskSpec or TaskRef must be provided.": "TaskSpec or TaskRef must be provided.",
"Must define at least one task.": "Must define at least one task.",
"1 day": "1 day",
"3 days": "3 days",
"1 week": "1 week",
Expand Down Expand Up @@ -213,7 +212,7 @@
"Username": "Username",
"The user with access to the cluster.": "The user with access to the cluster.",
"Password": "Password",
"Please provide Password.": "Please provide Password.",
"Please provide password.": "Please provide password.",
"Insecure": "Insecure",
"Indicate server should be accessed without verifying the TLS certificate.": "Indicate server should be accessed without verifying the TLS certificate.",
"Cadata": "Cadata",
Expand All @@ -234,15 +233,15 @@
"Add a sequential task before this task": "Add a sequential task before this task",
"Add a parallel task": "Add a parallel task",
"Task does not exist": "Task does not exist",
"Select Task": "Select Task",
"No Tasks": "No Tasks",
"Delete Task": "Delete Task",
"Select task": "Select task",
"No tasks": "No tasks",
"Delete task": "Delete task",
"When expression was met": "When expression was met",
"When expression was not met": "When expression was not met",
"When expression": "When expression",
"Input": "Input",
"Operator": "Operator",
"Select Operator": "Select Operator",
"Select operator": "Select operator",
"Values": "Values",
"Metrics": "Metrics",
"PipelineRuns": "PipelineRuns",
Expand Down Expand Up @@ -281,7 +280,6 @@
"TriggerTemplate": "TriggerTemplate",
"EventListener": "EventListener",
"Pipeline {{status}}": "Pipeline {{status}}",
"Task Status": "Task Status",
"Pipeline status is {{status}}. View logs.": "Pipeline status is {{status}}. View logs.",
"Pipeline not started. Start pipeline.": "Pipeline not started. Start pipeline.",
"Pipeline not started": "Pipeline not started",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const getPipelineTaskLinks = (pipeline: PipelineKind): PipelineTaskLinks
}
: {
resourceKind: 'EmbeddedTask',
name: i18next.t('pipelines-plugin~Embedded Task'),
name: i18next.t('pipelines-plugin~Embedded task'),
qualifier: task.name,
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ const PipelineSecretSection: React.FC = () => {

return (
<ExpandCollapse
textExpanded={t('pipelines-plugin~Hide Credential options')}
textCollapsed={t('pipelines-plugin~Show Credential options')}
textExpanded={t('pipelines-plugin~Hide credential options')}
textCollapsed={t('pipelines-plugin~Show credential options')}
>
<div className="odc-pipeline-secret-section">
<p>
Expand Down Expand Up @@ -98,7 +98,7 @@ const PipelineSecretSection: React.FC = () => {
className="odc-pipeline-secret-section__secret-action"
icon={<PlusCircleIcon />}
>
{t('pipelines-plugin~Add Secret')}
{t('pipelines-plugin~Add secret')}
</Button>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ const TriggerBindingSection: React.FC = () => {
<FormSection title={t('pipelines-plugin~Webhook')} fullWidth>
<TriggerBindingSelector
description={t(
'pipelines-plugin~Select your Git provider type to be associated with the Trigger',
'pipelines-plugin~Select your Git provider type to be associated with the Trigger.',
)}
label={t('pipelines-plugin~Git Provider type')}
label={t('pipelines-plugin~Git provider type')}
onChange={updateTriggerBindingVariables}
/>
{bindingVars && (
<ExpandableSection
toggleTextExpanded="Hide Variables"
toggleTextCollapsed="Show Variables"
toggleTextExpanded="Hide variables"
toggleTextCollapsed="Show variables"
>
<div className="odc-trigger-binding-section__variable-container">
<p className="odc-trigger-binding-section__variable-descriptor">
Expand All @@ -62,7 +62,7 @@ const TriggerBindingSection: React.FC = () => {
isHidden={false}
className="odc-trigger-binding-section__variable-help-text"
>
{t('pipelines-plugin~Use this format when referencing variables in this form: ')}
{t('pipelines-plugin~Use this format when you reference variables in this form: ')}
<code>{`$(${paramPrefix}parameter)`}</code>
</FormHelperText>
</ExpandableSection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import i18n from 'i18next';
// eslint-disable-next-line import/no-cycle
import { PipelineBuilderFormValues } from './types';

export const TASK_INCOMPLETE_ERROR_MESSAGE = 'Incomplete Task';

export enum UpdateOperationType {
ADD_LIST_TASK,
ADD_FINALLY_LIST_TASK,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type ModalCallback = () => void;

export const removeTaskModal = (taskName: string, onRemove: ModalCallback) => {
confirmModal({
title: i18next.t('pipelines-plugin~Remove Task'),
title: i18next.t('pipelines-plugin~Remove task'),
message: (
<ModalContent
icon={<ExclamationTriangleIcon size="lg" color={warningColor.value} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const TaskSidebar: React.FC<TaskSidebarProps> = (props) => {
<h2>{t('pipelines-plugin~Parameters')}</h2>
<p className="co-help-text">
<Trans ns="pipelines-plugin">
Use this format when referencing variables in this form: <code>$(</code>
Use this format when you reference variables in this form: <code>$(</code>
</Trans>
</p>
{params.map((param) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const TaskSidebarHeader: React.FC<TaskSidebarHeaderProps> = ({
<ActionsMenu
actions={[
{
label: t('pipelines-plugin~Remove Task'),
label: t('pipelines-plugin~Remove task'),
callback: () => removeThisTask(),
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const TaskSidebarWhenExpression: React.FC<TaskSidebarWhenExpressionProps> = (pro
<p className="co-help-text">
{field.value?.length > 0 ? (
<Trans ns="pipelines-plugin">
use this format while referencing the variables in this form: <code>$(</code>
Use this format when you reference variables in this form: <code>$(</code>
</Trans>
) : (
t('pipelines-plugin~No when expressions are associated with this task.')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const findTask = (
apiVersion: apiVersionForModel(TaskModel),
kind: 'EmbeddedTask',
metadata: {
name: i18n.t('pipelines-plugin~Embedded Task'),
name: i18n.t('pipelines-plugin~Embedded task'),
},
spec: task.taskSpec,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@ const resourceDefinition = (formValues: PipelineBuilderFormYamlValues, taskType:
})
.test(
'is-resource-link-broken',
i18n.t('pipelines-plugin~Resource name has changed, reselect'),
i18n.t('pipelines-plugin~Resource name has changed, reselect.'),
(resourceValue?: string) =>
!resourceValue || !!resources.find(({ name }) => name === resourceValue),
)
.test(
'is-resource-type-valid',
i18n.t('pipelines-plugin~Resource type has changed, reselect'),
i18n.t('pipelines-plugin~Resource type has changed, reselect.'),
function(resourceValue?: string) {
if (!resourceValue) {
return true;
Expand Down Expand Up @@ -405,7 +405,7 @@ const taskValidation = (formValues: PipelineBuilderFormYamlValues, taskType: Tas
)
.test(
'is-workspace-link-broken',
i18n.t('pipelines-plugin~Workspace name has changed, reselect'),
i18n.t('pipelines-plugin~Workspace name has changed, reselect.'),
(workspaceValue?: string) =>
!workspaceValue || !!workspaces.find(({ name }) => name === workspaceValue),
),
Expand All @@ -421,7 +421,7 @@ const taskValidation = (formValues: PipelineBuilderFormYamlValues, taskType: Tas
})
.test(
'taskRef-or-taskSpec',
i18n.t('pipelines-plugin~TaskSpec or TaskRef must be provided'),
i18n.t('pipelines-plugin~TaskSpec or TaskRef must be provided.'),
function(task: PipelineTask) {
return !!task.taskRef || !!task.taskSpec;
},
Expand Down Expand Up @@ -462,7 +462,7 @@ const pipelineBuilderFormSchema = (formValues: PipelineBuilderFormYamlValues) =>
}),
),
tasks: taskValidation(formValues, 'tasks')
.min(1, i18n.t('pipelines-plugin~Must define at least one Task'))
.min(1, i18n.t('pipelines-plugin~Must define at least one task.'))
.required(i18n.t('pipelines-plugin~Required')),
finallyTasks: taskValidation(formValues, 'finallyTasks'),
listTasks: yup.array().of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const PipelineClusterOptions: React.FC<PipelineClusterOptionsProps> = ({ prefixN
type={TextInputTypes.password}
name={`${prefixName}.params.password`}
label={t('pipelines-plugin~Password')}
helpText={t('pipelines-plugin~Please provide Password.')}
helpText={t('pipelines-plugin~Please provide password.')}
/>
<InputField
type={TextInputTypes.text}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const TaskList: React.FC<any> = ({
listOptions.map((task) => taskToOption(task, onNewTask)),
(o) => o.label,
);
const unselectedTaskText = unselectedText || t('pipelines-plugin~Select Task');
const unselectedTaskText = unselectedText || t('pipelines-plugin~Select task');

const truncatedTaskText = React.useMemo(
() =>
Expand Down Expand Up @@ -86,7 +86,7 @@ const TaskList: React.FC<any> = ({
/>
{options.length === 0 ? (
<text className="odc-task-list-node__trigger-disabled" x={width / 2} y={height / 2 + 1}>
{t('pipelines-plugin~No Tasks')}
{t('pipelines-plugin~No tasks')}
</text>
) : (
<g>
Expand Down Expand Up @@ -145,7 +145,7 @@ const TaskList: React.FC<any> = ({
</li>
<li>
<KebabItem
option={{ label: t('pipelines-plugin~Delete Task'), callback: onRemoveTask }}
option={{ label: t('pipelines-plugin~Delete task'), callback: onRemoveTask }}
onClick={onRemoveTask}
/>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const WhenExpressionForm: React.FC<WhenExpressionFormProps> = ({
name={`${namePrefix}.operator`}
label={t('pipelines-plugin~Operator')}
items={WhenExpressionOperatorType}
title={t('pipelines-plugin~Select Operator')}
title={t('pipelines-plugin~Select operator')}
onChange={(operator: string) => setFieldValue(`${namePrefix}.operator`, operator)}
fullWidth
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const PipelineBuildDecoratorTooltip: React.FC<PipelineBuildDecoratorTooltipProps
</div>
<div className="odc-pipeline-build-decorator-tooltip__status-bars-wrapper">
<div className="odc-pipeline-build-decorator-tooltip__status-bars-title">
{t('pipelines-plugin~Task Status')}
{t('pipelines-plugin~Task status')}
</div>
<div className="odc-pipeline-build-decorator-tooltip__status-bars">{pipelineBars}</div>
</div>
Expand Down

0 comments on commit c1e2eeb

Please sign in to comment.