Skip to content

fix(i18n): use 流量费 wording instead of gas/矿工费 and soften chain jargon in user copy - #41

Open
WuFenG-Hub wants to merge 3 commits into
metaid-developers:mainfrom
WuFenG-Hub:fix/traffic-fee-wording
Open

WuFenG-Hub wants to merge 3 commits into
metaid-developers:mainfrom
WuFenG-Hub:fix/traffic-fee-wording

Conversation

@WuFenG-Hub

@WuFenG-Hub WuFenG-Hub commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

What

User-facing copy stops exposing gas / chain jargon on the screens where the fee wording lives. 6 files, +45 / −45, three commits, driven by two rounds of independent read-only review.

Round 1 — 矿工费 → 流量费 (src/renderer/services/i18n.ts, 26 strings)

before after
矿工费 流量费
gas 费 / MVC Gas 补贴 / MVC 燃气费 流量费 / 流量补贴
链上新内容 / 链上通知 / 链上互动次数 / 已上链 网络上的新内容 / 收到的通知 / 网络互动次数 / 已发布

The trigger was the AI 冲浪 (MetaWeb surf) settings panel — the only place in the app that said 矿工费. The same gas-fee family also appeared in the subsidy and self-funded-broadcast copy, so it was swept in the same pass. The app already bills user traffic as 流量 (Traffic / tariff), so 流量费 reuses the vocabulary users already see instead of introducing a second one. English reuses the existing Traffic vocabulary: gastraffic fee, MVC Gas subsidytraffic subsidy.

Round 2 — closing what the first review found (16 lines)

  1. Same-screen vocabulary: metabotChainSyncPartialBadge (链上身份已注册 → 身份已注册), userSettingsRetryChainSync (重试上链 → 重试同步), userSettingsChatPubkeyNotPinned (聊天公钥尚未上链 → 尚未发布), plus userSettingsDepositHint zh aligned to 重试同步.
  2. English polish on the round-1 strings: "some traffic fee" → "a small traffic fee"; "top up traffic fee for the bot wallet" → "top up the bot wallet with traffic fee"; metabotSetupPendingHint gains "(MVC)" like its sibling; "the sync" → "the profile sync".
  3. The main-process fallback literal 'MVC gas subsidy request failed.' (5 sites: metabotManageService ×2, metaidCore, transferService, privateChatSubsidizedPin) → 'Traffic subsidy request failed.'

Round 3 — closing what the second review found (8 lines)

  1. F1, a split round 2 itself introduced: the sync button became 重试同步 / "Retry Sync", but the toast it fires still said 上链成功 / 上链失败 / "On-chain sync succeeded/failed". Now 同步成功 / 同步失败 / "Sync succeeded / Sync failed" (the neighbouring userSettingsMobileSyncFailed already used 同步失败).
  2. F3, the same defect class one persistence path over: 'MVC subsidy request failed.' (no "gas") at userIdentityService.ts:295/415/458/492 is written to user_identity.subsidy_error and rendered verbatim by UserSettings.tsx:939renderSubsidyWarning's {detail} (818-825). Now 'Traffic subsidy request failed.'

Attribution and independent review

Delivered by 小峰 (Twin) — the commits are authored and committed as 小峰 <xiaofeng@idbots.local>, following this repo's existing bot-attribution convention (Builder阿码 <builder@idbots.local>, 小昆 <xiaokun@idbots.local>).

Independently reviewed, read-only and with no authoring rights, by 小刚: round 1 on 1912bc27, round 2 on 9c255785. Both reviewed revisions are preserved as tags review/pr41-r1 / review/pr41-r2 (pushed to the fork). Re-authoring the commits changed their SHAs, so the equivalence is documented rather than asserted — each amended commit's file tree is byte-identical to the revision that was reviewed:

reviewed amended tree
1912bc27 028c6b25 f7d6b4b67aae553368f09f70408161b402246742 (identical)
9c255785 197b5d70 e6ab5b845a79049b2a790d84bf1ca2cb52d60912 (identical)
005f952e (round 3, pre-amend) b633af51 6ada52bbdd21a6789b3792aa9d31bdc996ab01a6 (identical)

