Merge branch 'badges-i18n' into 'develop'
Make all profile badges translatable See merge request soapbox-pub/soapbox!2647
This commit is contained in:
commit
c2a8044aa4
3 changed files with 5 additions and 4 deletions
|
@ -30,13 +30,13 @@ const getBadges = (
|
|||
const badges = [];
|
||||
|
||||
if (account?.admin) {
|
||||
badges.push(<Badge key='admin' slug='admin' title='Admin' />);
|
||||
badges.push(<Badge key='admin' slug='admin' title={<FormattedMessage id='account_moderation_modal.roles.admin' defaultMessage='Admin' />} />);
|
||||
} else if (account?.moderator) {
|
||||
badges.push(<Badge key='moderator' slug='moderator' title='Moderator' />);
|
||||
badges.push(<Badge key='moderator' slug='moderator' title={<FormattedMessage id='account_moderation_modal.roles.moderator' defaultMessage='Moderator' />} />);
|
||||
}
|
||||
|
||||
if (patronUser?.is_patron) {
|
||||
badges.push(<Badge key='patron' slug='patron' title='Patron' />);
|
||||
badges.push(<Badge key='patron' slug='patron' title={<FormattedMessage id='account.patron' defaultMessage='Patron' />} />);
|
||||
}
|
||||
|
||||
return badges;
|
||||
|
|
|
@ -83,7 +83,7 @@ const ProfileInfoPanel: React.FC<IProfileInfoPanel> = ({ account, username }) =>
|
|||
}
|
||||
|
||||
if (isPatron) {
|
||||
badges.push(<Badge slug='patron' title='Patron' key='patron' />);
|
||||
badges.push(<Badge slug='patron' title={<FormattedMessage id='account.patron' defaultMessage='Patron' />} key='patron' />);
|
||||
}
|
||||
|
||||
return [...badges, ...custom];
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
"account.mute": "Mute @{name}",
|
||||
"account.muted": "Muted",
|
||||
"account.never_active": "Never",
|
||||
"account.patron": "Patron",
|
||||
"account.posts": "Posts",
|
||||
"account.posts_with_replies": "Posts & replies",
|
||||
"account.profile": "Profile",
|
||||
|
|
Loading…
Reference in a new issue