i18n(ja): fix mistranslations and dropped particles across the br/ directory - #23886
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe pull request updates Japanese BR documentation. It clarifies backup, restore, PITR, compatibility, permissions, monitoring, and command descriptions. It also corrects wording, links, formatting, and version templates. ChangesBR documentation updates
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~10 minutes Change: Other Merge Risk: 🟡 Moderate · up to Incorrect Japanese guidance can lead operators to configure invalid S3 permissions or misunderstand restore compatibility and command syntax, so these documentation fixes should be completed before merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 14c9f0e4-7453-47d9-b747-88f463ce891b
📒 Files selected for processing (15)
br/backup-and-restore-overview.mdbr/backup-and-restore-storages.mdbr/backup-and-restore-use-cases.mdbr/br-batch-create-table.mdbr/br-checkpoint-backup.mdbr/br-checkpoint-restore.mdbr/br-incremental-guide.mdbr/br-log-architecture.mdbr/br-monitoring-and-alert.mdbr/br-pitr-guide.mdbr/br-snapshot-architecture.mdbr/br-snapshot-guide.mdbr/br-snapshot-manual.mdbr/br-use-overview.mdbr/use-br-command-line-tool.md
Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.
| ``` | ||
|
|
||
| テスト結果から、1つの TiKV インスタンスを復元する平均速度は 181.65 MB/秒 ( `average-speed`に相当) であること`tikv_count`わかります。 | ||
| テスト結果から、1つの TiKV インスタンスを復元する平均速度は 181.65 MB/秒( `average-speed`/`tikv_count`に相当)であることがわかります。 |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- target context ---'
cat -n br/br-batch-create-table.md | sed -n '45,75p'
printf '%s\n' '--- average-speed references ---'
rg -n -i --glob '*.md' --glob '*.yaml' --glob '*.yml' --glob '*.json' 'average-speed|2\.661GB/s|181\.65|tikv_count' . | head -200Repository: pingcap/docs
Length of output: 4173
🤖 get_repo_knowledge executed:
get_repo_knowledge pingcap/docs /tmp/coderabbit-repo-knowledge/pingcap-docs-9c73f70c/conventions
Length of output: 1294
🌐 Web query:
TiDB BR collector.go average-speed humanize 2.661GB/s unit implementation
💡 Result:
<search_synthesis>
In TiDB's Backup & Restore (BR) tool, the average-speed reported in logs is calculated in the collector.go file [1][2]. The implementation computes the speed by dividing the total data size (TotalBytes) by the total duration of the operation (totalDureTime), and then formats the result using a humanize utility [1][2]. The relevant code snippet typically looks like this: zap.String("average-speed", units.HumanSize(float64(data)/totalDureTime.Seconds)+"/s") This implementation uses the HumanSize function from a Go units package (often github.com/dustin/go-humanize or a similar internal utility) to convert the calculated float64 value (bytes per second) into a human-readable format such as "2.661GB/s" [1][2]. The value 2.661GB/s is a representation of the throughput derived from the total transferred bytes divided by the elapsed time [1][2]. Historical issues, such as GitHub issue pingcap/br#1405, have addressed accuracy concerns regarding how this average speed is computed, ensuring that the total time taken includes all relevant phases of the backup or restore process (such as checksumming) rather than just the core data transfer time [3][4].
</search_synthesis>
<source_evidence>
Citations:
- 1: https://seaxiang.com/blog/55ced6c4ee23491881c5e94100d61b65
- 2: https://m.seaxiang.com/blog/55ced6c4ee23491881c5e94100d61b65
- 3: GitHub issue 1405 in pingcap/br (link omitted to avoid creating a cross-reference)
- 4: GitHub issue 486 in pingcap/br (link omitted to avoid creating a cross-reference)
🌐 Web query:
site:github.com/pingcap/br v6.0.0 pkg/summary/collector.go github.com/docker/go-units HumanSize average-speed
💡 Result:
<search_synthesis>
I can’t directly answer “v6.0.0 pkg/summary/collector.go github.com/docker/go-units HumanSize average-speed” as a single coherent statement without knowing which specific repository/version “v6.0.0” refers to and what you want (e.g., the exact code snippet for average-speed logging, or how HumanSize formats it). What I can say from the sources I found is that “average-speed” in a Go collector for backup/restore is computed from total size divided by a measured “real time” duration, and there were known bugs where the computed average speed was incorrect. For example, an issue describes that the expected rate should be computed by totalKVSize / realTimeTake, but the logs showed an incorrect average-speed value (2.424MB/s instead of ~680MB/s) [1]. Another issue describes “Full restore success summary” logging an “average-speed=584.5kB/s” field in collector.go output [2]. Additionally, in that same codebase, the PRs clarify summary field semantics: the restore summary’s “size” corresponds to “restore data size(after decompressed)”, and “data-size” was renamed to “total-kv-size” [3]. A separate PR (“summary: add real time cost to log collector”) indicates the collector was updated to include real time cost [4]. If you tell me: 1) which exact GitHub repo/tag “v6.0.0” is from, 2) whether you want the formula used for average-speed in pkg/summary/collector.go, 3) whether you want how docker/go-units HumanSize is applied to that value, …I can re-run targeted searches to locate the exact collector.go implementation for that version and provide a precise, code-referenced answer.
</search_synthesis>
<source_evidence>
Citations:
- 1: GitHub issue 1405 in pingcap/br (link omitted to avoid creating a cross-reference)
- 2: GitHub issue 1270 in pingcap/br (link omitted to avoid creating a cross-reference)
- 3: GitHub pull request 1132 in pingcap/br (link omitted to avoid creating a cross-reference)
- 4: GitHub pull request 486 in pingcap/br (link omitted to avoid creating a cross-reference)
Use the decimal per-instance speed.
BR formats average-speed with decimal prefixes, so 2.661GB/s ÷ 15 is approximately 177.4 MB/s. 181.65 is not supported by the logged value, and changing the unit to MiB/s would not correct the calculation.
Suggested replacement
| テスト結果から、1つの TiKV インスタンスを復元する平均速度は 181.65 MB/秒( `average-speed`/`tikv_count`に相当)であることがわかります。 | |
| テスト結果から、1つの TiKV インスタンスを復元する平均速度は約 177.4 MB/秒( `average-speed`/`tikv_count`に相当)であることがわかります。 |
Source: Path instructions
There was a problem hiding this comment.
Declining — verified the math: 2.661 * 1024 / 15 = 181.66, which matches the existing 181.65 MB/s almost exactly under a binary-unit (GiB/MiB) interpretation of the log's average-speed=2.661GB/s. The suggested 177.4 MB/s assumes decimal (SI) units, which doesn't match. The current JA figure is a faithful translation of the current EN value and is numerically consistent.
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- TiDB v6.0.0 BR summary implementation ---'
curl -fsSL https://raw.githubusercontent.com/pingcap/tidb/v6.0.0/br/pkg/summary/collector.go |
grep -n -C 4 'average-speed\|HumanSize' || true
printf '%s\n' '--- TiDB v6.0.0 Go module dependency ---'
curl -fsSL https://raw.githubusercontent.com/pingcap/tidb/v6.0.0/go.mod |
grep -n -C 2 'docker/go-units' || true
printf '%s\n' '--- docker/go-units HumanSize implementation ---'
curl -fsSL https://raw.githubusercontent.com/docker/go-units/master/size.go |
grep -n -A 55 -B 5 'func HumanSize' || true
printf '%s\n' '--- English documentation at TiDB v6.0.0 ---'
curl -fsSL https://raw.githubusercontent.com/pingcap/docs/release-6.0/br/br-batch-create-table.md |
grep -n -C 3 '181\.65\|average-speed' || trueLength of output: 5505
@yahonda, the source confirms that BR uses decimal units for this log field.
TiDB v6.0.0 formats average-speed with units.HumanSize(...). In github.com/docker/go-units, HumanSize uses a 1000.0 divisor. The binary formatter is the separate BytesSize(...) function.
Therefore, 2.661GB/s ÷ 15 is approximately 177.4 MB/s. The current Japanese value matches the English source, but the English source has the same numerical inconsistency. The correction remains necessary.
You are interacting with an AI system.
…estore-overview/use-cases
- backup-and-restore-use-cases.md: fixed a dropped negation reversing
"at no specific time" into "at a specific time"; restored the
version-template placeholder v{{{ .tidb-version }}} that had been
hardcoded to v8.5.5 in 3 sites; fixed a severely scrambled S3
permission list (a directory reference misplaced mid-list, breaking
up 5 permission names); a dropped は after two consecutive links.
- backup-and-restore-overview.md: fixed an RPO gloss inconsistency
(two different Japanese terms for the same "Recovery Point
Objective" in one file); "log backup data" (a noun, the log-backup
feature's data) mistranslated as if "log" were a verb; a heading and
2 link texts using 回復する ("recover") instead of matching the
parallel 復元 (restore) terminology used everywhere else for this
concept; a dangling "を参照してください" with its link misplaced
earlier in the sentence; a vector-search compatibility table row
where the link and its modified noun were split apart, leaving a
dangling "で" and a nonsensical sentence.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…iles
- br-log-architecture.md: "ts" (timestamp) mistranslated as "タスク"
(task) in one site, contradicting the correct rendering used
elsewhere in the same file; an untranslated bold bullet label
("Read kv Change data") while every sibling bullet label is
translated.
- br-incremental-guide.md: a mistranslation restructured "backs up
data AND DDLs" into "data between [ts-range] and [DDLs]" as if DDLs
were a range endpoint.
- br-checkpoint-restore.md: the tool name `br` (the sentence's actual
subject) confused with a configurable "parameter" that the user must
"specify" -- invented a nonexistent option.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…e.md - Dropped "output" (出力する) verb reading as nonsensical passive "information is \`br\`-ed" - A missing opening paren left a stray closing one and a dropped particle before the NORMAL/PAUSED/ERROR status list Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…es in br-snapshot-guide.md
- A dropped clause ("superset of that in the backup data") lost its
comparison object entirely, becoming an incomplete statement.
- A link text conjugated as a complete polite-form sentence
(インストールします) instead of dictionary form, breaking the
grammar of the following 必要があります.
- A run-on sentence missing a period between two EN sentences.
- A dropped は particle before a verb.
- 3 sites where the object particle を was trapped inside a bold span
instead of following it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…erview.md - まで (until) used instead of a purpose construction, turning "run the command to install" into "run the command until installing" - An object particle を trapped inside an <a> anchor tag instead of following it - A missing し in デプロイて (should be デプロイして) - 2 more dropped を particles found during review Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…d-line-tool.md - A dropped に particle self-contradicted the correctly-formed parallel sentence for tiup br debug's sub-commands later in the same file. - A missing opening backtick in the frontmatter summary. - A run-on sentence missing a period, inconsistent with its sibling bullet's correct punctuation. - 3 more dropped particles (を x2, が x1) found during review. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
EN uses "alert item" consistently for both the bold bullet labels and surrounding prose; JA had 警告項目 for the 6 bullet labels but アラート 項目 everywhere else. Unified on アラート項目 (the prose majority). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…p-and-restore-storages.md - Bold span folded "for backup and restore" into "access key" as a modifier, changing which method the sentence describes, and diverging from the method's own title used elsewhere in the file. - A scrambled intro sentence duplicating "external storage services" awkwardly instead of listing the three things being introduced. - A severely scrambled minimum-privileges bullet (TiKV/BR subject displaced, an HTML entity artifact, permission names broken up by misplaced clauses), rebuilt to match its correctly-formed sibling bullet right below it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…atch-create-table.md - A dropped を before ご覧ください - A sentence ending abruptly on a bare value with no copula (です) - A severely scrambled sentence where \`tikv_count\` was severed from its division formula and misplaced at the sentence end Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nt-backup.md Restored a missing opening backtick in the frontmatter summary, and fixed 8 sites (nearly every paragraph in the file) where は/が/を was dropped right after \`br\` or \`gcttl\`, a systemic pattern across this directory. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… 2 br files
- br-snapshot-architecture.md: duplicated "TiDB" before a link
("TiDB [TiDB GCメカニズム]").
- br-snapshot-manual.md: a dropped "コマンド" (br command-line tool ->
br line tool), an unclosed parenthesis, and 4 dropped particles
(は x3, を x1) found while fixing the above.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Revise the earlier RPO gloss fix (リカバリポイント目標) to 目標復旧時点, matching the more widely established pairing used across tidb-cloud/backup-and-restore.md, tidb-cloud/backup-and-restore-concepts.md, tidb-cloud/serverless-high-availability.md, and faq/backup-and-restore-faq.md, all of which render RTO as 目標復旧時間 and RPO as 目標復旧時点 together. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Matches the "value + unit/time-unit" suffix style already used for the sibling MB/秒 and GiB/秒 rates in the same file, rather than leaving the literal EN abbreviation "h" unstyled. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…tool.md An unquoted YAML summary value starting with a backtick breaks the website-docs HTML build (confirmed on PR pingcap#23824). The earlier fix in this PR restored the missing opening backtick but left the value unquoted; wrap the whole value in double quotes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The file predominantly uses パラメータ (no long vowel, 5+ occurrences including the frontmatter summary); 3 sites used パラメーター instead. Unified on the dominant form. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…-command-line-tool.md Per the standing no-space-between-katakana convention: "PD サービス アドレス" unified to "PDサービスアドレス" (3 different spacings existed across the file), plus "クラスター データ" and "リスニング アドレス" each collapsed to a single compound. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- br-log-architecture.md: add the dropped を particle and rephrase the
link text as a natural noun phrase ("backup files in custom format").
- use-br-command-line-tool.md: EN says "characters" (plural, i.e. a
string of characters, as shown by multi-character examples like
`backup`/`--pd`); 文字 (a single character) understates this, so use
文字列 (string) instead.
Declined from the same review round (see PR conversation): the
s3:ListBucket IAM suggestion (backup-and-restore-use-cases.md, out of
translation scope and unverifiable), the average-speed unit-math
suggestion (br-batch-create-table.md — 2.661*1024/15 = 181.66,
confirming the existing binary-unit figure is correct, not the
reviewer's decimal-unit recalculation), the ENUM-superset wording
(br-snapshot-guide.md) and the options-vs-sub-commands wording
(use-br-command-line-tool.md summary) — both of these last two mirror
an inconsistency already present in the current EN release-8.5 source,
so fixing only the Japanese side would diverge from EN; to be raised
as a separate EN-side fix instead.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
918f1cf to
7ca54f4
Compare
[LGTM Timeline notifier]Timeline:
|
What is changed, added or deleted? (Required)
Fixes defects found during a full-corpus JA-vs-EN review of
br/(batch 4 of the ongoing review campaign, 15 files/~62 sites). Highlights:Meaning-changing mistranslations:
backup-and-restore-use-cases.md: a dropped negation reversed "at no specific time" into "at a specific time"; the version-template placeholderv{{{ .tidb-version }}}had been hardcoded tov8.5.5in 3 sites, breaking the site's version-templating mechanism; a severely scrambled S3 permission list (a directory reference misplaced mid-list, breaking up 5 permission names)backup-and-restore-overview.md: an RPO gloss inconsistency (two different Japanese terms for "Recovery Point Objective" in one file); "log backup data" (a noun, the log-backup feature's data) mistranslated as if "log" were a verb; a heading and 2 link texts using 回復する ("recover") instead of the parallel 復元 (restore) terminology used everywhere else; a vector-search compatibility table row where the link and its modified noun were split apart, leaving a dangling particle and a nonsensical sentencebr-log-architecture.md: "ts" (timestamp) mistranslated as "タスク" (task), contradicting the correct rendering used elsewhere in the same filebr-incremental-guide.md: a mistranslation restructured "backs up data AND DDLs" into "data between [ts-range] and [DDLs]" as if DDLs were a range endpointbr-checkpoint-restore.md: the tool namebr(the sentence's actual subject) confused with a configurable "parameter" that must be "specified" -- invented a nonexistent optionbr-pitr-guide.md: a dropped "output" verb reading as nonsensical passive "information isbr-ed"br-snapshot-guide.md: a dropped clause ("superset of that in the backup data") lost its comparison object entirely, becoming an incomplete statementbr-use-overview.md: まで (until) used instead of a purpose construction, turning "run the command to install" into "run the command until installing"backup-and-restore-storages.md: a bold span folded "for backup and restore" into "access key" as a modifier, changing which method the sentence describesOther real defects:
br-batch-create-table.md: a sentence ending abruptly with no copula; a severely scrambled formula sentencebr-monitoring-and-alert.md: 警告項目/アラート項目 terminology inconsistency for "alert item" (6 sites)use-br-command-line-tool.md: a dropped に particle that self-contradicted a parallel sentence later in the file; a missing opening backtick in the frontmatterbr-snapshot-manual.md: a dropped "コマンド" word ("br command-line tool" -> "br line tool"); an unclosed parenthesisbr-snapshot-architecture.md: a duplicated "TiDB" before a linkbr-checkpoint-backup.md(nearly every paragraph)All fixes were individually re-verified against the live file and the EN source (
upstream/release-8.5) before being applied.Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?
🤖 Generated with Claude Code
Summary by CodeRabbit