From 5b6ee3a68561335f16cda454e528727275b7b88e Mon Sep 17 00:00:00 2001
From: apple502j <33279053+apple502j@users.noreply.github.com>
Date: Tue, 9 Oct 2018 22:06:03 +0900
Subject: [PATCH] Translate 2 strings on list monitor (#3259)

* Translate "(empty)" and "length {value.length}"
* Use FormattedMessage
---
 src/components/monitor/list-monitor-scroller.jsx |  7 ++++++-
 src/components/monitor/list-monitor.jsx          | 10 +++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/components/monitor/list-monitor-scroller.jsx b/src/components/monitor/list-monitor-scroller.jsx
index a62c0c0e2..cfcd6a248 100644
--- a/src/components/monitor/list-monitor-scroller.jsx
+++ b/src/components/monitor/list-monitor-scroller.jsx
@@ -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>
         );
     }
diff --git a/src/components/monitor/list-monitor.jsx b/src/components/monitor/list-monitor.jsx
index daa9f33eb..e3422e5b3 100644
--- a/src/components/monitor/list-monitor.jsx
+++ b/src/components/monitor/list-monitor.jsx
@@ -1,6 +1,7 @@
 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')}
-- 
GitLab