Skip to content

Commit

Permalink
Merge pull request #3057 from reactioncommerce/ek-issue2817
Browse files Browse the repository at this point in the history
fix translations on order admin
  • Loading branch information
spencern authored Oct 7, 2017
2 parents 3b9a080 + 51ca34d commit 64a56dc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 8 deletions.
8 changes: 4 additions & 4 deletions imports/plugins/core/orders/client/components/orderFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class OrderFilter extends Component {
);
}
return (
<Components.Translation defaultValue="Date Range" i18nKey="order.filter.dateRange" />
<Components.Translation defaultValue="Date Range" i18nKey="admin.table.filter.dateRange" />
);
}

Expand All @@ -60,7 +60,7 @@ class OrderFilter extends Component {
return (
<Components.Translation
defaultValue="Shipping Status"
i18nKey={`order.filter.${this.state.shippingLabel}`}
i18nKey={`admin.table.filter.${this.state.shippingLabel}`}
/>
);
}
Expand Down Expand Up @@ -102,7 +102,7 @@ class OrderFilter extends Component {
<span className={`order-filter-name capitalize ${this.state.classNames.workflow}`}>
<Components.Translation
defaultValue={this.state.workflowLabel}
i18nKey={`order.filter.${this.state.workflowLabel}`}
i18nKey={`admin.table.filter.${this.state.workflowLabel}`}
/>
</span>
<div className="order-filter-icons">
Expand Down Expand Up @@ -130,7 +130,7 @@ class OrderFilter extends Component {
<Components.MenuItem
key={index}
label={status.label}
i18nKeyLabel={`order.filter.${status.value}`}
i18nKeyLabel={`admin.table.filter.${status.value}`}
value={status.value}
/>
))}
Expand Down
4 changes: 2 additions & 2 deletions imports/plugins/core/orders/client/components/orderSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ class OrderSearch extends Component {
className="search-input"
onChange={this.handleChange}
value={this.state.value}
i18nKeyPlaceholder="admin.dashboard.searchLabel"
i18nKeyPlaceholder="admin.table.search.placeholder"
/>
<i className="fa fa-search fa-fw"/>
<Components.Button
className="search-clear"
i18nKeyLabel="admin.dashboard.clearSearch"
i18nKeyLabel="admin.table.search.clearSearch"
label="Clear"
onClick={this.handleClear}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class OrderTableColumn extends Component {
<Badge
className="orders-badge"
badgeSize="large"
i18nKeyLabel={`cartDrawer.${this.props.row.value}`}
i18nKeyLabel={`admin.table.data.status.${this.props.row.value}`}
label={this.props.row.value}
status="basic"
/>
Expand All @@ -117,7 +117,7 @@ class OrderTableColumn extends Component {
<div className="status-info">
<Badge
badgeSize="large"
i18nKeyLabel={`cartDrawer.${this.props.row.value}`}
i18nKeyLabel={`admin.table.data.status.${this.props.row.value}`}
label={this.props.row.value}
status={this.props.fulfillmentBadgeStatus(this.props.row.original)}
/>
Expand Down
28 changes: 28 additions & 0 deletions imports/plugins/core/orders/server/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,34 @@
"total": "Total",
"shipping": "Shipping",
"status": "Status"
},
"filter": {
"status": "Status",
"dateRange": "Date range",
"shippingStatus": "Shipping status",
"new": "New",
"captured": "Captured",
"shipped": "Shipped",
"completed": "Completed",
"canceled": "Canceled",
"refunded": "Refunded"
},
"search": {
"clearSearch": "Clear",
"placeholder": "Search orders"
},
"data": {
"status": {
"new": "New ",
"coreOrderWorkflow/created": "Created ",
"coreOrderWorkflow/processing": "Processing ",
"coreOrderWorkflow/completed": "Completed ",
"coreOrderWorkflow/canceled": "Canceled ",
"coreOrderWorkflow/picked": "Picked ",
"coreOrderWorkflow/packed": "Packed ",
"coreOrderWorkflow/labeled": "Labeled ",
"coreOrderWorkflow/shipped": "Shipped "
}
}
}
}
Expand Down

0 comments on commit 64a56dc

Please sign in to comment.