OpenGpt icon indicating copy to clipboard operation
OpenGpt copied to clipboard

feat:  add i18n support

Open Quilljou opened this issue 1 year ago • 9 comments

Quilljou avatar Mar 11 '23 04:03 Quilljou

Someone is attempting to deploy a commit to a Personal Account owned by @futantan on Vercel.

@futantan first needs to authorize it.

vercel[bot] avatar Mar 11 '23 04:03 vercel[bot]

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

Name Status Preview Comments Updated
open-gpt ❌ Failed (Inspect) Mar 11, 2023 at 4:56AM (UTC)

vercel[bot] avatar Mar 11 '23 04:03 vercel[bot]

awesome! thank you @Quilljou !

futantan avatar Mar 11 '23 05:03 futantan

btw, the tool https://chatgpt-i18n.vercel.app/translate is awesome

Quilljou avatar Mar 11 '23 05:03 Quilljou

thanks for the sharing! I have two concerns about this and like to know your ideas:

  • this project is in very early stage, and most of the users speak Chinese
  • We will absolutely add i18n soon, but I'm worried that this will burden the work for the developer (mostly me)

I really love this PR and want to move this forward, how about this:

  • hard code language to zh-cn for now and merge the PR
  • another PR in the future to enable the language detection.

futantan avatar Mar 11 '23 05:03 futantan

This PR will close https://github.com/futantan/OpenGpt/issues/6

futantan avatar Mar 11 '23 05:03 futantan

thanks for the sharing! I have two concerns about this and like to know your ideas:

  • this project is in very early stage, and most of the users speak Chinese
  • We will absolutely add i18n soon, but I'm worried that this will burden the work for the developer (mostly me)

I really love this PR and want to move this forward, how about this:

  • hard code language to zh-cn for now and merge the PR
  • another PR in the future to enable the language detection.

Does hard code mean that the text in future new features will be hardcoded in Chinese instead of being written under locales?

Quilljou avatar Mar 11 '23 06:03 Quilljou

no. I mean we will write it under locales of course, but only use the Chinese locale for now

futantan avatar Mar 11 '23 09:03 futantan

no. I mean we will write it under locales of course, but only use the Chinese locale for now

Great. I'm currently developing a tool to simplify the burden of i18n work.

Quilljou avatar Mar 11 '23 12:03 Quilljou

@futantan All conflicts are resolved

Quilljou avatar Mar 12 '23 04:03 Quilljou

hi @Quilljou I created another PR to commit based on your history, which contains:

  • support zh-TW
  • add discord link

Please correct me it if this is the right way to update based on your code, thank you. https://github.com/futantan/OpenGpt/pull/33

futantan avatar Mar 12 '23 11:03 futantan

Screenshot 2023-03-12 at 19 54 30 i18n seems broken online, but it works in my local dev environment

Quilljou avatar Mar 12 '23 11:03 Quilljou

can you help to refresh the page and check it again? I think it's fixed

futantan avatar Mar 12 '23 11:03 futantan

I open it in my phone, it's still broken

Quilljou avatar Mar 12 '23 12:03 Quilljou

oh, it’s broken… could you help to fix it? I’m outside from my computer

On Sun, Mar 12, 2023 at 20:00 Quill Zhou @.***> wrote:

I open it in my phone, it's still broken

— Reply to this email directly, view it on GitHub https://github.com/futantan/OpenGpt/pull/13#issuecomment-1465176389, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABP2MGO2UDP2O6LWEQFE3QTW3W3HNANCNFSM6AAAAAAVXIPBUI . You are receiving this because you modified the open/close state.Message ID: @.***>

futantan avatar Mar 12 '23 12:03 futantan

OK, let me check

Quilljou avatar Mar 12 '23 12:03 Quilljou

Maybe something is wrong with Vecel, it works fine in my local dev environment with the latest code from upstream main branch

Quilljou avatar Mar 12 '23 12:03 Quilljou

same here. but it's still broken when I redeployed

futantan avatar Mar 12 '23 12:03 futantan

I disabled other language... https://github.com/futantan/OpenGpt/pull/34 let's enable them when we find the root cause

futantan avatar Mar 12 '23 12:03 futantan

This did not fix the issue... I rollback the deployment...

do you have any ideas about this? I haven't used these libs before

futantan avatar Mar 12 '23 12:03 futantan

sorry, I reverted the i18n related code, let's find out the root cause first

futantan avatar Mar 12 '23 12:03 futantan

Screenshot 2023-03-12 at 21 00 15 try to remove all default locale, and Screenshot 2023-03-12 at 21 01 34 react-i18n -> next-i18next, deploy on vercel preview enviroment to check

Quilljou avatar Mar 12 '23 13:03 Quilljou

as your suggestion, please check the latest 3 commits on main brach... still not working

futantan avatar Mar 12 '23 13:03 futantan

do you mind add me as your wechat friend? might a better way to communicate in this case

futantan avatar Mar 12 '23 13:03 futantan

sorry I can't figure it out, and reverted all the related code for now. Let's bring this back in the future once we find the root cause.

Thanks for your contribution, my bad... @Quilljou

futantan avatar Mar 12 '23 13:03 futantan

I apologize for the delayed response. I will review it later and test it on my Vercel account. I have sent my WeChat ID to your Gmail. @futantan

Quilljou avatar Mar 12 '23 14:03 Quilljou