diff --git a/src/components/views/messages/SenderProfile.js b/src/components/views/messages/SenderProfile.js index d5f78fe252..d64c5fe651 100644 --- a/src/components/views/messages/SenderProfile.js +++ b/src/components/views/messages/SenderProfile.js @@ -52,9 +52,13 @@ export default function SenderProfile(props) { return (
- { content.props.children[0] ? { content.props.children[0] } : '' } + { content.props.children[0] ? + { content.props.children[0] } : '' + } { content.props.children[1] } - { content.props.children[2] ? { content.props.children[2] } : '' } + { content.props.children[2] ? + { content.props.children[2] } : '' + }
); } diff --git a/test/i18n-test/languageHandler-test.js b/test/i18n-test/languageHandler-test.js index 2a94768092..f3c2e135d5 100644 --- a/test/i18n-test/languageHandler-test.js +++ b/test/i18n-test/languageHandler-test.js @@ -26,35 +26,38 @@ describe('languageHandler', function() { }); it('handles plurals', function() { - var text = 'and %(count)s others...'; + const text = 'and %(count)s others...'; expect(languageHandler._t(text, { count: 1 })).toBe('and one other...'); expect(languageHandler._t(text, { count: 2 })).toBe('and 2 others...'); }); it('handles simple variable subsitutions', function() { - var text = 'You are now ignoring %(userId)s'; + const text = 'You are now ignoring %(userId)s'; expect(languageHandler._t(text, { userId: 'foo' })).toBe('You are now ignoring foo'); }); it('handles simple tag substitution', function() { - var text = 'Press to start a chat with someone'; - expect(languageHandler._t(text, {}, { 'StartChatButton': () => 'foo' })).toBe('Press foo to start a chat with someone'); + const text = 'Press to start a chat with someone'; + expect(languageHandler._t(text, {}, { 'StartChatButton': () => 'foo' })) + .toBe('Press foo to start a chat with someone'); }); it('handles text in tags', function() { - var text = 'Click here to join the discussion!'; - expect(languageHandler._t(text, {}, { 'a': (sub) => `x${sub}x` })).toBe('xClick herex to join the discussion!'); + const text = 'Click here to join the discussion!'; + expect(languageHandler._t(text, {}, { 'a': (sub) => `x${sub}x` })) + .toBe('xClick herex to join the discussion!'); }); it('variable substitution with React component', function() { // Need an extra space at the end because the result of _t() has an extra empty node at the end - var text = 'You are now ignoring %(userId)s '; - expect(JSON.stringify(languageHandler._t(text, { userId: () => foo }))).toBe(JSON.stringify((You are now ignoring foo ))); + const text = 'You are now ignoring %(userId)s '; + expect(JSON.stringify(languageHandler._t(text, { userId: () => foo }))) + .toBe(JSON.stringify((You are now ignoring foo ))); }); it('tag substitution with React component', function() { - var text = 'Press to start a chat with someone'; - expect(JSON.stringify(languageHandler._t(text, {}, { 'StartChatButton': () => foo }))).toBe(JSON.stringify(Press foo to start a chat with someone)); - + const text = 'Press to start a chat with someone'; + expect(JSON.stringify(languageHandler._t(text, {}, { 'StartChatButton': () => foo }))) + .toBe(JSON.stringify(Press foo to start a chat with someone)); }); });