mirror of
https://github.com/wassname/talk.git
synced 2026-09-13 13:10:43 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45c193b9bf | ||
|
|
ed037f8461 | ||
|
|
7bb0c73ee4 | ||
|
|
f13654b297 | ||
|
|
4a165c0972 | ||
|
|
bbf034a595 | ||
|
|
9f6ddd3801 | ||
|
|
34184d07eb | ||
|
|
057d083341 | ||
|
|
c5f107a168 | ||
|
|
17a801d6d2 | ||
|
|
888a61f895 | ||
|
|
9edf1d7c41 | ||
|
|
b802fdd5eb | ||
|
|
1a7b3fe903 | ||
|
|
cadbbd0b5c | ||
|
|
b6101b880d | ||
|
|
afb9fdcdc1 | ||
|
|
53abb65da1 | ||
|
|
7b5192d40c | ||
|
|
8fdea8734a | ||
|
|
588fbb0eb9 | ||
|
|
a28024dfed | ||
|
|
343eb3e8b6 | ||
|
|
80319f9aca | ||
|
|
33e1e5e729 | ||
|
|
ea2b2bc2e3 | ||
|
|
6ca2f21bc2 | ||
|
|
0d9b795740 | ||
|
|
73482d68ac | ||
|
|
e837dfc3c1 | ||
|
|
2cd9a71d62 | ||
|
|
ad73fcd94b | ||
|
|
66145d6fd5 | ||
|
|
7d246bba76 | ||
|
|
0ce0d57a96 | ||
|
|
792bc713f2 | ||
|
|
399f5ef7ba | ||
|
|
14c0945687 | ||
|
|
52f2f48385 | ||
|
|
e52605e26b | ||
|
|
ae4d6e2424 | ||
|
|
968d20e744 | ||
|
|
49d2416172 | ||
|
|
aac7cae6d6 | ||
|
|
f4fd843efe | ||
|
|
c4de69218c | ||
|
|
94ae029a4a | ||
|
|
1dc1f91b72 | ||
|
|
c98216cf3c | ||
|
|
2c9f8586d3 | ||
|
|
4ce5d97e3b | ||
|
|
3ea2632187 | ||
|
|
c9b709ad43 | ||
|
|
dcd7145510 | ||
|
|
d3896ed97d | ||
|
|
47a3cba5f5 | ||
|
|
0f1cabe126 | ||
|
|
5f62083c2f | ||
|
|
3cabe50a7b | ||
|
|
c0efc33044 | ||
|
|
9344c1bc80 | ||
|
|
1bfe0fbac1 | ||
|
|
b3d704be76 | ||
|
|
3c100160fb | ||
|
|
49c7d2eeda | ||
|
|
cff9b29a36 | ||
|
|
5a1f93975c | ||
|
|
cd6da751a6 | ||
|
|
41610ccf57 | ||
|
|
607a59ad63 | ||
|
|
c0fea4821b | ||
|
|
8432df15a1 | ||
|
|
61486caa9e | ||
|
|
7f45f7e2e2 | ||
|
|
9e511817a8 | ||
|
|
4015e19040 | ||
|
|
c1fcc82b62 | ||
|
|
893c8d32b2 | ||
|
|
2dfadebd42 | ||
|
|
a2d5af1372 | ||
|
|
7a5416a807 | ||
|
|
8c2c632f52 | ||
|
|
fabec2c89b | ||
|
|
7f18603fd5 | ||
|
|
3a69e0cf96 | ||
|
|
7ad3d247b5 | ||
|
|
130dc578b3 | ||
|
|
fd7114ab2a | ||
|
|
5e4bdf1f0c | ||
|
|
71e1b69afe | ||
|
|
6fa18f6c7c | ||
|
|
bda9b55562 | ||
|
|
d843320c4a | ||
|
|
8a88228d9c | ||
|
|
0a9664d464 | ||
|
|
b3749b9332 | ||
|
|
aecb7de019 | ||
|
|
ade3cf6252 | ||
|
|
1837ae4a0f | ||
|
|
334074a7ca | ||
|
|
f93c4adc97 | ||
|
|
bb54009567 | ||
|
|
c126d217ad | ||
|
|
8b2dc3a46d | ||
|
|
d0eca26d5b | ||
|
|
b742923897 | ||
|
|
1781b926d9 | ||
|
|
9222ee57a5 | ||
|
|
67cca7d85d |
@@ -18,7 +18,7 @@ You’ve installed Talk on your server, and you’re preparing to launch it on y
|
||||
|
||||
## Advanced Usage
|
||||
|
||||
For advanced configuration and usage of Talk, check out our [Configuration](https://docs.coralproject.net/talk/advanced-configuration/) and [Integration](https://docs.coralproject.net/talk/integrating/authentication/) how-tos. This covers topics in whih you will need dev support to fully customize and integrate Talk, such as SSO/authentication, creating and managing assets and articles, styling Talk with custom CSS, and setting up Notifications and SMTP support.
|
||||
For advanced configuration and usage of Talk, check out our [Configuration](https://docs.coralproject.net/talk/advanced-configuration/) and [Integration](https://docs.coralproject.net/talk/integrating/authentication/) how-tos. This covers topics in which you will need dev support to fully customize and integrate Talk, such as SSO/authentication, creating and managing assets and articles, styling Talk with custom CSS, and setting up Notifications and SMTP support.
|
||||
|
||||
## Versions & Upgrading
|
||||
|
||||
|
||||
@@ -219,6 +219,28 @@ async function rewrite(search, replace, options) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* debugAssetURL will scrape the given URL and print it's scraped values.
|
||||
*/
|
||||
async function debugAssetURL(url) {
|
||||
try {
|
||||
const meta = await scraper.scrape(url);
|
||||
|
||||
const table = new Table({ head: ['Property', 'Value'] });
|
||||
|
||||
for (const [property, value] of Object.entries(meta)) {
|
||||
table.push([property, value]);
|
||||
}
|
||||
|
||||
console.log(table.toString());
|
||||
|
||||
util.shutdown(0);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
util.shutdown(1);
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// Setting up the program command line arguments.
|
||||
//==============================================================================
|
||||
@@ -234,6 +256,13 @@ program
|
||||
.description('list all the assets in the database')
|
||||
.action(listAssets);
|
||||
|
||||
program
|
||||
.command('debug [url]')
|
||||
.description(
|
||||
'prints the scraped metadata that would be added to the given asset'
|
||||
)
|
||||
.action(debugAssetURL);
|
||||
|
||||
program
|
||||
.command('refresh [age]')
|
||||
.description('queues the assets that exceed the age requested')
|
||||
|
||||
@@ -7,9 +7,9 @@ import t from 'coral-framework/services/i18n';
|
||||
import { can } from 'coral-framework/services/perms';
|
||||
import cn from 'classnames';
|
||||
|
||||
const CoralDrawer = ({ handleLogout, currentUser }) => (
|
||||
<Drawer className={cn('talk-admin-drawer-nav', styles.drawer)}>
|
||||
{currentUser && can(currentUser, 'ACCESS_ADMIN') ? (
|
||||
const CoralDrawer = ({ handleLogout, currentUser }) =>
|
||||
currentUser && can(currentUser, 'ACCESS_ADMIN') ? (
|
||||
<Drawer className={cn('talk-admin-drawer-nav', styles.drawer)}>
|
||||
<div>
|
||||
<Navigation className={styles.nav}>
|
||||
{can(currentUser, 'MODERATE_COMMENTS') && (
|
||||
@@ -48,9 +48,8 @@ const CoralDrawer = ({ handleLogout, currentUser }) => (
|
||||
<span>{`v${process.env.VERSION}`}</span>
|
||||
</Navigation>
|
||||
</div>
|
||||
) : null}
|
||||
</Drawer>
|
||||
);
|
||||
</Drawer>
|
||||
) : null;
|
||||
|
||||
CoralDrawer.propTypes = {
|
||||
handleLogout: PropTypes.func.isRequired,
|
||||
|
||||
@@ -123,7 +123,7 @@ class UserDetailComment extends React.Component {
|
||||
<IfHasLink text={comment.body}>
|
||||
<span className={styles.hasLinks}>
|
||||
{/* TODO: translate string */}
|
||||
<Icon name="error_outline" /> Contains Link
|
||||
<Icon name="error_outline" /> {t('common.contains_link')}
|
||||
</span>
|
||||
</IfHasLink>
|
||||
<div className={styles.actions}>
|
||||
|
||||
@@ -34,6 +34,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
.filterHeader {
|
||||
margin-top: 30px;
|
||||
font-size: 16px;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.filterDetail {
|
||||
margin-top: 15px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.radioGroup {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.mainContent {
|
||||
width: calc(100% - 300px);
|
||||
padding: 34px 14px;
|
||||
|
||||
@@ -9,6 +9,7 @@ import PropTypes from 'prop-types';
|
||||
import ActionsMenu from 'coral-admin/src/components/ActionsMenu';
|
||||
import ActionsMenuItem from 'coral-admin/src/components/ActionsMenuItem';
|
||||
import { isSuspended, isBanned } from 'coral-framework/utils/user';
|
||||
import { RadioGroup, Radio } from 'react-mdl';
|
||||
import moment from 'moment';
|
||||
import {
|
||||
ADMIN,
|
||||
@@ -64,11 +65,12 @@ class People extends React.Component {
|
||||
|
||||
render() {
|
||||
const {
|
||||
onSearchChange,
|
||||
onFilterChange,
|
||||
users = [],
|
||||
setUserRole,
|
||||
viewUserDetail,
|
||||
loadMore,
|
||||
filters,
|
||||
} = this.props;
|
||||
|
||||
const hasResults = !!users.nodes.length;
|
||||
@@ -87,11 +89,43 @@ class People extends React.Component {
|
||||
id="commenters-search"
|
||||
type="text"
|
||||
className={styles.searchBoxInput}
|
||||
defaultValue=""
|
||||
onChange={onSearchChange}
|
||||
value={filters.search}
|
||||
onChange={onFilterChange('search')}
|
||||
placeholder={t('streams.search')}
|
||||
/>
|
||||
</div>
|
||||
<div className={styles.filterHeader}>
|
||||
{t('community.filter_users')}
|
||||
</div>
|
||||
<div className={styles.filterDetail}>{t('community.status')}</div>
|
||||
<RadioGroup
|
||||
name="statusFilter"
|
||||
value={filters.status}
|
||||
childContainer="div"
|
||||
onChange={onFilterChange('status')}
|
||||
className={styles.radioGroup}
|
||||
>
|
||||
<Radio value="">{t('community.all')}</Radio>
|
||||
<Radio value="active">{t('community.active')}</Radio>
|
||||
<Radio value="suspended">{t('community.suspended')}</Radio>
|
||||
<Radio value="banned">{t('community.banned')}</Radio>
|
||||
</RadioGroup>
|
||||
<div className={styles.filterDetail}>
|
||||
{t('community.filter_role')}
|
||||
</div>
|
||||
<RadioGroup
|
||||
name="roleFilter"
|
||||
value={filters.role}
|
||||
childContainer="div"
|
||||
onChange={onFilterChange('role')}
|
||||
className={styles.radioGroup}
|
||||
>
|
||||
<Radio value="">{t('community.all')}</Radio>
|
||||
<Radio value={ADMIN}>{t('community.admin')}</Radio>
|
||||
<Radio value={STAFF}>{t('community.staff')}</Radio>
|
||||
<Radio value={MODERATOR}>{t('community.moderator')}</Radio>
|
||||
<Radio value={COMMENTER}>{t('community.commenter')}</Radio>
|
||||
</RadioGroup>
|
||||
</div>
|
||||
<div className={styles.mainContent}>
|
||||
{hasResults ? (
|
||||
@@ -254,7 +288,8 @@ class People extends React.Component {
|
||||
|
||||
People.propTypes = {
|
||||
users: PropTypes.object.isRequired,
|
||||
onSearchChange: PropTypes.func.isRequired,
|
||||
filters: PropTypes.object.isRequired,
|
||||
onFilterChange: PropTypes.func.isRequired,
|
||||
setUserRole: PropTypes.func.isRequired,
|
||||
viewUserDetail: PropTypes.func.isRequired,
|
||||
unbanUser: PropTypes.func.isRequired,
|
||||
|
||||
@@ -17,59 +17,65 @@ import update from 'immutability-helper';
|
||||
import { Spinner } from 'coral-ui';
|
||||
import withQuery from 'coral-framework/hocs/withQuery';
|
||||
|
||||
class PeopleContainer extends React.Component {
|
||||
class PeopleContainer extends React.PureComponent {
|
||||
timer = null;
|
||||
|
||||
state = {
|
||||
searchValue: '',
|
||||
search: '',
|
||||
role: '',
|
||||
status: '',
|
||||
};
|
||||
|
||||
onSearchChange = e => {
|
||||
const { value } = e.target;
|
||||
this.setState({ searchValue: value }, () => {
|
||||
statusToQuery = {
|
||||
active: { suspended: false, banned: false },
|
||||
suspended: { suspended: true },
|
||||
banned: { banned: true },
|
||||
};
|
||||
|
||||
onFilterChange = filter => e =>
|
||||
this.setState({ [filter]: e.target.value }, () => {
|
||||
clearTimeout(this.timer);
|
||||
this.timer = setTimeout(() => {
|
||||
this.search(value);
|
||||
}, 350);
|
||||
this.timer = setTimeout(this.filter, 350);
|
||||
});
|
||||
|
||||
getFilterState = () => {
|
||||
const { role, status } = this.state;
|
||||
|
||||
return {
|
||||
status: this.statusToQuery[status] || null,
|
||||
role: role || null,
|
||||
};
|
||||
};
|
||||
|
||||
search = async value => {
|
||||
return this.props.data.fetchMore({
|
||||
query: SEARCH_QUERY,
|
||||
filter = () =>
|
||||
this.props.data.fetchMore({
|
||||
query: FILTER_QUERY,
|
||||
variables: {
|
||||
value,
|
||||
state: this.getFilterState(),
|
||||
value: this.state.search,
|
||||
limit: 10,
|
||||
},
|
||||
updateQuery: (previous, { fetchMoreResult: { users } }) => {
|
||||
const updated = update(previous, {
|
||||
updateQuery: (previous, { fetchMoreResult: { users } }) =>
|
||||
update(previous, {
|
||||
users: {
|
||||
nodes: {
|
||||
$set: users.nodes,
|
||||
},
|
||||
nodes: { $set: users.nodes },
|
||||
hasNextPage: { $set: users.hasNextPage },
|
||||
endCursor: { $set: users.endCursor },
|
||||
},
|
||||
});
|
||||
return updated;
|
||||
},
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
setUserRole = async (id, role) => {
|
||||
await this.props.setUserRole(id, role);
|
||||
};
|
||||
|
||||
loadMore = () => {
|
||||
return this.props.data.fetchMore({
|
||||
loadMore = () =>
|
||||
this.props.data.fetchMore({
|
||||
query: LOAD_MORE_QUERY,
|
||||
variables: {
|
||||
value: this.state.searchValue,
|
||||
limit: 5,
|
||||
cursor: this.props.root.users.endCursor,
|
||||
state: this.getFilterState(),
|
||||
value: this.state.search,
|
||||
limit: 5,
|
||||
},
|
||||
updateQuery: (previous, { fetchMoreResult: { users } }) => {
|
||||
const updated = update(previous, {
|
||||
updateQuery: (previous, { fetchMoreResult: { users } }) =>
|
||||
update(previous, {
|
||||
users: {
|
||||
nodes: {
|
||||
$apply: nodes => appendNewNodes(nodes, users.nodes),
|
||||
@@ -77,11 +83,8 @@ class PeopleContainer extends React.Component {
|
||||
hasNextPage: { $set: users.hasNextPage },
|
||||
endCursor: { $set: users.endCursor },
|
||||
},
|
||||
});
|
||||
return updated;
|
||||
},
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
if (this.props.data.error) {
|
||||
@@ -98,9 +101,9 @@ class PeopleContainer extends React.Component {
|
||||
|
||||
return (
|
||||
<People
|
||||
onSearchChange={this.onSearchChange}
|
||||
onFilterChange={this.onFilterChange}
|
||||
viewUserDetail={this.props.viewUserDetail}
|
||||
setUserRole={this.setUserRole}
|
||||
setUserRole={this.props.setUserRole}
|
||||
showSuspendUserDialog={this.props.showSuspendUserDialog}
|
||||
showBanUserDialog={this.props.showBanUserDialog}
|
||||
unbanUser={this.props.unbanUser}
|
||||
@@ -109,6 +112,7 @@ class PeopleContainer extends React.Component {
|
||||
root={this.props.root}
|
||||
users={this.props.root.users}
|
||||
loadMore={this.loadMore}
|
||||
filters={this.state}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -125,16 +129,6 @@ PeopleContainer.propTypes = {
|
||||
root: PropTypes.object,
|
||||
};
|
||||
|
||||
const mapDispatchToProps = dispatch =>
|
||||
bindActionCreators(
|
||||
{
|
||||
viewUserDetail,
|
||||
showSuspendUserDialog,
|
||||
showBanUserDialog,
|
||||
},
|
||||
dispatch
|
||||
);
|
||||
|
||||
const LOAD_MORE_QUERY = gql`
|
||||
query TalkAdmin_Community_People_LoadMoreUsers(
|
||||
$limit: Int
|
||||
@@ -169,9 +163,13 @@ const LOAD_MORE_QUERY = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
const SEARCH_QUERY = gql`
|
||||
query TalkAdmin_Community_People_SearchUsers($value: String, $limit: Int) {
|
||||
users(query: { value: $value, limit: $limit }) {
|
||||
const FILTER_QUERY = gql`
|
||||
query TalkAdmin_Community_People_FilterUsers(
|
||||
$state: UserStateInput
|
||||
$value: String
|
||||
$limit: Int
|
||||
) {
|
||||
users(query: { state: $state, value: $value, limit: $limit }) {
|
||||
hasNextPage
|
||||
endCursor
|
||||
nodes {
|
||||
@@ -199,6 +197,16 @@ const SEARCH_QUERY = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
const mapDispatchToProps = dispatch =>
|
||||
bindActionCreators(
|
||||
{
|
||||
viewUserDetail,
|
||||
showSuspendUserDialog,
|
||||
showBanUserDialog,
|
||||
},
|
||||
dispatch
|
||||
);
|
||||
|
||||
export default compose(
|
||||
connect(
|
||||
null,
|
||||
|
||||
@@ -155,9 +155,19 @@ class StreamSettings extends React.Component {
|
||||
<ConfigureCard
|
||||
checked={settings.infoBoxEnable}
|
||||
onCheckbox={this.updateInfoBoxEnable}
|
||||
title={t('configure.include_comment_stream')}
|
||||
title={t('configure.code_of_conduct_summary')}
|
||||
>
|
||||
<p>{t('configure.include_comment_stream_desc')}</p>
|
||||
<p>
|
||||
{t('configure.code_of_conduct_summary_desc')}
|
||||
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href="https://guides.coralproject.net/create-a-code-of-conduct/"
|
||||
>
|
||||
Code of Conduct Guide.
|
||||
</a>
|
||||
</p>
|
||||
<div
|
||||
className={cn(
|
||||
styles.configSettingInfoBox,
|
||||
@@ -238,12 +248,14 @@ class StreamSettings extends React.Component {
|
||||
onChange={this.updateClosedTimeout}
|
||||
value={getTimeoutAmount(settings.closedTimeout)}
|
||||
label={t('configure.closed_comments_label')}
|
||||
disabled={!settings.autoCloseStream}
|
||||
/>
|
||||
<div className={styles.configTimeoutSelect}>
|
||||
<SelectField
|
||||
label="comments closed time window"
|
||||
value={getTimeoutMeasure(settings.closedTimeout)}
|
||||
onChange={this.updateClosedTimeoutMeasure}
|
||||
readOnly={!settings.autoCloseStream}
|
||||
>
|
||||
<Option value={'hours'}>{t('configure.hours')}</Option>
|
||||
<Option value={'days'}>{t('configure.days')}</Option>
|
||||
|
||||
@@ -6,7 +6,7 @@ import ConfigureCard from 'coral-framework/components/ConfigureCard';
|
||||
|
||||
const Wordlist = ({ suspectWords, bannedWords, onChangeWordlist }) => (
|
||||
<div>
|
||||
<ConfigureCard title={t('configure.banned_words_title')}>
|
||||
<ConfigureCard collapsible title={t('configure.banned_words_title')}>
|
||||
<p>{t('configure.banned_word_text')}</p>
|
||||
<TagsInput
|
||||
value={bannedWords}
|
||||
@@ -16,7 +16,7 @@ const Wordlist = ({ suspectWords, bannedWords, onChangeWordlist }) => (
|
||||
onChange={tags => onChangeWordlist('banned', tags)}
|
||||
/>
|
||||
</ConfigureCard>
|
||||
<ConfigureCard title={t('configure.suspect_word_title')}>
|
||||
<ConfigureCard collapsible title={t('configure.suspect_word_title')}>
|
||||
<p>{t('configure.suspect_word_text')}</p>
|
||||
<TagsInput
|
||||
value={suspectWords}
|
||||
|
||||
@@ -183,8 +183,7 @@ class Comment extends React.Component {
|
||||
<div className={styles.sideActions}>
|
||||
<IfHasLink text={comment.body}>
|
||||
<span className={styles.hasLinks}>
|
||||
{/* TODO: translate string */}
|
||||
<Icon name="error_outline" /> Contains Link
|
||||
<Icon name="error_outline" /> {t('common.contains_link')}
|
||||
</span>
|
||||
</IfHasLink>
|
||||
<div className={`actions ${styles.actions}`}>
|
||||
|
||||
@@ -50,7 +50,7 @@ class StoriesContainer extends Component {
|
||||
const { updateAssetState } = this.props;
|
||||
|
||||
try {
|
||||
updateAssetState(id, closeStream ? Date.now() : null);
|
||||
await updateAssetState(id, closeStream ? Date.now() : null);
|
||||
this.fetchAssets();
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
||||
@@ -18,6 +18,11 @@
|
||||
.comment {
|
||||
position: relative;
|
||||
padding-left: 15px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.commentContainer {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.commentLevel0 {
|
||||
@@ -138,6 +143,7 @@
|
||||
}
|
||||
|
||||
.commentAvatar {
|
||||
margin-top: 10px;
|
||||
max-width: 60px;
|
||||
}
|
||||
|
||||
|
||||
@@ -645,7 +645,7 @@ export default class Comment extends React.Component {
|
||||
})}
|
||||
onClick={this.onClickEdit}
|
||||
>
|
||||
Edit
|
||||
{t('framework.edit')}
|
||||
</a>
|
||||
)}
|
||||
</span>
|
||||
|
||||
@@ -38,5 +38,4 @@
|
||||
position: relative;
|
||||
margin-top: 28px;
|
||||
padding-bottom: 50px;
|
||||
min-height: 600px;
|
||||
}
|
||||
|
||||
@@ -206,15 +206,30 @@ class Stream extends React.Component {
|
||||
);
|
||||
}
|
||||
|
||||
renderQuestionBox() {
|
||||
const {
|
||||
root,
|
||||
asset,
|
||||
asset: {
|
||||
settings: { questionBoxEnable, questionBoxContent, questionBoxIcon },
|
||||
},
|
||||
} = this.props;
|
||||
const slotPassthrough = { root, asset };
|
||||
if (questionBoxEnable) {
|
||||
return (
|
||||
<QuestionBox content={questionBoxContent} icon={questionBoxIcon}>
|
||||
<Slot fill="streamQuestionArea" passthrough={slotPassthrough} />
|
||||
</QuestionBox>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
root,
|
||||
appendItemArray,
|
||||
asset,
|
||||
asset: {
|
||||
comment: highlightedComment,
|
||||
settings: { questionBoxEnable },
|
||||
},
|
||||
asset: { comment: highlightedComment },
|
||||
postComment,
|
||||
notify,
|
||||
updateItem,
|
||||
@@ -260,14 +275,7 @@ class Stream extends React.Component {
|
||||
content={asset.settings.infoBoxContent}
|
||||
enable={asset.settings.infoBoxEnable}
|
||||
/>
|
||||
{questionBoxEnable && (
|
||||
<QuestionBox
|
||||
content={asset.settings.questionBoxContent}
|
||||
icon={asset.settings.questionBoxIcon}
|
||||
>
|
||||
<Slot fill="streamQuestionArea" passthrough={slotPassthrough} />
|
||||
</QuestionBox>
|
||||
)}
|
||||
{this.renderQuestionBox()}
|
||||
{!banned &&
|
||||
temporarilySuspended && (
|
||||
<RestrictedMessageBox>
|
||||
@@ -305,6 +313,7 @@ class Stream extends React.Component {
|
||||
) : (
|
||||
<Markdown content={asset.settings.disableCommentingMessage} />
|
||||
)}
|
||||
{this.renderQuestionBox()}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import * as actions from '../constants/auth';
|
||||
import jwtDecode from 'jwt-decode';
|
||||
|
||||
function cleanAuthData(localStorage) {
|
||||
localStorage.removeItem('token');
|
||||
localStorage.removeItem('exp');
|
||||
}
|
||||
import { setStorageAuthToken, clearStorageAuthToken } from '../services/auth';
|
||||
|
||||
export const checkLogin = () => (
|
||||
dispatch,
|
||||
@@ -15,7 +10,7 @@ export const checkLogin = () => (
|
||||
rest('/auth')
|
||||
.then(result => {
|
||||
if (!result.user) {
|
||||
cleanAuthData(localStorage);
|
||||
clearStorageAuthToken(localStorage);
|
||||
dispatch(checkLoginSuccess(null));
|
||||
client.resetWebsocket();
|
||||
return;
|
||||
@@ -23,12 +18,16 @@ export const checkLogin = () => (
|
||||
|
||||
dispatch(checkLoginSuccess(result.user));
|
||||
pym.sendMessage('coral-auth-changed', JSON.stringify(result.user));
|
||||
client.resetWebsocket();
|
||||
|
||||
// We don't need to reset the websocket here because if the request
|
||||
// returned that there was a user (which is the case here), then the
|
||||
// original request has already succeeded, or a previous call to a token
|
||||
// set handler has already reset it.
|
||||
})
|
||||
.catch(error => {
|
||||
if (error.status && error.status === 401 && localStorage) {
|
||||
// Unauthorized.
|
||||
cleanAuthData(localStorage);
|
||||
clearStorageAuthToken(localStorage);
|
||||
client.resetWebsocket();
|
||||
} else {
|
||||
console.error(error);
|
||||
@@ -49,14 +48,20 @@ const checkLoginSuccess = user => ({
|
||||
user,
|
||||
});
|
||||
|
||||
export const setAuthToken = token => (dispatch, _, { localStorage }) => {
|
||||
localStorage.setItem('exp', jwtDecode(token).exp);
|
||||
localStorage.setItem('token', token);
|
||||
export const setAuthToken = token => (
|
||||
dispatch,
|
||||
_,
|
||||
{ localStorage, client }
|
||||
) => {
|
||||
setStorageAuthToken(localStorage, token);
|
||||
|
||||
// Dispatch the set auth token action. For some browsers and situations, we
|
||||
// may not be able to persist the auth token any other way. Keep it in redux!
|
||||
dispatch({ type: actions.SET_AUTH_TOKEN, token });
|
||||
|
||||
// Now that we set a token, let's reset the subscriptions.
|
||||
client.resetWebsocket();
|
||||
|
||||
dispatch(checkLogin());
|
||||
};
|
||||
|
||||
@@ -65,9 +70,7 @@ export const handleSuccessfulLogin = (user, token) => (
|
||||
_,
|
||||
{ client, localStorage, postMessage }
|
||||
) => {
|
||||
const { exp } = jwtDecode(token);
|
||||
localStorage.setItem('exp', exp);
|
||||
localStorage.setItem('token', token);
|
||||
setStorageAuthToken(localStorage, token);
|
||||
|
||||
// Send the message via the messages service to the window.opener if it
|
||||
// exists.
|
||||
@@ -79,6 +82,7 @@ export const handleSuccessfulLogin = (user, token) => (
|
||||
);
|
||||
}
|
||||
|
||||
// Now that we just set a token, set the token!
|
||||
client.resetWebsocket();
|
||||
|
||||
dispatch({
|
||||
@@ -105,7 +109,7 @@ export const logout = () => async (
|
||||
}
|
||||
|
||||
// Clear the auth data persisted to localStorage.
|
||||
cleanAuthData(localStorage);
|
||||
clearStorageAuthToken(localStorage);
|
||||
|
||||
// Reset the websocket.
|
||||
client.resetWebsocket();
|
||||
|
||||
@@ -1,50 +1,48 @@
|
||||
.card {
|
||||
margin-bottom: 20px;
|
||||
align-items: flex-start;
|
||||
min-height: 100px;
|
||||
max-width: 600px;
|
||||
min-height: 100px;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 20px;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.collapsibleCard {
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.enabledCard {
|
||||
border-left: 7px solid #00796b;
|
||||
}
|
||||
|
||||
.action {
|
||||
flex-shrink: 0;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-top: 3px;
|
||||
margin-bottom: 7px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
.body {
|
||||
margin-top: 7px;
|
||||
font-size: 14px;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.action {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: inline-block;
|
||||
padding: 0px 30px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.enabledSetting {
|
||||
border-left-color: #00796b;
|
||||
border-left-style: solid;
|
||||
border-left-width: 7px;
|
||||
}
|
||||
|
||||
.disabledSetting {
|
||||
padding-left: 22px;
|
||||
}
|
||||
|
||||
.disabledSettingText {
|
||||
.disabledBody {
|
||||
color: #ccc;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,46 +1,69 @@
|
||||
import React from 'react';
|
||||
import React, { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import styles from './ConfigureCard.css';
|
||||
import classnames from 'classnames/bind';
|
||||
import { Card } from 'coral-ui';
|
||||
import { Checkbox } from 'react-mdl';
|
||||
import cn from 'classnames';
|
||||
import { Checkbox, IconButton } from 'react-mdl';
|
||||
|
||||
const ConfigureCard = ({
|
||||
title,
|
||||
children,
|
||||
className,
|
||||
onCheckbox,
|
||||
checked,
|
||||
...rest
|
||||
}) => (
|
||||
<Card
|
||||
{...rest}
|
||||
className={cn(styles.card, className, {
|
||||
[styles.enabledSetting]: checked === true,
|
||||
[styles.disabledSetting]: checked === false,
|
||||
})}
|
||||
>
|
||||
{checked !== undefined && (
|
||||
<div className={styles.action}>
|
||||
<Checkbox onChange={onCheckbox} checked={checked} />
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
className={cn(styles.wrapper, {
|
||||
[styles.content]: checked !== undefined,
|
||||
})}
|
||||
>
|
||||
<div className={styles.header}>{title}</div>
|
||||
<div
|
||||
className={cn({
|
||||
[styles.disabledSettingText]: checked === false,
|
||||
import styles from './ConfigureCard.css';
|
||||
|
||||
const cn = classnames.bind(styles);
|
||||
|
||||
class ConfigureCard extends PureComponent {
|
||||
state = {
|
||||
isOpen: !this.props.collapsible,
|
||||
};
|
||||
|
||||
toggle = () => this.setState({ isOpen: !this.state.isOpen });
|
||||
|
||||
render() {
|
||||
const {
|
||||
title,
|
||||
children,
|
||||
className,
|
||||
onCheckbox,
|
||||
checked,
|
||||
collapsible,
|
||||
...rest
|
||||
} = this.props;
|
||||
|
||||
const { isOpen } = this.state;
|
||||
|
||||
const iconName = isOpen ? 'keyboard_arrow_up' : 'keyboard_arrow_down';
|
||||
|
||||
return (
|
||||
<Card
|
||||
{...rest}
|
||||
className={cn(styles.card, className, {
|
||||
enabledCard: checked === true,
|
||||
collapsibleCard: collapsible,
|
||||
})}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
{checked !== undefined && (
|
||||
<div className={styles.action}>
|
||||
<Checkbox onChange={onCheckbox} checked={checked} />
|
||||
</div>
|
||||
)}
|
||||
<div className={styles.wrapper}>
|
||||
<div className={styles.header}>
|
||||
<div className={styles.title}>{title}</div>
|
||||
{collapsible && (
|
||||
<IconButton onClick={this.toggle} name={iconName} ripple />
|
||||
)}
|
||||
</div>
|
||||
{isOpen && (
|
||||
<div
|
||||
className={cn(styles.body, {
|
||||
disabledBody: checked === false,
|
||||
})}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
ConfigureCard.propTypes = {
|
||||
title: PropTypes.string,
|
||||
@@ -48,6 +71,7 @@ ConfigureCard.propTypes = {
|
||||
onCheckbox: PropTypes.func,
|
||||
checked: PropTypes.bool,
|
||||
children: PropTypes.node,
|
||||
collapsible: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default ConfigureCard;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import jwtDecode from 'jwt-decode';
|
||||
|
||||
export const setStorageAuthToken = (storage, token) => {
|
||||
storage.setItem('exp', jwtDecode(token).exp);
|
||||
storage.setItem('token', token);
|
||||
};
|
||||
|
||||
export const clearStorageAuthToken = storage => {
|
||||
storage.removeItem('token');
|
||||
storage.removeItem('exp');
|
||||
};
|
||||
+25
-1
@@ -22,6 +22,7 @@ import {
|
||||
} from 'coral-framework/services/storage';
|
||||
import { createHistory } from 'coral-framework/services/history';
|
||||
import { createIntrospection } from 'coral-framework/services/introspection';
|
||||
import { setStorageAuthToken } from 'coral-framework/services/auth';
|
||||
import introspectionData from 'coral-framework/graphql/introspection.json';
|
||||
import coreReducers from '../reducers';
|
||||
import { checkLogin as checkLoginAction } from '../actions/auth';
|
||||
@@ -46,7 +47,30 @@ const getAuthToken = (store, storage) => {
|
||||
// capable of storing the token in localStorage, then we would have
|
||||
// persisted it to the redux state.
|
||||
return state.config.auth_token || state.auth.token;
|
||||
} else if (!bowser.safari && !bowser.ios && storage) {
|
||||
} else if (location.hash && location.hash.startsWith('#access_token=')) {
|
||||
// Check to see if the access token is living in the URL as a hash.
|
||||
const token = location.hash.substring(14);
|
||||
|
||||
history.replaceState(
|
||||
{},
|
||||
document.title,
|
||||
window.location.pathname + window.location.search
|
||||
);
|
||||
|
||||
// Once we clear the hash above, this login method will not persist across
|
||||
// refreshes. We will need to persist the token to storage if it's
|
||||
// available.
|
||||
if (storage) {
|
||||
setStorageAuthToken(storage, token);
|
||||
}
|
||||
|
||||
return token;
|
||||
} else if (
|
||||
!bowser.safari &&
|
||||
!bowser.ios &&
|
||||
storage &&
|
||||
storage.getItem('token')
|
||||
) {
|
||||
// Use local storage auth tokens where there's a stable api.
|
||||
return storage.getItem('token');
|
||||
}
|
||||
|
||||
@@ -88,21 +88,23 @@ export function createClient(options = {}) {
|
||||
});
|
||||
|
||||
client.resetWebsocket = () => {
|
||||
// Close socket connection which will also unregister subscriptions on the server-side.
|
||||
wsClient.close();
|
||||
if (wsClient.client) {
|
||||
// Close socket connection which will also unregister subscriptions on the server-side.
|
||||
wsClient.close(true);
|
||||
|
||||
// Reconnect to the server.
|
||||
wsClient.connect();
|
||||
// Reconnect to the server.
|
||||
wsClient.connect();
|
||||
|
||||
// Reregister all subscriptions (uses non public api).
|
||||
// See: https://github.com/apollographql/subscriptions-transport-ws/issues/171
|
||||
Object.keys(wsClient.operations).forEach(id => {
|
||||
wsClient.sendMessage(
|
||||
id,
|
||||
MessageTypes.GQL_START,
|
||||
wsClient.operations[id].options
|
||||
);
|
||||
});
|
||||
// Re-register all subscriptions (uses non public api).
|
||||
// See: https://github.com/apollographql/subscriptions-transport-ws/issues/171
|
||||
Object.keys(wsClient.operations).forEach(id => {
|
||||
wsClient.sendMessage(
|
||||
id,
|
||||
MessageTypes.GQL_START,
|
||||
wsClient.operations[id].options
|
||||
);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return client;
|
||||
|
||||
@@ -12,6 +12,7 @@ import 'moment/locale/da';
|
||||
import 'moment/locale/de';
|
||||
import 'moment/locale/es';
|
||||
import 'moment/locale/fr';
|
||||
import 'moment/locale/it';
|
||||
import 'moment/locale/nl';
|
||||
import 'moment/locale/pt-br';
|
||||
|
||||
@@ -22,6 +23,7 @@ import daTA from 'timeago.js/locales/da';
|
||||
import deTA from 'timeago.js/locales/de';
|
||||
import esTA from 'timeago.js/locales/es';
|
||||
import frTA from 'timeago.js/locales/fr';
|
||||
import itTA from 'timeago.js/locales/it';
|
||||
import nlTA from 'timeago.js/locales/nl';
|
||||
import pt_BRTA from 'timeago.js/locales/pt_BR';
|
||||
import zh_CNTA from 'timeago.js/locales/zh_CN';
|
||||
@@ -34,6 +36,7 @@ import da from '../../../locales/da.yml';
|
||||
import de from '../../../locales/de.yml';
|
||||
import es from '../../../locales/es.yml';
|
||||
import fr from '../../../locales/fr.yml';
|
||||
import it from '../../../locales/it.yml';
|
||||
import nl_NL from '../../../locales/nl_NL.yml';
|
||||
import pt_BR from '../../../locales/pt_BR.yml';
|
||||
import zh_CN from '../../../locales/zh_CN.yml';
|
||||
@@ -61,6 +64,7 @@ export const translations = {
|
||||
...de,
|
||||
...es,
|
||||
...fr,
|
||||
...it,
|
||||
...nl_NL,
|
||||
...pt_BR,
|
||||
...zh_CN,
|
||||
@@ -106,6 +110,7 @@ export function setupTranslations() {
|
||||
ta.register('da', daTA);
|
||||
ta.register('de', deTA);
|
||||
ta.register('fr', frTA);
|
||||
ta.register('it', itTA);
|
||||
ta.register('nl_NL', nlTA);
|
||||
ta.register('pt_BR', pt_BRTA);
|
||||
ta.register('zh_CN', zh_CNTA);
|
||||
|
||||
@@ -30,7 +30,7 @@ const CONFIG = {
|
||||
ENABLE_TRACING: Boolean(process.env.APOLLO_ENGINE_KEY),
|
||||
|
||||
// EMAIL_SUBJECT_PREFIX is the string before emails in the subject.
|
||||
EMAIL_SUBJECT_PREFIX: process.env.TALK_EMAIL_SUBJECT_PREFIX || '[Talk]',
|
||||
EMAIL_SUBJECT_PREFIX: process.env.TALK_EMAIL_SUBJECT_PREFIX,
|
||||
|
||||
// DEFAULT_LANG is the default language used for server sent emails and
|
||||
// rendered text.
|
||||
@@ -271,6 +271,10 @@ const CONFIG = {
|
||||
// CONFIG VALIDATION
|
||||
//==============================================================================
|
||||
|
||||
if (typeof CONFIG.EMAIL_SUBJECT_PREFIX === 'undefined') {
|
||||
CONFIG.EMAIL_SUBJECT_PREFIX = '[Talk]';
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
if (!CONFIG.ROOT_URL) {
|
||||
CONFIG.ROOT_URL = `http://${localAddress}:3001`;
|
||||
|
||||
@@ -98,12 +98,16 @@ sidebar:
|
||||
url: /configuration/
|
||||
- title: Advanced Configuration
|
||||
url: /advanced-configuration/
|
||||
- title: Configuration with CLI tools
|
||||
url: /configuration-cli-tools/
|
||||
- title: Integrating
|
||||
children:
|
||||
- title: Authentication
|
||||
url: /integrating/authentication/
|
||||
- title: Asset Management
|
||||
url: /integrating/asset-management/
|
||||
- title: Asset Scraping
|
||||
url: /integrating/asset-scraping/
|
||||
- title: Configuring the Comment Stream
|
||||
url: /integrating/configuring-comment-stream/
|
||||
- title: Configuring the Admin
|
||||
|
||||
@@ -246,6 +246,21 @@ Refer to the documentation for [TALK_JWT_ALG](#talk-jwt-alg) for other signing
|
||||
methods and other forms of the `TALK_JWT_SECRET`. If you are interested in using
|
||||
multiple keys, then refer to [TALK_JWT_SECRETS](#talk-jwt-secrets).
|
||||
|
||||
You can also encode your secret as a base64 string (if you are using a symmetric
|
||||
algorithm) as long as you prefix it with `base64:`. For example:
|
||||
|
||||
```plain
|
||||
TALK_JWT_SECRET={"secret": "base64:dGVzdA=="}
|
||||
```
|
||||
|
||||
Would be the same as:
|
||||
|
||||
```plain
|
||||
TALK_JWT_SECRET={"secret": "test"}
|
||||
```
|
||||
|
||||
As `dGVzdA==` is just `test` encoded using base64.
|
||||
|
||||
## TALK_JWT_SECRETS
|
||||
|
||||
Used when specifying multiple secrets used for key rotations. This is a JSON
|
||||
@@ -271,7 +286,6 @@ Note that the secret is stored in a JSON object, keyed by `secret`. This is only
|
||||
needed when specifying in the multiple secrets for `TALK_JWT_SECRETS`, but may
|
||||
be used to specify the single [TALK_JWT_SECRET](#talk-jwt-secret).
|
||||
|
||||
|
||||
When the value of [TALK_JWT_ALG](#talk-jwt-alg) is **not** a `HS*` value, then
|
||||
the value of the `TALK_JWT_SECRETS` should take the form:
|
||||
|
||||
@@ -282,7 +296,6 @@ TALK_JWT_SECRETS=[{"kid": "1", "private": "<my private key>", "public": "<my pub
|
||||
Refer to the documentation on the [TALK_JWT_ALG](#talk-jwt-alg) for more
|
||||
information on what to store in these parameters.
|
||||
|
||||
|
||||
## TALK_JWT_SIGNING_COOKIE_NAME
|
||||
|
||||
The default cookie name that is use to set a cookie containing a JWT that was
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
---
|
||||
title: Configuration with CLI tools
|
||||
permalink: /configuration-cli-tools/
|
||||
class: configuration
|
||||
toc: true
|
||||
---
|
||||
|
||||
Talk can be configured using CLI tools. The CLI tools are available through `./bin/cli`. Below is a list of commands available:
|
||||
```
|
||||
Usage: cli [options] [command]
|
||||
|
||||
Options:
|
||||
|
||||
-h, --help output usage information
|
||||
|
||||
Commands:
|
||||
|
||||
serve serve the application
|
||||
db run database commands
|
||||
settings interact with the application settings
|
||||
assets interact with assets
|
||||
setup setup the application
|
||||
jobs work with the job queues
|
||||
token work with the access tokens
|
||||
users work with the application auth
|
||||
migration provides utilities for migrating the database
|
||||
plugins provides utilities for interacting with the plugin system
|
||||
help [cmd] display help for [cmd]
|
||||
```
|
||||
|
||||
## Serving the application
|
||||
To serve the application, run `./bin/cli serve`. Please check that you have installed the Talk before doing this step. Below is a list of additional options available for this command:
|
||||
```
|
||||
Usage: cli-serve [options]
|
||||
|
||||
Options:
|
||||
|
||||
-j, --jobs enable job processing on this thread
|
||||
--disabled-jobs <jobs> disable jobs specified if the -j option is passed, specified as a comma separated list (default: )
|
||||
-w, --websockets enable the websocket (subscriptions) handler on this thread
|
||||
-h, --help output usage information
|
||||
```
|
||||
|
||||
## Database commands
|
||||
You can also run database commands using `./bin/cli db`. Below is a list of additional options available for this command:
|
||||
```
|
||||
Usage: cli-db [options] [command]
|
||||
|
||||
Options:
|
||||
|
||||
-h, --help output usage information
|
||||
|
||||
Commands:
|
||||
|
||||
createIndexes creates the database indexes and waits until they are created
|
||||
```
|
||||
|
||||
## Application settings
|
||||
You can also change application settings using `./bin/cli settings`. Below is a list of additional options available for this command:
|
||||
```
|
||||
Usage: cli-settings [options] [command]
|
||||
|
||||
Options:
|
||||
|
||||
-h, --help output usage information
|
||||
|
||||
Commands:
|
||||
|
||||
change-org-name change the organization name
|
||||
```
|
||||
|
||||
## Interaction with assets
|
||||
You can also interact with your application's assets using `./bin/cli assets`. Below is a list of additional options available for this command:
|
||||
```
|
||||
Usage: cli-assets [options] [command]
|
||||
|
||||
Options:
|
||||
|
||||
-h, --help output usage information
|
||||
|
||||
Commands:
|
||||
|
||||
list [options] list all the assets in the database
|
||||
refresh [age] queues the assets that exceed the age requested
|
||||
update-url <assetID> <url> update the URL of an asset
|
||||
merge <srcID> <dstID> merges two assets together by moving comments from src to dst and deleting the src asset
|
||||
rewrite [options] <search> <replace> rewrites asset url's using the provided regex replacement pattern
|
||||
```
|
||||
|
||||
## Setting up the application
|
||||
You can also run a setup wizard to setup the wizard using `./bin/cli setup`. Below is a list of additional options available for this command:
|
||||
```
|
||||
Usage: cli-setup [options]
|
||||
|
||||
runs the setup wizard to setup the application
|
||||
|
||||
Options:
|
||||
|
||||
--defaults apply defaults for config instead of prompting
|
||||
-h, --help output usage information
|
||||
```
|
||||
|
||||
## Working with job queues
|
||||
You can also work with job queues using `./bin/cli jobs`. Below is a list of additional options available for this command:
|
||||
```
|
||||
Usage: cli-jobs [options] [command]
|
||||
|
||||
Options:
|
||||
|
||||
-h, --help output usage information
|
||||
|
||||
Commands:
|
||||
|
||||
process starts job processing
|
||||
cleanup [options] cleans up inactive jobs
|
||||
```
|
||||
|
||||
## Working with access tokens
|
||||
You can also work with access tokens using `./bin/cli token`. Below is a list of additional options available for this command:
|
||||
```
|
||||
Usage: cli-token [options] [command]
|
||||
|
||||
Options:
|
||||
|
||||
-h, --help output usage information
|
||||
|
||||
Commands:
|
||||
|
||||
list <userID> list tokens for a user
|
||||
revoke <tokenID> revokes a token with a given id
|
||||
create <userID> <tokenName> create a token for a user with a given name
|
||||
```
|
||||
|
||||
## Working with your application's authentication
|
||||
You can also work with your application's authentication using `./bin/cli users`. Below is a list of additional options available for this command:
|
||||
```
|
||||
Usage: cli-users [options] [command]
|
||||
|
||||
Options:
|
||||
|
||||
-h, --help output usage information
|
||||
|
||||
Commands:
|
||||
|
||||
create creates a local user
|
||||
delete <userID> delete a user
|
||||
list searches for a user based on their stored username and email
|
||||
set-role <userID> sets the role on a user
|
||||
verify <userID> <email> verifies the given user's email address
|
||||
```
|
||||
|
||||
## Migrating your database
|
||||
Talk provides utilities for migrating your database using `./bin/cli migration`. Below is a list of additional options available for this command:
|
||||
```
|
||||
Usage: cli-migration [options] [command]
|
||||
|
||||
Options:
|
||||
|
||||
-h, --help output usage information
|
||||
|
||||
Commands:
|
||||
|
||||
create <name> creates a new migration
|
||||
run [options] runs all pending migrations
|
||||
```
|
||||
|
||||
## Interacting with the plugin system
|
||||
Talk provides utilities to interact with the plugin system using `./bin/cli plugins`. Below is a list of additional options available for this command:
|
||||
```
|
||||
Usage: cli-plugins [options] [command]
|
||||
|
||||
Options:
|
||||
|
||||
-h, --help output usage information
|
||||
|
||||
Commands:
|
||||
|
||||
create creates a seed plugin
|
||||
list
|
||||
reconcile [options] reconciles dependencies by downloading external plugins
|
||||
```
|
||||
@@ -5,7 +5,7 @@ permalink: /moderator-features/
|
||||
|
||||
## The Talk Admin
|
||||
|
||||
The Admin is your moderators will moderate your comments, and your Admins will
|
||||
The Admin is where your moderators will moderate your comments, and your Admins will
|
||||
configure and manage the different parts of Talk.
|
||||
|
||||
### Moderate
|
||||
@@ -18,57 +18,99 @@ site-wide.
|
||||
|
||||
**New**
|
||||
|
||||
The New queue contains all comments that have not been moderated yet.
|
||||
>_Conditions:_ Pre-Mod disabled
|
||||
|
||||
**Reported**
|
||||
Comments have been published? _**Yes**_
|
||||
|
||||
The Reported queue contains all comments that need moderator attention.
|
||||
The New queue contains all comments that have not been moderated yet. This queue contains comments that haven’t yet been Accepted or Rejected by a moderator
|
||||
|
||||
**Approved**
|
||||
**Pre-mod**
|
||||
|
||||
The Approved queue contains all approved comments.
|
||||
>_Conditions:_ Pre-Mod enabled
|
||||
|
||||
Comments have been published? _**No**_
|
||||
|
||||
This queue contains comments that haven’t yet been Accepted or Rejected by a moderator
|
||||
|
||||
**Accepted**
|
||||
|
||||
Comments have been published? _**Yes**_
|
||||
|
||||
Comments that have been approved by a moderator, written by a Staff member (and so auto approved), or Featured (and so auto approved). Tags for reports still appear on comments in this queue, but the comments will not go back into Reported.
|
||||
|
||||
**Rejected**
|
||||
|
||||
The Rejected queue contains all comments that have been rejected, either
|
||||
manually by moderators or automatically, e.g. they have used a banned word.
|
||||
Comments have been published? _**No**_
|
||||
|
||||
Comments that have been rejected by a moderator, or rejected because they contained a banned word/phrase. Tags for reports still appear on comments in this queue, but the comments will not go back into Reported.
|
||||
|
||||
|
||||
**Reported**
|
||||
|
||||
>_Conditions:_ Pre-Mod disabled
|
||||
|
||||
Comments have been published? _**depends**_
|
||||
|
||||
This queue contains comments that have been reported for moderator review, either by users or automatically by Talk, and have not yet been Approved or Rejected. If there are comments to review in this queue, a red dot will be displayed in the top menu.
|
||||
|
||||
**All**
|
||||
|
||||
The All queue contains all comments that have been submitted either article or
|
||||
site-wide.
|
||||
|
||||
#### Moderation Badges
|
||||
#### Moderation Tags that appear in Reported/other queues
|
||||
|
||||
**Pre-mod**
|
||||
|
||||
The Pre-mod badge signifies comments that are being pre-modded.
|
||||
_Comment published? No_
|
||||
|
||||
The Pre-mod tag signifies comments that are being pre-modded.
|
||||
|
||||
**User**
|
||||
|
||||
The User badge signifies comments that have been reported by another user.
|
||||
_Comment published? Yes_
|
||||
|
||||
**History**
|
||||
Comment has been reported by a user. The ‘More Details’ box contains the name/s of the users who reported the comment, and any additional information they provided.
|
||||
|
||||
**Staff**
|
||||
|
||||
_Comment published? Yes_
|
||||
|
||||
Comment has been reported by a staff member. The ‘More Details’ box contains the name/s of the staff member who reported the comment, and any additional information they provided.
|
||||
|
||||
**Suspect Word**
|
||||
|
||||
_Comment published? Yes_
|
||||
|
||||
Comment contains a word or phrase that is on the ’Suspect words’ list in the Configure > Moderation tab (administrators only). The word/phrase will be highlighted in yellow.
|
||||
|
||||
**Karma**
|
||||
|
||||
_Comment published? No_
|
||||
|
||||
The History tag signifies comments that have been flagged because the user’s history indicates their Accepted:Rejected ratio has reached below the karma threshold. [Read more about karma here.](/talk/trust/#user-karma-score)
|
||||
|
||||
**Spam**
|
||||
|
||||
_Comment published? No_
|
||||
|
||||
If you are using the Akismet anti-spam plugin, this tag means that Akismet has flagged the comment as spam. You must Approve it for it to appear in the stream. **Requires:** [talk-plugin-akismet](/talk/plugin/talk-plugin-akismet/)
|
||||
|
||||
The History badge signifies comments that have been flagged because of a user’s
|
||||
history.
|
||||
|
||||
**Toxic**
|
||||
|
||||
The Toxic badge signifies comments that are above the set Toxicity Probability
|
||||
Threshold. Note you must have [talk-plugin-toxic-comments](/talk/additional-plugins/#talk-plugin-toxic-comments) enabled.
|
||||
[Read more about Toxic Comments here](/talk/toxic-comments/).
|
||||
_Comment published? No_
|
||||
|
||||
**Suspect**
|
||||
If you are using the Toxic Comments plugin, this tag means that Perspective API has flagged the comment as likely to be toxic, above the threshold you have set (default: 80%). You must Approve it for it to appear in the stream. **Requires:** [talk-plugin-toxic-comments](/talk/additional-plugins/#talk-plugin-toxic-comments).
|
||||
Read more about [Toxic Comments here](/talk/toxic-comments/).
|
||||
|
||||
The Suspect badge signifies comments that contain a Suspect Word.
|
||||
|
||||
**Contains Link**
|
||||
|
||||
The Contains Link badge signifies a comment that contains a link, which can
|
||||
The Contains Link tag signifies a comment that contains a link, which can
|
||||
sometimes mean it is a spam or ad comment.
|
||||
|
||||
**Flag Details View**
|
||||
**More Details View**
|
||||
|
||||
At the bottom of each comment in the moderation queues, you can see more
|
||||
information about a comment’s flags by clicking on More Detail.
|
||||
@@ -88,9 +130,35 @@ Rejecting a comment removes the comment from the stream.
|
||||
Featuring a comment adds that comment to the Featured Comments tab on the
|
||||
stream.
|
||||
|
||||
#### Keyboard Shortcuts
|
||||
|
||||
Talk also supports a number of keyboard shortcuts that moderators can leverage
|
||||
to moderate queues quickly:
|
||||
|
||||
| Shortcut | Action |
|
||||
| -------- | -------------------------- |
|
||||
| `j` | Go to the next comment |
|
||||
| `k` | Go to the previous comment |
|
||||
| `ctrl+f` | Open search |
|
||||
| `1-5` | Switch queues |
|
||||
| `z` | Zen mode |
|
||||
| `?` | Open shortcuts menu |
|
||||
| `d` | Approve |
|
||||
| `f` | Reject |
|
||||
|
||||
Note: "Zen mode" allows a moderator to view and action only one comment at a time. Enjoy the silence!
|
||||
|
||||
#### The User Drawer
|
||||
|
||||
In order to get an idea of what sort of a commenter someone is, moderators can
|
||||
click on the commenter's username in any moderation queue/elsewhere in the admin (eg the Community page) to see details about
|
||||
their comments, and to take actions.
|
||||
|
||||
#### User Drawer Actions
|
||||
|
||||
**Suspend User**
|
||||
|
||||
Suspending a user allows a moderator to give a commenter a “time-out”; during
|
||||
Suspending a user allows a moderator to give a commenter a “time-out” for a set time chosen from four options; during
|
||||
that time they won’t be allowed to post comments or react to comments.
|
||||
|
||||
**Ban User**
|
||||
@@ -99,15 +167,13 @@ Banning a user allows a moderator to permanently disallow a commenter to
|
||||
interact with their community. The commenters previous comments will remain on
|
||||
the site. This action can only be un-done manually by a moderator.
|
||||
|
||||
#### Viewing a User’s Comment History
|
||||
**Reject Username**
|
||||
|
||||
In order to get an idea of what sort of a commenter someone is, moderators can
|
||||
click on the commenters username in any moderation queue and see details about
|
||||
their history.
|
||||
If a username is violating your guidelines but isn't bad enough to lead to a ban (eg. they are impersonating a famous person), you can reject their username. This will prevent them from publishing comments until they submit a new username. The new name will appear on the Community page for moderator approval before they can publish comments again.
|
||||
|
||||
**Username, Email and Member Since Date**
|
||||
|
||||
This shows the basic details about a commenter.
|
||||
This shows the basic details about a commenter's account
|
||||
|
||||
**Total Comments**
|
||||
|
||||
@@ -119,32 +185,17 @@ display on the site.
|
||||
This shows the % of comments a commenter has had rejected by moderators, or
|
||||
automatically.
|
||||
|
||||
**Reports**
|
||||
**Karma score**
|
||||
|
||||
This shows if a commenter is a reliable flagger, an unreliable flagger, or a
|
||||
neutral flagger. [Read more about reliable and unreliable flaggers here](/talk/trust/#reliable-and-unreliable-flaggers).
|
||||
The user's current score. To see the default threshhold, click on the 'i' next to the word Karma. If the user's score is equal to or below the default threshhold, the number will be highlighted red. [Read more about karma scores here.](/talk/trust/#user-karma-score)
|
||||
|
||||
**User History**
|
||||
|
||||
This shows the history of the account - if a user has changed their username, or been suspended or banned. The name of the moderator who suspended/banned them/lifted the suspection or ban is displayed here as well.
|
||||
|
||||
**Moderating from this View**
|
||||
|
||||
Talk also allows you to moderate a commenters recent comments from this view.
|
||||
|
||||
#### Keyboard Shortcuts
|
||||
|
||||
Talk also supports a number of keyboard shortcuts that moderators can leverage
|
||||
to moderate quickly:
|
||||
|
||||
| Shortcut | Action |
|
||||
| -------- | -------------------------- |
|
||||
| `j` | Go to the next comment |
|
||||
| `k` | Go to the previous comment |
|
||||
| `ctrl+f` | Open search |
|
||||
| `t` | Switch queues |
|
||||
| `z` | Zen mode |
|
||||
| `?` | Open this menu |
|
||||
| `d` | Approve |
|
||||
| `f` | Reject |
|
||||
|
||||
Note: "Zen mode" allows a moderator to view and action only one comment at a time. Enjoy the silence!
|
||||
Talk also allows you to moderate a commenters recent comments from this view. You can 'Select all' to select up to ten previous comments, and take bulk accept/reject actions.
|
||||
|
||||
### Stories
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Trust is a set of components within Talk that incorporate basic automated modera
|
||||
|
||||
## User Karma Score
|
||||
|
||||
Using Trust’s calculations, Talk will automatically hold back, move to the Reported queue, and tag with a 'History' marker, any comments by users who have an Unreliable karma score. (This is for sites who practice post-moderation. If you set pre-moderation of all comments sitewide, this feature has limited use.)
|
||||
Using Trust’s calculations, Talk will automatically hold back, move to the Reported queue, and tag with a 'Karma' marker, any comments by users who have an Unreliable karma score. (This is for sites who practice post-moderation. If you set pre-moderation of all comments sitewide, this feature has limited use.)
|
||||
|
||||
All users start out with a Neutral karma score (`0`). If they have a comment approved by a moderator, their score increases by `1`; if they have a comment rejected by a moderator, it decreases by `1`. When a commenter's score is labeled as Unreliable, their comments must be approved from the Reported queue before they are posted. Commenters are shown a message stating that a moderator will review their comment shortly.
|
||||
|
||||
@@ -27,29 +27,3 @@ We strongly recommend not telling your community how this system works, or where
|
||||
|
||||
If you see that a high proportion of first-time commenters on your site are abusive, you might want to change the threshhold to `0`, at least temporarily. You can configure your own Trust thresholds by using [TRUST_THRESHOLDS](/talk/advanced-configuration/#trust-thresholds) in your site configuration.
|
||||
|
||||
|
||||
## Reliable and Unreliable Flaggers
|
||||
|
||||
Trust also calculates how reliable users are in terms of the comments they
|
||||
report. This information is displayed to moderators in the User History drawer,
|
||||
which is accessed by clicking on a user’s name in the Admin. Currently, no other action is taken based on this score.
|
||||
|
||||
If a user's reports mostly match what moderators reject, their Report status
|
||||
will display to moderators as Reliable in the user information drawer. If a
|
||||
user's reports mostly differ from what moderators reject, their Report status
|
||||
will show as Unreliable.
|
||||
|
||||
If Talk doesn't have enough reports to make a call, or the reports even out, their
|
||||
status is Neutral.
|
||||
|
||||
Here are the default thresholds:
|
||||
|
||||
```text
|
||||
-1 and lower: Unreliable
|
||||
0 to +1: Neutral
|
||||
+2 and higher: Reliable
|
||||
```
|
||||
You can configure your own Trust thresholds by using [TRUST_THRESHOLDS](/talk/advanced-configuration/#trust-thresholds) in your
|
||||
configuration.
|
||||
|
||||
Note: Report Karma doesn't include reports of "I don't agree with this comment".
|
||||
|
||||
@@ -15,7 +15,7 @@ Even if GDPR will not apply to you, it is recommended to enable these
|
||||
features as a best practice to provide your users with control over their own
|
||||
data.
|
||||
|
||||
## GPDR Feature Overview
|
||||
## GDPR Feature Overview
|
||||
|
||||
Integrating our GDPR tools will give your users and organizations the following benefits:
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
title: Asset Scraping
|
||||
permalink: /integrating/asset-scraping/
|
||||
---
|
||||
|
||||
By default, Assets in Talk have their metadata scraped when they are loaded.
|
||||
This provides the easiest way for newsrooms to integrate their CMS's into Talk
|
||||
in a simple way. We use the following
|
||||
[meta tags](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta) on
|
||||
the target pages that allow us to extract some properties.
|
||||
|
||||
| Asset Property | Selector |
|
||||
|--------------------|----------|
|
||||
| `title` | See [`metascraper-title`](https://github.com/microlinkhq/metascraper/blob/dc664c37ea1b238b1e3e9d5342edfacc9027892c/packages/metascraper-title/index.js) |
|
||||
| `description` | See [`metascraper-description`](https://github.com/microlinkhq/metascraper/blob/dc664c37ea1b238b1e3e9d5342edfacc9027892c/packages/metascraper-description/index.js) |
|
||||
| `image` | See [`metascraper-image`](https://github.com/microlinkhq/metascraper/blob/dc664c37ea1b238b1e3e9d5342edfacc9027892c/packages/metascraper-image/index.js) |
|
||||
| `author` | See [`metascraper-author`](https://github.com/microlinkhq/metascraper/blob/dc664c37ea1b238b1e3e9d5342edfacc9027892c/packages/metascraper-author/index.js) |
|
||||
| `publication_date` | See [`metascraper-date`](https://github.com/microlinkhq/metascraper/blob/dc664c37ea1b238b1e3e9d5342edfacc9027892c/packages/metascraper-date/index.js) |
|
||||
| `modified_date` | `meta[property="article:modified"]` |
|
||||
| `section` | `meta[property="article:section"]` |
|
||||
|
||||
You can use the `./bin/cli assets debug <url>` to print the scraped metadata
|
||||
from that URL. For example:
|
||||
|
||||
```bash
|
||||
$ ./bin/cli assets debug https://www.washingtonpost.com/technology/2018/10/30/apple-event-october-ipad-pro-macbook-air/
|
||||
┌──────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Property │ Value │
|
||||
├──────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ title │ Apple redesigns the iPad Pro, breathes new life in the MacBook Air │
|
||||
├──────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ description │ Apple is unveiling new iPads and MacBooks at an event in New York starting at 10 a.m. Fowler is there and will report in with the news and hands-on analysis throughout the day. │
|
||||
├──────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ image │ https://www.washingtonpost.com/resizer/JAwNQE2alL2JjiWrbXeJ46wZHqA=/1484x0/arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/G5TWBFW4LAI6RC5MX7QB7TODUY.jpg │
|
||||
├──────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ author │ Geoffrey A. Fowler │
|
||||
├──────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ publication_date │ 2018-10-30T10:40:00.000Z │
|
||||
├──────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ modified_date │ │
|
||||
├──────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ section │ │
|
||||
└──────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
@@ -343,6 +343,20 @@ class ErrCommentTooShort extends TalkError {
|
||||
}
|
||||
}
|
||||
|
||||
// ErrCommentTooLong is returned when the comment is too long.
|
||||
class ErrCommentTooLong extends TalkError {
|
||||
constructor(length, allowed) {
|
||||
super(
|
||||
'Comment was too long',
|
||||
{
|
||||
translation_key: 'COMMENT_TOO_LONG',
|
||||
status: 400,
|
||||
},
|
||||
{ length, allowed }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// ErrAssetURLAlreadyExists is returned when a rename operation is requested
|
||||
// but an asset already exists with the new url.
|
||||
class ErrAssetURLAlreadyExists extends TalkError {
|
||||
@@ -413,13 +427,15 @@ module.exports = {
|
||||
ErrAssetURLAlreadyExists,
|
||||
ErrAuthentication,
|
||||
ErrCannotIgnoreStaff,
|
||||
ErrCommentTooShort,
|
||||
ErrCommentingDisabled,
|
||||
ErrCommentTooLong,
|
||||
ErrCommentTooShort,
|
||||
ErrContainsProfanity,
|
||||
ErrEditWindowHasEnded,
|
||||
ErrEmailAlreadyVerified,
|
||||
ErrEmailTaken,
|
||||
ErrEmailVerificationToken,
|
||||
ErrHTTPNotFound,
|
||||
ErrInstallLock,
|
||||
ErrInvalidAssetURL,
|
||||
ErrLoginAttemptMaximumExceeded,
|
||||
@@ -441,5 +457,4 @@ module.exports = {
|
||||
ErrSpecialChars,
|
||||
ErrUsernameTaken,
|
||||
ExtendableError,
|
||||
ErrHTTPNotFound,
|
||||
};
|
||||
|
||||
@@ -4,7 +4,11 @@ const { SEARCH_OTHER_USERS } = require('../../perms/constants');
|
||||
const { escapeRegExp } = require('../../services/regex');
|
||||
|
||||
const mergeState = (query, state) => {
|
||||
const { status } = state;
|
||||
const { role, status } = state;
|
||||
|
||||
if (role) {
|
||||
query.merge({ role });
|
||||
}
|
||||
|
||||
if (status) {
|
||||
const { username, banned, suspended } = status;
|
||||
|
||||
@@ -189,6 +189,7 @@ type UserStatus {
|
||||
}
|
||||
|
||||
input UserStateInput {
|
||||
role: USER_ROLES
|
||||
status: UserStatusInput
|
||||
}
|
||||
|
||||
|
||||
+3
-62
@@ -3,59 +3,7 @@ const scraper = require('../../services/scraper');
|
||||
const Assets = require('../../services/assets');
|
||||
const { createLogger } = require('../../services/logging');
|
||||
const logger = createLogger('jobs:scraper');
|
||||
const fetch = require('node-fetch');
|
||||
const { merge } = require('lodash');
|
||||
const { version } = require('../../package.json');
|
||||
const { SCRAPER_HEADERS, SCRAPER_PROXY_URL } = require('../../config');
|
||||
const ProxyAgent = require('proxy-agent');
|
||||
|
||||
// Load the scraper with the rules.
|
||||
const metascraper = require('metascraper').load([
|
||||
require('metascraper-title')(),
|
||||
require('metascraper-description')(),
|
||||
require('metascraper-image')(),
|
||||
require('metascraper-author')(),
|
||||
require('metascraper-date')(),
|
||||
require('./rules/modified')(),
|
||||
require('./rules/section')(),
|
||||
]);
|
||||
|
||||
let customHeaders = {};
|
||||
try {
|
||||
customHeaders = JSON.parse(SCRAPER_HEADERS);
|
||||
} catch (err) {
|
||||
console.error('Cannot parse TALK_SCRAPER_HEADERS');
|
||||
throw err;
|
||||
}
|
||||
|
||||
// Parse the headers to be added to the scraper.
|
||||
const headers = merge(
|
||||
{
|
||||
'User-Agent': `Coral-Talk/${version}`,
|
||||
},
|
||||
customHeaders
|
||||
);
|
||||
|
||||
// Add proxy configuration if exists.
|
||||
const agent = SCRAPER_PROXY_URL ? new ProxyAgent(SCRAPER_PROXY_URL) : null;
|
||||
|
||||
/**
|
||||
* Scrapes the given asset for metadata.
|
||||
*/
|
||||
async function scrape({ url }) {
|
||||
const res = await fetch(url, {
|
||||
headers,
|
||||
agent,
|
||||
});
|
||||
const html = await res.text();
|
||||
|
||||
// Get the metadata from the scraped html.
|
||||
const metadata = await metascraper({
|
||||
html,
|
||||
url,
|
||||
});
|
||||
return metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an Asset based on scraped asset metadata.
|
||||
@@ -64,16 +12,9 @@ function update(id, meta) {
|
||||
return Asset.update(
|
||||
{ id },
|
||||
{
|
||||
$set: {
|
||||
title: meta.title || '',
|
||||
description: meta.description || '',
|
||||
image: meta.image ? meta.image : '',
|
||||
author: meta.author || '',
|
||||
publication_date: meta.date || '',
|
||||
modified_date: meta.modified || '',
|
||||
section: meta.section || '',
|
||||
$set: merge(meta, {
|
||||
scraped: new Date(),
|
||||
},
|
||||
}),
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -95,7 +36,7 @@ module.exports = () => {
|
||||
}
|
||||
|
||||
// Scrape the metadata from the asset.
|
||||
const meta = await scrape(asset);
|
||||
const meta = await scraper.scrape(asset.url);
|
||||
|
||||
log.info('Finished scraping');
|
||||
|
||||
|
||||
+3
-3
@@ -130,8 +130,8 @@ ar:
|
||||
enable_questionbox: 'اطرح سؤال على القراء'
|
||||
enable_questionbox_description: 'هذا السؤال سيظهر في الجزء العلوي من جدول التعليقات هذا. اسأل القراء عن مسألة معينة في المقال او اطرح أسئلة نقاشية.. الخ.'
|
||||
hours: ساعات
|
||||
include_comment_stream: 'ادراج وصف جدول التعليقات للقراء'
|
||||
include_comment_stream_desc: 'اكتب رسالة ليتم إضافتها إلى الجزء العلوي من جدول التعليقات. ضع موضوعا، اشمل القواعد الإرشادية للمجموعة .. الخ'
|
||||
code_of_conduct_summary: 'ادراج وصف جدول التعليقات للقراء'
|
||||
code_of_conduct_summary_desc: 'اكتب رسالة ليتم إضافتها إلى الجزء العلوي من جدول التعليقات. ضع موضوعا، اشمل القواعد الإرشادية للمجموعة .. الخ'
|
||||
include_question_here: 'اكتب سؤالك هنا:'
|
||||
include_text: 'ادرج النص هنا.'
|
||||
moderate: اشرف
|
||||
@@ -225,6 +225,7 @@ ar:
|
||||
CANNOT_IGNORE_STAFF: 'لا يمكن تجاهل الموظفين.'
|
||||
COMMENT_PARENT_NOT_VISIBLE: 'التعليق الذي ترد عليه تمت إزالته أو غير موجود.'
|
||||
COMMENT_TOO_SHORT: 'يجب أن تكون التعليقات أكثر من حرف واحد، يرجى مراجعة تعليقك وإعادة المحاولة.'
|
||||
COMMENT_TOO_LONG: 'يتجاوز النص الحد الأقصى للطول المسموح'
|
||||
COMMENTING_CLOSED: 'تم إغلاق فاعلية التعليق'
|
||||
COMMENTING_DISABLED: 'التعليق معطّل حاليًا على هذا الموقع'
|
||||
confirm_password: 'كلمات المرور غير متطابقة. يرجى التحقق مرة أخرى'
|
||||
@@ -281,7 +282,6 @@ ar:
|
||||
reasons:
|
||||
comment:
|
||||
banned_word: 'كلمة محظورة'
|
||||
body_count: 'يتجاوز النص الحد الأقصى للطول المسموح'
|
||||
comment_noagree: أعارض
|
||||
comment_offensive: مسيء
|
||||
comment_other: آخر
|
||||
|
||||
+3
-3
@@ -123,8 +123,8 @@ da:
|
||||
enable_questionbox: 'Stil et spørgsmål til læserne'
|
||||
enable_questionbox_description: 'Dette spørgsmål vises øverst i denne kommentarstrøm. Stil et spørgsmål til læserne om et bestemt problem i artiklen eller stil spørgsmål til diskussion mv.'
|
||||
hours: Timer
|
||||
include_comment_stream: 'Inkluder kommentarstrømmens beskrivelse for læsere'
|
||||
include_comment_stream_desc: 'Skriv en besked, der skal tilføjes øverst i din kommentarstrøm. Indsæt et emne der omfatter fællesskabsretningslinjer mv.'
|
||||
code_of_conduct_summary: 'Inkluder kommentarstrømmens beskrivelse for læsere'
|
||||
code_of_conduct_summary_desc: 'Skriv en besked, der skal tilføjes øverst i din kommentarstrøm. Indsæt et emne der omfatter fællesskabsretningslinjer mv.'
|
||||
include_question_here: 'Stil dit spørgsmål her:'
|
||||
include_text: 'Medtag din tekst her.'
|
||||
moderate: Moderat
|
||||
@@ -197,6 +197,7 @@ da:
|
||||
CANNOT_IGNORE_STAFF: 'Kan ikke ignorere personale.'
|
||||
COMMENT_PARENT_NOT_VISIBLE: 'Den kommentar, du svarer på er blevet fjernet eller eksisterer ikke.'
|
||||
COMMENT_TOO_SHORT: 'Din kommentar skal indeholde noget'
|
||||
COMMENT_TOO_LONG: 'Body overstiger max længde'
|
||||
COMMENTING_CLOSED: 'Kommentering er allerede lukket'
|
||||
confirm_password: 'Kodeordene matcher ikke. Tjek venligst igen.'
|
||||
EDIT_USERNAME_NOT_AUTHORIZED: 'Du har ikke tilladelse til at opdatere dit brugernavn.'
|
||||
@@ -238,7 +239,6 @@ da:
|
||||
reasons:
|
||||
comment:
|
||||
banned_word: 'Forbudt ord'
|
||||
body_count: 'Body overstiger max længde'
|
||||
comment_noagree: Uenig
|
||||
comment_offensive: Offensiv
|
||||
comment_other: Andre
|
||||
|
||||
+3
-3
@@ -132,8 +132,8 @@ de:
|
||||
enable_questionbox: 'Stellen Sie den Lesern eine Frage'
|
||||
enable_questionbox_description: 'Diese Frage erscheint am Anfang des Kommentarbereichs. Regen Sie eine Diskussion an.'
|
||||
hours: Stunden
|
||||
include_comment_stream: 'Einleitung zum Kommentarbereich'
|
||||
include_comment_stream_desc: 'Verfassen Sie eine Einleitung, die über jedem Kommentarbereich erscheint. Nützlich z.B. für Community-Richtlinien.'
|
||||
code_of_conduct_summary: 'Einleitung zum Kommentarbereich'
|
||||
code_of_conduct_summary_desc: 'Verfassen Sie eine Einleitung, die über jedem Kommentarbereich erscheint. Nützlich z.B. für Community-Richtlinien.'
|
||||
include_question_here: 'Stellen Sie Ihre Frage hier:'
|
||||
include_text: 'Fügen Sie Ihren Text hier ein.'
|
||||
moderate: Moderieren
|
||||
@@ -224,6 +224,7 @@ de:
|
||||
CANNOT_IGNORE_STAFF: 'Mitarbeiter können nicht ignoriert werden.'
|
||||
COMMENT_PARENT_NOT_VISIBLE: 'Der Kommentar, auf den Sie antworten möchten, wurde entfernt oder existiert nicht.'
|
||||
COMMENT_TOO_SHORT: 'Kommentare sollten mehr als ein Zeichen enthalten, bitte überprüfen Sie Ihren Kommentar und probieren Sie es erneut.'
|
||||
COMMENT_TOO_LONG: 'Text überschreitet Zeichenlimit'
|
||||
COMMENTING_CLOSED: 'Kommentarbereich ist bereits geschlossen'
|
||||
COMMENTING_DISABLED: 'Die Kommentarfunktion ist derzeit abgeschaltet'
|
||||
confirm_password: 'Passwörter nicht identisch. Bitte erneut überprüfen'
|
||||
@@ -273,7 +274,6 @@ de:
|
||||
reasons:
|
||||
comment:
|
||||
banned_word: 'Unzulässiges Wort'
|
||||
body_count: 'Text überschreitet Zeichenlimit'
|
||||
comment_noagree: 'Andere Meinung'
|
||||
comment_offensive: Unangemessen
|
||||
comment_other: Anderes
|
||||
|
||||
+10
-4
@@ -48,6 +48,7 @@ en:
|
||||
comment_post_notif_premod: 'Thank you for posting. Our moderation team will review your comment shortly.'
|
||||
comment_singular: Comment
|
||||
common:
|
||||
contains_link: 'Contains Link'
|
||||
copy: Copy
|
||||
copied: 'Copied'
|
||||
notsupported: 'Not supported'
|
||||
@@ -62,6 +63,7 @@ en:
|
||||
active: Active
|
||||
admin: Administrator
|
||||
ads_marketing: 'This looks like an ad/marketing'
|
||||
all: 'All'
|
||||
are_you_sure: 'Are you sure you would like to ban {0}?'
|
||||
ban_user: 'Ban User?'
|
||||
banned: Banned
|
||||
@@ -69,6 +71,8 @@ en:
|
||||
cancel: Cancel
|
||||
commenter: Commenter
|
||||
dont_like_username: 'Dislike username'
|
||||
filter_users: 'Filter users'
|
||||
filter_role: Role
|
||||
flaggedaccounts: 'Reported Usernames'
|
||||
flags: Flags
|
||||
impersonating: Impersonation
|
||||
@@ -85,6 +89,7 @@ en:
|
||||
spam_ads: Spam/Ads
|
||||
staff: Staff
|
||||
status: Status
|
||||
suspended: Suspended
|
||||
username_and_email: 'Username and Email'
|
||||
yes_ban_user: 'Yes Ban User'
|
||||
configure:
|
||||
@@ -132,8 +137,8 @@ en:
|
||||
enable_questionbox: 'Ask Readers a Question'
|
||||
enable_questionbox_description: 'This question will appear at the top of this comment stream. Ask readers about a certain issue in the article or pose discussion questions etc.'
|
||||
hours: Hours
|
||||
include_comment_stream: 'Include Comment Stream Description for Readers'
|
||||
include_comment_stream_desc: 'Write a message to be added to the top of your comment stream. Pose a topic include community guidelines etc.'
|
||||
code_of_conduct_summary: 'Summary of your Code of Conduct'
|
||||
code_of_conduct_summary_desc: 'This message will appear above every comments stream on your site. Click here to learn more about writing a good code.'
|
||||
include_question_here: 'Write your question here:'
|
||||
include_text: 'Include your text here.'
|
||||
moderate: Moderate
|
||||
@@ -229,6 +234,7 @@ en:
|
||||
CANNOT_IGNORE_STAFF: 'Cannot ignore Staff members.'
|
||||
COMMENT_PARENT_NOT_VISIBLE: 'The comment that you''re replying to has been removed or doesn''t exist.'
|
||||
COMMENT_TOO_SHORT: 'Comments should be more than one character, please revise your comment and try again.'
|
||||
COMMENT_TOO_LONG: 'Body exceeds max length'
|
||||
COMMENTING_CLOSED: 'Commenting is already closed'
|
||||
COMMENTING_DISABLED: 'Commenting is currently disabled on this site'
|
||||
confirm_password: 'Passwords don''t match. Please check again'
|
||||
@@ -253,7 +259,7 @@ en:
|
||||
organization_contact_email: 'Organization email is not valid.'
|
||||
organization_name: 'Organization name must only contain letters or numbers.'
|
||||
password: 'Password must be at least 8 characters'
|
||||
PAGE_NOT_AVAILABLE_ROLE: 'This page is for team use only. Please contact an administrator if you want to join this team.'
|
||||
PAGE_NOT_AVAILABLE_ROLE: 'This page is for team use only. Please contact an administrator if you want to join this team.'
|
||||
PASSWORD_INCORRECT: 'Your current password was entered incorrectly'
|
||||
PASSWORD_LENGTH: 'Password is too short'
|
||||
PASSWORD_REQUIRED: 'Must input a password'
|
||||
@@ -286,7 +292,6 @@ en:
|
||||
reasons:
|
||||
comment:
|
||||
banned_word: 'Banned Word'
|
||||
body_count: 'Body exceeds max length'
|
||||
comment_noagree: Disagree
|
||||
comment_offensive: Offensive
|
||||
comment_other: Other
|
||||
@@ -313,6 +318,7 @@ en:
|
||||
comments: comments
|
||||
configure_stream: Configure
|
||||
content_not_available: 'This content is not available'
|
||||
edit: Edit
|
||||
edit_name:
|
||||
button: Submit
|
||||
error: 'Usernames can contain letters numbers and _ only'
|
||||
|
||||
+36
-29
@@ -4,19 +4,19 @@ es:
|
||||
view_options: 'Ver opciones'
|
||||
already_flagged_username: 'Usted ya reportó a este usuario.'
|
||||
bandialog:
|
||||
are_you_sure: '¿Estás segura que quieres suspender a {0}?'
|
||||
ban_user: '¿Quieres suspender el Usuario?'
|
||||
are_you_sure: '¿Estás seguro que quieres suspender a {0}?'
|
||||
ban_user: '¿Quieres suspender al Usuario?'
|
||||
banned_user: 'Usuario Suspendido'
|
||||
cancel: Cancelar
|
||||
email_message_ban: "Estimado/a {0},\n\nUsted o alguien con acceso a su cuenta a violado los lineamientos de nuestra comunidad. Como consecuencia de esto, su cuenta fue bloqueada. No podrá realizar ni reportar más comentarios. Si usted piensa que esto ha sido un error, por favor contáctese con nosotros."
|
||||
email_message_ban: "Estimado/a {0},\n\nUsted o alguien con acceso a su cuenta ha violado los lineamientos de nuestra comunidad. Como consecuencia de esto, su cuenta fue bloqueada. No podrá realizar ni reportar más comentarios. Si usted piensa que esto ha sido un error, por favor contáctese con nosotros."
|
||||
note: 'Nota: {0}'
|
||||
note_ban_user: 'Suspender a este usuario no le va a permitir (al usuario) borrar ni editar ni comentar.'
|
||||
note_reject_comment: 'Suspender a este usuario también va a colocar este comentario en la cola de Rechazados.'
|
||||
notify_ban_description: 'Esto notificará al usuario por email que fueron suspendidos de la comunidad'
|
||||
notify_ban_description: 'Esto notificará al usuario por correo electrónico que fueron suspendidos de la comunidad'
|
||||
notify_ban_headline: 'Notificar al usuario de la suspensión'
|
||||
send: Enviar
|
||||
write_a_message: 'Escribe un mensaje'
|
||||
yes_ban_user: 'Si, Suspender al usuario'
|
||||
yes_ban_user: 'Si, suspender al usuario'
|
||||
bio_offensive: 'Esta biografia es ofensiva'
|
||||
cancel: Cancelar
|
||||
characters_remaining: 'caracteres restantes'
|
||||
@@ -30,9 +30,9 @@ es:
|
||||
view_context: 'Ver contexto'
|
||||
comment_box:
|
||||
cancel: Cancelar
|
||||
characters_remaining: 'carácteres restantes'
|
||||
characters_remaining: 'caracteres restantes'
|
||||
comment: 'Publicar un comentario'
|
||||
comment_post_banned_word: 'Tu comentario contiene una o más palabras que no están permitidas en nuestro espacio, por lo que no será publicado. Si crees que es un error, por favor contacta a nuestro equipo de moderación.'
|
||||
comment_post_banned_word: 'Tu comentario contiene una o más palabras que no están permitidas en nuestro espacio, por lo que no será publicado. Si crees que es un error, por favor contactate a nuestro equipo de moderación.'
|
||||
comment_post_notif: 'Tu comentario ha sido publicado.'
|
||||
comment_post_notif_premod: 'Gracias por el comentario. Nuestro equipo de moderación va a revisarlo muy pronto.'
|
||||
name: Nombre
|
||||
@@ -40,11 +40,12 @@ es:
|
||||
reply: Responder
|
||||
comment_offensive: 'Este comentario es ofensivo'
|
||||
comment_plural: Comentarios
|
||||
comment_post_banned_word: 'Tu comentario contiene una o más palabras que no están permitidas en nuestro espacio, por lo que no será publicado. Si crees que es un error, por favor contacta a nuestro equipo de moderación.'
|
||||
comment_post_banned_word: 'Tu comentario contiene una o más palabras que no están permitidas en nuestro espacio, por lo que no será publicado. Si crees que es un error, por favor contactate con nuestro equipo de moderación.'
|
||||
comment_post_notif: 'Tu comentario ha sido publicado.'
|
||||
comment_post_notif_premod: 'Gracias por el comentario. Nuestro equipo de moderación va a revisarlo muy pronto.'
|
||||
comment_singular: Comentario
|
||||
common:
|
||||
contains_link: 'Contiene enlace'
|
||||
copy: Copiar
|
||||
error: 'Ha ocurrido un error.'
|
||||
reaction: reacción
|
||||
@@ -56,36 +57,40 @@ es:
|
||||
account_creation_date: 'Fecha de creación de la cuenta'
|
||||
active: Activa
|
||||
admin: Administrator
|
||||
ads_marketing: 'Esto parece ser un ad/marketing'
|
||||
are_you_sure: '¿Estás segura que quieres suspender a {0}?'
|
||||
ads_marketing: 'Esto parece ser un publicidad/acción de comercialización'
|
||||
all: 'Todos'
|
||||
are_you_sure: '¿Estás seguro que quieres suspender a {0}?'
|
||||
ban_user: '¿Quieres suspender al Usuario?'
|
||||
banned: Suspendido
|
||||
banned_user: 'Usuario Suspendido'
|
||||
banned_user: 'Usuario suspendido'
|
||||
cancel: Cancelar
|
||||
commenter: Comentarista
|
||||
dont_like_username: 'No me gusta este nombre de usuario'
|
||||
flaggedaccounts: 'Nombres de Usuario Reportados'
|
||||
filter_users: 'Filtrarr usuarios'
|
||||
filter_role: Rol
|
||||
flaggedaccounts: 'Nombres de usuario reportados'
|
||||
flags: Reportes
|
||||
impersonating: Impersonando
|
||||
loading: 'Cargando resultados'
|
||||
moderator: Moderator
|
||||
newsroom_role: 'Rol en la redacción'
|
||||
no_flagged_accounts: 'No hay ningún nombre de usario reportado en este momento.'
|
||||
no_flagged_accounts: 'No hay ningún nombre de usuario reportado en este momento.'
|
||||
no_results: 'No se encontraron usuarios con ese nombre o correo.'
|
||||
offensive: Ofensivo
|
||||
other: Otro
|
||||
people: Gente
|
||||
role: 'Seleccionar rol...'
|
||||
select_status: 'Seleccionar estado...'
|
||||
spam_ads: Spam/Publicidad
|
||||
spam_ads: Correo basura/Publicidad
|
||||
staff: Personal
|
||||
status: Estado
|
||||
suspended: Suspendido
|
||||
username_and_email: 'Usuario y Correo'
|
||||
yes_ban_user: 'Si, Suspendan el usuario'
|
||||
yes_ban_user: 'Sí, suspendan el usuario'
|
||||
configure:
|
||||
access_message: 'Usted debe ser un administrador para acceder a esta página. Encuentre a otro admin y actualice los permisos de su cuenta!'
|
||||
access_message: 'Usted debe ser un administrador para acceder a esta página. Encuentre a otro administrador y actualice los permisos de su cuenta!'
|
||||
apply: Aplicar
|
||||
banned_word_text: 'Comentarios que contengan estas palabras o frases, en mayusculas o minúsculas, serán automáticamente eliminados del hilo de comentario. Escribir una palabra y apretar Enter o Tabulador para agregarla. O pueden pegar una lista de palabras separadas por coma.'
|
||||
banned_word_text: 'Comentarios que contengan estas palabras o frases, en mayúsculas o minúsculas, serán automáticamente eliminados del hilo de comentarios. Escribir una palabra y apretar Enter o Tabulador para agregarla. O pueden pegar una lista de palabras separadas por coma.'
|
||||
banned_words_title: 'Lista de palabras prohibidas'
|
||||
close: Cerrar
|
||||
close_after: 'Cerrar comentarios luego de'
|
||||
@@ -93,14 +98,14 @@ es:
|
||||
close_stream_configuration: 'Este hilo de comentario está en este momento cerrado. Al abrirlo, nuevos comentarios serán publicados y mostrados.'
|
||||
closed_comments_desc: 'Escribe un mensaje que será mostrado cuando los comentarios estén cerrados y no se acepten más comentarios.'
|
||||
closed_comments_label: 'Escribe un mensaje...'
|
||||
closed_stream_settings: 'Mensaje que se muestra cuando no se aceptan más comentarios en el articulo'
|
||||
closed_stream_settings: 'Mensaje que se muestra cuando no se aceptan más comentarios en el artículo'
|
||||
comment_count_error: 'Por favor escribir un número válido'
|
||||
comment_count_header: 'Limitar el largo del comentario'
|
||||
comment_count_text_post: carácteres
|
||||
comment_count_text_post: caracteres
|
||||
comment_count_text_pre: 'Los comentarios serán limitados a'
|
||||
comment_settings: Configuración
|
||||
comment_stream: 'Hilo de Comentarios'
|
||||
comment_stream_will_close: 'El hilo de comentarios se cerrara'
|
||||
comment_stream_will_close: 'El hilo de comentarios se cerrará'
|
||||
community: Comunidad
|
||||
configure: Configurar
|
||||
copy_and_paste: 'Copiar y pegar el código de más abajo en tu CMS para colocar la caja de comentarios en tus artículos'
|
||||
@@ -117,16 +122,16 @@ es:
|
||||
embed_comment_stream: 'Colocar Hilo de Comentarios'
|
||||
enable_pre_moderation: 'Permitir pre-moderación'
|
||||
enable_pre_moderation_text: 'Los moderadores deben aprobar todo comentario antes que sea publicado.'
|
||||
enable_premod: 'Activar Pre Moderación'
|
||||
enable_premod: 'Activar Pre-Moderación'
|
||||
enable_premod_description: 'Los y las moderadoras deben aprobar cualquier comentario antes de su publicación'
|
||||
enable_premod_links: 'Pre-Moderar Comentarios que contienen Enlaces'
|
||||
enable_premod_links: 'Pre-Moderar comentarios que contienen Enlaces'
|
||||
enable_premod_links_description: 'Los y las moderadoras deben aprobar cualquier comentario que contengan enlaces antes de su publicación.'
|
||||
enable_premod_links_text: 'Los moderadores deben aprobar todo comentario que contenga un enlace antes de que sea publicado.'
|
||||
enable_questionbox: 'Hacer una pregunta a los y las lectoras.'
|
||||
enable_questionbox_description: 'Esta pregunta aparecerá en la parte de arriba del hilo de comentarios.'
|
||||
hours: Horas
|
||||
include_comment_stream: 'Incluir Descripción de Hilo de Comentarios para Lectores'
|
||||
include_comment_stream_desc: 'Escribir un mensaje para ser incluido al principio del hilo de comentarios. Un tema planteado podría ser la guía de comunidad, etc.'
|
||||
code_of_conduct_summary: 'Incluir Descripción de Hilo de Comentarios para Lectores'
|
||||
code_of_conduct_summary_desc: 'Escribir un mensaje para ser incluido al principio del hilo de comentarios. Un tema planteado podría ser la guía de comunidad, etc.'
|
||||
include_question_here: 'Escribir la pregunta aquí.'
|
||||
include_text: 'Agregar tu texto aquí.'
|
||||
moderate: Moderar
|
||||
@@ -135,7 +140,7 @@ es:
|
||||
open_stream: 'Abrir Hilo de Comentarios'
|
||||
open_stream_configuration: 'Este hilo de comentarios está abierto. Al cerrarlo no se podrán publicar nuevos comentarios pero todos los comentarios anteriores aún serán mostrados.'
|
||||
organization_contact_email: 'Email de la Organización'
|
||||
organization_info_copy: 'Nosotros usamos esta información en las notificaciones de email generadas por Talk. Esto conecta los mensajes de tu organización, y provee una forma para que los usuarios se comuniquen si tienen un inconveniente con su cuenta.'
|
||||
organization_info_copy: 'Nosotros usamos esta información en las notificaciones de correo electrónico generadas por Talk. Esto conecta los mensajes de tu organización, y provee una forma para que los usuarios se comuniquen si tienen un inconveniente con su cuenta.'
|
||||
organization_info_copy_2: 'Recomendamos crear un email genérico (ej: community@yournewsroom.com) for this purpose. Esto significa que puede permanecer consistente con el tiempo y no expone un nombre que los usuarios puedan atacar si su cuenta fue bloqueada.'
|
||||
organization_information: 'Información de la Organización'
|
||||
organization_name: 'Nombre de la Organización'
|
||||
@@ -215,6 +220,7 @@ es:
|
||||
CANNOT_IGNORE_STAFF: 'No puede ignorar a miembros del Staff.'
|
||||
COMMENT_PARENT_NOT_VISIBLE: 'El comentario a la que estás contestando ha sido eliminado o no existe.'
|
||||
COMMENT_TOO_SHORT: 'Tu comentario debe tener algo escrito'
|
||||
COMMENT_TOO_LONG: 'El texto excede el límite permitido'
|
||||
COMMENTING_CLOSED: 'Los comentarios ya estan cerrados'
|
||||
confirm_password: 'Las contraseñas no coinciden. Inténtelo nuevamente'
|
||||
EDIT_USERNAME_NOT_AUTHORIZED: 'No tiene permiso para editar el nombre de usuario.'
|
||||
@@ -260,7 +266,6 @@ es:
|
||||
reasons:
|
||||
comment:
|
||||
banned_word: 'Palabra prohibida'
|
||||
body_count: 'El texto exede el límite permitido'
|
||||
comment_noagree: 'No está de acuerdo'
|
||||
comment_offensive: 'Es ofensivo'
|
||||
comment_other: 'Otra razón'
|
||||
@@ -285,6 +290,7 @@ es:
|
||||
comments: comentarios
|
||||
configure_stream: 'Configurar'
|
||||
content_not_available: 'Este contenido no se encuentra disponible'
|
||||
edit: Editar
|
||||
edit_name:
|
||||
button: Enviar
|
||||
error: 'Nombres de usuarios pueden solamente incluir letras, números y _'
|
||||
@@ -310,14 +316,14 @@ es:
|
||||
save: Guardar
|
||||
create:
|
||||
confirm_password: 'Confirmar Contraseña'
|
||||
email: 'Dirección de correo'
|
||||
organization_contact_email: 'Organización: Email de contacto'
|
||||
email: 'Dirección de correo electrónico'
|
||||
organization_contact_email: 'Organización: correo electrónico de contacto'
|
||||
password: Contraseña
|
||||
save: Guardar
|
||||
username: 'Nombre de Usuario'
|
||||
final:
|
||||
close: 'Cerrar este instalador'
|
||||
description: '¡Gracias por instalar Talk! Enviamos un correo para verificar su dirección de correo. Mientras esta terminando de configurar su cuenta, ya puede comenzar a involucrarse con sus lectores.'
|
||||
description: '¡Gracias por instalar Talk! Enviamos un correo para verificar su dirección de correo electrónico. Mientras esta terminando de configurar su cuenta, ya puede comenzar a involucrarse con sus lectores.'
|
||||
launch: 'Iniciar Talk'
|
||||
initial:
|
||||
description: 'Vamos a crear su comunidad Talk en unos pocos pasos.'
|
||||
@@ -396,6 +402,7 @@ es:
|
||||
other: Otro
|
||||
password_reset:
|
||||
change_password: 'Cambio de contraseña'
|
||||
change_password_help: 'Por favor, introduzca una nueva contraseña. ¡Hazlo seguro!'
|
||||
confirm_new_password: 'Confirme su nueva contraseña'
|
||||
mail_sent: 'Si tiene una cuenta registrada, un enlace para resetear su clave ha sido enviado a esa dirección de correo.'
|
||||
new_password: 'Nueva contraseña'
|
||||
|
||||
+3
-3
@@ -123,8 +123,8 @@ fi_FI:
|
||||
enable_questionbox: 'Kysy lukijoilta'
|
||||
enable_questionbox_description: 'Tämä kysymys tulee näkymään kommenttiosion ylälaidassa. Kysy artikkelin aiheesta tai ohjaa keskustelua kysymyksen avulla.'
|
||||
hours: Tuntia
|
||||
include_comment_stream: 'Sisällytä kommentoinnin kuvaus lukijoille'
|
||||
include_comment_stream_desc: 'Kirjoita kommenttiosion yläreunassa näkyvä viesti. Aseta keskustelun aihe, sisällytä sääntöjä tms.'
|
||||
code_of_conduct_summary: 'Sisällytä kommentoinnin kuvaus lukijoille'
|
||||
code_of_conduct_summary_desc: 'Kirjoita kommenttiosion yläreunassa näkyvä viesti. Aseta keskustelun aihe, sisällytä sääntöjä tms.'
|
||||
include_question_here: 'Kirjoita kysymyksesi tähän:'
|
||||
include_text: 'Lisää teksti tähän.'
|
||||
moderate: Moderoi
|
||||
@@ -197,6 +197,7 @@ fi_FI:
|
||||
CANNOT_IGNORE_STAFF: 'Työntekijöitä ei voi jättää huomioimatta'
|
||||
COMMENT_PARENT_NOT_VISIBLE: 'Kommenttia, johon yrität vastata, ei enää ole.'
|
||||
COMMENT_TOO_SHORT: 'Kommentin tulee olla vähintään kaksi merkkiä pitkä. Tarkista kirjoittamasi teksti.'
|
||||
COMMENT_TOO_LONG: Liian pitkä viesti'
|
||||
COMMENTING_CLOSED: 'Kommentointi on suljettu'
|
||||
confirm_password: 'Salasanat eivät täsmää. Tarkista, ole hyvä.'
|
||||
EDIT_USERNAME_NOT_AUTHORIZED: 'Sinulla ei ole oikeutta päivittää tai muokata käyttäjänimeä.'
|
||||
@@ -240,7 +241,6 @@ fi_FI:
|
||||
reasons:
|
||||
comment:
|
||||
banned_word: 'Kielletty sana'
|
||||
body_count: 'Liian pitkä viesti'
|
||||
comment_noagree: 'Olen eri mieltä'
|
||||
comment_offensive: Loukkaava
|
||||
comment_other: Muu
|
||||
|
||||
+3
-3
@@ -127,8 +127,8 @@ fr:
|
||||
enable_questionbox: 'Posez une question aux lecteurs.'
|
||||
enable_questionbox_description: 'Cette question apparaîtra en haut de ce fil de commentaires. Demandez aux lecteurs de s''exprimer sur un sujet évoqué dans l''article ou posez les termes de la discussion, etc.'
|
||||
hours: Heures
|
||||
include_comment_stream: 'Inclure la description du fil de commentaires pour les lecteurs'
|
||||
include_comment_stream_desc: 'Écrivez un message à ajouter au haut de votre flux de commentaires. Publiez un sujet de discussion, avec des suggestion sur la tenue des débats, etc.'
|
||||
code_of_conduct_summary: 'Inclure la description du fil de commentaires pour les lecteurs'
|
||||
code_of_conduct_summary_desc: 'Écrivez un message à ajouter au haut de votre flux de commentaires. Publiez un sujet de discussion, avec des suggestion sur la tenue des débats, etc.'
|
||||
include_question_here: 'Écrivez votre question ici.'
|
||||
include_text: 'Entrez votre texte ici.'
|
||||
moderate: Modérer
|
||||
@@ -191,6 +191,7 @@ fr:
|
||||
CANNOT_IGNORE_STAFF: 'Ne peut pas ignorer les membres de l''équipe.'
|
||||
COMMENT_PARENT_NOT_VISIBLE: 'Le commentaire auquel vous répondez a été supprimé ou n’existe plus.'
|
||||
COMMENT_TOO_SHORT: 'Votre commentaire doit contenir quelque chose'
|
||||
COMMENT_TOO_LONG: 'Le texte dépasse la longueur maximale'
|
||||
COMMENTING_CLOSED: 'Les commentaires sont déjà fermés'
|
||||
confirm_password: 'Les mots de passe ne correspondent pas. Vérifiez à nouveau'
|
||||
EDIT_USERNAME_NOT_AUTHORIZED: 'Vous n''avez pas la permission de mettre à jour votre nom d''utilisateur.'
|
||||
@@ -235,7 +236,6 @@ fr:
|
||||
reasons:
|
||||
comment:
|
||||
banned_word: 'Mot banni'
|
||||
body_count: 'Le texte dépasse la longueur maximale'
|
||||
comment_noagree: 'Pas d’accord'
|
||||
comment_offensive: Offensive
|
||||
comment_other: Autre
|
||||
|
||||
+574
@@ -0,0 +1,574 @@
|
||||
it:
|
||||
admin_sidebar:
|
||||
sort_comments: 'Ordina Commenti'
|
||||
view_options: 'Visualizza Opzioni'
|
||||
already_flagged_username: 'Hai già segnalato questo username.'
|
||||
bandialog:
|
||||
are_you_sure: 'Sei sicuro di voler bloccare {0}?'
|
||||
ban_user: 'Blocca Utente'
|
||||
banned_user: 'Utenti bloccati'
|
||||
cancel: Annulla
|
||||
email_message_ban: "Caro {0},\n\nQualcuno che ha accesso al tuo account ha violato le nostre linee guida per la community. Di conseguenza, il tuo account è stato bloccato. Non potrai più commentare, apprezzare o segnalare commenti. Se ritieni questo sia un errore, contatta i nostri moderatori."
|
||||
note: 'Nota: {0}'
|
||||
note_ban_user: 'Bloccare questo utente non gli permetterà di commentare, interagire, o segnalare commenti.'
|
||||
note_reject_comment: 'Bloccare questo utente inserirà inoltre questo commento tra quelli rifiutati.'
|
||||
notify_ban_description: 'Questo notificherà l''utente, tramite email, che è stato bloccato dalla comunità.'
|
||||
notify_ban_headline: 'Notifica l''utente della interdizione'
|
||||
send: Invia
|
||||
write_a_message: 'Scrivi un messaggio'
|
||||
yes_ban_user: 'Si, blocca utente'
|
||||
bio_offensive: 'Questa descrizione è offensiva'
|
||||
cancel: Annulla
|
||||
characters_remaining: 'caratteri rimanenti'
|
||||
comment:
|
||||
anon: Anonimo
|
||||
ban_user: 'Blocca Utente'
|
||||
comment: 'Pubblica un commento'
|
||||
edited: Modificato
|
||||
flagged: segnalato
|
||||
undo_reject: Annulla
|
||||
view_context: 'Visualizza il contesto'
|
||||
comment_box:
|
||||
cancel: Annulla
|
||||
characters_remaining: 'caratteri rimanenti'
|
||||
comment: 'Pubblica un commento'
|
||||
comment_post_banned_word: 'Il tuo commento contiene una o più parole non permesse, non sarà quindi pubblicato. Se ritieni questo sia un errore, contatta i nostri moderatori.'
|
||||
comment_post_notif: 'Il tuo commento è stato pubblicato.'
|
||||
comment_post_notif_premod: 'Grazie per il tuo contributo. Il nostro team di moderatori revisionerà presto il tuo commento.'
|
||||
name: Nome
|
||||
post: Invia
|
||||
reply: Rispondi
|
||||
comment_history_blank:
|
||||
info: 'La cronologia dei tuoi commenti apparirà qui'
|
||||
title: 'Non hai pubblicato nessun commento'
|
||||
comment_offensive: 'Questo commento è offensivo'
|
||||
comment_plural: Commenti
|
||||
comment_post_banned_word: 'Il tuo commento contiene una o più parole non permesse, non sarà quindi pubblicato. Se ritieni questo sia un errore, contatta i nostri moderatori.'
|
||||
comment_post_notif: 'Il tuo commento è stato pubblicato.'
|
||||
comment_post_notif_premod: 'Grazie per il tuo contributo. Il nostro team di moderatori revisionerà presto il tuo commento.'
|
||||
comment_singular: Commento
|
||||
common:
|
||||
copy: Copia
|
||||
copied: 'Copiato'
|
||||
notsupported: 'Non supportato'
|
||||
error: 'Si è verificato un errore.'
|
||||
reaction: reazione
|
||||
reactions: reazioni
|
||||
reply: 'rispondi' # noun, singular
|
||||
replies: 'risposte'
|
||||
story: 'Storia'
|
||||
community:
|
||||
account_creation_date: 'Data creazione account'
|
||||
active: Attivo
|
||||
admin: Amministratore
|
||||
ads_marketing: 'Questo sembra essere un annuncio pubblicitario'
|
||||
all: 'Tutti'
|
||||
are_you_sure: 'Sei sicuro di voler bloccare {0}?'
|
||||
ban_user: 'Blocca Utente?'
|
||||
banned: Bloccato
|
||||
banned_user: 'Utente bloccato'
|
||||
cancel: Annulla
|
||||
commenter: Utente
|
||||
dont_like_username: 'Username non adatto'
|
||||
filter_users: 'Filtra utenti'
|
||||
filter_role: Ruolo
|
||||
flaggedaccounts: 'Username segnalati'
|
||||
flags: Segnalazioni
|
||||
impersonating: 'Impersonare'
|
||||
loading: 'Caricamento risultati'
|
||||
moderator: Moderatore
|
||||
newsroom_role: 'Ruolo della sala stampa'
|
||||
no_flagged_accounts: 'Nessun utente segnalato per ora.'
|
||||
no_results: 'Nessun utente con quell''username o indirizzo email trovato.'
|
||||
offensive: Offensivo
|
||||
other: Altro
|
||||
people: Persone
|
||||
role: 'Seleziona ruolo...'
|
||||
select_status: 'Seleziona status...'
|
||||
spam_ads: Spam/pubblicità
|
||||
staff: Staff
|
||||
status: Status
|
||||
suspended: Sospeso
|
||||
username_and_email: 'Username e Email'
|
||||
yes_ban_user: 'Si, blocca utente'
|
||||
configure:
|
||||
access_message: 'Devi essere amministratore per accedere alle configurazioni. Perfavore contatta un amministratore e chiedi di promuoverti!'
|
||||
apply: Applica
|
||||
banned_word_text: 'Commenti che contengono queste parole o frasi, che siano in maiuscolo o minuscolo, saranno automaticamente rimossi. Inserisci una parola e premi Invio o Tab per aggiungerla. Oppure aggiungi una lista di parole separate da virgole.'
|
||||
banned_words_title: 'Lista di parole vietate'
|
||||
close: Chiudi
|
||||
close_after: 'Chiudi commenti successivi'
|
||||
close_stream: 'Chiudi il thread dei commenti'
|
||||
close_stream_configuration: 'Questo thread dei commenti è attualmente chiuso. Aprirlo per visulizzare nuovi commenti'
|
||||
closed_comments_desc: 'Scrivi un messaggio da visualizzare quando il tuo thread dei commenti viene chiuso senza accettarne nuovi.'
|
||||
closed_comments_label: 'Scrivi un messaggio...'
|
||||
closed_stream_settings: 'Thread dei messaggi chiusi'
|
||||
comment_count_error: 'Inserisci un numero valido.'
|
||||
comment_count_header: 'Limite lunghezza commento'
|
||||
comment_count_text_post: caratteri
|
||||
comment_count_text_pre: 'I commenti saranno limitati a'
|
||||
comment_settings: Impostazioni
|
||||
comment_stream: 'Thread dei commenti'
|
||||
comment_stream_will_close: 'Il thread dei commenti sarà chiuso'
|
||||
community: Comunità
|
||||
configure: Configura
|
||||
copy_and_paste: 'Copia e incolla il codice qui sotto nel tuo CMS per includere il box dei commenti nei tuoi articoli'
|
||||
custom_css_url: 'URL per il CSS personalizzato'
|
||||
custom_css_url_desc: 'URL del CSS che sostituirà lo stile predefinito del thread dei commenti. Può essere interno o esterno.'
|
||||
days: Giorni
|
||||
description: 'Modifica le impostazioni dei commenti in questa storia.'
|
||||
disable_commenting_desc: 'Scrivi il messaggio che sarà visualizzato quando i commenti saranno disattivati.'
|
||||
disable_commenting_title: 'Disattiva tutti i commenti del sito'
|
||||
domain_list_text: 'Inserisci i domini che vuoi autorizzare per Talk. Per esempio i tuoi ambienti di sviluppo, test o produzione (ex. localhost:3000 staging.domain.com domain.com).'
|
||||
domain_list_title: 'Domain permessi'
|
||||
edit_comment_timeframe_heading: 'Periodo di tempo disponibile per modificare i commenti'
|
||||
edit_comment_timeframe_text_post: 'secondi per modificare i commenti.'
|
||||
edit_comment_timeframe_text_pre: 'Gli utenti avranno'
|
||||
edit_info: 'Modifica informazioni'
|
||||
embed_comment_stream: 'Integra il thread dei commenti'
|
||||
enable_pre_moderation: 'Abilita pre-moderazione'
|
||||
enable_pre_moderation_text: 'I moderatori dovranno approvare tutti i commenti prima che vengano pubblicati.'
|
||||
enable_premod: 'Abilita pre-moderazione'
|
||||
enable_premod_description: 'I moderatori dovranno approvare tutti i commenti prima che vengano pubblicati.'
|
||||
enable_premod_links: 'Pre-Modera commenti contenenti link'
|
||||
enable_premod_links_description: 'I moderatori devono approvare tutti i commenti contenenti link prima di essere pubblicati.'
|
||||
enable_premod_links_text: 'I moderatori devono approvare tutti i commenti contenenti link prima di essere pubblicati.'
|
||||
enable_questionbox: 'Domanda qualcosa ai lettori'
|
||||
enable_questionbox_description: 'Questa domanda apparirà sopra al thread dei commenti. Chiedi ai lettori cosa ne pensano dell''articolo o poni domande per iniziare una conversazione etc.'
|
||||
hours: Ore
|
||||
include_comment_stream: 'Includi la descrizione del thread dei commenti'
|
||||
include_comment_stream_desc: 'Scrivi un messaggio che sarà aggiunto sopra il thread dei commenti. Poni una domanda, includi le linee guida della comunità etc.'
|
||||
include_question_here: 'Scrivi la tua domanda di seguito:'
|
||||
include_text: 'Includi il testo qui.'
|
||||
moderate: Modera
|
||||
moderation_settings: 'Impostazioni di moderazione'
|
||||
open: Apri
|
||||
open_stream: 'Apri il thread'
|
||||
open_stream_configuration: 'Questo thread dei commenti è attualmente aperto. Chiudendolo non saranno più accettati nuovi commenti, mentre tutti i commenti precedenti continueranno ad essere visibili.'
|
||||
organization_contact_email: 'Indirizzo email dell''organizzazione'
|
||||
organization_info_copy: 'Utilizziamo queste informazioni nelle email di notifica generate da Talk. Questo connette i messaggi alla tua organizzazione, permettendo agli utenti di contattarti se riscontrano problemi con il loro account.'
|
||||
organization_info_copy_2: 'Raccomandiamo di creare un indirizzo email generico (eg. community@yournewsroom.com) per questo scopo. Così da poter rimanere consistente nel tempo, senza rivelare il proprio nome che gli utenti potrebbero prendere di mira nel caso il loro account venga bloccato.'
|
||||
organization_information: 'Informazioni dell''organizzazione'
|
||||
organization_name: 'Nome dell''organizzazione'
|
||||
suspect_or_forbidden_words_placeholder: 'Parola o frase'
|
||||
product_guide_link: 'Guida all''uso del prodotto'
|
||||
report_bug_or_feedback: 'Segnala un bug o lascia un feedback'
|
||||
require_email_verification: 'Richiede la verifica dell''email'
|
||||
require_email_verification_text: 'I nuovi utenti devono verificare la loro email prima di poter commentare'
|
||||
save: Salva
|
||||
save_changes: 'Salva le modifiche'
|
||||
save_changes_dialog:
|
||||
cancel: Annulla
|
||||
copy: 'Hai apportato una o più modifiche senza salvare. Vuoi salvare o scartare le modifiche?'
|
||||
discard: Scarta
|
||||
save_settings: 'Salva impostazioni'
|
||||
unsaved_changes: 'Modifiche non salvate'
|
||||
shortcuts: Scorciatoie
|
||||
sign_out: Esci
|
||||
stories: Storie
|
||||
stream_settings: 'Impostazioni thread dei commenti'
|
||||
suspect_word_text: 'Commenti che contengono queste parole o frasi, che siano in maiuscolo o minuscolo, saranno evidenziate nel thread dei commenti. Inserisci una parola e premi Invio o Tab per aggiungerla. Oppure aggiungi una lista di parole separate da virgole.'
|
||||
suspect_word_title: 'Lista delle parole indiziate'
|
||||
tech_settings: 'Impostazioni tecniche'
|
||||
title: 'Configura il thread dei commenti'
|
||||
view_last_version: 'Visualizza ultima versione'
|
||||
weeks: Settimane
|
||||
wordlist: 'Parole vietate'
|
||||
confirm_email:
|
||||
click_to_confirm: 'Premi qui sotto per confermare il tuo indirizzo email.'
|
||||
confirm: Conferma
|
||||
email_confirmation: 'Conferma Email'
|
||||
continue: Continua
|
||||
createdisplay:
|
||||
check_the_form: 'Modulo non valido. Ricontrolla i campi'
|
||||
continue: 'Continua con lo stesso username di Facebook'
|
||||
error_create: 'Errore nel cambiamento dell''username'
|
||||
fake_comment_body: 'Questo è un commento esempio. I lettori possono condividere i loro pensieri e opinioni con le redazioni nella sezione dei commenti.'
|
||||
fake_comment_date: '1 minuto fa'
|
||||
if_you_dont_change_your_name: 'Se non modifichi il tuo username in questo momento, il tuo nome Facebook comparirà accanto a tutti i tuoi commenti.'
|
||||
required_field: 'Campo obbligatorio'
|
||||
save: Salva
|
||||
special_characters: 'Gli username possono contenere solo lettere numeri e _'
|
||||
username: Username
|
||||
write_your_username: 'Modifica il tuo username'
|
||||
your_username: 'Il tuo username appare in tutti i commenti che pubblichi.'
|
||||
done: Finito
|
||||
edit_comment:
|
||||
body_input_label: 'Modifica questo commento'
|
||||
edit_window_expired: 'Non puoi più modificare questo commento. Il periodo di tempo disponibile per modificarlo è terminato. Perchè non ne pubblichi uno nuovo?'
|
||||
edit_window_expired_close: Chiudi
|
||||
edit_window_timer_prefix: 'Modifica periodo di tempo: '
|
||||
minute: minuto
|
||||
minutes_plural: minuti
|
||||
save_button: 'Salva modifiche'
|
||||
second: secondo
|
||||
seconds_plural: secondi
|
||||
email:
|
||||
banned:
|
||||
body: 'In conformità con le linee guida della comunità The Coral Project, il tuo account è stato bloccato. Non ti è più permesso commentare, segnalare o interagire con la nostra comunità.'
|
||||
subject: 'Il tuo account è stato bloccato'
|
||||
confirm:
|
||||
confirm_email: 'Conferma Email'
|
||||
has_been_requested: 'Una email di conferma è stata richiesta per i seguenti account:'
|
||||
if_you_did_not: 'Se non sei stato tu a richiederla puoi tranquillamente ignorare questa email.'
|
||||
subject: 'Email di conferma'
|
||||
to_confirm: 'Per confermare l''account visita il seguente link:'
|
||||
password_change:
|
||||
body: "La password del tuo account è stata modificata.\n\nSe non sei stato tu a richiedere questa modifica, contattaci a {0}."
|
||||
subject: '{0} password modificata'
|
||||
password_reset:
|
||||
if_you_did: 'Se sei stato tu,'
|
||||
please_click: 'premi qui per reimpostare la password'
|
||||
subject: 'Reimposta Password'
|
||||
we_received_a_request: 'Abbiamo ricevuto una richiesta di reimpostare la password. Se non sei stato tu a richiedere la modifica puoi ignorare questa email.'
|
||||
suspended:
|
||||
subject: 'Il tuo account è stato sospeso'
|
||||
embed_comments_tab: Commenti
|
||||
embedlink:
|
||||
copy: 'Copiato negli appunti'
|
||||
copied: 'Copiato'
|
||||
error:
|
||||
ALREADY_EXISTS: 'Risorsa già esistente'
|
||||
AUTHENTICATION: 'Si è verificato un errore durante il tentativo di autenticazione del tuo account.'
|
||||
CANNOT_IGNORE_STAFF: 'Non puoi ignorare membri dello stuff.'
|
||||
COMMENT_PARENT_NOT_VISIBLE: 'Il commento al quale stai rispondendo è stato rimosso o non esiste.'
|
||||
COMMENT_TOO_SHORT: 'I commenti devono avere più di un carattere, ricontrolla il tuo commento e riprova.'
|
||||
COMMENT_TOO_LONG: 'Il testo eccede il limite permesso.'
|
||||
COMMENTING_CLOSED: 'I commenti sono stati chiusi.'
|
||||
COMMENTING_DISABLED: 'Attualmente non è possibile commentare in questo sito.'
|
||||
confirm_password: 'Le password non coincidono. Perfavore riprova.'
|
||||
DELETION_NOT_SCHEDULED: 'L''eliminazione non è stata pianificata.'
|
||||
EDIT_USERNAME_NOT_AUTHORIZED: 'Non hai l''autorizzazione per modificare il tuo username.'
|
||||
EDIT_WINDOW_ENDED: 'Non puoi più modificare questo commento. Il periodo di tempo disponibile per farlo è terminato.'
|
||||
email: 'Inserisci un indirizzo email valido.'
|
||||
EMAIL_ALREADY_VERIFIED: 'Indirizzo email già verificato.'
|
||||
EMAIL_IN_USE: 'Indirizzo email già in uso.'
|
||||
email_not_verified: 'L''indirizzo email {0} non è verificato.'
|
||||
EMAIL_NOT_VERIFIED: 'Indirizzo email non verificato.'
|
||||
email_password: 'Email e/o password errate/a.'
|
||||
EMAIL_REQUIRED: 'È richiesto un indirizzo email'
|
||||
EMAIL_VERIFICATION_TOKEN_INVALID: 'Il token di verifica dell''e-mail non è valido.'
|
||||
INCORRECT_PASSWORD: 'Password errata'
|
||||
INVALID_ASSET_URL: 'URL non valido'
|
||||
LOGIN_MAXIMUM_EXCEEDED: 'Hai effettuato troppi tentativi falliti. Si prega di attendere.'
|
||||
network_error: 'Errore durante la connessione con il server. Controlla la tua connessione internet e riprova.'
|
||||
NO_SPECIAL_CHARACTERS: 'L''username può contenere solo lettere numeri o _'
|
||||
NOT_AUTHORIZED: 'Non sei autorizzato a compiere questa azione.'
|
||||
NOT_FOUND: 'Risorsa non trovata'
|
||||
organization_contact_email: 'L''email dell''organizzazione è invalida.'
|
||||
organization_name: 'Il nome dell''organizzazione può contenere solo lettere o numeri.'
|
||||
password: 'La password deve avere almeno 8 caratteri'
|
||||
PAGE_NOT_AVAILABLE_ROLE: 'Questa pagina può essere utilizzata solo dal team. Contatta l''amministratore se vuoi entrare a far parte di questo team.'
|
||||
PASSWORD_INCORRECT: 'La password inserita non è corretta'
|
||||
PASSWORD_LENGTH: 'La password è troppo corta'
|
||||
PASSWORD_REQUIRED: 'Inserire una password'
|
||||
PASSWORD_RESET_TOKEN_INVALID: 'Il link per reimpostare la tua password non è valido.'
|
||||
PROFANITY_ERROR: 'Gli username non devono contenere volgarità. Contatta l''amministratore se ritieni ci sia stato un errore.'
|
||||
RATE_LIMIT_EXCEEDED: 'Limite di tentativi superato'
|
||||
required_field: 'Questo campo è obbligatorio'
|
||||
SAME_USERNAME_PROVIDED: 'Devi inserire un username diverso.'
|
||||
temporarily_suspended: 'Il tuo account è attualmente sospeso. Sarà riattivato {0}. Contattaci se hai qualche domanda.'
|
||||
unexpected: 'Si è verificato un errore imprevisto. Ci scusiamo!'
|
||||
username: 'L''username può contenere solo lettere numeri o _'
|
||||
USERNAME_IN_USE: 'Username già in uso'
|
||||
USERNAME_REQUIRED: 'Inserire un username'
|
||||
flag_comment: 'Segnala commento'
|
||||
flag_reason: 'Motivi segnalazione (Opzionale)'
|
||||
flag_reasons:
|
||||
username:
|
||||
impersonating: 'Questo utente sta impersonando'
|
||||
nolike: 'Non mi piace il suo username'
|
||||
offensive: 'Username offensivo'
|
||||
other: Altro
|
||||
spam: 'Sembra si tratti di pubblicità/marketing'
|
||||
flag_username: 'Segnala username'
|
||||
flagged_usernames:
|
||||
notify_approved: '{0} username approvato {1}'
|
||||
notify_changed: 'utente {0} ha cambiato il suo username in {1}'
|
||||
notify_flagged: '{0} ha segnalato l''username {1}'
|
||||
notify_rejected: '{0} ha rifiutato l''username {1}'
|
||||
flags:
|
||||
reasons:
|
||||
comment:
|
||||
banned_word: 'Parola vietata'
|
||||
comment_noagree: Disaccordo
|
||||
comment_offensive: Offensivo
|
||||
comment_other: Altro
|
||||
comment_spam: Spam
|
||||
links: Link
|
||||
suspect_word: 'Parola sospetta'
|
||||
trust: Karma
|
||||
user:
|
||||
username_impersonating: Impersonificazione
|
||||
username_nolike: 'Non mi piace'
|
||||
username_offensive: Offensivo
|
||||
username_other: Altro
|
||||
username_spam: Spam
|
||||
framework:
|
||||
banned_account_body: 'Significa che non potrai votare, segnalare o scrivere commenti.'
|
||||
banned_account_header: 'Il tuo account è attualmente bloccato.'
|
||||
changed_name:
|
||||
msg: 'Il tuo nuovo username è sotto esame da parte del nostro team di moderatori.'
|
||||
comment: commento
|
||||
comment_is_deleted: 'Questo utente ha eliminato il suo account.'
|
||||
comment_is_hidden: 'Questo commento non è disponibile.'
|
||||
comment_is_ignored: 'Questo commento è nascosto perchè hai ignorato questo utente.'
|
||||
comment_is_rejected: 'Hai rifiutato questo commento.'
|
||||
comments: commenti
|
||||
configure_stream: Configura
|
||||
content_not_available: 'Questo contenuto non è disponibile'
|
||||
edit_name:
|
||||
button: Invia
|
||||
error: 'L''username può contenere solo lettere numeri o _'
|
||||
label: 'Nuovo username'
|
||||
msg: 'Il tuo account è attualmente sospeso perchè il tuo username è considerato inappropriato. Per ripristinare il tuo account inserisci un nuovo username. Contattaci se hai qualche domanda.'
|
||||
my_comments: 'I miei commenti'
|
||||
my_profile: 'Il mio profilo'
|
||||
new_count: 'Visualizza {0} e {1}'
|
||||
profile: Profilo
|
||||
show_all_comments: 'Visualizza tutti i commenti'
|
||||
show_all_replies: 'Visualizza tutte le risposte'
|
||||
show_more_replies: 'Visualizza più risposte'
|
||||
success_bio_update: 'La tua descrizione è stata aggiornata'
|
||||
success_name_update: 'Il tuo username è stato aggiornato'
|
||||
success_update_settings: 'Le modifiche apportate sono state applicate al thread dei commenti in questo articolo'
|
||||
view_more_comments: 'visualizza più commenti'
|
||||
view_reply: 'visualizza risposta'
|
||||
from_settings_page: 'Dalla pagina del profilo puoi vedere la tua cronologia dei commenti.'
|
||||
install:
|
||||
add_organization:
|
||||
description: 'Inserisci il nome della tua organizzazione. Questa apparirà nelle email di invito ai nuovi membri.'
|
||||
label: 'Nome dell''organizzazione'
|
||||
save: Salva
|
||||
create:
|
||||
confirm_password: 'Conferma password'
|
||||
email: 'Indirizzo email'
|
||||
organization_contact_email: 'Indirizzo email dell''organizzazione'
|
||||
password: Password
|
||||
save: Salva
|
||||
username: Username
|
||||
final:
|
||||
close: 'Chiudi l''installer'
|
||||
description: 'Grazie per aver installato Talk! Ti abbiamo inviato una email per verificare il tuo indirizzo email. Mentre termini la configurazione del tuo account, puoi iniziare a interagire con i tuoi lettori.'
|
||||
launch: 'Avvia Talk'
|
||||
initial:
|
||||
description: 'Configura la tua comunità Talk in pochi passi.'
|
||||
submit: Inizia
|
||||
permitted_domains:
|
||||
description: 'Inserisci i domini che vuoi autorizzare per Talk. Per esempio i tuoi ambienti di sviluppo, test o produzione (ex. localhost:3000 staging.domain.com domain.com).'
|
||||
submit: 'Termina installazione'
|
||||
title: 'Domini autorizzati'
|
||||
like: 'Mi piace'
|
||||
loading_results: 'Caricamento risultati'
|
||||
login:
|
||||
email_address: 'Indirizzo email'
|
||||
forgot_password: 'Hai dimenticato la tua password?'
|
||||
go_back: Indietro
|
||||
sign_in: Accedi
|
||||
sign_in_button: Accedi
|
||||
sign_in_message: 'Accedi per interagire con la comunità.'
|
||||
password: Password
|
||||
reset_password_send_button: 'Reimposta Password'
|
||||
request_passowrd: 'Richiedi una nuova password.'
|
||||
team_sign_in: 'Accesso Team'
|
||||
marketing: 'Sembra si tratti di pubblicità/marketing'
|
||||
moderate_all_streams: 'Modera i commenti in Tutte le storie'
|
||||
moderate_this_stream: 'Modera questo thread dei commenti'
|
||||
modqueue:
|
||||
account: 'segnalazioni dell''account'
|
||||
actions: Azioni
|
||||
all: tutto
|
||||
all_streams: 'Tutti i thread di commenti'
|
||||
approve: Approva
|
||||
approved: Approvato
|
||||
ban_user: Bloccato
|
||||
ban_user_actions: 'Blocca utente'
|
||||
billion: M
|
||||
close: Chiudi
|
||||
empty_queue: 'Non ci sono più commenti da moderare.'
|
||||
flagged: contrassegnato
|
||||
jump_to_queue: 'Vai a una determinata coda'
|
||||
less_detail: 'Meno dettagli'
|
||||
likes: 'mi piace'
|
||||
million: m
|
||||
mod_faster: 'Modera più velocemente con le scorciatoie da tastiera'
|
||||
moderate: 'Modera →'
|
||||
more_detail: 'Più dettagli'
|
||||
navigation: Navigazione
|
||||
new: Nuovo
|
||||
newest_first: 'Nuovo primo'
|
||||
next_comment: 'Vai al prossimo commento'
|
||||
next_queue: 'Cambia coda'
|
||||
notify_accepted: '{0} ha accettato il commento "{1}"'
|
||||
notify_edited: '{0} ha modificato il commento "{1}"'
|
||||
notify_flagged: '{0} ha contrassegnato il commento "{1}"'
|
||||
notify_rejected: '{0} ha rifiutato il commento "{1}"'
|
||||
notify_reset: '{0} ha ripristinato lo stato del commento "{1}"'
|
||||
oldest_first: 'Primo più vecchio'
|
||||
premod: pre-moderazione
|
||||
prev_comment: 'Vai al commento precedente'
|
||||
reject: Rifiuta
|
||||
rejected: Rifiutato
|
||||
reply: Rispondi
|
||||
reported: Segnalato
|
||||
select_stream: 'Seleziona thread dei commenti'
|
||||
shift_key: ⇧
|
||||
shortcuts: Scorciatoie
|
||||
show_shortcuts: 'Visualizza scorciatoie'
|
||||
singleview: 'Modalità zen'
|
||||
sort: Ordina
|
||||
suspend: 'Sospendi utente'
|
||||
system_withheld: 'Sistema bloccato'
|
||||
thismenu: 'Apri questo menu'
|
||||
thousand: k
|
||||
toggle_search: 'Apri ricerca'
|
||||
try_these: 'Prova queste'
|
||||
view_more_shortcuts: 'Visualizza più scorciatoie'
|
||||
my_comment_history: 'La mia cronologia di commenti'
|
||||
name: Nome
|
||||
no_agree_comment: 'Non concordo con questo commento'
|
||||
no_like_bio: 'Non apprezzo questa descrizione'
|
||||
no_like_username: 'Non apprezzo questo username'
|
||||
other: Altro
|
||||
password_reset:
|
||||
change_password: 'Cambia password'
|
||||
change_password_help: 'Inserisci una nuova password per accedere'
|
||||
confirm_new_password: 'Conferma la nuova password'
|
||||
mail_sent: 'Se hai già un account ti è stata inviata una email con un link per reimpostare la password'
|
||||
new_password: 'Nuova password'
|
||||
new_password_help: 'La password deve avere almeno 8 caratteri'
|
||||
set_new_password: 'Cambia la tua password'
|
||||
permalink: Condividi
|
||||
personal_info: 'Questo commento contiene dati personali'
|
||||
post: Pubblica
|
||||
profile: Profilo
|
||||
profile_settings: Impostazioni
|
||||
reject_username:
|
||||
description_notify: 'La sospensione di questo utente disabiliterà temporaneamente il loro account.'
|
||||
description_reject: 'Sei sicuro di volere bloccare temporaneamente questo utente perchè {0}? Accettando sospenderai temporaneamente questo utente finché non riscriveranno il loro {0}.'
|
||||
email_message_reject: 'Un''altro membro della comunità ha recentemente segnalato il tuo username consigliando una revisione. A causa del suo contenuto, il tuo username è stato rifiutato. Significa che non potrai più commentare, apprezzare o segnalare contenuti fino a quando non modificherai il tuo username. Inviaci una email per qualsiasi domanda o dubbio.'
|
||||
no_cancel: 'Non annullare'
|
||||
send: Invia
|
||||
suspend_user: 'Sospendi utente'
|
||||
title_notify: 'Avvisa l''utente della sua temporanea sospensione'
|
||||
title_reject: 'Abbiamo notato che hai rifiutato un nome utente'
|
||||
username: username
|
||||
write_message: 'Scrivi un messaggio'
|
||||
yes_suspend: 'Si, sospendi'
|
||||
reject_username_dialog:
|
||||
cancel: Annulla
|
||||
description: 'Aiutaci a capire'
|
||||
message: 'Motivi per la segnalazione (Opzionale)'
|
||||
reason: Ragione
|
||||
reject_username: 'Rifiuta username'
|
||||
title: 'Rifiuta username'
|
||||
reply: Rispondi
|
||||
report: Segnala
|
||||
report_notif: 'Grazie per aver segnalato questo commento. Il nostro team di moderatori è stato avvisato e lo revisionerà presto.'
|
||||
report_notif_remove: 'La tua segnalazione è stata rimossa.'
|
||||
reported: Segnalato
|
||||
settings:
|
||||
from_settings_page: 'Dalla pagina del profilo puoi vedere la tua cronologia dei commenti.'
|
||||
my_comment_history: 'La mia cronologia dei commenti'
|
||||
profile: Profilo
|
||||
profile_settings: 'Impostazioni profilo'
|
||||
sign_in: Accedi
|
||||
to_access: 'per accedere al profilo'
|
||||
user_no_comment: 'Non hai ancora pubblicato un commento. Partecipa alla conversazione!'
|
||||
step_1_header: 'Segnala un problema'
|
||||
step_2_header: 'Aiutaci a capire'
|
||||
step_3_header: 'Grazie per la tua partecipazione'
|
||||
stream:
|
||||
all_comments: 'Tutti i commenti'
|
||||
comment_not_found: 'Questo commento è stato rimosso o non esiste.'
|
||||
no_comments: 'Non ci sono ancora commenti. Perchè non ne pubblichi uno?'
|
||||
no_comments_and_closed: 'Non c''era alcun commento in questo articolo.'
|
||||
temporarily_suspended: 'In conformità con le linee guida della comunità {0}, il tuo account è stato temporaneamente sospeso. Torna a partecipare alla conversazione {1}.'
|
||||
streams:
|
||||
all: Tutti
|
||||
article: Storia
|
||||
closed: Chiuso
|
||||
empty_result: 'Questa ricerca non ha ottenuto risultati. Prova ad amplicare la tua ricerca.'
|
||||
filter_streams: 'Filtra i thread dei commenti'
|
||||
most_recent_stories: 'Storie più recenti'
|
||||
newest: Nuovi
|
||||
no_results: 'Nessun risultato'
|
||||
oldest: Vecchi
|
||||
open: Apri
|
||||
pubdate: 'Data di pubblicazione'
|
||||
search: Cerca
|
||||
search_results: 'Risultati della ricerca'
|
||||
sort_by: 'Ordina per'
|
||||
status: 'Status del thread dei commenti'
|
||||
stream_status: 'Status del thread dei commenti'
|
||||
suspenduser:
|
||||
cancel: Annulla
|
||||
day: '{0} giorno'
|
||||
days: '{0} giorni'
|
||||
description_notify: 'La sospensione di questo utente disabiliterà temporaneamente il loro account.'
|
||||
description_suspend: 'Stai sospendendo {0}. Questo commento sarà inserito tra quelli rifiutati, e {0} non potrà apprezzare, segnalare, rispondere o pubblicare fino al termine del periodo di sospensione.'
|
||||
email_message_suspend: "Caro {0},\n\nIn conformità con le linee guida della comunità, il tuo account è stato temporaneamente sospenso. Durante il periodo di sospension non potrai commentare, segnalare o interagire con la comunità. Puoi tornare a partecipare dal {2}."
|
||||
hour: '{0} ora'
|
||||
hours: '{0} ore'
|
||||
notify_suspend_until: 'L''utente {0} è stato temporaneamente sospeso. Questa sospensione finirà automaticamente {1}.'
|
||||
one_hour: '1 ora'
|
||||
select_duration: 'Seleziona la durata della sospensione'
|
||||
send: Invia
|
||||
suspend_user: 'Sospendi utente'
|
||||
title_notify: 'Avvisa l''utente della sua temporanea sospensione'
|
||||
title_suspend: 'Sospendi utente'
|
||||
write_message: 'Scrivi un messaggio'
|
||||
thank_you: 'Apprezziamo il tuo feedback. Un moderatore revisionerà la tua segnalazione.'
|
||||
user:
|
||||
bio_flags: 'segnalazioni per questa descrizione'
|
||||
user_bio: 'Descrizione utente'
|
||||
username_flags: 'segnalazioni per questo utente'
|
||||
user_detail:
|
||||
all: Tutti
|
||||
ban: 'Blocca utente'
|
||||
banned: Bloccato
|
||||
email: Email
|
||||
id: ID
|
||||
karma: Karma
|
||||
karma_docs_link: 'https://docs.coralproject.net/talk/trust/#user-karma-score'
|
||||
learn_more: 'Maggiori informazioni'
|
||||
member_since: 'Membro dal'
|
||||
reject_rate: 'Tasso di rifiuto'
|
||||
reject_username: 'Username rifiutato'
|
||||
rejected: Rifiutato
|
||||
remove_ban: 'Ban rimosso'
|
||||
remove_suspension: 'Sospensione rimossa'
|
||||
suspend: 'Utente sospeso'
|
||||
suspended: Sospeso
|
||||
total_comments: 'Commenti totali'
|
||||
unreliable: Inaffidabile
|
||||
user_history: 'Cronologia utente'
|
||||
user_karma_score: 'Punteggio Karma dell''utente'
|
||||
username: Username
|
||||
username_needs_approval: 'L''username necessita di approvazione'
|
||||
username_rejected: 'Username rifiutato'
|
||||
user_history:
|
||||
action: Azione
|
||||
ban_removed: 'Ban rimosso'
|
||||
date: Data
|
||||
suspended: 'Sospeso, {0}'
|
||||
suspension_removed: 'Sospensione rimossa'
|
||||
system: Sistema
|
||||
taken_by: 'Preso da'
|
||||
user_banned: 'Utente bloccato'
|
||||
username_status: 'Username {0}'
|
||||
user_impersonating: 'Questo utente sta impersonando'
|
||||
user_no_comment: 'Non hai ancora pubblicato un commento. Partecipa alla discussione!'
|
||||
username_offensive: 'Questo username è offensivo'
|
||||
validators:
|
||||
confirm_email: 'Le email non coincidono. Perfavore riprova.'
|
||||
confirm_password: 'Le password non coincidono. Perfavore riprova.'
|
||||
required: 'Questo campo è obbligatorio'
|
||||
verify_email: 'Inserisci un email valida.'
|
||||
verify_organization_name: 'Il nome dell''organizzazione può contenere solo lettere o numeri.'
|
||||
verify_password: 'La password deve contenere almeno 8 caratteri'
|
||||
verify_username: 'Gli username possono contenere solo lettere numeri e _'
|
||||
view_conversation: 'Visualizza conversazione'
|
||||
your_account_has_been_banned: 'Il tuo account è stato bloccato.'
|
||||
your_account_has_been_suspended: 'Il tuo account è stato temporaneamente sospeso.'
|
||||
your_username_has_been_rejected: 'Il tuo account è stato sospeso perchè il tuo username è ritenuto inappropriato. Per ripristinare il tuo account inserisci un nuovo username.'
|
||||
+3
-3
@@ -123,8 +123,8 @@ nl_NL:
|
||||
enable_questionbox: 'Stel een vraag aan de lezers'
|
||||
enable_questionbox_description: 'Deze vraag zal bovenaan de conversatie verschijnen. Vraag lezers naar een probleem in het artikel, poneer discussie vragen, enzovoort.'
|
||||
hours: Uren
|
||||
include_comment_stream: 'Neem conversatie beschrijving op voor lezers.'
|
||||
include_comment_stream_desc: 'Schrijf een bericht voor boven je conversatie. Poneer een stelling, wijs op de community richtlijnen, etc.'
|
||||
code_of_conduct_summary: 'Neem conversatie beschrijving op voor lezers.'
|
||||
code_of_conduct_summary_desc: 'Schrijf een bericht voor boven je conversatie. Poneer een stelling, wijs op de community richtlijnen, etc.'
|
||||
include_question_here: 'Schrijf je vraag hier:'
|
||||
include_text: 'Schrijf hier je tekst.'
|
||||
moderate: Modereer
|
||||
@@ -197,6 +197,7 @@ nl_NL:
|
||||
CANNOT_IGNORE_STAFF: 'Kan geen Staff-leden negeren.'
|
||||
COMMENT_PARENT_NOT_VISIBLE: 'De reactie waarop je probeert te reageren bestaat niet of is inmiddels verwijderd.'
|
||||
COMMENT_TOO_SHORT: 'Reacties moeten meer dan één teken hebben. Herzie je reactie en probeer opnieuw.'
|
||||
COMMENT_TOO_LONG: 'Tekst is te lang'
|
||||
COMMENTING_CLOSED: 'Reageren is al afgesloten.'
|
||||
confirm_password: 'Wachtwoorden komen niet overeen. Controleer opnieuw.'
|
||||
EDIT_USERNAME_NOT_AUTHORIZED: 'Je bent niet gemachtigd om je gebruikersnaam te wijzigen.'
|
||||
@@ -239,7 +240,6 @@ nl_NL:
|
||||
reasons:
|
||||
comment:
|
||||
banned_word: 'Geblokeerd woord'
|
||||
body_count: 'Tekst is te lang'
|
||||
comment_noagree: 'Niet eens'
|
||||
comment_offensive: Aanstootgevend
|
||||
comment_other: Anders
|
||||
|
||||
+4
-4
@@ -130,8 +130,8 @@ pt_BR:
|
||||
enable_questionbox: 'Faça uma pergunta aos leitores'
|
||||
enable_questionbox_description: 'Esta pergunta aparecerá no topo da lista de comentários. Pergunte aos leitores sobre um determinado problema no artigo, abra o assunto para discussão, etc.'
|
||||
hours: Horas
|
||||
include_comment_stream: 'Incluir descrição da lista comentários para leitores'
|
||||
include_comment_stream_desc: 'Escreva uma mensagem para adicionar ao topo do seu hilo de comentários. Posicionar um tópico, incluem diretrizes comunitárias, etc.'
|
||||
code_of_conduct_summary: 'Incluir descrição da lista comentários para leitores'
|
||||
code_of_conduct_summary_desc: 'Escreva uma mensagem para adicionar ao topo do seu hilo de comentários. Posicionar um tópico, incluem diretrizes comunitárias, etc.'
|
||||
include_question_here: 'Escreva sua pergunta aqui:'
|
||||
include_text: 'Inclua seu texto aqui:'
|
||||
moderate: Moderar
|
||||
@@ -209,7 +209,7 @@ pt_BR:
|
||||
to_confirm: 'Para confirmar a conta, visite este link: '
|
||||
password_change:
|
||||
body: "A sua senha foi alterada.\n\nSe você não solicitou essa alteracão, por favor nos contate em {0}"
|
||||
subject: '{0} password change'
|
||||
subject: '{0} password change'
|
||||
password_reset:
|
||||
if_you_did: 'Se você solicitou isso, '
|
||||
please_click: 'clique aqui para redefinir sua senha.'
|
||||
@@ -223,7 +223,7 @@ pt_BR:
|
||||
copied: 'Copiado'
|
||||
error:
|
||||
ALREADY_EXISTS: 'O recurso já existe'
|
||||
AUTHENTICATION: ‘Ocorreu um erro durante a autenticação da sua conta’
|
||||
AUTHENTICATION: ‘Ocorreu um erro durante a autenticação da sua conta’
|
||||
CANNOT_IGNORE_STAFF: 'Não é possível ignorar membros Staff.'
|
||||
COMMENT_PARENT_NOT_VISIBLE: 'O comentário que você está respondendo foi removido ou não existe.'
|
||||
COMMENT_TOO_SHORT: 'Seu comentário precisar ter mais de um caracter. Revise seu comentário e envie novamente'
|
||||
|
||||
+2
-2
@@ -114,8 +114,8 @@ zh_CN:
|
||||
enable_questionbox: 向读者提问
|
||||
enable_questionbox_description: 该问题将在评论流顶部出现。可以就文章中特定内容发问,也可以设置一个讨论问题,等等。
|
||||
hours: 小时
|
||||
include_comment_stream: 开启评论流描述
|
||||
include_comment_stream_desc: 填写将在评论流顶部出现的描述。可以写评论主题、社群指引方针,等等。
|
||||
code_of_conduct_summary: 开启评论流描述
|
||||
code_of_conduct_summary_desc: 填写将在评论流顶部出现的描述。可以写评论主题、社群指引方针,等等。
|
||||
include_question_here: 此处输入问题:
|
||||
include_text: 此处输入文本。
|
||||
moderate: 审查
|
||||
|
||||
+2
-2
@@ -113,8 +113,8 @@ zh_TW:
|
||||
enable_questionbox: 向讀者提問
|
||||
enable_questionbox_description: 該問題將會在評論流置頂。您可以詢問其他讀者有關文章中的具體時間或是提出討論等
|
||||
hours: 小時
|
||||
include_comment_stream: 包含讀者的評論流描述
|
||||
include_comment_stream_desc: 留言將在您的評論流中置頂。發布一個社區規則等
|
||||
code_of_conduct_summary: 包含讀者的評論流描述
|
||||
code_of_conduct_summary_desc: 留言將在您的評論流中置頂。發布一個社區規則等
|
||||
include_question_here: 請在此處輸入問題:
|
||||
include_text: 在此插入您的文本
|
||||
moderate: 審核
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "talk",
|
||||
"version": "4.6.4",
|
||||
"version": "4.6.6",
|
||||
"description": "A better commenting experience from Mozilla, The New York Times, and the Washington Post. https://coralproject.net",
|
||||
"main": "app.js",
|
||||
"private": true,
|
||||
@@ -201,7 +201,7 @@
|
||||
"smoothscroll-polyfill": "^0.3.5",
|
||||
"snake-case": "2.1.0",
|
||||
"style-loader": "^0.16.0",
|
||||
"subscriptions-transport-ws": "^0.8.3",
|
||||
"subscriptions-transport-ws": "^0.7.2",
|
||||
"supports-color": "^4",
|
||||
"timeago.js": "^2.0.3",
|
||||
"timekeeper": "^1.0.0",
|
||||
|
||||
@@ -219,7 +219,7 @@ es:
|
||||
register: "Registrar"
|
||||
sign_up: "Registro"
|
||||
confirm_password: "Confirmar Contraseña"
|
||||
username: "Nombre"
|
||||
username: "Nombre de Usuario"
|
||||
already_have_an_account: "¿Ya tienes una cuenta?"
|
||||
recover_password: "Recuperar la contraseña"
|
||||
email_in_use: "Este correo se encuentra en uso"
|
||||
|
||||
@@ -178,10 +178,12 @@ class Profile extends React.Component {
|
||||
},
|
||||
},
|
||||
notify,
|
||||
success: hasChangedUsername,
|
||||
} = this.props;
|
||||
const { editing, formData, showDialog } = this.state;
|
||||
|
||||
const usernameCanBeUpdated = canUsernameBeUpdated(status);
|
||||
const usernameCanBeUpdated =
|
||||
canUsernameBeUpdated(status) && !hasChangedUsername;
|
||||
|
||||
return (
|
||||
<section
|
||||
@@ -232,6 +234,7 @@ class Profile extends React.Component {
|
||||
validationType="username"
|
||||
disabled={!usernameCanBeUpdated}
|
||||
columnDisplay
|
||||
errorMsg={this.state.errors.newUsername}
|
||||
>
|
||||
<div className={styles.bottomText}>
|
||||
<span>
|
||||
@@ -307,6 +310,7 @@ Profile.propTypes = {
|
||||
notify: PropTypes.func.isRequired,
|
||||
username: PropTypes.string,
|
||||
emailAddress: PropTypes.string,
|
||||
success: PropTypes.bool.isRequired,
|
||||
};
|
||||
|
||||
export default Profile;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
import { compose, gql } from 'react-apollo';
|
||||
import { bindActionCreators } from 'redux';
|
||||
@@ -23,6 +24,14 @@ class AddEmailAddressDialog extends React.Component {
|
||||
|
||||
componentDidMount() {
|
||||
this.props.startAttach();
|
||||
document.body.style.minHeight = `${
|
||||
document.getElementById('talk-plugin-local-auth-email-dialog')
|
||||
.clientHeight
|
||||
}px`;
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
document.body.style.removeProperty('min-height');
|
||||
}
|
||||
|
||||
handleDone = () => {
|
||||
@@ -63,7 +72,7 @@ class AddEmailAddressDialog extends React.Component {
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<Dialog open={true}>
|
||||
<Dialog open={true} id="talk-plugin-local-auth-email-dialog">
|
||||
{step === 0 && <AddEmailForm onSubmit={this.handleSubmit} />}
|
||||
{step === 1 &&
|
||||
!requireEmailConfirmation && (
|
||||
|
||||
@@ -302,25 +302,28 @@ de:
|
||||
path: "Mein Profil > Profil-Einstellungen"
|
||||
alert: "E-Mail-Adresse hinzugefügt!"
|
||||
es:
|
||||
email:
|
||||
email_change_original:
|
||||
subject: Cambio de correo electrónico
|
||||
body: Su dirección de correo electrónico ha cambiado de {0} a {1}. Si no solicitó este cambio, póngase en contacto con {2}.
|
||||
error:
|
||||
NO_LOCAL_PROFILE: No hay una dirección de correo electrónico asociada a esta cuenta.
|
||||
LOCAL_PROFILE: Una dirección de correo electrónico ya está asociada a esta cuenta.
|
||||
INCORRECT_PASSWORD: La contraseña dada fue incorrecta.
|
||||
talk-plugin-local-auth:
|
||||
email:
|
||||
email_change_original:
|
||||
subject: Cambio de correo electrónico
|
||||
body: Su dirección de correo electrónico ha cambiado de {0} a {1}. Si no solicitó este cambio, póngase en contacto con {2}.
|
||||
error:
|
||||
NO_LOCAL_PROFILE: No hay una dirección de correo electrónico asociada a esta cuenta.
|
||||
LOCAL_PROFILE: Una dirección de correo electrónico ya está asociada a esta cuenta.
|
||||
INCORRECT_PASSWORD: La contraseña dada fue incorrecta.
|
||||
change_password:
|
||||
save: "Salvar"
|
||||
cancel: "Cancelar"
|
||||
edit: "Editar"
|
||||
changed_password_msg: "Senha alterada - Sua senha foi alterada com sucesso"
|
||||
forgot_password_sent: "Esqueceu a senha - Nós enviamos um email para recuperação da senha"
|
||||
change_password: "Cambiar Contraseña"
|
||||
passwords_dont_match: "Las contraseñas no coinciden"
|
||||
required_field: "Este campo es requerido"
|
||||
forgot_password: "Olvidaste tu contraseña?"
|
||||
save: "Guardar"
|
||||
cancel: "Cancelar"
|
||||
edit: "Editar"
|
||||
changed_password_msg: "Contraseña Actualizada - Tu contraseña ha sido exitosamente actualizada"
|
||||
forgot_password_sent: "Contraseña Olvidada - Te enviamos un email para recuperar tu contraseña"
|
||||
old_password: "Contraseña anterior"
|
||||
new_password: "Contraseña nueva"
|
||||
confirm_new_password: "Confirme contraseña nueva"
|
||||
change_username:
|
||||
change_username_note: "El usuario puede ser cambiado cada 14 días."
|
||||
is_not_eligible: "Ahora mismo no se puede cambiar su nombre de usuario."
|
||||
@@ -329,11 +332,13 @@ es:
|
||||
cancel: "Cancelar"
|
||||
confirm_username_change: "Confirmar Cambio de Usuario"
|
||||
description: "Estás intentando cambiar tu usuario. Tu nuevo usuario aparecerá en todos tus pasados y futuros comentarios."
|
||||
old_username: "Usuario viejo"
|
||||
old_username: "Usuario anterior"
|
||||
new_username: "Usuario nuevo"
|
||||
re_enter: "Escriba usuario nuevo otra vez"
|
||||
bottom_note: "Nota: No podrás cambiar tu usuario por 14 días"
|
||||
confirm_changes: "Confirmar Cambios"
|
||||
username_does_not_match: "El usuario no coincide"
|
||||
cant_be_equal: "Tu nuev@ {0} tiene que ser diferente"
|
||||
changed_username_success_msg: "Usuario Actualizado - Tu usuario ha sido exitosamente actualizado. No podrás cambiar el usuario por 14 días."
|
||||
change_username_attempt: "El usuario no puede ser actualizado. Los usuarios pueden ser cambiados cada 14 días."
|
||||
change_email:
|
||||
@@ -346,7 +351,7 @@ es:
|
||||
cancel: "Cancelar"
|
||||
change_email_msg: "Dirección de correo electrónico modificada. Esta dirección de correo electrónico ahora se utilizará para iniciar sesión y notificaciones por correo electrónico."
|
||||
add_email:
|
||||
add_email_address: "Agregar dirección de correo electrónico"
|
||||
add_email_address: "Confirmar"
|
||||
enter_email_address: "Introducir la dirección de correo electrónico:"
|
||||
invalid_email_address: "Dirección de correo electrónico no válida"
|
||||
confirm_email_address: "Confirmar el correo:"
|
||||
|
||||
@@ -10,9 +10,10 @@ plugin:
|
||||
---
|
||||
|
||||
Using the [Perspective API](http://perspectiveapi.com/), this
|
||||
plugin will warn users and reject comments that exceed the predefined toxicity
|
||||
threshold. For more information on what Toxic Comments are, check out the
|
||||
[Toxic Comments](/talk/toxic-comments/) documentation.
|
||||
plugin will warn users when comments exceed the predefined toxicity
|
||||
threshold. Toxic comments will be flagged and are held back from being posted until reviewed by a moderator.
|
||||
|
||||
For more information on what Toxic Comments are, check out the [Toxic Comments](/talk/toxic-comments/) documentation, and you can see how the plugin works on [this blog post](https://coralproject.net/blog/toxic-avenging/).
|
||||
|
||||
Configuration:
|
||||
|
||||
@@ -25,4 +26,5 @@ Configuration:
|
||||
- `TALK_PERSPECTIVE_TIMEOUT` - The timeout for sending a comment to
|
||||
be processed before it will skip the toxicity analysis, parsed by
|
||||
[ms](https://www.npmjs.com/package/ms). (Default `300ms`)
|
||||
- `TALK_PERSPECTIVE_DO_NOT_STORE` - Whether the API is permitted to store comment and context from this request. Stored comments will be used for future research and community model building purposes to improve the API over time. (Default `true`) [Perspective API - Analize Comment Request](https://github.com/conversationai/perspectiveapi/blob/master/api_reference.md#analyzecomment-request)
|
||||
- `TALK_PERSPECTIVE_DO_NOT_STORE` - Whether the API stores or deletes the comment text and context from this request after it has been evaluated. Stored comments will be used for future research and community model building purposes to improve the API over time. (Default `true`) [Perspective API - Analyze Comment Request](https://github.com/conversationai/perspectiveapi/blob/master/api_reference.md#analyzecomment-request)
|
||||
- `TALK_PERSPECTIVE_SEND_FEEDBACK` - If set to `TRUE`, this plugin will send back moderation actions as feedback to [Perspective](http://perspectiveapi.com/) to improve their model. (Default `FALSE`)
|
||||
|
||||
@@ -11,10 +11,10 @@ const getInfo = (toxicity, actions) => {
|
||||
let text = t('talk-plugin-toxic-comments.unlikely');
|
||||
if (toxicity > 0.8) {
|
||||
text = t('talk-plugin-toxic-comments.highly_likely');
|
||||
} else if (toxicity >= 0.5) {
|
||||
text = t('talk-plugin-toxic-comments.possibly');
|
||||
} else if (toxicity >= 0.7) {
|
||||
text = t('talk-plugin-toxic-comments.likely');
|
||||
} else if (toxicity >= 0.5) {
|
||||
text = t('talk-plugin-toxic-comments.possibly');
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -75,7 +75,7 @@ es:
|
||||
Puede editar el comentario o enviarlo para la revisión del moderador.
|
||||
talk-plugin-toxic-comments:
|
||||
unlikely: "Improbable"
|
||||
highly_likely: "Altamente Improbable"
|
||||
highly_likely: "Altamente Probable"
|
||||
possibly: "Posiblemente"
|
||||
likely: "Probable"
|
||||
toxic_comment: "Comentario Tóxico"
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
{
|
||||
"name": "@coralproject/talk-plugin-toxicity",
|
||||
"pluginName": "talk-plugin-toxicity",
|
||||
"name": "@coralproject/talk-plugin-toxic-comments",
|
||||
"pluginName": "talk-plugin-toxic-comments",
|
||||
"version": "0.0.1",
|
||||
"description": "Provides support for measuring the toxicity of user comments using the Perspectives API",
|
||||
"main": "index.js",
|
||||
"author": "The Coral Project Team <coral@mozillafoundation.org>",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"ms": "^2.0.0"
|
||||
}
|
||||
"author": "The Coral Project Team <coralcore@mozillafoundation.org>",
|
||||
"license": "Apache-2.0"
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ const config = {
|
||||
THRESHOLD: process.env.TALK_TOXICITY_THRESHOLD || 0.8,
|
||||
API_TIMEOUT: ms(process.env.TALK_PERSPECTIVE_TIMEOUT || '300ms'),
|
||||
DO_NOT_STORE: process.env.TALK_PERSPECTIVE_DO_NOT_STORE || true,
|
||||
SEND_FEEDBACK: process.env.TALK_PERSPECTIVE_SEND_FEEDBACK === 'TRUE',
|
||||
};
|
||||
|
||||
if (process.env.NODE_ENV !== 'test' && !config.API_KEY) {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
const { getScores, isToxic } = require('./perspective');
|
||||
const { getScores, submitFeedback, isToxic } = require('./perspective');
|
||||
const { SEND_FEEDBACK } = require('./config');
|
||||
const { ErrToxic } = require('./errors');
|
||||
|
||||
const { merge } = require('lodash');
|
||||
const debug = require('debug')('talk:plugin:toxic-comments');
|
||||
|
||||
function handlePositiveToxic(input) {
|
||||
input.status = 'SYSTEM_WITHHELD';
|
||||
input.actions =
|
||||
@@ -20,14 +24,15 @@ async function getScore(body) {
|
||||
scores = await getScores(body);
|
||||
} catch (err) {
|
||||
// Warn and let mutation pass.
|
||||
console.trace(err); // TODO: log/handle this differently?
|
||||
debug('Error sending to API: %o', err);
|
||||
return;
|
||||
}
|
||||
|
||||
return scores;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
// Create all the hooks that will enable Perspective to add scores to Comments.
|
||||
const hooks = {
|
||||
RootMutation: {
|
||||
editComment: {
|
||||
pre: async (_, { edit: { body }, edit }) => {
|
||||
@@ -58,3 +63,57 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
// If feedback sending is enabled, we need to add in the hooks for processing
|
||||
// feedback.
|
||||
if (SEND_FEEDBACK) {
|
||||
// statusMap provides a map of Talk names to ones Perspective are expecting.
|
||||
const statusMap = {
|
||||
ACCEPTED: 'APPROVED',
|
||||
REJECTED: 'DELETED',
|
||||
};
|
||||
|
||||
// Merge these hooks into the hooks for plugging into the graph operations.
|
||||
merge(hooks, {
|
||||
RootMutation: {
|
||||
// Hook into mutations associated with accepting/rejecting comments.
|
||||
setCommentStatus: {
|
||||
async post(root, args, ctx) {
|
||||
if (ctx.user && args.status in statusMap) {
|
||||
const comment = await ctx.loaders.Comments.get.load(args.id);
|
||||
if (comment) {
|
||||
const asset = await ctx.loaders.Assets.getByID.load(
|
||||
comment.asset_id
|
||||
);
|
||||
|
||||
// Submit feedback.
|
||||
submitFeedback(comment, asset, statusMap[args.status]);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
// Hook into mutations associated with featuring comments.
|
||||
addTag: {
|
||||
async post(root, args, ctx) {
|
||||
if (
|
||||
ctx.user &&
|
||||
args.tag.name === 'FEATURED' &&
|
||||
args.tag.item_type === 'COMMENTS'
|
||||
) {
|
||||
const comment = await ctx.loaders.Comments.get.load(args.tag.id);
|
||||
if (comment) {
|
||||
const asset = await ctx.loaders.Assets.getByID.load(
|
||||
comment.asset_id
|
||||
);
|
||||
|
||||
// Submit feedback.
|
||||
submitFeedback(comment, asset, 'HIGHLIGHTED');
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = hooks;
|
||||
|
||||
@@ -6,37 +6,70 @@ const {
|
||||
API_TIMEOUT,
|
||||
DO_NOT_STORE,
|
||||
} = require('./config');
|
||||
const debug = require('debug')('talk:plugin:toxic-comments');
|
||||
|
||||
// Load the global Talk configuration, we want to grab some variables..
|
||||
const { ROOT_URL } = require('config');
|
||||
|
||||
// Use the ROOT_URL to grab the domain to construct a communityID for the
|
||||
// feedback.
|
||||
const communityId = `Coral:${ROOT_URL}`;
|
||||
|
||||
async function send(method, body) {
|
||||
// Perform the fetch.
|
||||
const res = await fetch(`${API_ENDPOINT}/${method}?key=${API_KEY}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
timeout: API_TIMEOUT,
|
||||
body: JSON.stringify(body, null, 2),
|
||||
});
|
||||
if (!res.ok) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Grab the JSON from the request.
|
||||
const data = await res.json();
|
||||
|
||||
// Send the data back!
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scores from the perspective api
|
||||
* @param {string} text text to be anaylized
|
||||
*
|
||||
* @param {string} text text to be analyzed
|
||||
* @return {object} object containing toxicity scores
|
||||
*/
|
||||
async function getScores(text) {
|
||||
const response = await fetch(
|
||||
`${API_ENDPOINT}/comments:analyze?key=${API_KEY}`,
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
debug('Sending to Perspective: %o', text);
|
||||
|
||||
// Send the comment off to be analyzed.
|
||||
const data = await send('comments:analyze', {
|
||||
comment: {
|
||||
text,
|
||||
},
|
||||
// TODO: support other languages.
|
||||
languages: ['en'],
|
||||
doNotStore: DO_NOT_STORE,
|
||||
requestedAttributes: {
|
||||
TOXICITY: {},
|
||||
SEVERE_TOXICITY: {},
|
||||
},
|
||||
});
|
||||
if (!data || data.error) {
|
||||
debug('Received Error when submitting: %o', data.error);
|
||||
return {
|
||||
TOXICITY: {
|
||||
summaryScore: null,
|
||||
},
|
||||
timeout: API_TIMEOUT,
|
||||
body: JSON.stringify({
|
||||
comment: {
|
||||
text,
|
||||
},
|
||||
SEVERE_TOXICITY: {
|
||||
summaryScore: null,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
// TODO: support other languages.
|
||||
languages: ['en'],
|
||||
doNotStore: DO_NOT_STORE,
|
||||
requestedAttributes: {
|
||||
TOXICITY: {},
|
||||
SEVERE_TOXICITY: {},
|
||||
},
|
||||
}),
|
||||
}
|
||||
);
|
||||
const data = await response.json();
|
||||
return {
|
||||
TOXICITY: {
|
||||
summaryScore: data.attributeScores.TOXICITY.summaryScore.value,
|
||||
@@ -49,6 +82,7 @@ async function getScores(text) {
|
||||
|
||||
/**
|
||||
* Get toxicity probability
|
||||
*
|
||||
* @param {object} scores scores as returned by `getScores`
|
||||
* @return {number} toxicity probability from 0 - 1.0
|
||||
*/
|
||||
@@ -57,7 +91,9 @@ function getProbability(scores) {
|
||||
}
|
||||
|
||||
/**
|
||||
* isToxic determines if given probabilty or scores meets the toxicity threshold.
|
||||
* isToxic determines if given probability or scores meets the toxicity
|
||||
* threshold.
|
||||
*
|
||||
* @param {object|number} scoresOrProbability scores or probability
|
||||
* @return {boolean}
|
||||
*/
|
||||
@@ -69,9 +105,23 @@ function isToxic(scoresOrProbability) {
|
||||
return probability > THRESHOLD;
|
||||
}
|
||||
|
||||
/**
|
||||
* wrapError will mask API key in error messages.
|
||||
*
|
||||
* @param {Error} err the error potentially containing the API key
|
||||
*/
|
||||
function wrapError(err) {
|
||||
if (err.message) {
|
||||
err.message = err.message.replace(API_KEY, '***');
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/**
|
||||
* maskKeyInError is a decorator that calls fn and masks the
|
||||
* API_KEY in errors before throwing.
|
||||
*
|
||||
* @param {function} fn Function that returns a Promise
|
||||
* @return {function} decorated function
|
||||
*/
|
||||
@@ -80,16 +130,83 @@ function maskKeyInError(fn) {
|
||||
try {
|
||||
return await fn(...args);
|
||||
} catch (err) {
|
||||
if (err.message) {
|
||||
err.message = err.message.replace(API_KEY, '***');
|
||||
}
|
||||
throw err;
|
||||
throw wrapError(err);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* submitFeedback will send back moderation feedback to Perspective.
|
||||
*
|
||||
* @param {Object} comment the Comment that feedback is related to
|
||||
* @param {Object} asset the Asset where the Comment was made on
|
||||
* @param {Object} status the attribute to send back to Perspective
|
||||
*/
|
||||
const submitFeedback = (
|
||||
{
|
||||
id: Coral_comment_id, // Comment ID.
|
||||
parent_id: reply_to_id_Coral_comment_id, // Comment parent id (reply parent).
|
||||
body: text, // Comment body.
|
||||
}, // Comment.
|
||||
{
|
||||
url, // Asset (article) URL.
|
||||
}, // Asset (article).
|
||||
status // Either APPROVED, DELETED, or HIGHLIGHTED.
|
||||
) =>
|
||||
// Handle this operation in the next tick, so it does not affect the current
|
||||
// comment processing.
|
||||
process.nextTick(async () => {
|
||||
// Construct a client token.
|
||||
const clientToken = `comment:${Coral_comment_id}`;
|
||||
|
||||
try {
|
||||
// Send the feedback to perspective.
|
||||
const body = await send('comments:suggestscore', {
|
||||
comment: {
|
||||
text,
|
||||
},
|
||||
context: {
|
||||
entries: [
|
||||
{
|
||||
text: JSON.stringify({
|
||||
url,
|
||||
reply_to_id_Coral_comment_id,
|
||||
Coral_comment_id,
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
attributeScores: {
|
||||
[status]: {
|
||||
summaryScore: {
|
||||
value: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
languages: ['EN'],
|
||||
communityId,
|
||||
clientToken,
|
||||
});
|
||||
if (!body || body.clientToken !== clientToken) {
|
||||
throw new Error(
|
||||
`"${JSON.stringify(
|
||||
body
|
||||
)}" did not contain the clientToken we expected`
|
||||
);
|
||||
}
|
||||
|
||||
debug(`sent ${status} feedback to perspective`);
|
||||
} catch (err) {
|
||||
console.error(
|
||||
`could not send ${status} feedback to perspective`,
|
||||
wrapError(err)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
getScores: maskKeyInError(getScores),
|
||||
getProbability,
|
||||
submitFeedback,
|
||||
isToxic,
|
||||
};
|
||||
|
||||
@@ -120,6 +120,11 @@ function SharedSecret({ kid = undefined, secret = null }, algorithm) {
|
||||
throw new Error('Secret cannot have a zero length');
|
||||
}
|
||||
|
||||
// If the secret is base64 encoded, then decode it!
|
||||
if (secret.startsWith('base64:')) {
|
||||
secret = Buffer.from(secret.substring(7), 'base64').toString();
|
||||
}
|
||||
|
||||
return new Secret({
|
||||
kid,
|
||||
signingKey: secret,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { ErrCommentTooShort } = require('../../../errors');
|
||||
const { ErrCommentTooShort, ErrCommentTooLong } = require('../../../errors');
|
||||
|
||||
// This phase checks to see if the comment is long enough.
|
||||
module.exports = (
|
||||
@@ -17,19 +17,6 @@ module.exports = (
|
||||
|
||||
// Reject if the comment is too long
|
||||
if (charCountEnable && comment.body.length > charCount) {
|
||||
// Add the flag related to Trust to the comment.
|
||||
return {
|
||||
status: 'REJECTED',
|
||||
actions: [
|
||||
{
|
||||
action_type: 'FLAG',
|
||||
user_id: null,
|
||||
group_id: 'BODY_COUNT',
|
||||
metadata: {
|
||||
count: comment.body.length,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
throw new ErrCommentTooLong(comment.body.length, charCount);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ module.exports = (
|
||||
},
|
||||
}
|
||||
) => {
|
||||
if (premodLinksEnable && linkify.test(comment.body)) {
|
||||
if (premodLinksEnable && linkify.test(comment.body.replace(/\xAD/g, ''))) {
|
||||
// Add the flag related to Trust to the comment.
|
||||
return {
|
||||
status: 'SYSTEM_WITHHELD',
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
const kue = require('./kue');
|
||||
|
||||
/**
|
||||
* Exposes a service object to allow operations to execute against the scraper.
|
||||
* @type {Object}
|
||||
*/
|
||||
const scraper = {
|
||||
/**
|
||||
* Create the new Task kue singleton.
|
||||
*/
|
||||
task: new kue.Task({
|
||||
name: 'scraper',
|
||||
}),
|
||||
|
||||
/**
|
||||
* Creates a new scraper job and scrapes the url when it gets processed.
|
||||
*/
|
||||
async create(ctx, id) {
|
||||
ctx.log.info({ assetID: id }, 'Creating job');
|
||||
|
||||
const job = await scraper.task.create({
|
||||
title: `Scrape for asset ${id}`,
|
||||
id: ctx.id,
|
||||
asset_id: id,
|
||||
});
|
||||
|
||||
ctx.log.info({ jobID: job.id, assetID: id }, 'Created job');
|
||||
|
||||
return job;
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = scraper;
|
||||
@@ -0,0 +1,96 @@
|
||||
const fetch = require('node-fetch');
|
||||
const ProxyAgent = require('proxy-agent');
|
||||
const { merge } = require('lodash');
|
||||
|
||||
const { SCRAPER_HEADERS, SCRAPER_PROXY_URL } = require('../../config');
|
||||
const kue = require('../kue');
|
||||
const { version } = require('../../package.json');
|
||||
|
||||
// Load the scraper with the rules.
|
||||
const metascraper = require('metascraper').load([
|
||||
require('metascraper-title')(),
|
||||
require('metascraper-description')(),
|
||||
require('metascraper-image')(),
|
||||
require('metascraper-author')(),
|
||||
require('metascraper-date')(),
|
||||
require('./rules/modified')(),
|
||||
require('./rules/section')(),
|
||||
]);
|
||||
|
||||
let customHeaders = {};
|
||||
try {
|
||||
customHeaders = JSON.parse(SCRAPER_HEADERS);
|
||||
} catch (err) {
|
||||
console.error('Cannot parse TALK_SCRAPER_HEADERS');
|
||||
throw err;
|
||||
}
|
||||
|
||||
// Parse the headers to be added to the scraper.
|
||||
const headers = merge(
|
||||
{
|
||||
'User-Agent': `Coral-Talk/${version}`,
|
||||
},
|
||||
customHeaders
|
||||
);
|
||||
|
||||
// Add proxy configuration if exists.
|
||||
const agent = SCRAPER_PROXY_URL ? new ProxyAgent(SCRAPER_PROXY_URL) : null;
|
||||
|
||||
/**
|
||||
* Exposes a service object to allow operations to execute against the scraper.
|
||||
* @type {Object}
|
||||
*/
|
||||
const scraper = {
|
||||
/**
|
||||
* Create the new Task kue singleton.
|
||||
*/
|
||||
task: new kue.Task({
|
||||
name: 'scraper',
|
||||
}),
|
||||
|
||||
/**
|
||||
* Creates a new scraper job and scrapes the url when it gets processed.
|
||||
*/
|
||||
async create(ctx, id) {
|
||||
ctx.log.info({ assetID: id }, 'Creating job');
|
||||
|
||||
const job = await scraper.task.create({
|
||||
title: `Scrape for asset ${id}`,
|
||||
id: ctx.id,
|
||||
asset_id: id,
|
||||
});
|
||||
|
||||
ctx.log.info({ jobID: job.id, assetID: id }, 'Created job');
|
||||
|
||||
return job;
|
||||
},
|
||||
|
||||
/**
|
||||
* Scrapes the given asset for metadata.
|
||||
*/
|
||||
async scrape(url) {
|
||||
const res = await fetch(url, {
|
||||
headers,
|
||||
agent,
|
||||
});
|
||||
const html = await res.text();
|
||||
|
||||
// Get the metadata from the scraped html.
|
||||
const meta = await metascraper({
|
||||
html,
|
||||
url,
|
||||
});
|
||||
|
||||
return {
|
||||
title: meta.title || '',
|
||||
description: meta.description || '',
|
||||
image: meta.image ? meta.image : '',
|
||||
author: meta.author || '',
|
||||
publication_date: meta.date || '',
|
||||
modified_date: meta.modified || '',
|
||||
section: meta.section || '',
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = scraper;
|
||||
@@ -30,6 +30,10 @@ module.exports = {
|
||||
.waitForElementVisible('@signOutButton')
|
||||
.click('@signOutButton');
|
||||
},
|
||||
login(user) {
|
||||
this.expect.section('@login').to.be.visible;
|
||||
return this.section.login.login(user);
|
||||
},
|
||||
navigateAndLogin(user) {
|
||||
this.navigate().expect.section('@login').to.be.visible;
|
||||
return this.section.login.login(user);
|
||||
|
||||
@@ -20,13 +20,18 @@ module.exports = {
|
||||
client.end();
|
||||
},
|
||||
|
||||
'Admin goes to login': client => {
|
||||
const adminPage = client.page.admin();
|
||||
adminPage.navigate().expect.element('drawerButton').to.not.be.present;
|
||||
},
|
||||
|
||||
'Admin logs in': client => {
|
||||
const adminPage = client.page.admin();
|
||||
const {
|
||||
testData: { admin },
|
||||
} = client.globals;
|
||||
|
||||
adminPage.navigateAndLogin(admin);
|
||||
adminPage.login(admin);
|
||||
},
|
||||
|
||||
'Admin goes to Stories': client => {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<h1>{{ t('password_reset.set_new_password') }}</h1>
|
||||
<p>{{ t('password_reset.change_password_help') }}</p>
|
||||
<div class="error-console"><span></span></div>
|
||||
<form id="reset-password-form">
|
||||
<form id="reset-password-form" method="post">
|
||||
<label for="password">
|
||||
{{ t('password_reset.new_password') }}
|
||||
<input type="password" name="password" placeholder="{{ t('password_reset.new_password') }}" />
|
||||
|
||||
Reference in New Issue
Block a user