Skip to content

Commit 735a85c

Browse files
moving texts to proper file
1 parent 4596684 commit 735a85c

File tree

3 files changed

+28
-16
lines changed

3 files changed

+28
-16
lines changed

public/locales/en.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,8 @@
364364
"maxChars": "Max length is {{maxLength}} characters.",
365365
"userExists": "User with this name already exists!",
366366
"atLeastOneUser": "You need to have at least one member assigned.",
367-
"notValidChargingTargetFormat": "Use lowercase letters a-f, numbers 0-9, and hyphens (-) in the format: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
367+
"notValidChargingTargetFormat": "Use lowercase letters a-f, numbers 0-9, and hyphens (-) in the format: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
368+
"urlFormat": "Must be a valid HTTPS URL"
368369
},
369370
"common": {
370371
"all": "All",
@@ -507,5 +508,16 @@
507508
"addMembersButton0": "Add members",
508509
"addMembersButton1": "Add member",
509510
"addMembersButtonN": "Add {{count}} members"
511+
},
512+
"CreateGitRepositoryDialog": {
513+
"dialogTitle": "Create Git Repository'",
514+
"metadataTitle": "Metadata",
515+
"urlTitle": "URL",
516+
"secretRefOptionalTitle": "SecretRef (Optional)",
517+
"secretRefTitle": "SecretRef",
518+
"nameTitle": "Name",
519+
"intervalTitle": "Interval",
520+
"specTitle": "Spec",
521+
"branchTitle": "Branch"
510522
}
511523
}

src/components/ControlPlane/GitRepositories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export function GitRepositories() {
170170
<Title>{t('common.resourcesCount', { count: rows.length })}</Title>
171171
<ToolbarSpacer />
172172
<Button icon="add" onClick={() => setIsCreateDialogOpen(true)}>
173-
{t('buttons.create', 'Create')}
173+
{t('buttons.create')}
174174
</Button>
175175
</Toolbar>
176176
}

src/components/Dialogs/CreateGitRepositoryDialog.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function CreateGitRepositoryDialog({
5555
return (
5656
<Dialog
5757
open={isOpen}
58-
headerText={t('flux.createGitRepository', 'Create Git Repository')}
58+
headerText={t('CreateGitRepositoryDialog.dialogTitle')}
5959
footer={
6060
<Bar
6161
endContent={
@@ -88,13 +88,13 @@ export function CreateGitRepositoryDialog({
8888
onClose={handleClose}
8989
>
9090
<Form className={styles.form}>
91-
<FormGroup headerText={t('flux.metadata', 'Metadata')}>
91+
<FormGroup headerText={t('CreateGitRepositoryDialog.metadataTitle')}>
9292
<div className={styles.formField}>
93-
<Label required>{t('flux.name', 'Name')}</Label>
93+
<Label required>{t('CreateGitRepositoryDialog.nameTitle')}</Label>
9494
<Controller
9595
name="name"
9696
control={control}
97-
rules={{ required: t('validation.required', 'This field is required') }}
97+
rules={{ required: t('validationErrors.required') }}
9898
render={({ field }) => (
9999
<Input
100100
{...field}
@@ -108,13 +108,13 @@ export function CreateGitRepositoryDialog({
108108
</div>
109109
</FormGroup>
110110

111-
<FormGroup headerText={t('flux.spec', 'Spec')}>
111+
<FormGroup headerText={t('CreateGitRepositoryDialog.specTitle')}>
112112
<div className={styles.formField}>
113-
<Label required>{t('flux.interval', 'Interval')}</Label>
113+
<Label required>{t('CreateGitRepositoryDialog.intervalTitle')}</Label>
114114
<Controller
115115
name="interval"
116116
control={control}
117-
rules={{ required: t('validation.required', 'This field is required') }}
117+
rules={{ required: t('validationErrors.required') }}
118118
render={({ field }) => (
119119
<Input
120120
{...field}
@@ -129,13 +129,13 @@ export function CreateGitRepositoryDialog({
129129
</div>
130130

131131
<div className={styles.formField}>
132-
<Label required>{t('flux.url', 'URL')}</Label>
132+
<Label required>{t('CreateGitRepositoryDialog.urlTitle')}</Label>
133133
<Controller
134134
name="url"
135135
control={control}
136136
rules={{
137-
required: t('validation.required', 'This field is required'),
138-
pattern: { value: /^https:\/\/.+/, message: t('validation.urlFormat', 'Must be a valid HTTPS URL') },
137+
required: t('validationErrors.required'),
138+
pattern: { value: /^https:\/\/.+/, message: t('validationErrors.urlFormat') },
139139
}}
140140
render={({ field }) => (
141141
<Input
@@ -151,11 +151,11 @@ export function CreateGitRepositoryDialog({
151151
</div>
152152

153153
<div className={styles.formField}>
154-
<Label required>{t('flux.branch', 'Branch')}</Label>
154+
<Label required>{t('CreateGitRepositoryDialog.branchTitle')}</Label>
155155
<Controller
156156
name="branch"
157157
control={control}
158-
rules={{ required: t('validation.required', 'This field is required') }}
158+
rules={{ required: t('validationErrors.required') }}
159159
render={({ field }) => (
160160
<Input
161161
{...field}
@@ -170,15 +170,15 @@ export function CreateGitRepositoryDialog({
170170
</div>
171171

172172
<div className={styles.formField}>
173-
<Label>{t('flux.secretRef', 'SecretRef')}</Label>
173+
<Label>{t('CreateGitRepositoryDialog.secretRefTitle', 'SecretRef')}</Label>
174174
<Controller
175175
name="secretRef"
176176
control={control}
177177
render={({ field }) => (
178178
<Input
179179
{...field}
180180
id="secretRef"
181-
placeholder={t('flux.secretRefOptional', 'SecretRef (Optional)')}
181+
placeholder={t('CreateGitRepositoryDialog.secretRefOptionalTitle')}
182182
className={styles.input}
183183
/>
184184
)}

0 commit comments

Comments
 (0)