feat: add Chinese i18n support with vue-i18n#1310
Conversation
Greptile SummaryThis PR adds Chinese (Simplified) language support to ActivityWatch's documentation by introducing Chinese translations of
Confidence Score: 5/5Safe to merge — all changes are documentation only, with no impact on application code or runtime behaviour. The entire diff is additive Markdown content. The three existing files receive only two new badge lines each, and the three new Chinese translation files are standalone documents. No application logic, build configuration, or data is touched. README.zh.md and CONTRIBUTING.zh.md contain cross-links that point to the English versions of documents that now have Chinese translations. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User opens README.md / README.zh.md] --> B{Language badge clicked?}
B -- "en badge" --> C[README.md]
B -- "zh-CN badge" --> D[README.zh.md]
C --> E{Internal link clicked?}
D --> F{Internal link clicked?}
E -- CONTRIBUTING link --> G[CONTRIBUTING.md]
E -- CODE_OF_CONDUCT link --> H[CODE_OF_CONDUCT.md]
F -- CONTRIBUTING link --> I[CONTRIBUTING.md - should be .zh.md]
G --> K{Language badge?}
K -- zh-CN --> L[CONTRIBUTING.zh.md]
L -- CODE_OF_CONDUCT link --> M[CODE_OF_CONDUCT.md - should be .zh.md]
Reviews (3): 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) |
|
Yes, I really need this feature too. |
|
@greptile-apps review |
This PR adds Chinese (zh) language support to ActivityWatch: