Improvements

This commit is contained in:
jason5ng32 committed 2026-10-22 11:06:30 +08:00
1 parent 9ee262fdc3
commit 11b4160767
3 files changed
+32 -16

No files matched your search

+1 -1
View File
@@ -9,5 +9,5 @@ Summary of the change, and the issue it fixes if any (e.g. `Closes #123`).
- [ ] Targets `dev`; one concern per PR
- [ ] `pnpm check` is green locally (tests + build)
- [ ] Logic changes ship with a spec in `tests/`
- [ ] User-visible copy lands in all five `full` locales (`en` / `zh` / `zh-TW` / `fr` / `ru`)
- [ ] User-visible copy lands in every `full` locale (`en` / `zh` / `zh-TW` / `fr` / `ru` / `pt-BR`)
- [ ] I've read [CONTRIBUTING.md](../CONTRIBUTING.md) and the relevant `AGENTS.md`
+12 -9
View File
@@ -59,8 +59,8 @@ Details and rationale live in the AGENTS.md files; the headlines:
- **New functions use `const` arrow syntax** (`const fn = async () => {}`).
- **Every new file opens with a header comment** stating its purpose.
- **The `full` locales land together** — user-visible copy ships in `en` / `zh` / `zh-TW` /
`fr` / `ru` in the same PR (`frontend/locales/`; tests enforce it). `beta` locales are
exempt — they fall back to English.
`fr` / `ru` / `pt-BR` in the same PR (`frontend/locales/`; tests enforce it). `beta`
locales are exempt — they fall back to English.
- **Backend logging goes through the shared pino logger** (`server/logger.js`) —
no `console.*` in `api/`, `server/` or `common/`.
@@ -81,19 +81,22 @@ runnable directly as `pnpm fetch-favicons`). Only if auto-fetch can't find a usa
PNG do you hand-source one (on macOS, `sips` handles ICO→PNG). Remember to commit
the PNGs with your change — CI stays offline and only checks they exist.
**README translations** — beyond the five READMEs we maintain (`en` / `zh` / `zh-TW` / `fr` /
`ru`), community-maintained translations in any language are welcome. Create
**README translations** — beyond the READMEs we maintain (`en` / `zh` / `zh-TW` / `fr` /
`ru`) and the community-maintained `pt-BR` one, translations in any language are welcome. Create
`README_<LANG>.md` from the English [README.md](README.md) (the canonical source),
open it with a one-line "community-maintained translation — English is canonical"
note in your language, and add your language to the switcher row near the top of the
existing READMEs. Keep code blocks, URLs, and badges unchanged. Check open issues
for requested languages before starting.
**UI translations** — improvements to the existing `en` / `zh` / `zh-TW` / `fr` / `ru` packs
are welcome, and so is a whole new language. Adding one is two files: a locale pack under
`frontend/locales/` and a line in `common/locale-registry.js`. **A partial pack is a
welcome first PR** — anything you don't translate falls back to English, and the language
ships as `beta` until it's complete. Full walkthrough: **[TRANSLATING.md](TRANSLATING.md)**.
**UI translations** — improvements to the existing `en` / `zh` / `zh-TW` / `fr` / `ru` /
`pt-BR` packs are always welcome. New languages are added by visitor demand, not on request:
the open **Translations wanted** issue lists the ones currently up for claiming, and a pack
for any other language won't be merged. For a listed language, adding it is two files: a
locale pack under `frontend/locales/` and a line in `common/locale-registry.js`. **A partial
pack is a welcome first PR** — anything you don't translate falls back to English, and the
language ships as `beta` until it's complete. Full walkthrough:
**[TRANSLATING.md](TRANSLATING.md)**.
## Bugs & feature requests
+19 -6
View File
@@ -1,9 +1,9 @@
# Translating MyIP
MyIP (demo website: [IPCheck.ing](https://ipcheck.ing)) ships its UI in English, 简体中文, 繁體中文,
Français and Русский. Adding a sixth — or a seventh — is a two-file change, and **a partial
translation is a welcome first PR**. You do not need to translate everything, and you do not
need to know Vue.
Français, Русский and Português (Brasil). Adding a language is a two-file change, and **a
partial translation is a welcome first PR**. You do not need to translate everything, and you
do not need to know Vue.
Anything you leave untranslated falls back to English, so a pack with a hundred strings in
it is genuinely useful on day one and can grow over several PRs. Untranslated strings stay
@@ -13,6 +13,19 @@ in your pack as `""`, which is what keeps a translation PR readable: every diff
General contribution rules (fork, branch from `dev`, `pnpm check` before you open the PR)
live in [CONTRIBUTING.md](CONTRIBUTING.md).
## Which languages we take
**New languages are added by visitor demand, not on request.** Every pack has to follow
every UI change — the English pack grew by roughly 45% over two months in 2026, and each
shipped language followed in the same commits — and each language is one more variant of
the docs site to look after. So a language opens only once it has a meaningful share of
IPCheck.ing's visitors. The open **Translations wanted** issue lists the languages
currently up for claiming; a pack for a language that isn't on it won't be merged, however
good it is. Right-to-left languages also need layout work the app doesn't have yet.
If your language isn't on the list, a README translation is welcome in any language — that
is a single file and costs nothing to keep (see CONTRIBUTING.md).
---
## The smallest useful PR
@@ -41,7 +54,7 @@ can see at a glance which strings you actually wrote.
| File | What it is | Required? |
|---|---|---|
| `frontend/locales/<code>.json` | The main pack — every string in the app UI (~1,150 keys) | **Yes** — all keys, values may be `""` |
| `frontend/locales/<code>.json` | The main pack — every string in the app UI (~1,650 keys) | **Yes** — all keys, values may be `""` |
| `frontend/locales/privacy/<code>.json` | Privacy policy copy (~50 keys) | No — but whole or not at all |
| `frontend/locales/security-checklist/<code>.json` | The Cybersecurity Checklist dataset (~1,080 keys, 258 items) | No — but whole or not at all |
| `frontend/data/changelog.json` | Release history, one string per language per entry | No — beta languages are exempt |
@@ -184,8 +197,8 @@ them would fail the gate on your behalf. Translate the new keys, or drop the fil
## Improving an existing language
Fixes and better phrasings for `en` / `zh` / `zh-TW` / `fr` / `ru` are just as welcome as new
languages — edit the JSON and open the PR. Two things to keep in mind:
Fixes and better phrasings for `en` / `zh` / `zh-TW` / `fr` / `ru` / `pt-BR` are just as
welcome as new languages — edit the JSON and open the PR. Two things to keep in mind:
- Prefer natural phrasing over literal translation; this is a networking tool, and the
jargon most users know is often the English term.