The reviews found nothing wrong with the round-1/round-2 edits themselves (no out-of-scope lines, no test/assertion/parser depends on the old literals, key sets identical to base, tests + eslint + tsc green). What they did find is what rounds 2 and 3 fix.

Corrections to this PR's own earlier statements (kept visible)

  • Carrier citation was wrong. Round 2's description said the metabot fallback reaches the UI via MetabotsManager.tsx:849. The real carrier is metabotManageService.ts:531 → persisted subsidy_errorMetaBotCreateSuccessModal.tsx:142 (read at MetabotsManager.tsx:987754). Line 849 composes result.subsidy.error, which the 531 fallback does not populate. The literal is still user-visible; only the cited path was wrong.
  • The key-count figure was extraction-dependent. "2437" comes from an identifier+colon regex that silently skips quoted keys (there are 304 lines of them, e.g. 'coworkSubmitError.invalid_input'). Under a quoted-key-aware extraction the count is 2588. Set equality with the base holds under either method; the number should always be quoted together with its extraction rule.

Scope discipline

  • Key names untouched — they are code identifiers; metabotMvcSubsidy* keep their keys while their copy says 流量补贴.
  • Chain addresses in copy left as-is (先向该 MVC 地址转入…) — that is an address, not jargon.
  • Deliberately not touched (stop line, so this PR stays reviewable): metabotCreateChainFailed ('上链失败', the bot-creation action), userSettingsMobileSyncButton ('一键上链'), the agent-tool copy at metabotManageAgentTools.ts:157/166, the onboarding title 区块链互联网, BTC 手续费 in Gig Square, docs/gasfee-flow/operator-manual.md, and the app-wide on-chain / 上链 vocabulary.

Verification

  • Cumulative git diff --numstat upstream/main..HEAD → 6 files / +45 −45, no collateral edits
  • zh / en key sets identical to base cdb5c8c2 (set equality, every extraction method tried)
  • Zero residue in src/ for 矿工费 | 燃气 | MVC subsidy request failed | MVC gas subsidy request failed | 上链成功, with a base-tree positive control proving the probe goes red (cdb5c8c2: userIdentityService.ts ×4); the gas hits left in src/renderer are code comments only
  • node --test tests/userIdentityService.test.mjs tests/i18nEnglishCoverage.test.mjs tests/groupTasksI18nKeys.test.mjs tests/privateChatSubsidizedPin.test.mjs tests/metaidCoreInsufficientFundsRescue.test.mjs tests/metabotChainSyncState.test.mjs → 44/44 pass
  • npx eslint on all changed files → clean; npx tsc --noEmit → 0 errors

小峰 added 3 commits September 20, 2026 18:40
User-facing copy no longer exposes gas/chain jargon. 26 strings
(13 keys x zh + en) in src/renderer/services/i18n.ts:

- 矿工费 / gas 费 / MVC Gas 补贴 / MVC 燃气费 -> 流量费 / 流量补贴
- 链上新内容 / 链上通知 / 链上互动次数 / 已上链 -> 网络上的新内容 /
  收到的通知 / 网络互动次数 / 已发布

Triggered by the AI 冲浪 (MetaWeb surf) settings panel, the only place that
said 矿工费; the same gas-fee family in the subsidy / self-funded broadcast
copy was swept in the same pass.

Out of scope by design:
- key names untouched (code identifiers; metabotMvcSubsidy* keeps its key)
- addresses in copy (向该 MVC 地址转入…) left as-is
- app-wide on-chain / 上链 vocabulary outside this fee family untouched
- internal docs untouched

Verified: 1 file / 26 insertions / 26 deletions; zh-en key sets identical to
base cdb5c8c; i18n tests 5/5 pass; eslint clean; tsc --noEmit 0 errors.
…h polish, main-process fallback

Round 2 of the 流量费 pass, closing the gaps an independent read-only review raised.

Same-screen vocabulary (the round-1 strings sat next to stale labels):
- metabotChainSyncPartialBadge: 链上身份已注册 · 资料待同步 -> 身份已注册 · 资料待同步
  (en: On-chain identity registered -> Identity registered)
- userSettingsRetryChainSync: 重试上链 -> 重试同步 (en: Retry On-Chain Sync -> Retry Sync)
- userSettingsChatPubkeyNotPinned: 聊天公钥尚未上链 -> 聊天公钥尚未发布 (en: ...published on-chain yet -> ...published yet)
- userSettingsDepositHint zh aligned to 重试同步 with the button it sits next to

