Skip to content
Snippets Groups Projects
Commit 2dde2bfd authored by Kyle Doherty's avatar Kyle Doherty
Browse files

use inflection on table and relationships for object details

parent 6f3bd8bc
No related merge requests found
'use strict';
import ExpandableString from './ExpandableString.react';
import Humanize from 'humanize';
import Icon from 'metabase/components/Icon.react';
import IconBorder from 'metabase/components/IconBorder.react';
import LoadingSpinner from 'metabase/components/LoadingSpinner.react';
import { singularize, inflect } from 'inflection';
import cx from "classnames";
......@@ -121,7 +121,7 @@ export default React.createClass({
</IconBorder>
);
var relationName = Humanize.pluralize(fkCountValue, fk.origin.table.display_name);
var relationName = inflect(fk.origin.table.display_name, fkCountValue);
var info = (
<div>
......@@ -176,7 +176,7 @@ export default React.createClass({
return false;
}
var tableName = (this.props.tableMetadata) ? this.props.tableMetadata.display_name : "Unknown",
var tableName = (this.props.tableMetadata) ? singularize(this.props.tableMetadata.display_name) : "Unknown",
// TODO: once we nail down the "title" column of each table this should be something other than the id
idValue = this.getIdValue();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment