From 2c86cbc2c94319fe52a0a343ed4db2b894c8290f Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Tue, 24 Oct 2023 22:48:27 +0100 Subject: [PATCH 1/3] add helptext to flows screen --- src/containers/Flow/Flow.tsx | 1 + src/i18n/en/en.json | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/containers/Flow/Flow.tsx b/src/containers/Flow/Flow.tsx index 29324542d..ed67ee970 100644 --- a/src/containers/Flow/Flow.tsx +++ b/src/containers/Flow/Flow.tsx @@ -153,6 +153,7 @@ export const Flow = () => { variant: 'outlined', label: t('Tag'), }, + helperText: t('Use this to categorize your flows.'), }, { component: Checkbox, diff --git a/src/i18n/en/en.json b/src/i18n/en/en.json index 8d3f5b41d..4038ac440 100644 --- a/src/i18n/en/en.json +++ b/src/i18n/en/en.json @@ -181,6 +181,7 @@ "Keywords": "Keywords", "Enter comma separated keywords that trigger this flow": "Enter comma separated keywords that trigger this flow", "Tag": "Tag", + "Use this to categorize your flows.": "Use this to categorize your flows.", "Ignore Keywords": "Ignore Keywords", "If activated, users will not be able to change this flow by entering keyword for any other flow.": "If activated, users will not be able to change this flow by entering keyword for any other flow.", "Is pinned?": "Is pinned?", @@ -380,6 +381,7 @@ "Change assignee": "Change assignee", "Remarks": "Remarks", "Update ticket": "Update ticket", + "Created at": "Created at", "Issue": "Issue", "Opened by": "Opened by", "Add remark": "Add remark", @@ -419,6 +421,5 @@ "Request header": "Request header", "Request JSON": "Request JSON", "Response JSON": "Response JSON", - "Webhook Logs": "Webhook Logs", - "Created at": "Created at" + "Webhook Logs": "Webhook Logs" } From 06386a0f551928791888feec1ac9b53b0f2cd88b Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Thu, 26 Oct 2023 22:57:48 +0100 Subject: [PATCH 2/3] fixed localization to extract strings from .ts files --- i18next-parser.config.js | 2 +- src/containers/Flow/Flow.tsx | 2 +- src/containers/Template/Form/Template.tsx | 1 + src/i18n/en/en.json | 23 +++++++++++++++++------ 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/i18next-parser.config.js b/i18next-parser.config.js index 342878ab1..34a043521 100644 --- a/i18next-parser.config.js +++ b/i18next-parser.config.js @@ -22,7 +22,7 @@ module.exports = { // Supports JSON (.json) and YAML (.yml) file formats // Where to write the locale files relative to process.cwd() - input: ['src/**/*.tsx'], + input: ['src/**/*.tsx', 'src/**/*.ts'], // An array of globs that describe where to look for source files // relative to the location of the configuration file // Globs syntax: https://github.com/isaacs/node-glob#glob-primer diff --git a/src/containers/Flow/Flow.tsx b/src/containers/Flow/Flow.tsx index ed67ee970..e6e743a3a 100644 --- a/src/containers/Flow/Flow.tsx +++ b/src/containers/Flow/Flow.tsx @@ -138,7 +138,7 @@ export const Flow = () => { name: 'keywords', type: 'text', placeholder: t('Keywords'), - helperText: t('Enter comma separated keywords that trigger this flow'), + helperText: t('Enter comma separated keywords that trigger this flow.'), }, { component: AutoComplete, diff --git a/src/containers/Template/Form/Template.tsx b/src/containers/Template/Form/Template.tsx index 47405678e..8d1057006 100644 --- a/src/containers/Template/Form/Template.tsx +++ b/src/containers/Template/Form/Template.tsx @@ -765,6 +765,7 @@ const Template = ({ variant: 'outlined', label: t('Tag'), }, + helperText: t('Use this to categorize your templates.'), }; const hsmFields = formField && [ diff --git a/src/i18n/en/en.json b/src/i18n/en/en.json index 4038ac440..37829a5f2 100644 --- a/src/i18n/en/en.json +++ b/src/i18n/en/en.json @@ -1,4 +1,6 @@ { + "Password must be at least 10 characters long.": "Password must be at least 10 characters long.", + "Input required": "Input required", "Type a message...": "Type a message...", "Loading...": "Loading...", "Settings": "Settings", @@ -11,7 +13,6 @@ "or": "or", "We are unable to generate an OTP, kindly contact your technical team.": "We are unable to generate an OTP, kindly contact your technical team.", "Please confirm the OTP received at your WhatsApp number.": "Please confirm the OTP received at your WhatsApp number.", - "Input required": "Input required", "We are unable to register, kindly contact your technical team.": "We are unable to register, kindly contact your technical team.", "Create your new account": "Create your new account", "Continue": "Continue", @@ -28,7 +29,6 @@ "Invalid captcha": "Invalid captcha", "Your full name": "Your full name", "Your personal WhatsApp number": "Your personal WhatsApp number", - "Password must be at least 10 characters long.": "Password must be at least 10 characters long.", "Register with ": "Register with ", "Login to Glific": "Login to Glific", "Phone number": "Phone number", @@ -179,7 +179,7 @@ "You won't be able to use this flow again.": "You won't be able to use this flow again.", "Configure": "Configure", "Keywords": "Keywords", - "Enter comma separated keywords that trigger this flow": "Enter comma separated keywords that trigger this flow", + "Enter comma separated keywords that trigger this flow.": "Enter comma separated keywords that trigger this flow.", "Tag": "Tag", "Use this to categorize your flows.": "Use this to categorize your flows.", "Ignore Keywords": "Ignore Keywords", @@ -206,6 +206,17 @@ "Roles": "Roles", "Select roles to apply to the resource": "Select roles to apply to the resource", "Cancel": "Cancel", + "Title is required": "Title is required", + "Title can be at most 60 characters": "Title can be at most 60 characters", + "Message content is required.": "Message content is required.", + "Section title can be at most 24 characters": "Section title can be at most 24 characters", + "Sorry! Emojis are not allowed in the title": "Sorry! Emojis are not allowed in the title", + "Title can be at most 24 characters": "Title can be at most 24 characters", + "Description can be at most 72 characters": "Description can be at most 72 characters", + "Please enter unique title": "Please enter unique title", + "Button value can be at most 20 characters": "Button value can be at most 20 characters", + "Footer value can be at most 60 characters": "Footer value can be at most 60 characters", + "Attachment URL is required.": "Attachment URL is required.", "Copy Interactive Message": "Copy Interactive Message", "You won't be able to use this again.": "You won't be able to use this again.", "Please check the errors": "Please check the errors", @@ -356,11 +367,11 @@ "Attachment Type": "Attachment Type", "Please provide a sample attachment for approval purpose. You may send a similar but different attachment when sending the HSM to users.": "Please provide a sample attachment for approval purpose. You may send a similar but different attachment when sending the HSM to users.", "Define what use case does this template serve eg. OTP, optin, activity preference": "Define what use case does this template serve eg. OTP, optin, activity preference", + "Use this to categorize your templates.": "Use this to categorize your templates.", "Title length is too long.": "Title length is too long.", "Message is required.": "Message is required.", - "Attachment URL is required.": "Attachment URL is required.", - "Please enter valid phone number.": "", - "Please enter valid url.": "", + "Please enter valid phone number.": "Please enter valid phone number.", + "Please enter valid url.": "Please enter valid url.", "Submit for Approval": "Submit for Approval", "Create": "Create", "Create Speed Send": "Create Speed Send", From 12a2c1bb3f5bda890c09416c7a9aaafa7e055499 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Thu, 26 Oct 2023 23:01:29 +0100 Subject: [PATCH 3/3] add helptext for interactive messages --- src/containers/InteractiveMessage/InteractiveMessage.tsx | 1 + src/i18n/en/en.json | 1 + 2 files changed, 2 insertions(+) diff --git a/src/containers/InteractiveMessage/InteractiveMessage.tsx b/src/containers/InteractiveMessage/InteractiveMessage.tsx index 283961068..3af34d2ad 100644 --- a/src/containers/InteractiveMessage/InteractiveMessage.tsx +++ b/src/containers/InteractiveMessage/InteractiveMessage.tsx @@ -720,6 +720,7 @@ export const InteractiveMessage = () => { variant: 'outlined', label: t('Tag'), }, + helperText: t('Use this to categorize your interactive messages.'), }, ]; diff --git a/src/i18n/en/en.json b/src/i18n/en/en.json index 37829a5f2..191dc79b6 100644 --- a/src/i18n/en/en.json +++ b/src/i18n/en/en.json @@ -226,6 +226,7 @@ "You can also use variables in message enter @ to see the available list": "You can also use variables in message enter @ to see the available list", "Footer": "Footer", "Attachment type": "Attachment type", + "Use this to categorize your interactive messages.": "Use this to categorize your interactive messages.", "Validating URL": "Validating URL", "You won't be able to use this interactive message.": "You won't be able to use this interactive message.", "Show all languages": "Show all languages",