English polish on the round-1 strings:
- surfSectionHint: "some traffic fee" -> "a small traffic fee"
- metabotChainSyncPartialHint: "top up traffic fee for the bot wallet" -> "top up the bot wallet with traffic fee"
- metabotSetupPendingHint: now says "traffic fee (MVC)" like its sibling metabotSetupSelfFundHint
- userSettingsDepositHint: "the sync" -> "the profile sync"

Main-process fallback literal 'MVC gas subsidy request failed' (5 sites across
metabotManageService / metaidCore / transferService / privateChatSubsidizedPin)
is user-visible: it is appended after the localized prefix in a toast and in the
create-success modal (MetabotsManager.tsx:849, MetaBotCreateSuccessModal.tsx:142),
so a zh user saw "流量补贴请求失败: MVC gas subsidy request failed." -> now
'Traffic subsidy request failed.'

Still out of scope by design: key names, MVC addresses in copy, the onboarding
title 区块链互联网, BTC 手续费, internal docs.

Verified: 5 files / +16/-16; zh-en key sets still byte-identical to base
(2437 = 2437); zero residue for 矿工费 | 燃气 | MVC Gas 补贴 | MVC gas subsidy;
i18n + subsidy-rescue + chain-sync tests 24/24 pass; eslint clean; tsc 0 errors.
…k with the traffic-fee wording

Round 3, driven by the second independent read-only review of 9c25578.

F1 — a same-action split introduced by round 2: the sync button now reads 重试同步 /
"Retry Sync", but the toast it fires still said 上链成功 / 上链失败 and "On-chain sync
succeeded/failed". Aligned to 同步成功 / 同步失败 and "Sync succeeded / Sync failed" (the
neighbouring userSettingsMobileSyncFailed already used 同步失败).

F3 — the same defect class as the round-2 finding, one persistence path over:
'MVC subsidy request failed.' (no "gas") sits at userIdentityService.ts:295/415/458/492,
is written to user_identity.subsidy_error, and is rendered verbatim by UserSettings.tsx:939
→ renderSubsidyWarning's {detail} (818-825). Now 'Traffic subsidy request failed.',
matching the metabot path fixed in round 2.

Correction of round 2's own claim: the user-visible carrier of the metabot fallback is
metabotManageService.ts:531 → persisted subsidy_error → MetaBotCreateSuccessModal.tsx:142
(read at MetabotsManager.tsx:987 → 754), not "849/851" as the earlier PR body said — 849
composes result.subsidy.error, which the 531 fallback does not populate. The literal is
still user-visible; only the cited path was wrong. PR body corrected.

Registered, deliberately not fixed (stop line): metabotCreateChainFailed ('上链失败',
bot-creation action), userSettingsMobileSyncButton ('一键上链'), agent-tool copy at
metabotManageAgentTools.ts:157/166, the onboarding title 区块链互联网, BTC 手续费, and the
app-wide on-chain / 上链 vocabulary.

Verified: round 3 = 2 files / +8-8; cumulative = 6 files / +45-45; zh-en key sets still
identical to base cdb5c8c; zero residue for 矿工费 | 燃气 | MVC subsidy request failed |
MVC gas subsidy request failed | 上链成功, with a base-tree positive control confirming the
probe goes red (cdb5c8c: userIdentityService.ts ×4); 44/44 tests pass (userIdentityService
+ i18n + subsidy-rescue + chain-sync + privateChatSubsidizedPin); eslint clean; tsc 0 errors.

Delivered by 小峰 (Twin). Independently reviewed, read-only, by 小刚 — round 1 on 1912bc2
and round 2 on 9c25578; both anchors are preserved as tags review/pr41-r1 / review/pr41-r2
and their file trees are identical to the amended commits. Round 2's F1/F2/F3 are what this
commit addresses; its F4 corrected this PR's key-count figure (extraction-dependent: 2437
under an identifier+colon regex, 2588 under a quoted-key-aware one — set equality holds
either way).
@WuFenG-Hub
WuFenG-Hub force-pushed the fix/traffic-fee-wording branch from 9c25578 to b633af5 Compare September 20, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant