mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
Merge pull request #1499 from qge/devel
Add i18n messages for no more posts, no results, and load more days
This commit is contained in:
commit
f3b32b0f34
4 changed files with 17 additions and 11 deletions
|
@ -1,10 +1,11 @@
|
||||||
import Telescope from 'meteor/nova:lib';
|
import Telescope from "meteor/nova:lib";
|
||||||
import React, { PropTypes, Component } from 'react';
|
import React, { PropTypes, Component } from "react";
|
||||||
import { Button } from 'react-bootstrap';
|
import { Button } from "react-bootstrap";
|
||||||
import moment from 'moment';
|
import moment from "moment";
|
||||||
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
class PostsDaily extends Component{
|
class PostsDaily extends Component{
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.loadMoreDays = this.loadMoreDays.bind(this);
|
this.loadMoreDays = this.loadMoreDays.bind(this);
|
||||||
|
@ -30,7 +31,7 @@ class PostsDaily extends Component{
|
||||||
<div className="posts-daily">
|
<div className="posts-daily">
|
||||||
<Telescope.components.PostsListHeader />
|
<Telescope.components.PostsListHeader />
|
||||||
{this.getLastNDates(this.state.days).map((date, index) => <Telescope.components.PostsDay key={index} date={date} number={index}/>)}
|
{this.getLastNDates(this.state.days).map((date, index) => <Telescope.components.PostsDay key={index} date={date} number={index}/>)}
|
||||||
<button className="posts-load-more" onClick={this.loadMoreDays}>Load More Days</button>
|
<button className="posts-load-more" onClick={this.loadMoreDays}><FormattedMessage id="posts.load_more_days"/></button>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -39,12 +40,12 @@ class PostsDaily extends Component{
|
||||||
PostsDaily.propTypes = {
|
PostsDaily.propTypes = {
|
||||||
days: React.PropTypes.number,
|
days: React.PropTypes.number,
|
||||||
increment: React.PropTypes.number
|
increment: React.PropTypes.number
|
||||||
}
|
};
|
||||||
|
|
||||||
PostsDaily.defaultProps = {
|
PostsDaily.defaultProps = {
|
||||||
days: 5,
|
days: 5,
|
||||||
increment: 5
|
increment: 5
|
||||||
}
|
};
|
||||||
|
|
||||||
module.exports = PostsDaily;
|
module.exports = PostsDaily;
|
||||||
export default PostsDaily;
|
export default PostsDaily;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React from 'react';
|
import React from "react";
|
||||||
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
const PostsNoMore = props => <p className="posts-no-more">No more posts.</p>
|
const PostsNoMore = props => <p className="posts-no-more"><FormattedMessage id="posts.no_more"/></p>;
|
||||||
|
|
||||||
PostsNoMore.displayName = "PostsNoMore";
|
PostsNoMore.displayName = "PostsNoMore";
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
const PostsNoResults = props => <p className="posts-no-results">No posts to display.</p>
|
const PostsNoResults = props => <p className="posts-no-results"><FormattedMessage id="posts.no_results"/></p>;
|
||||||
|
|
||||||
PostsNoResults.displayName = "PostsNoResults";
|
PostsNoResults.displayName = "PostsNoResults";
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,9 @@ Telescope.strings.en = {
|
||||||
"posts.status": "Status",
|
"posts.status": "Status",
|
||||||
"posts.sticky": "Sticky",
|
"posts.sticky": "Sticky",
|
||||||
"posts.load_more": "Load More",
|
"posts.load_more": "Load More",
|
||||||
|
"posts.load_more_days": "Load More Days",
|
||||||
|
"posts.no_more": "No more posts.",
|
||||||
|
"posts.no_results": "No posts to display.",
|
||||||
"posts.search": "Search",
|
"posts.search": "Search",
|
||||||
"posts.view": "View",
|
"posts.view": "View",
|
||||||
"posts.top": "Top",
|
"posts.top": "Top",
|
||||||
|
|
Loading…
Add table
Reference in a new issue