Skip to content

Commit

Permalink
fixed localization to extract strings from .ts files
Browse files Browse the repository at this point in the history
  • Loading branch information
kurund committed Oct 26, 2023
1 parent 2c86cbc commit 06386a0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion i18next-parser.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Flow/Flow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/containers/Template/Form/Template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,7 @@ const Template = ({
variant: 'outlined',
label: t('Tag'),
},
helperText: t('Use this to categorize your templates.'),
};

const hsmFields = formField && [
Expand Down
23 changes: 17 additions & 6 deletions src/i18n/en/en.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 06386a0

Please sign in to comment.