Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add internationalization configuration to the front-end #2149

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jackiemoo
Copy link
Contributor

Add internationalization configuration to the front-end, including English, Portuguese, and Chinese.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 12, 2024
Copy link

vercel bot commented Jun 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langflow ❌ Failed (Inspect) Jun 17, 2024 2:08am

@dosubot dosubot bot added the javascript Pull requests that update Javascript code label Jun 12, 2024
@ogabrielluiz
Copy link
Contributor

This is so good, @jackiemoo !

@jackiemoo
Copy link
Contributor Author

Hi ogabrielluiz @ogabrielluiz ,

Thanks for your response. Could you please let me know if there are plans to support internationalization? I'd be happy to help if needed.

Thanks!

@YamonBot
Copy link
Contributor

I am very interested in your work. If this is reflected in the main source and the structure is established, we will provide a Korean translation.

@ogabrielluiz
Copy link
Contributor

Hey @jackiemoo

This PR #2260 adds a very similar implementation. I think they merged this PR with them, I'm not sure.

@jackiemoo
Copy link
Contributor Author

jackiemoo commented Jul 1, 2024

Hi @ogabrielluiz ,
I saw it, very well done,translated a large part.
I think we can quickly push forward with internationalization to support more languages. Of course, you can also decide on the internationalization framework, and then the community contributors can help implement and improve it. What do you think? Haha.

@ogabrielluiz
Copy link
Contributor

Hey @jackiemoo

We are going to prioritize this PR as this was the first one to be created. Please, let me know what are your plans and what else we need to merge it.

@jackiemoo
Copy link
Contributor Author

jackiemoo commented Jul 10, 2024

Hi @ogabrielluiz ,

Thanks for your reply.
My plans for the internationalization (i18n) implementation include the following steps:

1.Finalizing the Basic Configuration:
Ensure the basic i18n configuration is solid, including setting up English, Portuguese, and Chinese translations. I'll review the existing translations and make necessary adjustments.

2.Automatic Language Detection:
Automatically detect the browser's language settings and select the most appropriate language.

3.Adding More Languages:
Once the basic setup is confirmed, I'll open it up for the community to contribute additional translations. We’ve already received interest from contributors willing to add Korean and other languages.

4.Documentation:
Create clear documentation for adding new languages and managing translations. This will help guide community contributors and maintain consistency across translations.

If there are any specific areas or features you think should be prioritized or if there are any blockers that need attention, please let me know. I'd be happy to collaborate closely to ensure a smooth and efficient integration of i18n.

@ogabrielluiz
Copy link
Contributor

That's a very good plan.

What do you say we create an issue with all the tasks required for this and we start with a basic implementation that simply makes langflow continue to work as is but with the i18n in place?

That way we can make smaller improvements.

@YamonBot
Copy link
Contributor

Hey dudes,

I think translating UI elements is great from an accessibility perspective. However, most use cases involve repetitive use of components.

How about a design where users can suggest translations for components available in the LangFlow store at the component level?

The original proposers of the components could then accept these suggestions. It sounds like it could be a challenging journey, but isn't there a good way to achieve this?

@YamonBot
Copy link
Contributor

YamonBot commented Jul 10, 2024

In Korea, where I am from, Naver, which is like the Google of Korea, has implemented a similar concept by creating a structure where users can directly translate and share specific webcomics.
https://translate.webtoons.com/translate/status?webtoonNo=141

Screenshot_20240711_000534_Edge.png

@ogabrielluiz
Copy link
Contributor

In Korea, where I am from, Naver, which is like the Google of Korea, has implemented a similar concept by creating a structure where users can directly translate and share specific webcomics. translate.webtoons.com/translate/status?webtoonNo=141

We can do that for sure but it will require quite a bit of restructuring of the database

@YamonBot
Copy link
Contributor

In Korea, where I am from, Naver, which is like the Google of Korea, has implemented a similar concept by creating a structure where users can directly translate and share specific webcomics. translate.webtoons.com/translate/status?webtoonNo=141

We can do that for sure but it will require quite a bit of restructuring of the database

Yes, I might have been too enthusiastic. It seems like it would require a massive investment of resources, so it might not be a priority right now. I'll keep it in mind and propose it again later.

@jackiemoo
Copy link
Contributor Author

jackiemoo commented Jul 11, 2024

Hi @ogabrielluiz ,

Creating an issue with all the tasks required is a good idea. Here's how I propose we proceed:

1.Create an Issue for i18n Implementation:

Outline the overall plan and break it down into smaller tasks.

2.Basic Implementation:

Start with a basic i18n setup that ensures Langflow continues to work as it currently does.
Set English as the initial language, then extract UI elements and replace them with i18n objects. This step is crucial because the front-end is frequently modified, and we can continue to make progress iteratively.

3.Task Breakdown:

  • Review and adjust existing translations.
  • Implement browser language detection.
  • Set up a process for the community to add new translations, starting with Korean, Portuguese and Chinese.
  • Draft initial documentation for adding new languages and managing translations.

By taking these steps, we can ensure a smooth integration of i18n while making incremental improvements.

If there's anything specific you think should be added or adjusted.

Next step, we can go ahead and create the issue with these details.

@ogabrielluiz ogabrielluiz changed the base branch from dev to main July 11, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants