rilldata / rill

Rill is a tool for effortlessly transforming data sets into powerful, opinionated dashboards using SQL. BI-as-code.
https://www.rilldata.com
Apache License 2.0
1.66k stars 111 forks source link

Internationalization Support for the UI (i18n) #3547

Open fredguth opened 10 months ago

fredguth commented 10 months ago

Problem Description: I am using Rill and have encountered a significant barrier for non-English speaking users. Many of my users are Portuguese speakers, and they face difficulties as the Rill UI is currently available only in English. This language barrier hinders the usability and accessibility of Rill for a broader audience.

Proposed Solution: I propose the adoption of Paraglide.js as an internationalization (i18n) library. Paraglide.js is a new library known for its efficiency (due to Message Functions tree shaking) and ease of integration. By integrating Paraglide.js, we can make Rill more accessible to non-English speakers, starting with Portuguese localization.

Implementation Suggestion:

Integrate Paraglide.js: Begin by integrating Paraglide.js into Rill's frontend (starting by web-local/web-common and then web-admin).

Localization Files: Create localization files for Portuguese, allowing for future expansion to other languages.

Refactor UI Codebase: Update the UI codebase to utilize Paraglide.js, replacing hardcoded English text with references to the localization files.

Community Contribution: Encourage the community to contribute translations for other languages, enhancing Rill's global usability. Impact of the Feature:

This feature will significantly improve Rill's accessibility for non-English speaking users and open up opportunities for broader usage globally. It aligns with the ethos of open-source projects by fostering inclusivity and diversity.

Additional Considerations:

Testing: Ensure thorough testing of the internationalized UI to maintain a consistent user experience across different languages. Documentation: Update documentation to reflect the new internationalization feature and guide contributors on adding more languages.

I believe that this feature will be a valuable addition to Rill and will greatly enhance its appeal and usability worldwide. I look forward to discussing this further with the community and contributors.

ericpgreen2 commented 10 months ago

@fredguth, thanks very much for opening this issue and pushing this forward. A few initial thoughts/questions:

Pending your answers, a good next step will be a small PoC PR to translate a few strings with the proposed setup. Thank you!

fredguth commented 10 months ago
  • Paraglide looks pretty neat. My one hesitation is that it’s very new (still considered a prerelease). What alternatives did you consider? Can you speak to the pros/cons compared to established alternatives?

To be completely honest, I haven't compared alternatives, I was sold by the VSCode extension which helps a lot with the translation process itself. But if you prefer another lib, I have no problems with that.

  • To best manage community-contributed translations, we should setup a l10n management platform. Do you have experience with these tools and have any recommendations?

I have used Crowdin before as a translator (not developer), but I didn't think about this. As I said before, I am willing to comply to whatever solution Rill prefers.

  • For Rill Developer, the “Add Source” form uses text that comes from the backend. At some point, we’ll need a i18n solution for the backend as well. Are your users mainly dashboard consumers or additionally dashboard creators? If only dashboard consumers, we can consider the backend another time.

I am a little overwhelmed by the monorepo approach of Rill. Most libraries and examples focus only in a simple repo, so I am not sure where to install things.

I didn't have much time since creating the issue, but this week I will work a little on this and the first step is to create a small PR with a PoC (not for merging).

ericpgreen2 commented 10 months ago

Ok, thanks. Internally, we're reviewing different i18n libraries. Particularly:

And different l10n platforms. Particularly:

If you have any insights, feel free to drop them here! Else I'll circle back next week once we've done our review.

ericpgreen2 commented 9 months ago

@fredguth, update for you!

If this sounds good, as a first step, could you please put together a PoC PR that sets up svelte-i18n and factors out a couple strings into language files?

As a second step, I can setup the Crowdin project and integration and give you translator access.

fredguth commented 9 months ago

@ericpgreen2 I created a minimum working example just to check if I am doing it right. The monorepo is a bit confusing for me.