Skip to content

Conversation

oupula
Copy link

@oupula oupula commented Sep 28, 2025

add i18n support , add zh-CN language

@CLAassistant
Copy link

CLAassistant commented Sep 28, 2025

CLA assistant check
All committers have signed the CLA.

@oupula oupula marked this pull request as draft September 28, 2025 10:27
@oupula
Copy link
Author

oupula commented Sep 28, 2025

image image

@oupula oupula marked this pull request as ready for review September 28, 2025 10:51
@@ -0,0 +1 @@
{} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason we don't put all the undisputed English stuff here, and the UK/US differences as overrides in their respective files? Are we actually doing fallback?

Copy link
Author

Choose a reason for hiding this comment

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

current only en-US and zh-CN , if browser detect without language file , i18n-next will auto failback to en-US
why put empty language file ,
my browser language is zh-CN , but i18next auto request zh.json & zh-CN.json language file ,
in english(US) the same , i18next request both file (en.json & en-US.json)
just without 404 error

@@ -0,0 +1,758 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

I personally do not feel qualified to review the Chinese (I could possibly do a reasonable job with German)... how do we get another Chinese person to chip in?

<p className="mb-2 text-sm text-slate-600 dark:text-slate-300">
A new update is available to enhance system performance and improve
compatibility. We recommend updating to ensure everything runs smoothly.
{t('A_new_update_is_available_to_enhance_system_performance_and_improve_compatibility_We_recommend_updating_to_ensure_everything_runs_smoothly')}
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably shorten huge keys like this.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, that's a good idea. but I can't decide which key replace with long sentences

Copy link
Contributor

Choose a reason for hiding this comment

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

Just if it's more that 5 or six words, maybe?

import tsconfigPaths from "vite-tsconfig-paths";
import basicSsl from "@vitejs/plugin-basic-ssl";

declare const process: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert this white-space/indentation-only change.

Copy link
Author

Choose a reason for hiding this comment

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

emm .. why after commit with the white-space ??
image

Copy link
Contributor

Choose a reason for hiding this comment

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

The file ends with three blank lines

@oupula oupula requested a review from IDisposable September 30, 2025 04:51
Copy link
Contributor

@IDisposable IDisposable left a comment

Choose a reason for hiding this comment

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

Thanks for starting this off!

We've discussed internally and would rather use InLang.com for our localization package as it gives a much better developer-experience and quite a bit smaller at runtime. It compiles messages into JS functions, which are fully typed so you cannot easily forget replacement parameters and such.

Architecture
Comparison

We know it's tedious to do this initial pass, and really appreciate your efforts. Can you switch from i18next to inlang or would you like to resubmit after we pull it in?

@@ -135,4 +134,4 @@
};

return (
Copy link
Contributor

Choose a reason for hiding this comment

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

Please restore this code, it's fine if it's not localized.

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.

4 participants