Skip to content

Commit

Permalink
Translate input-radio labels and options to English.
Browse files Browse the repository at this point in the history
Refs: #6455
  • Loading branch information
anicyne committed Aug 5, 2024
1 parent 058cf3d commit 9db53d7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@ import React, { forwardRef } from 'react';

import { KolInputRadio } from '@public-ui/react';

import { ERROR_MSG } from '../../../shares/constants';
import { ERROR_MSG, HINT_MSG } from '../../../shares/constants';

import type { Components } from '@public-ui/components';
export const InputRadioCases = forwardRef<HTMLKolInputRadioElement, Components.KolInputRadio>(function InputRadioCases(props, ref) {
return (
<div className="grid gap-4">
<KolInputRadio
{...props}
_options="[{'disabled':true,'label':'Frau (disabled)','value':'Frau'},{'label':'Herr'},{'label':'Firma','value':'Firma'}]"
_label="Anrede"
_options="[{'disabled':true,'label':'Mrs. (disabled)','value':'Mrs.'},{'label':'Mr.'},{'label':'Company','value':'Company'}]"
_label="Salutation"
/>
<KolInputRadio
{...props}
_required
_msg={{ _type: 'error', _description: ERROR_MSG }}
_touched
_value="Firma"
_options="[{'label':'Frau','value':'Frau'},{'disabled':true,'label':'Herr (disabled)','value':'Herr'},{'label':'Firma','value':'Firma'}]"
_label="Anrede (mit Fehler)"
_value="Company"
_options="[{'label':'Mrs.','value':'Mrs.'},{'disabled':true,'label':'Mr. (disabled)','value':'Mr.'},{'label':'Company','value':'Company'}]"
_label="Salutation (with error)"
/>
<KolInputRadio
{...props}
ref={ref}
_accessKey="A"
_orientation="horizontal"
_required
_value="Firma"
_options="[{'label':'Frau','value':'Frau'},{'disabled':true,'label':'Herr (disabled)'},{'label':'Firma','value':'Firma'}]"
_label="Anrede (horizontal)"
_value="Company"
_options="[{'label':'Mrs.','value':'Mrs.'},{'disabled':true,'label':'Mr. (disabled)'},{'label':'Company','value':'Company'}]"
_label="Salutation (horizontal)"
/>
<KolInputRadio
{...props}
Expand All @@ -39,16 +39,16 @@ export const InputRadioCases = forwardRef<HTMLKolInputRadioElement, Components.K
_required
_msg={{ _type: 'error', _description: ERROR_MSG }}
_touched
_value="Firma"
_options="[{'label':'Frau','value':'Frau'},{'disabled':true,'label':'Herr (disabled)'},{'label':'Firma','value':'Firma'}]"
_label="Anrede (horizontal mit Fehler)"
_value="Company"
_options="[{'label':'Mrs.','value':'Mrs.'},{'disabled':true,'label':'Mr. (disabled)'},{'label':'Company','value':'Company'}]"
_label="Salutation (horizontal with error)"
/>
<KolInputRadio
{...props}
_disabled
_value="Firma"
_options="[{'label':'Frau','value':'Frau'},{'disabled':true,'label':'Herr (disabled)'},{'label':'Firma','value':'Firma'}]"
_label="Anrede"
_value="Company"
_options="[{'label':'Mrs.','value':'Mrs.'},{'disabled':true,'label':'Mr. (disabled)'},{'label':'Company','value':'Company'}]"
_label="Salutation"
_touched
/>
<KolInputRadio
Expand All @@ -57,10 +57,10 @@ export const InputRadioCases = forwardRef<HTMLKolInputRadioElement, Components.K
_required
_msg={{ _type: 'error', _description: ERROR_MSG }}
_touched
_value="Firma"
_options="[{'label':'Frau','value':'Frau', 'description':'Ich bin eine Beschreibung.'},{'disabled':true,'label':'Herr (disabled)'},{'label':'Firma','value':'Firma'}]"
_label="Anrede (horizontal mit Fehler Hinweis und Beschreibung)"
_hint={'Ich bin ein Hinweis.'}
_value="Company"
_options="[{'label':'Mrs.','value':'Mrs.', 'description':'I am a description.'},{'disabled':true,'label':'Mr. (disabled)'},{'label':'Company','value':'Company'}]"
_label="Salutation (horizontal with error hint and description)"
_hint={HINT_MSG}
/>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions packages/samples/react/src/shares/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const PUBLIC_DOC_COMPONENT_URL = 'https://public-ui.github.io/docs/components';
export const ERROR_MSG = 'Ich bin eine Fehlermeldung!';
export const HINT_MSG = 'Ich bin ein Hinweis.';
export const ERROR_MSG = 'I am an error message!';
export const HINT_MSG = 'I am a hint.';

0 comments on commit 9db53d7

Please sign in to comment.