Skip to content
Snippets Groups Projects
Commit 5b6ee3a6 authored by apple502j's avatar apple502j Committed by chrisgarrity
Browse files

Translate 2 strings on list monitor (#3259)

* Translate "(empty)" and "length {value.length}"
* Use FormattedMessage
parent 2e299d3f
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import bindAll from 'lodash.bindall';
import {FormattedMessage} from 'react-intl';
import styles from './monitor.css';
import {List} from 'react-virtualized';
......@@ -21,7 +22,11 @@ class ListMonitorScroller extends React.Component {
noRowsRenderer () {
return (
<div className={classNames(styles.listRow, styles.listEmpty)}>
{'(empty)' /* TODO waiting for design before translation */}
<FormattedMessage
defaultMessage="(empty)"
description="Text shown on a list monitor when a list is empty"
id="gui.monitor.listMonitor.empty"
/>
</div>
);
}
......
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import {FormattedMessage} from 'react-intl';
import styles from './monitor.css';
import ListMonitorScroller from './list-monitor-scroller.jsx';
......@@ -32,7 +33,14 @@ const ListMonitor = ({draggable, label, width, height, value, onResizeMouseDown,
{'+' /* TODO waiting on asset */}
</div>
<div className={styles.footerLength}>
{`length ${value.length}`}
<FormattedMessage
defaultMessage="length {length}"
description="Length label on list monitors. DO NOT translate {length} (with brackets)."
id="gui.monitor.listMonitor.listLength"
values={{
length: value.length
}}
/>
</div>
<div
className={classNames(draggable ? styles.resizeHandle : null, 'no-drag')}
......
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