From 2fde4d7e8019eb9f3967a47b03da738cac9ba617 Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 22 Apr 2020 17:19:29 +1000 Subject: [PATCH] messages.json fixup --- _locales/en/messages.json | 21 ++++++++++++++++++--- preload.js | 5 +++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 94a1fede4..49e362294 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2521,14 +2521,29 @@ "message": "Remove" }, "invalidHexId": { - "message": "Invalid Hex ID", + "message": "Invalid Session ID or LNS Name", "description": - "Error string shown when user type an invalid pubkey hex string" + "Error string shown when user types an invalid pubkey hex string" + }, + "invalidLnsFormat": { + "message": "Invalid LNS Name", + "description": "Error string shown when user types an invalid LNS name" }, "invalidPubkeyFormat": { "message": "Invalid Pubkey Format", "description": "Error string shown when user types an invalid pubkey format" }, + "lnsMappingNotFound": { + "message": "There is no LNS mapping associated with this name", + "description": "Shown in toast if user enters an unknown LNS name" + }, + "lnsLookupTimeout": { + "message": "LNS lookup timed out", + "description": "Shown in toast if user enters an unknown LNS name" + }, + "lnsTooFewNodes": { + "message": "Not enough nodes currently active for LNS lookup" + }, "conversationsTab": { "message": "Conversations", "description": "conversation tab title" @@ -2711,7 +2726,7 @@ "message": "Enter Session ID" }, "pasteSessionIDRecipient": { - "message": "Enter a Session ID" + "message": "Enter a Session ID or LNS name" }, "usersCanShareTheir...": { "message": diff --git a/preload.js b/preload.js index 8a84536ef..6d3eb2977 100644 --- a/preload.js +++ b/preload.js @@ -92,8 +92,9 @@ window.CONSTANTS = new function() { this.LNS_MAX_LENGTH = 64; // Conforms to naming rules here // https://loki.network/2020/03/25/loki-name-system-the-facts/ - this.LNS_REGEX = `^[a-zA-Z0-9_]([a-zA-Z0-9_-]{0,${this.LNS_MAX_LENGTH - 2}}[a-zA-Z0-9_]){0,1}$`; -}; + this.LNS_REGEX = `^[a-zA-Z0-9_]([a-zA-Z0-9_-]{0,${this.LNS_MAX_LENGTH - + 2}}[a-zA-Z0-9_]){0,1}$`; +}(); window.versionInfo = { environment: window.getEnvironment(),