mirror of
https://github.com/wassname/talk.git
synced 2026-07-04 15:58:38 +08:00
Merge pull request #1338 from leeeandroo/admin-user-details
Admin user details translations and wording
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
||||
import ActionsMenu from 'coral-admin/src/components/ActionsMenu';
|
||||
import ActionsMenuItem from 'coral-admin/src/components/ActionsMenuItem';
|
||||
import UserInfoTooltip from './UserInfoTooltip';
|
||||
import t from 'coral-framework/services/i18n';
|
||||
|
||||
class UserDetail extends React.Component {
|
||||
rejectThenReload = async info => {
|
||||
@@ -152,27 +153,27 @@ class UserDetail extends React.Component {
|
||||
>
|
||||
{suspended ? (
|
||||
<ActionsMenuItem onClick={() => unsuspendUser({ id: user.id })}>
|
||||
Remove Suspension
|
||||
{t('user_detail.remove_suspension')}
|
||||
</ActionsMenuItem>
|
||||
) : (
|
||||
<ActionsMenuItem
|
||||
disabled={me.id === user.id}
|
||||
onClick={this.showSuspenUserDialog}
|
||||
>
|
||||
Suspend User
|
||||
{t('user_detail.suspend')}
|
||||
</ActionsMenuItem>
|
||||
)}
|
||||
|
||||
{banned ? (
|
||||
<ActionsMenuItem onClick={() => unbanUser({ id: user.id })}>
|
||||
Remove Ban
|
||||
{t('user_detail.remove_ban')}
|
||||
</ActionsMenuItem>
|
||||
) : (
|
||||
<ActionsMenuItem
|
||||
disabled={me.id === user.id}
|
||||
onClick={this.showBanUserDialog}
|
||||
>
|
||||
Ban User
|
||||
{t('user_detail.ban')}
|
||||
</ActionsMenuItem>
|
||||
)}
|
||||
</ActionsMenu>
|
||||
@@ -190,14 +191,18 @@ class UserDetail extends React.Component {
|
||||
<ul className={styles.userDetailList}>
|
||||
<li>
|
||||
<Icon name="assignment_ind" />
|
||||
<span className={styles.userDetailItem}>Member Since:</span>
|
||||
<span className={styles.userDetailItem}>
|
||||
{t('user_detail.member_since')}:
|
||||
</span>
|
||||
{new Date(user.created_at).toLocaleString()}
|
||||
</li>
|
||||
|
||||
{user.profiles.map(({ id }) => (
|
||||
<li key={id}>
|
||||
<Icon name="email" />
|
||||
<span className={styles.userDetailItem}>Email:</span>
|
||||
<span className={styles.userDetailItem}>
|
||||
{t('user_detail.email')}:
|
||||
</span>
|
||||
{id}{' '}
|
||||
<ButtonCopyToClipboard
|
||||
className={styles.copyButton}
|
||||
@@ -210,17 +215,23 @@ class UserDetail extends React.Component {
|
||||
|
||||
<ul className={styles.stats}>
|
||||
<li className={styles.stat}>
|
||||
<span className={styles.statItem}>Total Comments</span>
|
||||
<span className={styles.statItem}>
|
||||
{t('user_detail.total_comments')}
|
||||
</span>
|
||||
<span className={styles.statResult}>{totalComments}</span>
|
||||
</li>
|
||||
<li className={styles.stat}>
|
||||
<span className={styles.statItem}>Reject Rate</span>
|
||||
<span className={styles.statItem}>
|
||||
{t('user_detail.reject_rate')}
|
||||
</span>
|
||||
<span className={styles.statResult}>
|
||||
{rejectedPercent.toFixed(1)}%
|
||||
</span>
|
||||
</li>
|
||||
<li className={styles.stat}>
|
||||
<span className={styles.statItem}>Reports</span>
|
||||
<span className={styles.statItem}>
|
||||
{t('user_detail.reports')}
|
||||
</span>
|
||||
<span
|
||||
className={cn(
|
||||
styles.statReportResult,
|
||||
@@ -259,13 +270,13 @@ class UserDetail extends React.Component {
|
||||
'talk-admin-user-detail-all-tab'
|
||||
)}
|
||||
>
|
||||
All
|
||||
{t('user_detail.all')}
|
||||
</Tab>
|
||||
<Tab
|
||||
tabId={'rejected'}
|
||||
className={cn(styles.tab, 'talk-admin-user-detail-rejected-tab')}
|
||||
>
|
||||
Rejected
|
||||
{t('user_detail.rejected')}
|
||||
</Tab>
|
||||
<Tab
|
||||
tabId={'history'}
|
||||
@@ -275,7 +286,7 @@ class UserDetail extends React.Component {
|
||||
'talk-admin-user-detail-history-tab'
|
||||
)}
|
||||
>
|
||||
Account History
|
||||
{t('user_detail.account_history')}
|
||||
</Tab>
|
||||
</TabBar>
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@ class ViewOptions extends React.Component {
|
||||
'talk-admin-moderation-view-options-headline'
|
||||
)}
|
||||
>
|
||||
View Options
|
||||
{t('admin_sidebar.view_options')}
|
||||
</h2>
|
||||
<div className={styles.viewOptionsContent}>
|
||||
<ul className={styles.viewOptionsList}>
|
||||
<li className={styles.viewOptionsItem}>
|
||||
Sort Comments
|
||||
{t('admin_sidebar.sort_comments')}
|
||||
<Dropdown
|
||||
containerClassName={styles.dropdownContainer}
|
||||
toggleClassName={styles.dropdownToggle}
|
||||
|
||||
@@ -418,6 +418,19 @@ en:
|
||||
bio_flags: "flags for this bio"
|
||||
user_bio: "User Bio"
|
||||
username_flags: "flags for this username"
|
||||
user_detail:
|
||||
remove_suspension: "Remove Suspension"
|
||||
suspend: "Suspend User"
|
||||
remove_ban: "Remove Ban"
|
||||
ban: "Ban User"
|
||||
member_since: "Member Since"
|
||||
email: "Email"
|
||||
total_comments: "Total Comments"
|
||||
reject_rate: "Reject Rate"
|
||||
reports: "Reports"
|
||||
all: "All"
|
||||
rejected: "Rejected"
|
||||
account_history: "Account History"
|
||||
user_impersonating: "This user is impersonating"
|
||||
user_no_comment: "You've never left a comment. Join the conversation!"
|
||||
username_offensive: "This username is offensive"
|
||||
@@ -444,3 +457,6 @@ en:
|
||||
description: "Thanks for installing Talk! We sent an email to verify your email address. While you finish setting up the account, you can start engaging with your readers now."
|
||||
launch: "Launch Talk"
|
||||
close: "Close this Installer"
|
||||
admin_sidebar:
|
||||
view_options: "View Options"
|
||||
sort_comments: "Sort Comments"
|
||||
|
||||
Reference in New Issue
Block a user