Add country specific tax id field labels

This commit is contained in:
Jenni Nurmi 2018-12-19 15:05:55 +02:00
parent a3b43cec27
commit 1ba857c3ce
2 changed files with 45 additions and 15 deletions

View file

@ -24,14 +24,26 @@ const PayoutDetailsFormCompanyComponent = ({ fieldRenderProps }) => {
})
);
const companyTaxIdLabel = intl.formatMessage({ id: 'PayoutDetailsForm.companyTaxIdLabel' });
const companyTaxIdPlaceholder = intl.formatMessage({
id: 'PayoutDetailsForm.companyTaxIdPlaceholder',
const companyTaxIdLabel = intl.formatMessage({
id: `PayoutDetailsForm.companyTaxIdLabel.${country}`,
});
const companyTaxIdPlaceholder = intl.formatMessage(
{
id: 'PayoutDetailsForm.companyTaxIdPlaceholder',
},
{
idName: companyTaxIdLabel,
}
);
const companyTaxIdRequired = validators.required(
intl.formatMessage({
id: 'PayoutDetailsForm.companyTaxIdRequired',
})
intl.formatMessage(
{
id: 'PayoutDetailsForm.companyTaxIdRequired',
},
{
idName: companyTaxIdLabel,
}
)
);
return (
@ -41,31 +53,29 @@ const PayoutDetailsFormCompanyComponent = ({ fieldRenderProps }) => {
<div className={css.sectionContainer}>
<h3 className={css.subTitle}>
<FormattedMessage id="PayoutDetailsForm.companyDetailsTitle" />
</h3>
<div className={css.formRow}>
</h3>
<FieldTextInput
id="companyName"
name="companyName"
disabled={disabled}
className={css.firstName}
type="text"
autoComplete="company-name"
label={companyNameLabel}
placeholder={companyNamePlaceholder}
validate={companyNameRequired}
/>
<FieldTextInput
id="companyTaxId"
name="companyTaxId"
className={css.taxId}
disabled={disabled}
className={css.lastName}
type="text"
autoComplete="company-tax-id"
label={companyTaxIdLabel}
placeholder={companyTaxIdPlaceholder}
validate={companyTaxIdRequired}
/>
</div>
</div>
<PayoutDetailsAddress

View file

@ -486,11 +486,31 @@
"PayoutDetailsForm.companyAddressTitle": "Company address",
"PayoutDetailsForm.companyDetailsTitle": "Company details",
"PayoutDetailsForm.companyNameLabel": "Company name",
"PayoutDetailsForm.companyNamePlaceholder": "Company name",
"PayoutDetailsForm.companyNamePlaceholder": "Enter company name...",
"PayoutDetailsForm.companyNameRequired": "Company name is required",
"PayoutDetailsForm.companyTaxIdLabel": "VAT ID",
"PayoutDetailsForm.companyTaxIdPlaceholder": "VAT ID",
"PayoutDetailsForm.companyTaxIdRequired": "VAT ID is required",
"PayoutDetailsForm.companyTaxIdLabel.AT": "Firmenbuchnummer (FN)",
"PayoutDetailsForm.companyTaxIdLabel.AU": "Company ACN/ABN - TFN",
"PayoutDetailsForm.companyTaxIdLabel.BE": "TVA/BTW/CBE",
"PayoutDetailsForm.companyTaxIdLabel.CA": "Business Number (Tax ID)",
"PayoutDetailsForm.companyTaxIdLabel.CH": "VAT number UID/MWST/TVA/IVA",
"PayoutDetailsForm.companyTaxIdLabel.DE": "Handelsregisternummer (HRB) ",
"PayoutDetailsForm.companyTaxIdLabel.DK": "Momsregistreringsnummer (CVR)",
"PayoutDetailsForm.companyTaxIdLabel.ES": "Número de Identificación Fiscal (NIF)",
"PayoutDetailsForm.companyTaxIdLabel.FI": "Y-tunnus",
"PayoutDetailsForm.companyTaxIdLabel.FR": "Numéro SIREN",
"PayoutDetailsForm.companyTaxIdLabel.GB": "Companies House Registration Number (CRN)",
"PayoutDetailsForm.companyTaxIdLabel.HK": "Registration Number",
"PayoutDetailsForm.companyTaxIdLabel.IE": "Company Number",
"PayoutDetailsForm.companyTaxIdLabel.IT": "Numero RI/ REA",
"PayoutDetailsForm.companyTaxIdLabel.LU": "Company/RCS number",
"PayoutDetailsForm.companyTaxIdLabel.NL": "KVK number",
"PayoutDetailsForm.companyTaxIdLabel.NO": "Organisasjonsnummer (Orgnr)",
"PayoutDetailsForm.companyTaxIdLabel.NZ": "NZBN",
"PayoutDetailsForm.companyTaxIdLabel.PT": "N.º Contribuinte",
"PayoutDetailsForm.companyTaxIdLabel.SE": "Organisationsnummer",
"PayoutDetailsForm.companyTaxIdLabel.US": "Tax ID",
"PayoutDetailsForm.companyTaxIdPlaceholder": "Enter {idName}...",
"PayoutDetailsForm.companyTaxIdRequired": "{idName} is required",
"PayoutDetailsForm.countryLabel": "Country",
"PayoutDetailsForm.countryNames.AT": "Austria",
"PayoutDetailsForm.countryNames.AU": "Australia",