Skip to content

Add localization (i18n) support #15#46

Open
kumaradityaraj wants to merge 13 commits intoserverlessworkflow:mainfrom
kumaradityaraj:i18nSetup
Open

Add localization (i18n) support #15#46
kumaradityaraj wants to merge 13 commits intoserverlessworkflow:mainfrom
kumaradityaraj:i18nSetup

Conversation

@kumaradityaraj
Copy link
Copy Markdown

Closes 15

Summary

This PR sets up internationalization (i18n) support for the project by introducing a shared @serverlessworkflow/i18n package and integrating it into the diagram editor.

Changes

  • Added a new workspace package @serverlessworkflow/i18n to centralize i18n configuration.
  • Configured i18next and react-i18next with default English resources.
  • Initialized i18n in the diagram editor so components can use useTranslation() without additional setup.

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings March 25, 2026 07:47
@kumaradityaraj
Copy link
Copy Markdown
Author

@fantonangeli Please review this PR. Thank you.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces initial internationalization (i18n) scaffolding by adding a shared @serverlessworkflow/i18n workspace package and wiring i18n initialization/usage into the diagram editor so React components can call useTranslation().

Changes:

  • Added new @serverlessworkflow/i18n package with i18next + react-i18next configuration and English resources.
  • Initialized i18n in serverless-workflow-diagram-editor and demonstrated useTranslation() usage.
  • Updated workspace dependencies/lockfile to include the new package and i18n libraries.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
pnpm-lock.yaml Adds lock entries for the new i18n package and i18next/react-i18next deps.
packages/serverless-workflow-diagram-editor/src/i18n.ts Initializes i18next via shared setupI18n.
packages/serverless-workflow-diagram-editor/src/diagram-editor/DiagramEditor.tsx Imports i18n setup and renders a few translated strings via useTranslation().
packages/serverless-workflow-diagram-editor/package.json Adds dependencies for shared i18n package and i18n libraries.
packages/i18n/tsconfig.json TypeScript build config for the new i18n package.
packages/i18n/src/types.d.ts Adds react-i18next type augmentation for typed resources/namespace.
packages/i18n/src/resources.ts Defines resources map and imports English JSON bundle.
packages/i18n/src/locales/en/common.json English string bundle for the default namespace.
packages/i18n/src/index.ts Exports i18n config/resources from the new package.
packages/i18n/src/config.ts Implements setupI18n() using i18next + initReactI18next.
packages/i18n/package.json Declares the new workspace package, scripts, and dependencies.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings March 25, 2026 08:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 12 changed files in this pull request and generated 5 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copy link
Copy Markdown
Member

@fantonangeli fantonangeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @kumaradityaraj for this PR.
I also add some points here:

  • please write a short README file explaining how to use it and how to add languages to components

@fantonangeli fantonangeli requested a review from lornakelly March 25, 2026 18:38
@lornakelly
Copy link
Copy Markdown
Contributor

@kumaradityaraj Let me know when you have addressed @fantonangeli comments and I will review again, thanks!

@kumaradityaraj
Copy link
Copy Markdown
Author

@lornakelly Handrey suggested something similar to implement like this - I18nDictionariesProvider

So i am looking at it as this is more modular and easy to use

@fantonangeli
Copy link
Copy Markdown
Member

@kumaradityaraj, maybe you can try with the official provider: https://react.i18next.com/latest/i18nextprovider ?

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings March 27, 2026 08:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copy link
Copy Markdown
Contributor

@handreyrc handreyrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kumaradityaraj,

Supported languages settings and translations could be package specific in my opinion.

WDYT?

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings April 1, 2026 08:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings April 1, 2026 08:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 27 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 27 changed files in this pull request and generated 8 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copy link
Copy Markdown
Contributor

@handreyrc handreyrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kumaradityaraj ,

We have a base i18n package, package specifc settings and dictionary.
Looks good to me!

Thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add localization (i18n) support

5 participants