Regression: Added missing translate keys for Federation (#22810)

pull/22811/head
Alan Sikora 5 years ago committed by GitHub
parent b1e6a28444
commit a4aca4b6d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      client/views/admin/info/FederationCard/components/FederationModal/DNSRecords.tsx
  2. 16
      client/views/admin/info/FederationCard/components/FederationModal/FederationModal.tsx
  3. 11
      packages/rocketchat-i18n/i18n/en.i18n.json

@ -2,6 +2,7 @@ import { Box } from '@rocket.chat/fuselage';
import _ from 'lodash';
import React, { FC } from 'react';
import { useTranslation } from '../../../../../../contexts/TranslationContext';
import { SectionStatus } from '../Section';
import { DNSRecordItem } from './DNSRecordItem';
import { DNSText } from './DNSText';
@ -24,6 +25,8 @@ export const DNSRecords: FC<{
resolvedEntries,
legacy,
}) => {
const t = useTranslation();
function buildDNSRecord(
type: DNSRecordType,
name: DNSRecordName | TXTRecordValue,
@ -167,22 +170,28 @@ export const DNSRecords: FC<{
return (
<>
<DNSText text='You must add the following DNS records on your server:' />
<DNSText text='SRV Record (2.0.0 or newer)' />
<DNSText text={t('Federation_Must_add_records')} />
<DNSText text={t('Federation_SRV_records_2.0.0')} />
<Box style={{ marginTop: 10 }}>
{srvDNSRecords.map((record: DNSRecord) => (
<DNSRecordItem key={record.title} record={record} />
))}
</Box>
<DNSText text='Public Key TXT Record' />
<DNSText text={t('Federation_Public_key_TXT_record')} />
<Box style={{ marginTop: 10 }}>
{txtDNSRecords.map((record: DNSRecord) => (
<DNSRecordItem key={record.title} record={record} />
))}
</Box>
{!legacy && (
<Box style={{ marginTop: 20, padding: 10, backgroundColor: '#F2F3F5' }}>
<p style={{ fontWeight: 'bold' }}>{t('Federation_HTTP_instead_HTTPS')}</p>
{t('Federation_HTTP_instead_HTTPS_details')}
</Box>
)}
{legacy && (
<>
<DNSText text='Protocol TXT Record' />
<DNSText text={t('Federation_Protocol_TXT_record')} />
<Box style={{ marginTop: 10 }}>
{legacyTxtDNSRecords.map((record: DNSRecord) => (
<DNSRecordItem key={record.title} record={record} />

@ -162,10 +162,10 @@ export const FederationModal: FC<{ onClose: () => void }> = ({
<Modal.Content>
<Tabs>
<Tabs.Item selected={currentTab === 1} onClick={(): void => setCurrentTab(1)}>
Configure DNS
{t('Federation_Configure_DNS')}
</Tabs.Item>
<Tabs.Item selected={currentTab === 2} onClick={(): void => setCurrentTab(2)}>
Legacy Support
{t('Federation_Legacy_support')}
</Tabs.Item>
</Tabs>
<Box style={{ marginTop: 30 }}>
@ -182,11 +182,8 @@ export const FederationModal: FC<{ onClose: () => void }> = ({
{currentTab === 2 && (
<>
<Box style={{ marginBottom: 15 }}>
<b>If your DNS provider does not support SRV records with _http or _https</b>
<p style={{ marginTop: 8 }}>
Some DNS providers will not allow setting _https or _http on SRV records, so
we have support for those cases, using our old DNS record resolution method.
</p>
<b>{t('Federation_SRV_no_support')}</b>
<p style={{ marginTop: 8 }}>{t('Federation_SRV_no_support_details')}</p>
</Box>
<DNSRecords
federationSubdomain={federationSubdomain}
@ -215,6 +212,11 @@ export const FederationModal: FC<{ onClose: () => void }> = ({
</>
)}
<Modal.Footer>
{currentStep === 2 && (
<Box style={{ color: '#6C727A', marginTop: 9, fontSize: 12, float: 'left' }}>
{t('Federation_DNS_info_update')}
</Box>
)}
<ButtonGroup align='end'>
<Button onClick={previousStep}>{currentStep === 1 ? t('Cancel') : t('Back')}</Button>
<Button primary onClick={nextStep}>

@ -1832,10 +1832,21 @@
"Federation_Channels_Will_Be_Replicated": "Those channels are going to be replicated to the remote server, without the message history.",
"Federation_Adding_users_from_another_server": "Adding users from another server",
"Federation_Changes_needed": "Changes needed on your Server the Domain Name, Target and Port.",
"Federation_Configure_DNS": "Configure DNS",
"Federation_Domain": "Domain",
"Federation_Domain_details": "Add the domain name that this server should be linked to.",
"Federation_Enable": "Enable Federation",
"Federation_Fix_now": "Fix now!",
"Federation_SRV_no_support": "If your DNS provider does not support SRV records with _http or _https",
"Federation_SRV_no_support_details": "Some DNS providers will not allow setting _https or _http on SRV records, so we have support for those cases, using our old DNS record resolution method.",
"Federation_Must_add_records": "You must add the following DNS records on your server:",
"Federation_SRV_records_2.0.0": "SRV Record (2.0.0 or newer)",
"Federation_Public_key_TXT_record": "Public Key TXT Record",
"Federation_Protocol_TXT_record": "Protocol TXT Record",
"Federation_Legacy_support": "Legacy Support",
"Federation_HTTP_instead_HTTPS": "If you use HTTP protocol instead HTTPS",
"Federation_HTTP_instead_HTTPS_details": "We recommend to use HTTPS for all kinds of communications, but sometimes that is not possible. If you need, in the SRV DNS entry replace: the protocol: _http the port: 80",
"Federation_DNS_info_update": "This Info is updated every 1 minute",
"Federation_Adding_Federated_Users": "Adding Federated Users",
"Federation_Guide_adding_users": "We guide you on how to add your first federated user.",
"Federation_Is_working_correctly": "Federation integration is working correctly.",

Loading…
Cancel
Save