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

Copy link
Contributor

Choose a reason for hiding this comment

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

My comment was more about the standard for example of putting all English translations in en.json and then where (for there are differences) the US and UK differences (and only the differences) in en-US.json and en-UK.json

@@ -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.

Copy link
Author

@oupula oupula Oct 2, 2025

Choose a reason for hiding this comment

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

the two const use in image red frame area
image

Copy link
Contributor

Choose a reason for hiding this comment

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

I was talking about the developer mode stuff, which seems to using the wrong controlling value. Should be const { developerMode } = useSettingsStore();

@oupula
Copy link
Author

oupula commented Oct 2, 2025

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?

if you are do this work,I won't get involved.
but, please not use the machine translate
example :
extension is translate to "扩展" , will not translate to "扩大" , single word "extension" translate "扩大" is right! software extension function "extension" translate "扩展"

image

@oupula oupula marked this pull request as draft October 2, 2025 06:46
@oupula
Copy link
Author

oupula commented Oct 2, 2025

I am interest this project (with go , c and react native)
pikvm project run with python , I'm not interesting
I running the jetkvm in rasberrypi cm4 now .
modify some code(include jetkvm-native [ video encode , you are using the rk sdk ] && jetkvm-app source code)
image

@IDisposable
Copy link
Contributor

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?

if you are do this work,I won't get involved.

We welcome your input! I started a (draft) PR #864 with the paraglide translation stubbed out... will need to extract all the rest of the language-text once we're settled into a pattern.

please not use the machine translate example : extension is translate to "扩展" , will not translate to "扩大" , single word "extension" translate "扩大" is right! software extension function "extension" translate "扩展"

Oh, I get it. We will likely do a machine translation for a baseline, but we really want native speakers to contribute. That said, I will try to line up all your work in this PR with what we ship initially, and then welcome corrections.

@adamshiervani
Copy link
Contributor

Closing this PR now, but @oupula feel more than welcome to edit the translation files in #864 or in dev once that it's merged. As @IDisposable said, we really want native speakers to contribute.

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.

5 participants