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 Traditional Chinese(zhTW) locale #1042

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

PeterDaveHello
Copy link
Contributor

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

    Add Traditional Chinese(zhTW) locale

  • Why was this change needed? (You can also link to an open issue here)

    More language support, more users approach

  • Other information:

    None

Copy link

vercel bot commented Jul 28, 2024

@PeterDaveHello is attempting to deploy a commit to the Arc53 Team on Vercel.

A member of the Team first needs to authorize it.

@PeterDaveHello
Copy link
Contributor Author

@dartpain can you also help review this one? Thanks.

Copy link

vercel bot commented Aug 3, 2024

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

Name Status Preview Comments Updated (UTC)
docs-gpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 10:33pm

@ManishMadan2882
Copy link
Collaborator

Perfect @PeterDaveHello,
Requesting a minor change to follow the general convention for locale codes, like zh-TW.
This should allow the browsers to detect the language from browser settings.

@PeterDaveHello
Copy link
Contributor Author

@ManishMadan2882 done 👍

ManishMadan2882

This comment was marked as outdated.

@dartpain
Copy link
Contributor

Hey there is a build log issue

[20:05:35.939] Running build in Washington, D.C., USA (East) – iad1
[20:05:36.057] Cloning github.com/arc53/DocsGPT (Branch: Add-zhTW-locale, Commit: ed5db76)
[20:05:36.068] Skipping build cache, deployment was triggered without cache.
[20:05:37.170] Cloning completed: 1.109s
[20:05:37.522] Running "vercel build"
[20:05:37.984] Vercel CLI 36.0.0
[20:05:38.612] Installing dependencies...
[20:05:48.576]
[20:05:48.577] > [email protected] prepare
[20:05:48.577] > cd .. && husky install frontend/.husky
[20:05:48.577]
[20:05:48.633] husky - Git hooks installed
[20:05:48.650]
[20:05:48.650] added 841 packages in 10s
[20:05:48.651]
[20:05:48.651] 301 packages are looking for funding
[20:05:48.651] run npm fund for details
[20:05:48.677] Detected package-lock.json generated by npm 7+
[20:05:48.677] Running "npm run build"
[20:05:49.113]
[20:05:49.113] > [email protected] build
[20:05:49.113] > tsc && vite build
[20:05:49.113]
[20:05:52.676] src/locale/i18n.ts(9,10): error TS1005: '=' expected.
[20:05:52.677] src/locale/i18n.ts(9,14): error TS1005: ';' expected.
[20:05:52.677] src/locale/i18n.ts(28,9): error TS1005: ',' expected.
[20:05:52.678] src/locale/i18n.ts(28,12): error TS1005: ',' expected.
[20:05:52.678] src/locale/i18n.ts(28,14): error TS1136: Property assignment expected.
[20:05:52.678] src/locale/i18n.ts(31,5): error TS1135: Argument expression expected.
[20:05:52.678] src/locale/i18n.ts(31,6): error TS1135: Argument expression expected.
[20:05:52.678] src/locale/i18n.ts(32,16): error TS1005: ',' expected.
[20:05:52.678] src/locale/i18n.ts(33,14): error TS1005: ',' expected.
[20:05:52.678] src/locale/i18n.ts(38,3): error TS1135: Argument expression expected.
[20:05:52.706] Error: Command "npm run build" exited with 2
[20:05:53.388]

@PeterDaveHello
Copy link
Contributor Author

@ManishMadan2882 is there anything I should do here?

@ManishMadan2882
Copy link
Collaborator

Hi @PeterDaveHello
There is an error in locale/i18n.ts, in the resources object try wrapping zh-TW as "zh-TW" in line 28
Thanks!

@dartpain
Copy link
Contributor

dartpain commented Oct 5, 2024

src/locale/i18n.ts(9,10): error TS1005: '=' expected.
src/locale/i18n.ts(9,14): error TS1005: ';' expected.
Error: Command "npm run build" exited with 2

Still getting this error

@PeterDaveHello
Copy link
Contributor Author

It looks like because the hyphen - in the import statement import zh-TW from './zh-TW.json'; is not valid in JavaScript/TypeScript variable names.

Should we rename the variable like this:

import zhTW from './zh-TW.json'; // Traditional Chinese

And then adjust the usage accordingly:

"zh-TW": {
  translation: zhTW,
},

@ManishMadan2882
Copy link
Collaborator

@PeterDaveHello yes please, this should fix the syntax.

@ManishMadan2882 ManishMadan2882 dismissed their stale review October 5, 2024 19:59

Build failure

Copy link
Collaborator

@ManishMadan2882 ManishMadan2882 left a comment

Choose a reason for hiding this comment

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

@dartpain dartpain merged commit fa9ca22 into arc53:main Oct 8, 2024
6 checks passed
@PeterDaveHello PeterDaveHello deleted the Add-zhTW-locale branch October 9, 2024 10:34
@dartpain
Copy link
Contributor

@holopin-bot @PeterDaveHello Thank you!

Copy link

holopin-bot bot commented Oct 21, 2024

Congratulations @PeterDaveHello, the maintainer of this repository has issued you a badge! Here it is: https://holopin.io/claim/cm2jemjx900620cm8p2gj20no

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

@dartpain
Copy link
Contributor

Hey @PeterDaveHello fill in this form if you are interested in a t-shirt
https://airtable.com/appikMaJwdHhC1SDP/pagoblCJ9W29wf6Hf/form

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

Successfully merging this pull request may close these issues.

3 participants