mirror of
https://github.com/wassname/talk.git
synced 2026-07-10 00:18:56 +08:00
Add YAML loader. Fix i18n module to get YAML files.
This commit is contained in:
@@ -3,9 +3,8 @@ import Layout from 'coral-admin/src/components/ui/Layout';
|
||||
import styles from './NotFound.css';
|
||||
import {Button, TextField, Alert, Success} from 'coral-ui';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
import Recaptcha from 'react-recaptcha';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
class AdminLogin extends React.Component {
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@ import {Button, Icon} from 'coral-ui';
|
||||
import styles from './BanUserButton.css';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations.json';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const BanUserButton = ({user, ...props}) => (
|
||||
<div className={styles.ban}>
|
||||
|
||||
@@ -5,8 +5,7 @@ import styles from './BanUserDialog.css';
|
||||
import Button from 'coral-ui/components/Button';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const onBanClick = (userId, commentId, handleBanUser, rejectComment, handleClose) => (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import React, {PropTypes} from 'react';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations';
|
||||
import styles from 'coral-admin/src/containers/Dashboard/Dashboard.css';
|
||||
import {Icon} from 'coral-ui';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
const refreshIntervalSeconds = 60 * 5;
|
||||
|
||||
class CountdownTimer extends React.Component {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../translations.json';
|
||||
import React, {PropTypes} from 'react';
|
||||
import Modal from 'components/Modal';
|
||||
import styles from './ModerationKeysModal.css';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const shortcuts = [
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@ import {Navigation, Drawer} from 'react-mdl';
|
||||
import {IndexLink, Link} from 'react-router';
|
||||
import styles from './Drawer.css';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../../translations.json';
|
||||
|
||||
const CoralDrawer = ({handleLogout, restricted = false}) => (
|
||||
<Drawer className={styles.header}>
|
||||
@@ -50,6 +49,6 @@ CoralDrawer.propTypes = {
|
||||
restricted: PropTypes.bool // hide app elements from a logged out user
|
||||
};
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
export default CoralDrawer;
|
||||
|
||||
@@ -3,7 +3,6 @@ import {Navigation, Header, IconButton, MenuItem, Menu} from 'react-mdl';
|
||||
import {Link, IndexLink} from 'react-router';
|
||||
import styles from './Header.css';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../../translations.json';
|
||||
import {Logo} from './Logo';
|
||||
|
||||
const CoralHeader = ({handleLogout, showShortcuts = () => {}, restricted = false}) => (
|
||||
@@ -78,6 +77,6 @@ CoralHeader.propTypes = {
|
||||
restricted: PropTypes.bool // hide elemnts from a user that's logged out
|
||||
};
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
export default CoralHeader;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations.json';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
import styles from './Community.css';
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import React from 'react';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations.json';
|
||||
|
||||
import styles from './Community.css';
|
||||
import Table from './Table';
|
||||
import {Pager, Icon} from 'coral-ui';
|
||||
import EmptyCard from '../../components/EmptyCard';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const tableHeaders = [
|
||||
{
|
||||
|
||||
@@ -3,10 +3,9 @@ import {connect} from 'react-redux';
|
||||
import {SelectField, Option} from 'react-mdl-selectfield';
|
||||
import styles from './Community.css';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../../translations';
|
||||
import {setRole, setCommenterStatus} from '../../actions/community';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
class Table extends Component {
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ import styles from './BanUserDialog.css';
|
||||
import Button from 'coral-ui/components/Button';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations.json';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const BanUserDialog = ({open, handleClose, handleBanUser, user}) => (
|
||||
<Dialog
|
||||
|
||||
@@ -3,11 +3,10 @@ import React from 'react';
|
||||
import styles from './styles.css';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations.json';
|
||||
|
||||
import {Link} from 'react-router';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const CommunityMenu = () => {
|
||||
const flaggedPath = '/admin/community/flagged';
|
||||
|
||||
@@ -4,9 +4,7 @@ import {Dialog, Button} from 'coral-ui';
|
||||
import styles from './SuspendUserDialog.css';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations.json';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const stages = [
|
||||
{
|
||||
|
||||
@@ -4,9 +4,7 @@ import styles from '../Community.css';
|
||||
import ActionButton from './ActionButton';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../../../translations.json';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
// Render a single user for the list
|
||||
const User = props => {
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
import {Button, List, Item, Card, Spinner} from 'coral-ui';
|
||||
import styles from './Configure.css';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations.json';
|
||||
import StreamSettings from './StreamSettings';
|
||||
import ModerationSettings from './ModerationSettings';
|
||||
import TechSettings from './TechSettings';
|
||||
@@ -176,4 +175,4 @@ const mapStateToProps = state => ({
|
||||
});
|
||||
export default connect(mapStateToProps)(Configure);
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
@@ -4,8 +4,7 @@ import styles from './Configure.css';
|
||||
import TagsInput from 'react-tagsinput';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../../translations.json';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const Domainlist = ({domains, onChangeDomainlist}) => {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, {Component} from 'react';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../../translations.json';
|
||||
import styles from './Configure.css';
|
||||
import {Button, Card} from 'coral-ui';
|
||||
|
||||
@@ -65,4 +65,4 @@ class EmbedLink extends Component {
|
||||
|
||||
export default EmbedLink;
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
@@ -4,8 +4,8 @@ import {Card} from 'coral-ui';
|
||||
import {Checkbox} from 'react-mdl';
|
||||
import Wordlist from './Wordlist';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../../translations.json';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
const lang = new I18n();
|
||||
|
||||
const updateModeration = (updateSettings, mod) => () => {
|
||||
const moderation = mod === 'PRE' ? 'POST' : 'PRE';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import {SelectField, Option} from 'react-mdl-selectfield';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../../translations.json';
|
||||
|
||||
import styles from './Configure.css';
|
||||
import {Checkbox, Textfield} from 'react-mdl';
|
||||
import {Card, Icon, TextArea} from 'coral-ui';
|
||||
@@ -184,4 +184,4 @@ const getTimeoutMeasure = ts => {
|
||||
// obtain the amount of time
|
||||
const getTimeoutAmount = ts => ts / TIMESTAMPS[getTimeoutMeasure(ts)];
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
@@ -4,8 +4,8 @@ import Domainlist from './Domainlist';
|
||||
import EmbedLink from './EmbedLink';
|
||||
import styles from './Configure.css';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../../translations.json';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
const lang = new I18n();
|
||||
|
||||
const updateCustomCssUrl = (updateSettings) => (event) => {
|
||||
const customCssUrl = event.target.value;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../../translations.json';
|
||||
|
||||
import TagsInput from 'react-tagsinput';
|
||||
import styles from './Configure.css';
|
||||
import {Card} from 'coral-ui';
|
||||
@@ -37,4 +37,4 @@ const Wordlist = ({suspectWords, bannedWords, onChangeWordlist}) => (
|
||||
|
||||
export default Wordlist;
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
@@ -2,9 +2,8 @@ import React, {PropTypes} from 'react';
|
||||
import {Link} from 'react-router';
|
||||
import styles from './Widget.css';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const ActivityWidget = ({assets}) => {
|
||||
return (
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import React, {PropTypes} from 'react';
|
||||
import {Link} from 'react-router';
|
||||
import styles from './Widget.css';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
const lang = new I18n();
|
||||
|
||||
const FlagWidget = ({assets}) => {
|
||||
|
||||
|
||||
@@ -2,9 +2,8 @@ import React, {PropTypes} from 'react';
|
||||
import {Link} from 'react-router';
|
||||
import styles from './Widget.css';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const LikeWidget = ({assets}) => {
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations';
|
||||
|
||||
import ModerationQueue from 'coral-admin/src/containers/ModerationQueue/ModerationQueue';
|
||||
import styles from './Widget.css';
|
||||
import BanUserDialog from 'coral-admin/src/components/BanUserDialog';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const MostLikedCommentsWidget = props => {
|
||||
const {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import styles from './style.css';
|
||||
import {TextField, Button} from 'coral-ui';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
import translations from '../../translations.json';
|
||||
const lang = new I18n();
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
|
||||
const AddOrganizationName = props => {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import styles from './style.css';
|
||||
import {TextField, Button, Spinner} from 'coral-ui';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
import translations from '../../translations.json';
|
||||
const lang = new I18n();
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
|
||||
const InitialStep = props => {
|
||||
|
||||
@@ -3,8 +3,8 @@ import styles from './style.css';
|
||||
import {Button} from 'coral-ui';
|
||||
import {Link} from 'react-router';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
import translations from '../../translations.json';
|
||||
const lang = new I18n();
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
|
||||
const InitialStep = () => {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import styles from './style.css';
|
||||
import {Button} from 'coral-ui';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
import translations from '../../translations.json';
|
||||
const lang = new I18n();
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
|
||||
const InitialStep = props => {
|
||||
|
||||
@@ -3,8 +3,8 @@ import styles from './style.css';
|
||||
import {Button, Card} from 'coral-ui';
|
||||
import TagsInput from 'react-tagsinput';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
import translations from '../../translations.json';
|
||||
const lang = new I18n();
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
|
||||
const PermittedDomainsStep = props => {
|
||||
|
||||
@@ -5,10 +5,10 @@ import styles from './components/styles.css';
|
||||
import EmptyCard from '../../components/EmptyCard';
|
||||
import {actionsMap} from './helpers/moderationQueueActionsMap';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations';
|
||||
|
||||
import LoadMore from './components/LoadMore';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
class ModerationQueue extends React.Component {
|
||||
|
||||
static propTypes = {
|
||||
|
||||
@@ -15,8 +15,7 @@ import {getActionSummary} from 'coral-framework/utils';
|
||||
const linkify = new Linkify();
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations.json';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const Comment = ({actions = [], comment, ...props}) => {
|
||||
const links = linkify.getMatches(comment.body);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, {PropTypes} from 'react';
|
||||
import styles from './CommentCount.css';
|
||||
import I18n from 'coral-framework/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations.json';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
const lang = new I18n();
|
||||
|
||||
const CommentCount = ({count}) => {
|
||||
let number = count;
|
||||
|
||||
@@ -2,8 +2,7 @@ import React, {Component, PropTypes} from 'react';
|
||||
import {Icon} from 'coral-ui';
|
||||
import styles from './FlagBox.css';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations.json';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const shortReasons = {
|
||||
'This comment is offensive': lang.t('modqueue.offensive'),
|
||||
|
||||
@@ -3,11 +3,10 @@ import CommentCount from './CommentCount';
|
||||
import styles from './styles.css';
|
||||
import {SelectField, Option} from 'react-mdl-selectfield';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations.json';
|
||||
import {Icon} from 'coral-ui';
|
||||
import {Link} from 'react-router';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const ModerationMenu = (
|
||||
{asset, allCount, acceptedCount, premodCount, rejectedCount, flaggedCount, selectSort, sort}
|
||||
|
||||
@@ -3,7 +3,6 @@ import styles from './Stories.css';
|
||||
import {connect} from 'react-redux';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import {fetchAssets, updateAssetState} from 'coral-admin/src/actions/assets';
|
||||
import translations from 'coral-admin/src/translations.json';
|
||||
import {Link} from 'react-router';
|
||||
|
||||
import {Pager, Icon} from 'coral-ui';
|
||||
@@ -189,4 +188,4 @@ const mapDispatchToProps = (dispatch) => {
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(Stories);
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
@@ -3,7 +3,7 @@ import styles from './Stories.css';
|
||||
import {connect} from 'react-redux';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import {fetchAssets, updateAssetState} from '../../actions/assets';
|
||||
import translations from '../../translations.json';
|
||||
|
||||
import {Link} from 'react-router';
|
||||
|
||||
import {Pager, Icon} from 'coral-ui';
|
||||
@@ -184,4 +184,4 @@ const mapDispatchToProps = (dispatch) => {
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(Stories);
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
@@ -2,9 +2,7 @@ import React from 'react';
|
||||
import {Button} from 'coral-ui';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-admin/src/translations';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
export default ({status, onClick}) => (
|
||||
status === 'open' ? (
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"en": {
|
||||
"configureCommentStream": {
|
||||
"apply": "Apply",
|
||||
"title": "Configure Comment Stream",
|
||||
"description": "As an admin you may customize the settings for the comment stream for this asset",
|
||||
"enablePremod": "Enable Premoderation",
|
||||
"enablePremodDescription": "Moderators must approve any comment before its published.",
|
||||
"enablePremodLinks": "Pre-Moderate Comments Containing Links",
|
||||
"enablePremodLinksDescription": "Moderators must approve any comment containing a link before its published.",
|
||||
"enableQuestionBox": "Ask readers a question",
|
||||
"enableQuestionBoxDescription": "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.",
|
||||
"includeQuestionHere": "Write your question here."
|
||||
}
|
||||
},
|
||||
"es": {
|
||||
"configureCommentStream": {
|
||||
"apply": "Aplicar",
|
||||
"title": "Configurar los comentarios",
|
||||
"description": "Como Administrador/a puedes modificar las opciones de los comentarios en este artículo",
|
||||
"enablePremod": "Activar Pre Moderación",
|
||||
"enablePremodDescription": "Los y las Moderadoras deben aprobar cualquier comentario antes de su publicación",
|
||||
"enablePremodLinks": "Pre-Moderar Comentarios que contienen Enlaces",
|
||||
"enablePremodLinksDescription": "Los y las moderadoras deben aprobar cualquier comentario que contengan enlaces antes de su publicación.",
|
||||
"enableQuestionBox": "Hacer una pregunta a los y las lectoras.",
|
||||
"enableQuestionBoxDescription": "Esta pregunta aparecera en la parte de arriba del hilo de comentarios.",
|
||||
"includeQuestionHere": "Escribir la pregunta aquí."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import I18n from 'coral-framework/modules/i18n/i18n';
|
||||
import translations from 'coral-framework/translations';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
const lang = new I18n();
|
||||
|
||||
import {TabBar, Tab, TabContent, Button} from 'coral-ui';
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-framework/translations';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
// Render in place of a Comment when the author of the comment is ignored
|
||||
const IgnoredCommentTombstone = () => (
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React, {PropTypes} from 'react';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-framework/translations.json';
|
||||
import {ADDTL_COMMENTS_ON_LOAD_MORE} from '../constants/stream';
|
||||
import {Button} from 'coral-ui';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
const lang = new I18n();
|
||||
|
||||
const loadMoreComments = (assetId, comments, loadMore, parentId, replyCount) => {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, {PropTypes} from 'react';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from 'coral-framework/translations.json';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const onLoadMoreClick = ({loadMore, commentCount, firstCommentDate, assetId, setCommentCountCache}) => (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -3,8 +3,7 @@ import coralApi from '../helpers/response';
|
||||
import {addNotification} from '../actions/notification';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from './../translations';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
export const fetchAssetRequest = () => ({type: actions.FETCH_ASSET_REQUEST});
|
||||
export const fetchAssetSuccess = asset => ({type: actions.FETCH_ASSET_SUCCESS, asset});
|
||||
@@ -48,4 +47,3 @@ export const updateOpenStatus = status => dispatch => {
|
||||
dispatch(updateOpenStream({closedAt: new Date().getTime()}));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import {gql} from 'react-apollo';
|
||||
import client from 'coral-framework/services/client';
|
||||
import I18n from '../../coral-i18n/modules/i18n/i18n';
|
||||
import translations from './../translations';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
import * as actions from '../constants/auth';
|
||||
import coralApi, {base} from '../helpers/response';
|
||||
import {pym} from 'coral-framework';
|
||||
|
||||
@@ -3,8 +3,7 @@ import coralApi from '../helpers/response';
|
||||
import * as actions from '../constants/auth';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from './../translations';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
const editUsernameFailure = error => ({type: actions.EDIT_USERNAME_FAILURE, error});
|
||||
const editUsernameSuccess = () => ({type: actions.EDIT_USERNAME_SUCCESS});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from './../translations';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
export default {
|
||||
email: lang.t('error.email'),
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
{
|
||||
"en": {
|
||||
"MY_COMMENTS": "My Comments",
|
||||
"profile": "Profile",
|
||||
"myProfile": "My profile",
|
||||
"successUpdateSettings": "The changes you have made have been applied to the comment stream on this article",
|
||||
"successNameUpdate": "Your username has been updated",
|
||||
"contentNotAvailable": "This content is not available",
|
||||
"bannedAccountMsg": "Your account is currently suspended. This means that you cannot Like, Report, or write comments. Please contact us if you have any questions.",
|
||||
"editName": {
|
||||
"msg": "Your account is currently suspended because your username has been deemed inappropriate. To restore your account, please enter a new username. Please contact us if you have any questions.",
|
||||
"label": "New Username",
|
||||
"button": "Submit",
|
||||
"error": "Usernames can contain letters, numbers and _ only"
|
||||
},
|
||||
"viewMoreComments": "view more comments",
|
||||
"showAllComments": "Show all comments",
|
||||
"viewReply": "view reply",
|
||||
"viewAllRepliesInitial": "view all {0} replies",
|
||||
"viewAllReplies": "view {0} replies",
|
||||
"newCount": "View {0} new {1}",
|
||||
"comment": "comment",
|
||||
"comments": "comments",
|
||||
"commentIsIgnored": "This comment is hidden because you ignored this user.",
|
||||
"error": {
|
||||
"emailNotVerified": "Email address {0} not verified.",
|
||||
"email": "Not a valid E-Mail",
|
||||
"password": "Password must be at least 8 characters",
|
||||
"username": "Usernames can contain letters, numbers and _ only",
|
||||
"confirmPassword": "Passwords don't match. Please, check again",
|
||||
"organizationName": "Organization name must only contain letters or numbers.",
|
||||
"emailPasswordError": "Email and/or password combination incorrect.",
|
||||
"EMAIL_REQUIRED": "An email address is required",
|
||||
"PASSWORD_REQUIRED": "Must input a password",
|
||||
"PASSWORD_LENGTH": "Password is too short",
|
||||
"EMAIL_IN_USE": "Email address already in use",
|
||||
"EMAIL_USERNAME_IN_USE": "Email address or username already in use",
|
||||
"USERNAME_IN_USE": "Username already in use",
|
||||
"USERNAME_REQUIRED": "Must input a username",
|
||||
"NO_SPECIAL_CHARACTERS": "Usernames can contain letters, numbers and _ only",
|
||||
"PROFANITY_ERROR": "Usernames must not contain profanity. Please contact the administrator if you believe this to be in error.",
|
||||
"NOT_AUTHORIZED": "Not authorized.",
|
||||
"EDIT_USERNAME_NOT_AUTHORIZED": "You do not have permission to update your username."
|
||||
}
|
||||
},
|
||||
"es": {
|
||||
"profile": "Pérfil",
|
||||
"MY_COMMENTS": "Mis Comentarios",
|
||||
"myProfile": "Mi pérfil",
|
||||
"successUpdateSettings": "La configuración de este articulo fue actualizada",
|
||||
"successBioUpdate": "Tu biografia fue actualizada",
|
||||
"contentNotAvailable": "El contenido no se encuentra disponible",
|
||||
"bannedAccountMsg": "Tu cuenta se encuentra suspendida. Esto significa que no puedes gustar, marcar o escribir commentarios.",
|
||||
"editNameMsg": "",
|
||||
"viewMoreComments": "Ver commentarios más",
|
||||
"viewReply": "ver respuesta",
|
||||
"viewAllRepliesInitial": "ver todas las {0} respuestas",
|
||||
"viewAllReplies": "ver {0} respuestas",
|
||||
"newCount": "Ver {0} {1} más",
|
||||
"comment": "commentario",
|
||||
"comments": "commentarios",
|
||||
"commentIsIgnored": "Este comentario está escondido porque has ignorado al usuario.",
|
||||
"showAllComments": "Mostrar todos los comentarios",
|
||||
"error": {
|
||||
"emailNotVerified": "E-mail {0} no verificado.",
|
||||
"email": "No es un e-mail válido",
|
||||
"password": "La contraseña debe tener por lo menos 8 caracteres",
|
||||
"username": "Los nombres pueden contener letras, números y _",
|
||||
"organizationName": "El nombre de la organización debe contener letras y/o números.",
|
||||
"confirmPassword": "Las contraseñas no coinciden",
|
||||
"emailPasswordError": "E-mail y/o contraseña incorrecta.",
|
||||
"EMAIL_REQUIRED": "Se requiere un e-mail",
|
||||
"PASSWORD_REQUIRED": "Debe ingresar una contraseña",
|
||||
"PASSWORD_LENGTH": "La contraseña es muy corta",
|
||||
"EMAIL_IN_USE": "El e-mail se encuentra en uso",
|
||||
"EMAIL_USERNAME_IN_USE": "E-mail o Nombre en uso.",
|
||||
"USERNAME_IN_USE": "Nombre en uso.",
|
||||
"USERNAME_REQUIRED": "Debe ingresar un nombre",
|
||||
"NO_SPECIAL_CHARACTERS": "Los nombres pueden contener letras, números y _",
|
||||
"PROFANITY_ERROR": "Los nombres no pueden contener blasfemias. Por favor contacte al o la administradora si cree que esto es un error",
|
||||
"NOT_AUTHORIZED": "Acción no autorizada.",
|
||||
"EDIT_USERNAME_NOT_AUTHORIZED": "No tiene permiso para editar el nombre de usuario."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,45 @@
|
||||
---
|
||||
en:
|
||||
framework:
|
||||
profile: Profile
|
||||
my_profile: My profile
|
||||
successUpdateSettings: The changes you have made have been applied to the comment stream on this article
|
||||
successNameUpdate: Your username has been updated
|
||||
contentNotAvailable: This content is not available
|
||||
bannedAccountMsg: Your account is currently suspended. This means that you cannot Like Report or write comments. Please contact us if you have any questions.
|
||||
editName:
|
||||
msg: Your account is currently suspended because your username has been deemed inappropriate. To restore your account please enter a new username. Please contact us if you have any questions.
|
||||
label: New Username
|
||||
button: Submit
|
||||
error: Usernames can contain letters numbers and _ only
|
||||
viewMoreComments: view more comments
|
||||
showAllComments: Show all comments
|
||||
viewReply: view reply
|
||||
viewAllRepliesInitial: view all 0 replies
|
||||
viewAllReplies: view 0 replies
|
||||
newCount: View 0 new 1
|
||||
comment: comment
|
||||
comments: comments
|
||||
commentIsIgnored: This comment is hidden because you ignored this user.
|
||||
configure:
|
||||
framework:
|
||||
profile: Profile
|
||||
my_profile: My profile
|
||||
successUpdateSettings: The changes you have made have been applied to the comment stream on this article
|
||||
successNameUpdate: Your username has been updated
|
||||
contentNotAvailable: This content is not available
|
||||
bannedAccountMsg: Your account is currently suspended. This means that you cannot Like Report or write comments. Please contact us if you have any questions.
|
||||
editName:
|
||||
msg: Your account is currently suspended because your username has been deemed inappropriate. To restore your account please enter a new username. Please contact us if you have any questions.
|
||||
label: New Username
|
||||
button: Submit
|
||||
error: Usernames can contain letters numbers and _ only
|
||||
viewMoreComments: view more comments
|
||||
showAllComments: Show all comments
|
||||
viewReply: view reply
|
||||
viewAllRepliesInitial: view all 0 replies
|
||||
viewAllReplies: view 0 replies
|
||||
newCount: View 0 new 1
|
||||
comment: comment
|
||||
comments: comments
|
||||
commentIsIgnored: This comment is hidden because you ignored this user.
|
||||
my_comments: My Comments
|
||||
error:
|
||||
emailNotVerified: Email address {0} not verified.
|
||||
email: Not a valid E-Mail
|
||||
password: Password must be at least 8 characters
|
||||
username: Usernames can contain letters numbers and _ only
|
||||
confirmPassword: Passwords don't match. Please check again
|
||||
organizationName: Organization name must only contain letters or numbers.
|
||||
emailPasswordError: Email and/or password combination incorrect.
|
||||
EMAIL_REQUIRED: An email address is required
|
||||
PASSWORD_REQUIRED: Must input a password
|
||||
PASSWORD_LENGTH: Password is too short
|
||||
EMAIL_IN_USE: Email address already in use
|
||||
EMAIL_USERNAME_IN_USE: Email address or username already in use
|
||||
USERNAME_IN_USE: Username already in use
|
||||
USERNAME_REQUIRED: Must input a username
|
||||
NO_SPECIAL_CHARACTERS: Usernames can contain letters numbers and _ only
|
||||
PROFANITY_ERROR: Usernames must not contain profanity. Please contact the administrator if you believe this to be in error.
|
||||
NOT_AUTHORIZED: Not authorized.
|
||||
EDIT_USERNAME_NOT_AUTHORIZED: You do not have permission to update your username.
|
||||
configure:
|
||||
apply: Apply
|
||||
title: Configure Comment Stream
|
||||
description: As an admin you may customize the settings for the comment stream for this asset
|
||||
@@ -32,27 +50,7 @@ en:
|
||||
enableQuestionBox: Ask readers a question
|
||||
enableQuestionBoxDescription: 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.
|
||||
includeQuestionHere: Write your question here.
|
||||
error:
|
||||
emailNotVerified: Email address 0 not verified.
|
||||
email: Not a valid E-Mail
|
||||
password: Password must be at least 8 characters
|
||||
username: Usernames can contain letters numbers and _ only
|
||||
confirmPassword: Passwords don't match. Please check again
|
||||
organizationName: Organization name must only contain letters or numbers.
|
||||
emailPasswordError: Email and/or password combination incorrect.
|
||||
EMAIL_REQUIRED: An email address is required
|
||||
PASSWORD_REQUIRED: Must input a password
|
||||
PASSWORD_LENGTH: Password is too short
|
||||
EMAIL_IN_USE: Email address already in use
|
||||
EMAIL_USERNAME_IN_USE: Email address or username already in use
|
||||
USERNAME_IN_USE: Username already in use
|
||||
USERNAME_REQUIRED: Must input a username
|
||||
NO_SPECIAL_CHARACTERS: Usernames can contain letters numbers and _ only
|
||||
PROFANITY_ERROR: Usernames must not contain profanity. Please contact the administrator if you believe this to be in error.
|
||||
NOT_AUTHORIZED: Not authorized.
|
||||
EDIT_USERNAME_NOT_AUTHORIZED: You do not have permission to update your username.
|
||||
|
||||
settings:
|
||||
settings:
|
||||
profile: Profile
|
||||
userNoComment: You've never left a comment. Join the conversation!
|
||||
allComments: All Comments
|
||||
|
||||
@@ -1,62 +1,61 @@
|
||||
---
|
||||
es:
|
||||
framework:
|
||||
profile: Pérfil
|
||||
my_profile: Mi pérfil
|
||||
successUpdateSettings: La configuración de este articulo fue actualizada
|
||||
successBioUpdate: Tu biografia fue actualizada
|
||||
contentNotAvailable: El contenido no se encuentra disponible
|
||||
bannedAccountMsg: Tu cuenta se encuentra suspendida. Esto significa que no puedes gustar marcar o escribir commentarios.
|
||||
editName:
|
||||
msg: Your account is currently suspended because your username has been deemed inappropriate. To restore your account please enter a new username. Please contact us if you have any questions.
|
||||
label: New Username
|
||||
button: Submit
|
||||
error: Usernames can contain letters numbers and _ only
|
||||
viewMoreComments: Ver commentarios más
|
||||
viewReply: ver respuesta
|
||||
viewAllRepliesInitial: ver todas las 0 respuestas
|
||||
viewAllReplies: ver 0 respuestas
|
||||
newCount: Ver 0 1 más
|
||||
comment: commentario
|
||||
comments: commentarios
|
||||
commentIsIgnored: Este comentario está escondido porque has ignorado al usuario.
|
||||
showAllComments: Mostrar todos los comentarios
|
||||
configure:
|
||||
apply: Aplicar
|
||||
title: Configurar los comentarios
|
||||
description: Como Administrador/a puedes modificar las opciones de los comentarios en este artículo
|
||||
enablePremod: Activar Pre Moderación
|
||||
enablePremodDescription: Los y las Moderadoras deben aprobar cualquier comentario antes de su publicación
|
||||
enablePremodLinks: Pre-Moderar Comentarios que contienen Enlaces
|
||||
enablePremodLinksDescription: Los y las moderadoras deben aprobar cualquier comentario que contengan enlaces antes de su publicación.
|
||||
enableQuestionBox: Hacer una pregunta a los y las lectoras.
|
||||
enableQuestionBoxDescription: Esta pregunta aparecera en la parte de arriba del hilo de comentarios.
|
||||
includeQuestionHere: Escribir la pregunta aquí.
|
||||
settings:
|
||||
profile: Perfil
|
||||
userNoComment: No has dejado aún ningún comentario. ¡Únete a la conversación!
|
||||
allComments: Todos los comentarios
|
||||
profileSettings: Configuración del perfil
|
||||
myCommentHistory: Mi historial de comentarios
|
||||
signIn: Entrar
|
||||
toAccess: para acceder a al perfil
|
||||
fromSettingsPage: Desde la página de configuración puedes ver tu historia de comentarios.
|
||||
error:
|
||||
emailNotVerified: E-mail 0 no verificado.
|
||||
email: No es un e-mail válido
|
||||
password: La contraseña debe tener por lo menos 8 caracteres
|
||||
username: Los nombres pueden contener letras números y _
|
||||
organizationName: El nombre de la organización debe contener letras y/o números.
|
||||
confirmPassword: Las contraseñas no coinciden
|
||||
emailPasswordError: E-mail y/o contraseña incorrecta.
|
||||
EMAIL_REQUIRED: Se requiere un e-mail
|
||||
PASSWORD_REQUIRED: Debe ingresar una contraseña
|
||||
PASSWORD_LENGTH: La contraseña es muy corta
|
||||
EMAIL_IN_USE: El e-mail se encuentra en uso
|
||||
EMAIL_USERNAME_IN_USE: E-mail o Nombre en uso.
|
||||
USERNAME_IN_USE: Nombre en uso.
|
||||
USERNAME_REQUIRED: Debe ingresar un nombre
|
||||
NO_SPECIAL_CHARACTERS: Los nombres pueden contener letras números y _
|
||||
PROFANITY_ERROR: Los nombres no pueden contener blasfemias. Por favor contacte al o la administradora si cree que esto es un error
|
||||
NOT_AUTHORIZED: Acción no autorizada.
|
||||
EDIT_USERNAME_NOT_AUTHORIZED: No tiene permiso para editar el nombre de usuario.
|
||||
framework:
|
||||
profile: Pérfil
|
||||
my_profile: Mi pérfil
|
||||
successUpdateSettings: La configuración de este articulo fue actualizada
|
||||
successBioUpdate: Tu biografia fue actualizada
|
||||
contentNotAvailable: El contenido no se encuentra disponible
|
||||
bannedAccountMsg: Tu cuenta se encuentra suspendida. Esto significa que no puedes gustar marcar o escribir commentarios.
|
||||
editName:
|
||||
msg: Your account is currently suspended because your username has been deemed inappropriate. To restore your account please enter a new username. Please contact us if you have any questions.
|
||||
label: New Username
|
||||
button: Submit
|
||||
error: Usernames can contain letters numbers and _ only
|
||||
viewMoreComments: Ver commentarios más
|
||||
viewReply: ver respuesta
|
||||
viewAllRepliesInitial: ver todas las 0 respuestas
|
||||
viewAllReplies: ver 0 respuestas
|
||||
newCount: Ver 0 1 más
|
||||
comment: commentario
|
||||
comments: commentarios
|
||||
commentIsIgnored: Este comentario está escondido porque has ignorado al usuario.
|
||||
showAllComments: Mostrar todos los comentarios
|
||||
my_comments: Mis Comentarios
|
||||
error:
|
||||
emailNotVerified: E-mail {0} no verificado.
|
||||
email: No es un e-mail válido
|
||||
password: La contraseña debe tener por lo menos 8 caracteres
|
||||
username: Los nombres pueden contener letras números y _
|
||||
organizationName: El nombre de la organización debe contener letras y/o números.
|
||||
confirmPassword: Las contraseñas no coinciden
|
||||
emailPasswordError: E-mail y/o contraseña incorrecta.
|
||||
EMAIL_REQUIRED: Se requiere un e-mail
|
||||
PASSWORD_REQUIRED: Debe ingresar una contraseña
|
||||
PASSWORD_LENGTH: La contraseña es muy corta
|
||||
EMAIL_IN_USE: El e-mail se encuentra en uso
|
||||
EMAIL_USERNAME_IN_USE: E-mail o Nombre en uso.
|
||||
USERNAME_IN_USE: Nombre en uso.
|
||||
USERNAME_REQUIRED: Debe ingresar un nombre
|
||||
NO_SPECIAL_CHARACTERS: Los nombres pueden contener letras números y _
|
||||
PROFANITY_ERROR: Los nombres no pueden contener blasfemias. Por favor contacte al o la administradora si cree que esto es un error
|
||||
NOT_AUTHORIZED: Acción no autorizada.
|
||||
EDIT_USERNAME_NOT_AUTHORIZED: No tiene permiso para editar el nombre de usuario.
|
||||
configure:
|
||||
apply: Aplicar
|
||||
title: Configurar los comentarios
|
||||
description: Como Administrador/a puedes modificar las opciones de los comentarios en este artículo
|
||||
enablePremod: Activar Pre Moderación
|
||||
enablePremodDescription: Los y las Moderadoras deben aprobar cualquier comentario antes de su publicación
|
||||
enablePremodLinks: Pre-Moderar Comentarios que contienen Enlaces
|
||||
enablePremodLinksDescription: Los y las moderadoras deben aprobar cualquier comentario que contengan enlaces antes de su publicación.
|
||||
enableQuestionBox: Hacer una pregunta a los y las lectoras.
|
||||
enableQuestionBoxDescription: Esta pregunta aparecera en la parte de arriba del hilo de comentarios.
|
||||
includeQuestionHere: Escribir la pregunta aquí.
|
||||
settings:
|
||||
profile: Perfil
|
||||
userNoComment: No has dejado aún ningún comentario. ¡Únete a la conversación!
|
||||
allComments: Todos los comentarios
|
||||
profileSettings: Configuración del perfil
|
||||
myCommentHistory: Mi historial de comentarios
|
||||
signIn: Entrar
|
||||
toAccess: para acceder a al perfil
|
||||
fromSettingsPage: Desde la página de configuración puedes ver tu historia de comentarios.
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import has from 'lodash/has';
|
||||
import get from 'lodash/get';
|
||||
|
||||
import YAML from 'yamljs';
|
||||
const localesFiles = {
|
||||
'en': require('json-loader!yaml-loader!../../locales/en.yml'),
|
||||
'es': require('json-loader!yaml-loader!../../locales/es.yml')
|
||||
};
|
||||
|
||||
/**
|
||||
* Default locales, this should be overriden by config file
|
||||
@@ -9,6 +12,7 @@ import YAML from 'yamljs';
|
||||
|
||||
class i18n {
|
||||
constructor(translations) {
|
||||
this.locales = {'en': 'en', 'es': 'es'};
|
||||
|
||||
/**
|
||||
* Register locales
|
||||
@@ -28,17 +32,20 @@ class i18n {
|
||||
}
|
||||
|
||||
loadTranslations = (translations) => {
|
||||
const localesFiles = {'en': 'locales/en.yml', 'es': 'locales/es.yml'};
|
||||
|
||||
try {
|
||||
if (typeof translations == 'undefined'){
|
||||
|
||||
// Translations need to be loaded from translations or localesFiles.
|
||||
this.translations = translations[this.language] || YAML.load(localesFiles[this.language]);
|
||||
// Translations need to be loaded from translations or localesFiles.
|
||||
this.translations = localesFiles[this.language];
|
||||
} else {
|
||||
this.translations = translations[this.language];
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
|
||||
// To Do: get configuration for default translation
|
||||
this.translations = translations['en'];
|
||||
this.translations = localesFiles['en'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
import {I18n} from '../coral-framework';
|
||||
import translations from './translations.json';
|
||||
|
||||
import {Icon} from 'coral-ui';
|
||||
import classnames from 'classnames';
|
||||
|
||||
@@ -12,7 +12,7 @@ export const commentIsBest = ({tags} = {}) => {
|
||||
};
|
||||
|
||||
const name = 'coral-plugin-best';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
// It would be best if the backend/api held this business logic
|
||||
const canModifyBestTag = ({roles = []} = {}) => roles && ['ADMIN', 'MODERATOR'].some(role => roles.includes(role));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, {PropTypes} from 'react';
|
||||
import {I18n} from '../coral-framework';
|
||||
import translations from './translations.json';
|
||||
|
||||
const name = 'coral-plugin-comment-count';
|
||||
|
||||
const CommentCount = ({count}) => {
|
||||
@@ -15,4 +15,4 @@ CommentCount.propTypes = {
|
||||
|
||||
export default CommentCount;
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, {PropTypes} from 'react';
|
||||
import {Button} from 'coral-ui';
|
||||
import {connect} from 'react-redux';
|
||||
import {I18n} from '../coral-framework';
|
||||
import translations from './translations.json';
|
||||
|
||||
import Slot from 'coral-framework/components/Slot';
|
||||
|
||||
const name = 'coral-plugin-commentbox';
|
||||
@@ -205,4 +205,4 @@ const mapStateToProps = ({commentBox}) => ({commentBox});
|
||||
|
||||
export default connect(mapStateToProps, null)(CommentBox);
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, {Component} from 'react';
|
||||
import {I18n} from '../coral-framework';
|
||||
import translations from './translations.json';
|
||||
|
||||
import {PopupMenu, Button} from 'coral-ui';
|
||||
import onClickOutside from 'react-onclickoutside';
|
||||
|
||||
@@ -222,4 +222,4 @@ const styles = {
|
||||
}
|
||||
};
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import React from 'react';
|
||||
import FlagButton from './FlagButton';
|
||||
import {I18n} from '../coral-framework';
|
||||
import translations from './translations.json';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
|
||||
const lang = new I18n();
|
||||
|
||||
const FlagComment = (props) => <FlagButton {...props} getPopupMenu={getPopupMenu} />;
|
||||
|
||||
@@ -49,5 +50,3 @@ const getPopupMenu = [
|
||||
];
|
||||
|
||||
export default FlagComment;
|
||||
|
||||
const lang = new I18n(translations);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import React, {PropTypes} from 'react';
|
||||
import styles from './styles.css';
|
||||
|
||||
import {I18n} from '../coral-framework';
|
||||
import translations from './translations.json';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
|
||||
const lang = new I18n();
|
||||
|
||||
const ModerationLink = props => props.isAdmin ? (
|
||||
<div className={styles.moderationLink}>
|
||||
@@ -17,6 +18,4 @@ ModerationLink.propTypes = {
|
||||
isAdmin: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
const lang = new I18n(translations);
|
||||
|
||||
export default ModerationLink;
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import React, {PropTypes} from 'react';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from './translations';
|
||||
import onClickOutside from 'react-onclickoutside';
|
||||
const name = 'coral-plugin-permalinks';
|
||||
import {Button} from 'coral-ui';
|
||||
import styles from './styles.css';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
class PermalinkButton extends React.Component {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, {PropTypes} from 'react';
|
||||
import {I18n} from '../coral-framework';
|
||||
import translations from './translations.json';
|
||||
|
||||
import classnames from 'classnames';
|
||||
|
||||
const name = 'coral-plugin-replies';
|
||||
@@ -24,4 +24,4 @@ ReplyButton.propTypes = {
|
||||
|
||||
export default ReplyButton;
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
@@ -7,8 +7,8 @@ import FakeComment from './FakeComment';
|
||||
import styles from './styles.css';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
const lang = new I18n();
|
||||
|
||||
const CreateUsernameDialog = ({open, handleClose, formData, handleSubmitUsername, handleChange, ...props}) => {
|
||||
return (
|
||||
|
||||
@@ -7,9 +7,8 @@ import PubDate from 'coral-plugin-pubdate/PubDate';
|
||||
import {ReplyButton} from 'coral-plugin-replies';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
class FakeComment extends React.Component {
|
||||
constructor (props) {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React from 'react';
|
||||
import styles from './styles.css';
|
||||
import Button from 'coral-ui/components/Button';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
const lang = new I18n();
|
||||
|
||||
class ForgotContent extends React.Component {
|
||||
constructor (props) {
|
||||
|
||||
@@ -2,8 +2,8 @@ import React, {PropTypes} from 'react';
|
||||
import {Button, TextField, Spinner, Success, Alert} from 'coral-ui';
|
||||
import styles from './styles.css';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
const lang = new I18n();
|
||||
|
||||
const SignInContent = ({
|
||||
handleChange,
|
||||
|
||||
@@ -2,8 +2,8 @@ import React, {PropTypes} from 'react';
|
||||
import {Button, TextField, Spinner, Success, Alert} from 'coral-ui';
|
||||
import styles from './styles.css';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
const lang = new I18n();
|
||||
|
||||
class SignUpContent extends React.Component {
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import styles from './styles.css';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
const lang = new I18n();
|
||||
|
||||
const UserBox = ({className, user, onLogout, onShowProfile}) => (
|
||||
<div className={`${styles.userBox} ${className ? className : ''}`}>
|
||||
|
||||
@@ -7,8 +7,8 @@ import errorMsj from 'coral-framework/helpers/error';
|
||||
import CreateUsernameDialog from '../components/CreateUsernameDialog';
|
||||
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
const lang = new I18n();
|
||||
|
||||
import {
|
||||
showCreateUsernameDialog,
|
||||
|
||||
@@ -4,9 +4,9 @@ import SignDialog from '../components/SignDialog';
|
||||
import validate from 'coral-framework/helpers/validate';
|
||||
import errorMsj from 'coral-framework/helpers/error';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
|
||||
import {pym} from 'coral-framework';
|
||||
const lang = new I18n(translations);
|
||||
const lang = new I18n();
|
||||
|
||||
import {
|
||||
changeView,
|
||||
|
||||
+2
-3
@@ -98,13 +98,12 @@
|
||||
"react-recaptcha": "^2.2.6",
|
||||
"recompose": "^0.23.1",
|
||||
"redis": "^2.7.1",
|
||||
"uuid": "^3.0.1",
|
||||
"simplemde": "^1.11.2",
|
||||
"subscriptions-transport-ws": "^0.5.5-alpha.0",
|
||||
"resolve": "^1.3.2",
|
||||
"semver": "^5.3.0",
|
||||
"simplemde": "^1.11.2",
|
||||
"subscriptions-transport-ws": "^0.5.5-alpha.0",
|
||||
"uuid": "^3.0.1",
|
||||
"yaml-loader": "^0.4.0",
|
||||
"yamljs": "^0.2.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -2,7 +2,8 @@ import React, {Component} from 'react';
|
||||
import styles from './style.css';
|
||||
import Icon from './Icon';
|
||||
|
||||
import {I18n} from 'coral-framework';
|
||||
import I18n from 'coral-i18n/modules/i18n/i18n';
|
||||
|
||||
import cn from 'classnames';
|
||||
import translations from '../translations.json';
|
||||
import {getMyActionSummary, getTotalActionCount} from 'coral-framework/utils';
|
||||
|
||||
@@ -115,6 +115,11 @@ module.exports = {
|
||||
test: /\.(graphql|gql)$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'graphql-tag/loader'
|
||||
},
|
||||
{
|
||||
test: /\.yaml$/,
|
||||
include: path.resolve('locales'),
|
||||
loader: 'yaml'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -4431,7 +4431,7 @@ js-tokens@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7"
|
||||
|
||||
js-yaml@3.x, js-yaml@^3.4.3, js-yaml@^3.5.1, js-yaml@^3.7.0:
|
||||
js-yaml@3.x, js-yaml@^3.4.3, js-yaml@^3.5.1, js-yaml@^3.5.2, js-yaml@^3.7.0:
|
||||
version "3.8.3"
|
||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.3.tgz#33a05ec481c850c8875929166fe1beb61c728766"
|
||||
dependencies:
|
||||
@@ -8423,6 +8423,12 @@ yallist@^2.0.0:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
|
||||
|
||||
yaml-loader@^0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/yaml-loader/-/yaml-loader-0.4.0.tgz#4aae447d13c1aa73a989d8a2a5309b0b1a3ca353"
|
||||
dependencies:
|
||||
js-yaml "^3.5.2"
|
||||
|
||||
yamljs@^0.2.10:
|
||||
version "0.2.10"
|
||||
resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.2.10.tgz#481cc7c25ca73af59f591f0c96e3ce56c757a40f"
|
||||
|
||||
Reference in New Issue
Block a user