文件
ParlzPackageManger/web/mirror/lang/en-US.pjson
T
JGZYES 5a7d325f25 i18n: .pjson language-pack system + PMM output standard
- docs/STANDARD.md: unified banner (PMM <ver> (<arch>)), command wording,
  help layout, CHANGELOG and .pjson key-naming conventions.
- src/i18n.c/.h: pmm_tr / pmm_tr_fmt / pmm_lang_load(_active) / set_locale with
  LANG|LC_ALL auto-detect, loading a flattened key->value .pjson from
  ~/.pmm/lang/<locale>.pjson.
- pmm setting lang -l | <locale>: list installed packs; download <locale>.pjson
  from the registry mirror into ~/.pmm/lang/, persist language=<locale> in
  pmm.conf and reload. PmmConfig gains a language field (read from json/ini/conf).
- Banner + version now standardised: PMM 0.3.5 (amd64) (no OS name / brackets).
- web/mirror/lang/{zh-CN,en-US}.pjson built-in packs; web/translate.php lists
  packs (keys + download) and explains community contribution; nav now has a
  翻译 item.
- Makefile/build.bat/release.yml include src/i18n.c.

Verified on WSL: compiles; version/help banner -> 'PMM 0.3.5 (amd64)';
pmm setting lang -l lists the packs dir.
2026-09-04 21:49:02 +08:00

73 行
3.4 KiB
Plaintext

{
"help.banner": "PMM {ver} ({arch})",
"help.usage": "usage:",
"help.commands": "commands:",
"help.options": "options:",
"help.common": "common commands:",
"cmd.list": "list",
"cmd.info": "info",
"cmd.search": "search",
"cmd.install": "install",
"cmd.remove": "remove",
"cmd.update": "update",
"cmd.upgrade": "upgrade",
"cmd.mirror": "mirror",
"cmd.self-update": "self-update",
"cmd.version": "version",
"cmd.help": "help",
"desc.list": "list packages by name",
"desc.info": "show detailed info for a package",
"desc.search": "search packages by keyword",
"desc.install": "install a package by name",
"desc.remove": "uninstall a package by name",
"desc.update": "refresh the registry index (apt-style)",
"desc.upgrade": "upgrade all installed packages",
"desc.mirror": "list / manage mirrors",
"desc.self-update": "update the pmm tool itself",
"desc.version": "show version",
"desc.help": "show help",
"opt.p-drive": "install under <DRIVE>:\\\\.pmm",
"opt.no-color": "omit ANSI colours on a terminal (PMM_NO_COLOR=1 too)",
"opt.quiet": "only print errors/warnings (suppress info/success)",
"opt.verbose": "print extra detail",
"msg.looking-up": "looking up {name} in mirror {mirror}",
"msg.selected": "selected {name}@{version} (os={os} arch={arch})",
"msg.downloading": "downloading {url}",
"msg.downloaded": "downloaded {path}",
"msg.sha256": "sha256: {hex}",
"msg.sha1": "sha1: {hex}",
"msg.installing": "installing {name} ...",
"msg.installed": "installed {name}",
"msg.removed": "removed {name} ({count} files)",
"msg.checksum-ok": "{algo} checksum OK: {hex}",
"msg.checksum-mismatch": "CHECKSUM MISMATCH ({algo})!\n expected: {expected}\n actual: {actual}",
"msg.registry-ok": "registry sha256 OK: {hex}",
"msg.registry-not-found": "package '{name}' not found in any registry mirror",
"msg.no-version": "no version of '{name}' for os={os} arch={arch} satisfying '{spec}'",
"msg.up-to-date": "{name} {cur} is up to date (latest {latest})",
"msg.upgrading": "{name}: {cur} -> {latest}",
"msg.upgraded": "upgraded {count} package(s).",
"msg.no-installed": "no installed packages.",
"msg.registry-updated": "updated registry index: {ok}/{total} packages cached.",
"msg.skipping-no-registry": "skipping {name}: no registry entry",
"msg.err.not-found": "package '{name}' not found",
"msg.err.usage": "usage: {usage}",
"msg.err.unknown-cmd": "unknown command '{cmd}' (try 'pmm help')",
"msg.err.failed-install": "failed to install {name}",
"msg.err.failed-remove": "failed to uninstall {name}",
"msg.err.no-registry-mirror": "no registry mirror configured. Add to ~/.pmm/mirror.ini",
"msg.err.cannot-write": "cannot write {path}",
"msg.err.cannot-open": "cannot open file: {path}",
"msg.err.empty-path": "empty file path",
"msg.err.invalid-locale": "invalid language pack: {locale}",
"msg.err.download-failed": "failed to download language pack {locale}",
"msg.lang-set": "language set to '{locale}'",
"msg.api-unreachable": "could not reach a known release API for {repo}",
"msg.no-suitable-asset": "no suitable {os} asset found in latest release of {repo}",
"msg.retrying-asset": "retrying with {name} ({os})",
"mirror.sources": "mirrors:",
"mirror.checking": "checking registry mirrors...",
"mirror.result": "result: {ok}/{total} sources reachable",
"lang.packs-in": "language packs in {dir}:"
}