add some translations and link to mod queue

This commit is contained in:
riley
2017-02-15 14:11:44 -07:00
parent efb529d7bd
commit b26c170a52
2 changed files with 32 additions and 13 deletions
+24 -13
View File
@@ -1,5 +1,10 @@
import React, {PropTypes} from 'react';
import {Link} from 'react-router';
import styles from './FlagWidget.css';
import I18n from 'coral-framework/modules/i18n/i18n';
import translations from 'coral-admin/src/translations';
const lang = new I18n(translations);
const FlagWidget = ({assets}) => {
@@ -7,22 +12,28 @@ const FlagWidget = ({assets}) => {
<table className={styles.widgetTable}>
<thead className={styles.widgetHead}>
<tr>
<th>Article</th>
<th>Flags</th>
<th>Comment Count</th>
<th></th>{/* empty on purpose */}
<th>{lang.t('streams.article')}</th>
<th>{lang.t('modqueue.flagged')}</th>
<th>{lang.t('dashboard.comment_count')}</th>
</tr>
</thead>
<tbody>
{assets.map(asset => {
const flagCount = asset.action_summaries.find(s => s.__typename === 'FlagAssetActionSummary').actionCount;
return (
<tr key={asset.id}>
<td><a href={asset.url} target="_blank">{asset.title}</a></td>
<td>{flagCount}</td>
<td>{asset.commentCount}</td>
</tr>
);
})}
{
assets.length
? assets.map((asset, index) => {
const flagCount = asset.action_summaries.find(s => s.__typename === 'FlagAssetActionSummary').actionCount;
return (
<tr key={asset.id}>
<td>{index + 1}</td>
<td><Link to={`/admin/moderate/flagged/${asset.id}`}>{lang.t('configure.moderate')} » {asset.title}</Link></td>
<td>{flagCount}</td>
<td>{asset.commentCount}</td>
</tr>
);
})
: <tr><td colSpan="3">{lang.t('dashboard.no_flags')}</td></tr>
}
</tbody>
</table>
);
+8
View File
@@ -107,6 +107,10 @@
"email": "Another member of the community recently flagged your {0} for review. Because of its content your {0} was rejected. This means you can no longer comment, like, or flag content until you rewrite your {0}. Please e-mail moderator@newsorg.com if you have any questions or concerns.",
"write_message": "Write a message"
},
"dashboard": {
"no_flags": "There have been no flags in the last 5 minutes! Hooray!",
"comment_count": "Comment Count"
},
"streams": {
"search": "Search",
"filter-streams": "Filter Streams",
@@ -209,6 +213,10 @@
"cancel": "Cancelar",
"yes_ban_user": "Si, Suspendan el usuario"
},
"dashbord": {
"no_flags": "",
"comment_count": ""
},
"streams": {
"search": "",
"filter-streams": "",