Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stopped the pluralization of collection name #503

Merged
merged 2 commits into from
Jul 27, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
"moment": "^2.11.2",
"netlify-auth-js": "^0.5.5",
"normalize.css": "^4.2.0",
"pluralize": "^3.0.0",
"preliminaries": "1.1.0",
"preliminaries-parser-toml": "1.1.0",
"preliminaries-parser-yaml": "1.1.0",
Expand Down
3 changes: 1 addition & 2 deletions src/components/AppHeader/AppHeader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { PropTypes } from "react";
import ImmutablePropTypes from "react-immutable-proptypes";
import pluralize from "pluralize";
import { IndexLink } from "react-router";
import { IconMenu, Menu, MenuItem } from "react-toolbox/lib/menu";
import Avatar from "react-toolbox/lib/avatar";
Expand Down Expand Up @@ -81,7 +80,7 @@ export default class AppHeader extends React.Component {
key={collection.get("name")}
value={collection.get("name")}
onClick={this.handleCreatePostClick.bind(this, collection.get('name'))} // eslint-disable-line
caption={pluralize(collection.get("label"), 1)}
caption={collection.get("label")}
/>
)
}
Expand Down
3 changes: 1 addition & 2 deletions src/components/UnpublishedListing/UnpublishedListing.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { DragSource, DropTarget, HTML5DragDrop } from 'react-simple-dnd';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { Link } from 'react-router';
import moment from 'moment';
import pluralize from 'pluralize';
import { capitalize } from 'lodash'
import { Card, CardTitle, CardText, CardActions } from 'react-toolbox/lib/card';
import Button from 'react-toolbox/lib/button';
Expand Down Expand Up @@ -82,7 +81,7 @@ class UnpublishedListing extends React.Component {
<div className={styles.draggable}>
<Card className={styles.card}>
<UnpublishedListingCardMeta
meta={capitalize(pluralize(collection))}
meta={pluralize(collection)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you meant to remove pluralize and leave capitalize.

label={isModification ? "" : "New"}
/>
<CardTitle
Expand Down
3 changes: 1 addition & 2 deletions src/containers/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { PropTypes } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import pluralize from 'pluralize';
import { connect } from 'react-redux';
import { IndexLink } from "react-router";
import FontIcon from 'react-toolbox/lib/font_icon';
Expand Down Expand Up @@ -157,7 +156,7 @@ class App extends React.Component {
className={sidebarStyles.viewEntriesLink}
onClick={e => this.handleLinkClick(e, navigateToCollection, collectionName)}
>
{pluralize(collection.get('label'))}
{collection.get('label')}
</a>
{
collection.get('create') ? (
Expand Down