From 01be58acc2abd836ec4d568321a43e846d93deaa Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg <scott@signal.org> Date: Mon, 21 May 2018 11:57:40 -0700 Subject: [PATCH] Remove formatting in importError localization string --- _locales/en/messages.json | 10 +++++++--- background.html | 5 ++++- js/views/import_view.js | 3 ++- test/i18n_test.js | 7 ++----- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 0bef20ac9..61a61a36f 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -67,9 +67,13 @@ "message": "Loading contacts and messages", "description": "Header of screen shown as data is import" }, - "importError": { - "message": "Make sure you have chosen the correct directory that contains your saved Signal data. Its name should begin with 'Signal Export.' You can also save a new copy of your data from the Chrome App.<p>If these steps don't work for you, please <a target='_blank' href='https://support.signal.org/hc/en-us/articles/215188737'>submit a debug log</a> so that we can help you get migrated!</p>", - "description": "Message shown if the import went wrong." + "importErrorFirst": { + "message": "Make sure you have chosen the correct directory that contains your saved Signal data. Its name should begin with 'Signal Export.' You can also save a new copy of your data from the Chrome App.", + "description": "Message shown if the import went wrong; first paragraph" + }, + "importErrorSecond": { + "message": "If these steps don't work for you, please submit a debug log (View -> Debug Log) so that we can help you get migrated!", + "description": "Message shown if the import went wrong; second paragraph" }, "importAgain": { "message": "Choose folder and try again", diff --git a/background.html b/background.html index 65d5550e7..f9a4aeb1b 100644 --- a/background.html +++ b/background.html @@ -740,7 +740,10 @@ <div class='step-body'> <span class='banner-icon alert-outline'></span> <div class='header'>{{ errorHeader }}</div> - <div class='body-text-wide'>{{& errorMessage }}</div> + <div class='body-text-wide'> + {{ errorMessageFirst }} + <p>{{ errorMessageSecond }}</p> + </div> </div> <div class='nav'> <div> diff --git a/js/views/import_view.js b/js/views/import_view.js index 1cf100ef2..70764b265 100644 --- a/js/views/import_view.js +++ b/js/views/import_view.js @@ -58,7 +58,8 @@ return { isError: true, errorHeader: i18n('importErrorHeader'), - errorMessage: i18n('importError'), + errorMessageFirst: i18n('importErrorFirst'), + errorMessageSecond: i18n('importErrorSecond'), chooseButton: i18n('importAgain'), }; } diff --git a/test/i18n_test.js b/test/i18n_test.js index f992d0ab1..8ab1885db 100644 --- a/test/i18n_test.js +++ b/test/i18n_test.js @@ -11,11 +11,8 @@ describe('i18n', function() { assert.equal(actual, 'Attempting reconnect in 5 seconds'); }); it('returns message with multiple substitutions', function() { - const actual = i18n('verifyContact', ['<strong>', '</strong>']); - assert.equal( - actual, - 'You may wish to <strong> verify </strong> your safety number with this contact.' - ); + const actual = i18n('theyChangedTheTimer', ['Someone', '5 minutes']); + assert.equal(actual, 'Someone set the timer to 5 minutes.'); }); });