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

Multi-language Capability #331

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

Conversation

morgendigital
Copy link

We propose an integration of an internationalization library (i18n) to allow the UI of Chaindesk to be used in multiple languages. Translation can easily be done over a JSON file, and a language switcher is included in the settings.

Is there any interest for such a functionality?

Copy link

vercel bot commented Feb 15, 2024

@JanikHalder is attempting to deploy a commit to the databerry Team on Vercel.

A member of the Team first needs to authorize it.

@gmpetrov
Copy link
Owner

Hi @morgendigital, support for i18n would be great!
Maybe we should start with test an implementation on a single page so that we can agree on the right setup for the project.
Could you prepare a first draft?

@morgendigital
Copy link
Author

That sounds great @gmpetrov - thank you. We will prepare a test setup over the next couple of days and will get back to you.

@morgendigital
Copy link
Author

@gmpetrov have you checked our recent implementation that we would have liked to commit in the first place? Is there any feedback you can give us here already? Then we can improve it in the test implementation you proposed. Thank you :)

@gmpetrov gmpetrov requested a review from OdapX February 26, 2024 19:28
@gmpetrov
Copy link
Owner

@gmpetrov have you checked our recent implementation that we would have liked to commit in the first place? Is there any feedback you can give us here already? Then we can improve it in the test implementation you proposed. Thank you :)

Hello @morgendigital we're going to check ASAP

@OdapX can you review this PR pls?

@morgendigital
Copy link
Author

Thanks, both of you. Just let us know if there's something you'd like to adapt, we will quickly implement it and draft a new round.

@@ -36,7 +36,7 @@ COPY turbo.json turbo.json
# Uncomment the following line in case you want to disable telemetry during the build.
ENV NEXT_TELEMETRY_DISABLED 1
# RUN mv next.config.docker.js next.config.js
# RUN npm run prisma:generate
# RUN npm run prisma:generateBzw.
Copy link
Collaborator

Choose a reason for hiding this comment

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

to drop

title="Deploy"
description="Deploy your agent with the following widgets or integrations"
title={t('publish')}
description={t('publish-subtitle')}
Copy link
Collaborator

Choose a reason for hiding this comment

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

use camelcase, applies elsewhere too.


<FormControl>
<FormLabel>Knowledge Restriction</FormLabel>
<FormLabel>{t('knowRest')}</FormLabel>
Copy link
Collaborator

Choose a reason for hiding this comment

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

please be as explicit as possible with the keys. (knowledgeRestriction)

@@ -110,7 +112,7 @@ export default function BaseForm(props: Props) {
{networkError && <Alert color="danger">{networkError}</Alert>}

<Input
label="Datastore Name"
label={t('nameKonfig')}
Copy link
Collaborator

Choose a reason for hiding this comment

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

datastoreName

@@ -75,13 +77,13 @@ function EmailInboxSettingsTab({ inboxId }: Props) {
}
},
color: 'danger',
children: 'Delete',
children: `${t('deleteCta')}`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

should not be structured this way. ctas should be a nested object where relevant.

icon: <ManageAccountsRoundedIcon fontSize="small" />,
active: router.route.startsWith(RouteNames.SETTINGS),
active: router.route.startsWith(RouteNames.PROFILE),
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this change?

@JanikHalder
Copy link

JanikHalder commented Feb 26, 2024 via email

@OdapX
Copy link
Collaborator

OdapX commented Feb 26, 2024

Hi, thank you for your contribution!

I have the following remarks:

  • use camel case for all keys (no mixing), and carefull with spelling (eg, nameKonfig)
  • be very explicit with the key names (even if the key is long).
  • scope down the PR to just translation changes: do not add language to user schema (lang would probably be added to the org later),do not perform updates and do not rename settings to profile.
  • Structure: Not sure if this is the best structure for the long run, we still need to think about a clean way to do this.

I think as @gmpetrov suggested, you could scope this to just one page and no need to change the schema at the moment (use this plugin i18next-browser-languagedetector to detect the locale).

thanks.

@morgendigital
Copy link
Author

Thank you @OdapX for your extensive and detailed comment! We are on it!

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.

None yet

4 participants