From 610a305e23ac6442ada45c4e471ee6a2e303daf7 Mon Sep 17 00:00:00 2001 From: Mikunj Date: Wed, 28 Nov 2018 12:46:56 +1100 Subject: [PATCH] Added localised strings. Only override name when editing profile. --- _locales/en/messages.json | 8 ++++++++ js/background.js | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 9f5dc789c..f431e22ce 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1648,5 +1648,13 @@ "settingsUnblockHeader": { "message": "Blocked Users", "description": "Shown in the settings page as the heading for the blocked user settings" + }, + "editProfileTitle": { + "message": "Change your own display name", + "description": "The title shown when user edits their own profile" + }, + "editProfileDisplayNameWarning": { + "message": "Note: Your display name will be visible to your contacts", + "description": "Shown to the user as a warning about setting display name" } } diff --git a/js/background.js b/js/background.js index e1cb7f6cc..5b8a01848 100644 --- a/js/background.js +++ b/js/background.js @@ -574,8 +574,8 @@ const displayName = profile && profile.name && profile.name.displayName; if (appView) { appView.showNicknameDialog({ - title: 'Change your own display name', - message: 'Note: Your display name will be visible to your contacts.', + title: window.i18n('editProfileTitle'), + message: window.i18n('editProfileDisplayNameWarning'), nickname: displayName, onOk: async (newName) => { // Update our profiles accordingly' @@ -585,6 +585,7 @@ await storage.removeLocalProfile(); } else { newProfile = { + ...(profile || {}), name: { displayName: trimmed, },