feat: add Chinese i18n support with vue-i18n#1310
Conversation
Greptile SummaryThis PR adds Chinese (zh-CN) language support to the ActivityWatch documentation by introducing translated versions of
Confidence Score: 4/5Safe to merge as a documentation-only change, but the PR description describes an entire frontend i18n feature that is entirely absent from the diff. The actual file changes are clean translated Markdown files with no broken links or rendering issues. However, the PR description promises a fully implemented vue-i18n integration — locale JSON files, $t() replacements across Vue components, a Settings language switcher, localStorage persistence, and browser-language auto-detection — none of which exist in the diff. Merging while those items are listed as delivered could mislead maintainers and users into thinking the full feature is shipped. CONTRIBUTING.zh.md — internal CoC link points to the English file rather than the Chinese translation added in this same PR. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["User visits GitHub"] --> B{Preferred language?}
B -->|English| C["README.md\nCODE_OF_CONDUCT.md\nCONTRIBUTING.md"]
B -->|Chinese| D["README.zh.md\nCODE_OF_CONDUCT.zh.md\nCONTRIBUTING.zh.md"]
C -->|"zh badge"| D
D -->|"en badge"| C
C -->|"Internal link"| E["CODE_OF_CONDUCT.md ✅"]
D -->|"Internal link"| F["CODE_OF_CONDUCT.md ⚠️ (should be .zh.md)"]
Reviews (2): Last reviewed commit: "fix: use shields.io badges for language ..." | Re-trigger Greptile |
| <p align="center"> | ||
| <b>Records what you do</b> so that you can <i>know how you've spent your time</i>. | ||
| <br> | ||
| All in a secure way where <i>you control the data</i>. |
There was a problem hiding this comment.
Untranslated tagline in Chinese README
The introductory paragraph retained its English text (Records what you do…, All in a secure way…) and was never translated. A reader looking at this file for a Chinese-language version will encounter English text immediately below the banner, undermining the purpose of the translation.
| @@ -1,3 +1,5 @@ | |||
| [](/README.md) | [](/README.zh.md) | |||
There was a problem hiding this comment.
The badge syntax
[](/README.md) uses a Markdown file path as the image source. GitHub cannot render a .md file as an image, so both badges will display as broken-image icons. Use shields.io URLs (or plain text links) instead so the language switcher actually renders.
| [](/README.md) | [](/README.zh.md) | |
| [](/README.md) | [](/README.zh.md) |
| @@ -1,3 +1,5 @@ | |||
| [](/CODE_OF_CONDUCT.md) | [](/CODE_OF_CONDUCT.zh.md) | |||
There was a problem hiding this comment.
Same broken-image badge issue as in
README.md — .md files cannot be used as image sources in Markdown badge syntax, so this switcher will display broken icons on GitHub.
| [](/CODE_OF_CONDUCT.md) | [](/CODE_OF_CONDUCT.zh.md) | |
| [](/CODE_OF_CONDUCT.md) | [](/CODE_OF_CONDUCT.zh.md) |
| @@ -1,3 +1,5 @@ | |||
| [](/CONTRIBUTING.md) | [](/CONTRIBUTING.zh.md) | |||
There was a problem hiding this comment.
Same broken-image badge issue —
.md files cannot serve as image sources, so both language switcher badges will render as broken icons on GitHub.
| [](/CONTRIBUTING.md) | [](/CONTRIBUTING.zh.md) | |
| [](/CONTRIBUTING.md) | [](/CONTRIBUTING.zh.md) |
| @@ -0,0 +1,251 @@ | |||
| [ | ](README.zh.md) | |||
There was a problem hiding this comment.
The badge format here differs from
CODE_OF_CONDUCT.zh.md and CONTRIBUTING.zh.md. The outer wrapper [... | ...](README.zh.md) creates a single link around both images (with a literal pipe character), and the "English" badge also has a broken image source. The other Chinese files correctly use two independent clickable badge links separated by |. Additionally all image sources should be shields.io URLs.
| [ | ](README.zh.md) | |
| [](/README.md) | [](/README.zh.md) |
| @@ -0,0 +1,48 @@ | |||
| [](/CODE_OF_CONDUCT.md) | [](/CODE_OF_CONDUCT.zh.md) | |||
There was a problem hiding this comment.
Same broken-image badge issue —
CODE_OF_CONDUCT.md and CODE_OF_CONDUCT.zh.md are not image files and will render as broken icons on GitHub.
| [](/CODE_OF_CONDUCT.md) | [](/CODE_OF_CONDUCT.zh.md) | |
| [](/CODE_OF_CONDUCT.md) | [](/CODE_OF_CONDUCT.zh.md) |
| @@ -0,0 +1,118 @@ | |||
| [](/CONTRIBUTING.md) | [](/CONTRIBUTING.zh.md) | |||
There was a problem hiding this comment.
Same broken-image badge issue —
CONTRIBUTING.md and CONTRIBUTING.zh.md are not image files and will render as broken icons on GitHub.
| [](/CONTRIBUTING.md) | [](/CONTRIBUTING.zh.md) | |
| [](/CONTRIBUTING.md) | [](/CONTRIBUTING.zh.md) |
This PR adds Chinese (zh) language support to ActivityWatch: