Skip to content

Commit 5197587

Browse files
authored
Pass helpText prop to Nexus Form (#2265)
* Pass helptext to form * Update translations
1 parent 6b2cf56 commit 5197587

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

Diff for: src/lib/i18n/locales/en/nexus.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const Strings = {
3535
'endpoint-name-hint':
3636
'Endpoint name must start with A-Z, a-z or _ and can only contain A-Z, a-z, 0-9, or _',
3737
'endpoint-name-hint-with-dash':
38-
'Endpoint name must start with A-Z, a-z or _ and can only contain A-Z, a-z, 0-9, _ or -',
38+
'Endpoint name must start with A-Z or a-z and can only contain A-Z, a-z, 0-9 or -',
3939
'access-policy': 'Access Policy',
4040
'allowed-caller-namespaces': 'Allowed caller namespaces',
4141
'allowed-caller-namespaces-description':

Diff for: src/lib/pages/nexus-create-endpoint.svelte

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
export let loading = false;
1616
export let isCloud = false;
1717
export let nameRegexPattern: RegExp = /^[A-Za-z_][A-Za-z0-9_]*$/;
18+
export let nameHintText = translate('nexus.endpoint-name-hint');
1819
1920
$: createDisabled =
2021
$endpointForm.spec.name === '' ||
@@ -33,6 +34,7 @@
3334
</h1>
3435
<NexusForm
3536
{nameRegexPattern}
37+
{nameHintText}
3638
{error}
3739
{targetNamespaceList}
3840
{callerNamespaceList}

Diff for: src/lib/pages/nexus-edit-endpoint.svelte

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
export let loading = false;
2222
export let isCloud = false;
2323
export let nameRegexPattern: RegExp = /^[A-Za-z_][A-Za-z0-9_]*$/;
24+
export let nameHintText = translate('nexus.endpoint-name-hint');
2425
2526
let deleteConfirmationModalOpen = false;
2627
let confirmDeleteInput = '';
@@ -50,6 +51,7 @@
5051
</div>
5152
<NexusForm
5253
{endpoint}
54+
{nameHintText}
5355
{nameRegexPattern}
5456
{targetNamespaceList}
5557
{callerNamespaceList}

Diff for: src/lib/pages/nexus-form.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
export let error: NetworkError | undefined = undefined;
4040
export let nameDisabled = false;
4141
export let isCloud = true;
42-
export let nameHintText = translate('nexus.endpoint-name-hint');
42+
export let nameHintText: string;
4343
export let nameRegexPattern: RegExp;
4444
4545
let name = endpoint?.spec?.name || '';

0 commit comments

Comments
 (0)