Remove t function from admin_definition.tsx (and more) (#25406)

* Remove t function from schema_admin_settings

* i18n

* Fix import

* Use always string or descriptor and more improvements

* i18n-extract

* Remove t function for roles

* Remove more t functions

* Address feedback

* i18n-extract fix

* Fix tests

* Fix tests

* Remove translation of team edition notice

* Remove unexpected file in the commit

* Address feedback

* Fix search in admin console

* Fix test
Этот коммит содержится в:
Daniel Espino García
2024-01-16 10:10:24 +01:00
коммит произвёл GitHub
родитель 6f1bbcd8ec
Коммит 8818141dae
159 изменённых файлов: 7096 добавлений и 6350 удалений

Просмотреть файл

@@ -21,6 +21,7 @@ import Markdown from 'components/markdown';
import OverlayTrigger from 'components/overlay_trigger';
import type {BaseOverlayTrigger} from 'components/overlay_trigger';
import ChannelPermissionGate from 'components/permissions_gates/channel_permission_gate';
import {statusDropdownMessages} from 'components/status_dropdown/status_dropdown';
import StatusIcon from 'components/status_icon';
import Timestamp from 'components/timestamp';
import Tooltip from 'components/tooltip';
@@ -34,7 +35,7 @@ import {
NotificationLevels,
RHSStates,
} from 'utils/constants';
import {handleFormattedTextClick, localizeMessage, isEmptyObject, toTitleCase} from 'utils/utils';
import {handleFormattedTextClick, isEmptyObject} from 'utils/utils';
import type {ModalData} from 'types/actions';
import type {RhsState} from 'types/store/rhs';
@@ -260,7 +261,7 @@ class ChannelHeader extends React.PureComponent<Props, State> {
hideGuestTags,
} = this.props;
const {formatMessage} = this.props.intl;
const ariaLabelChannelHeader = localizeMessage('accessibility.sections.channelHeader', 'channel header region');
const ariaLabelChannelHeader = this.props.intl.formatMessage({id: 'accessibility.sections.channelHeader', defaultMessage: 'channel header region'});
let hasGuestsText: ReactNode = '';
if (hasGuests && !hideGuestTags) {
@@ -314,10 +315,7 @@ class ChannelHeader extends React.PureComponent<Props, State> {
dmHeaderTextStatus = (
<span className='header-status__text'>
<FormattedMessage
id={`status_dropdown.set_${channel.status}`}
defaultMessage={toTitleCase(channel.status || '')}
/>
<FormattedMessage {...statusDropdownMessages[channel.status!].name}/>
{this.renderCustomStatus()}
</span>
);