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

Translation: Simplified Chinese (partial) #353

Merged
merged 47 commits into from
Sep 13, 2024
Merged

Conversation

djyde
Copy link
Contributor

@djyde djyde commented Sep 11, 2024

The goal of this PR is to try to translate 100% into Chinese. I speparate different part to track the progress:

  • Settings

    • General panel
    • Appearance panel
    • Actions panel
    • Integrations panel
    • Profile panel
    • Shortcusts panel
    • Wallet panel
    • Invitations panel
    • About panel
  • Sidebar

    • words
    • context menu
    • Edit feed
  • Articles list

    • words
    • context menu
  • Entry content

  • Discover

Copy link

vercel bot commented Sep 11, 2024

@djyde is attempting to deploy a commit to the RSS3 Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Sep 11, 2024

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

Name Status Preview Comments Updated (UTC)
follow ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 13, 2024 7:54am

@Innei
Copy link
Member

Innei commented Sep 12, 2024

@djyde

Thanks for the contribution.

One thing though, we need to split multiple namespaces to make the i18n module more maintainable.

For example

namespace - common is used to store common nouns verbs etc.
namespace - lang can be used to store language nouns.
Other things like setting can also be split into one namespace.

We don't want to manage all the i18n modules in a single file, as the file will be bloated and difficult to maintain.

@djyde
Copy link
Contributor Author

djyde commented Sep 12, 2024

@djyde

Thanks for the contribution.

One thing though, we need to split multiple namespaces to make the i18n module more maintainable.

For example

namespace - common is used to store common nouns verbs etc. namespace - lang can be used to store language nouns. Other things like setting can also be split into one namespace.

We don't want to manage all the i18n modules in a single file, as the file will be bloated and difficult to maintain.

I recommend maintain in one single file. Do you have some open source project example that I can learn how to maintain in seperate namespace?

@Innei
Copy link
Member

Innei commented Sep 12, 2024

@djyde
Thanks for the contribution.
One thing though, we need to split multiple namespaces to make the i18n module more maintainable.
For example
namespace - common is used to store common nouns verbs etc. namespace - lang can be used to store language nouns. Other things like setting can also be split into one namespace.
We don't want to manage all the i18n modules in a single file, as the file will be bloated and difficult to maintain.

I recommend maintain in one single file. Do you have some open source project example that I can learn how to maintain in seperate namespace?

Maybe vscode-loc?

https://github.com/microsoft/vscode-loc/blob/main/i18n/vscode-language-pack-cs/translations/extensions/ms-vscode.js-debug.i18n.json

@djyde
Copy link
Contributor Author

djyde commented Sep 12, 2024

@djyde
Thanks for the contribution.
One thing though, we need to split multiple namespaces to make the i18n module more maintainable.
For example
namespace - common is used to store common nouns verbs etc. namespace - lang can be used to store language nouns. Other things like setting can also be split into one namespace.
We don't want to manage all the i18n modules in a single file, as the file will be bloated and difficult to maintain.

I recommend maintain in one single file. Do you have some open source project example that I can learn how to maintain in seperate namespace?

Maybe vscode-loc?

https://github.com/microsoft/vscode-loc/blob/main/i18n/vscode-language-pack-cs/translations/extensions/ms-vscode.js-debug.i18n.json

Well. I still don't think it's a good practice. Separating to different files only increases maintainance cost. For example, I just need to translate one single file to get 100% trasnlation for the whole app to another language.

And if translations locate on different namespace, you always need to consider which namespace you should use with useTranslation(). Maybe sometime you need to even use more than one useTranslation() in a single component.

@Innei
Copy link
Member

Innei commented Sep 12, 2024

@djyde

For translation contributors or maintainers, it is indeed better to write all translations in the same file.

But imagine if a json has thousands of lines and there are many nested modules, and each developer maintains a different module. In the subsequent development, it is easy to have redundancy and code conflicts.

Or, the subsequent module deletion also becomes difficult.

Though I do agree with you very much.

But we need to break down into at least the following necessary namespaces:

  • common - common translation resource
  • app - used only in app
  • external - only used in external pages
  • lang provides translations for languages, e.g. original Name and names in the current language.

@Innei
Copy link
Member

Innei commented Sep 12, 2024

If you agree with this, I would move the root resource to namespaces/app

@Innei
Copy link
Member

Innei commented Sep 12, 2024

Also, for the sake of app loading speed, we don't load all the language resources. But by splitting the namespaces, we load the common resource for all languages, but not the others.

We only load the language-specific resource when necessary.

@djyde
Copy link
Contributor Author

djyde commented Sep 12, 2024

If you agree with this, I would move the root resource to namespaces/app

Sure. I will finish the rest of translation after your refactoring

@Innei
Copy link
Member

Innei commented Sep 12, 2024

@djyde I've refactored it and resolved the code conflicts

@djyde
Copy link
Contributor Author

djyde commented Sep 13, 2024

@dorival @Innei I've made the i18n key flat

@djyde
Copy link
Contributor Author

djyde commented Sep 13, 2024

@Innei Now all the translation is done except the "Wallet" setting panel (I don't have dev api server to test this page).

When the Wallet panel is done, I think we can rollout this PR

@Innei
Copy link
Member

Innei commented Sep 13, 2024

@djyde Can you provide the current cursor ai chat prompt? Thank you very much.

@djyde
Copy link
Contributor Author

djyde commented Sep 13, 2024

@djyde Can you provide the current cursor ai chat prompt? Thank you very much.

Open the component you want to translate, then cmd+l:

CleanShot 2024-09-13 at 16 08 33@2x

Notice that you need to at(@) the correct locale file

Signed-off-by: Innei <[email protected]>
Signed-off-by: Innei <[email protected]>
@Innei
Copy link
Member

Innei commented Sep 13, 2024

I've merged it first, I'll continue translating it later

@Innei Innei changed the title WIP: Translation Translation: Simplified Chinese (partial) Sep 13, 2024
@Innei Innei merged commit 140d01a into RSSNext:dev Sep 13, 2024
1 of 2 checks passed
@Innei Innei mentioned this pull request Sep 14, 2024
12 tasks
@stuchilde
Copy link
Contributor

Have all the content been translated?

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