Skip to content

Conversation

ajnart
Copy link
Member

@ajnart ajnart commented Jul 23, 2025

  • Added Simplified Chinese ('cn') to the i18n configuration with appropriate labels and HTML language settings.
  • Introduced a locale dropdown in the navigation for language selection.
  • Wrapped the home hero description in a Translate component for localization support.
  • Updated the serve command in package.json to prevent automatic opening of the browser.

Usage

To translate a message, you only need to wrap the string with , so

    <Translate>
              A sleek, modern dashboard that puts all of your apps and services at your fingertips.
              Control everything in one convenient location. Seamlessly integrates with the
              apps you've added, providing you with valuable information.
    </Translate>

just works ! Then it generates a key corresponding to it :

  "A sleek, modern dashboard that puts all of your apps and services at your fingertips. Control everything in one convenient location. Seamlessly integrates with the apps you've added, providing you with valuable information.": {
    "message": "光滑的现代仪表板,将所有应用程序和服务触手可及。在一个方便的位置控制所有内容。与您添加的应用程序无缝集成,为您提供有价值的信息。(Google translate)"
  },

Notes

  • To see the locale in dev mode you need to do pnpm run dev --locale cn
  • We could add this to the same crowdin account and share the "translation memory" to make it faster to translate.
  • I don't think translation in another language than Chinese is necessary, such proposal should be rejected

Note

The translation keys are AUTOMATICALLY GENERATED using pnpm write-translations --locale cn making it pain-free to create the json to translate. But it might be annoying for the person translating when we change the string (because the key will change) but we should ignore this.

Thoughts

We could utilize the AI-translate feature with the context of the project on Crowdin to generate translations that are close to the final result, then leverage the frustrated Chinese users seeing wrong translations to ask them to translate

Preview

CleanShot 2025-07-23 at 11 42 31

- Added Simplified Chinese ('cn') to the i18n configuration with appropriate labels and HTML language settings.
- Introduced a locale dropdown in the navigation for language selection.
- Wrapped the home hero description in a Translate component for localization support.
- Updated the serve command in package.json to prevent automatic opening of the browser.
Copy link

netlify bot commented Jul 23, 2025

Deploy Preview for homarr-docs failed.

Name Link
🔨 Latest commit 1cfb8cd
🔍 Latest deploy log https://app.netlify.com/projects/homarr-docs/deploys/6880ae69d12f130008a16c0a

Copy link

argos-ci bot commented Jul 23, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 135 changed Jul 23, 2025, 10:14 AM

Copy link

@sumingyd sumingyd left a comment

Choose a reason for hiding this comment

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

up

@manuel-rw
Copy link
Member

I agree with this, thanks for working on it. Right now only very little is translated. Can you translate more / the rest?
And how does this work if the source text is updated?

@sumingyd
Copy link

sumingyd commented Aug 6, 2025

I agree with this, thanks for working on it. Right now only very little is translated. Can you translate more / the rest? And how does this work if the source text is updated?

Since all I can see here are the changes to these few files, if you can provide more files like this one that have already changed their mode, I can spare some time to produce the translation content.

Besides, I don't know why my changes can't be seen in the file changes here

@manuel-rw
Copy link
Member

manuel-rw commented Aug 6, 2025

@ajnart can you provide this and help @sumingyd with contributing?

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.

3 participants