Skip to content

fix(i18n): show Hindi search match counts in argument order - #132176

Merged
steipete merged 1 commit into
mainfrom
steipete/hi-match-counter-20260828
Aug 30, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/hi-match-counter-20260828

Conversation

@steipete

@steipete steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Hindi-speaking users searching a conversation see the current match and total described in the wrong reading order. The existing Swift caller supplies the current match first and the total second, while the old Hindi wording expects total followed by current.

Why This Change Was Made

Use explicit match/total labels: मिलान %lld, कुल %lld. Preserve the existing argument order and both %lld placeholders in the canonical Hindi inventory and synchronized iOS/macOS catalogs. The shared search modifier is macOS-only; both Apple catalogs intentionally include shared chat sources. No Swift, generator, dependency, configuration, schema, or locale-policy changes. AI-assisted.

The existing single commit is now 3b9c0751824a60f59bd7f69434aee511cd425710, directly on the landed canonical locale prerequisite 4f92bd5064f11c0271e703fbffd52390cadf2307. Recursive JSON comparison confirms exactly three changed leaves and no added/deleted keys. Every other landed value is retained. Product resources: +3/-3 (net 0); runtime: 0; tests: 0.

User Impact

The first, second, and third matches among three read मिलान 1, कुल 3, मिलान 2, कुल 3, and मिलान 3, कुल 3. The formatter still receives current index before total.

Evidence

Retained local proof executed on 3b9c0751824a60f59bd7f69434aee511cd425710 and verified at 2026-08-29 23:38:50 UTC, with sources frozen before checks/builds. These checks were not rerun during the final native landing continuation:

  • Strict native:i18n:check passed, including Android and Apple derived parity: 21 locale artifacts, 4,331 source entries, 1,658 Android app keys, 1,653 iOS keys, 1,363 macOS keys, 84 InfoPlist files, and zero Apple translation contradictions. The checker reports 5,489 nonblocking quality advisories; these were not suppressed or repaired here.
  • The two existing native/Apple i18n test files passed all 29 cases with at most four Vitest workers. No tests or production seams were added.
  • Both canonical macOS resource compiles passed. The baseline uses newly copied immutable inputs from 4f92bd5064f11c0271e703fbffd52390cadf2307; the candidate uses the frozen new head. Among 43 compiled files per tree, only hi.lproj/Localizable.strings differs.
  • The same task-local Foundation probe was rerun against each freshly compiled resource: baseline intentionally failed all three assertions (exit 1), producing 1 में से 3, 2 में से 3, 3 में से 3; candidate passed all three (exit 0), producing the expected explicitly labeled strings above. This is compiled-resource console proof, not native UI proof.
  • Canonical inventory JSON and Apple catalog serializer checks passed. git diff --check passed. Used Node 26.8.1; pnpm 12.0.0, tsx 4.23.12, Vitest 4.1.11, and oxfmt 0.60.0 match their package pins; no install, lockfile change, or dependency edit was needed. Canonical serializers own these generated files, which oxfmt excludes.

Commands (PROOF denotes the task-local proof artifact directory; before-tree contains immutable compiler inputs, not another checkout):

node --import ./scripts/tsx.mjs scripts/native-app-i18n.ts check
OPENCLAW_VITEST_MAX_WORKERS=4 node scripts/run-vitest.mjs test/scripts/native-app-i18n.test.ts test/scripts/apple-app-i18n.test.ts
node --import ./scripts/tsx.mjs "$PROOF/before-tree/scripts/apple-app-i18n.ts" compile-macos --output "$PROOF/before-resources"
node --import ./scripts/tsx.mjs scripts/apple-app-i18n.ts compile-macos --output "$PROOF/candidate-resources"
swift "$PROOF/hindi-format-probe.swift" "$PROOF/before-resources/hi.lproj/Localizable.strings"
swift "$PROOF/hindi-format-probe.swift" "$PROOF/candidate-resources/hi.lproj/Localizable.strings"
node --import ./scripts/tsx.mjs "$PROOF/format-resources.mts"
git diff --check 4f92bd5064f11c0271e703fbffd52390cadf2307...HEAD

The prior managed Codex P0 review ran on 457cb8cb284323b178333c1e2f95e56caa177f48 against cc374dff6ba3cb553e08f2d2deb78176e7277fcf, completing at 2026-08-29 22:50:02 UTC with exit 0 and no findings. Its semantic three-value delta and relevant owner/caller/compiler/test blobs remain identical after this rebase. That review is reused with its original identity; no new-head review execution is claimed. Its scope does not waive hosted CI or native UI proof.

Historical failures and resolved prerequisites

The original head d63ff974f0e576d3c7acaabf9ff1ffdcdd30949b had a passing strict resource check and 29 passing tests, but CI 33218036081, attempt 1 failed macos-swift job 99006166917 in “dedupes gateway echo of local user message” at ChatViewModelTests.swift:6547. Incomplete bootstrap synchronization could allow assertions before history application; the log does not establish the precise scheduling interleaving.

The canonical shared-chat fixture repair, #131466, landed as dd4528b6393e7d00063067a080ca7241b48ce475 and is an ancestor of this base. It uses loadAndWaitBootstrap in the affected test and eight related fixtures. Its relevant fixture blob is retained unchanged. The earlier coordination comment is historical; this PR does not duplicate or take over that repair.

The first refresh at 457cb8cb284323b178333c1e2f95e56caa177f48 passed 29 tests and the three-case Foundation red/green probe, but publication correctly stopped because strict validation found the same inherited 23 missing and three stale IDs in all 21 locales on both base and candidate. That failure was not waived.

The canonical locale refresh #132875 landed at 4f92bd5064f11c0271e703fbffd52390cadf2307 on 2026-08-29 at 23:27:49 UTC. Its CI 33280162081, attempt 1 succeeded for source fa3e1571302da22774418d15aa80ccbb60f7aee2. All 46 changed landed files match that source; all 21 locales now contain the 23 missing IDs and omit the three stale IDs. This second, prerequisite-driven rebase uses that exact landed merge, with no further main chase or locale generation. Strict parity now passes on the Hindi candidate itself.

Remaining proof gap

Native before/after UI proof remains unexecuted and owned by the coordinating maintainer. A real named-profile app still opens installation-wide PortGuardian and chat databases, so it does not isolate operator state. The available stopped macOS VM still has clipboard, cloud, app, and SmartMount sharing enabled; exclusive ownership and a clean baseline have not been established. No app build/sign/launch, VM start/configuration, screenshot, or upload was performed for this refresh. This is an isolation gap, not a claim that a signing certificate is unavailable.

Final landing decision and current CI

CI 33281571399, attempt 1 completed SUCCESS for exact head 3b9c0751824a60f59bd7f69434aee511cd425710. Fresh verification confirms macos-swift 99177591227, native-i18n 99177591206, and required openclaw/ci-gate 99180799139 all succeeded. No CI dispatch or test rerun was needed. Observer command retries in the completed watcher are not test reruns.

The current exact-head ClawSweeper review, completed 2026-08-29 23:47:14 UTC, has no mechanical findings. Its wording decision is resolved in the sourced maintainer disposition: retain the explicit labels because the unchanged call supplies current then total, while the cited Hindi partitive example puts the total first. This is source/dictionary-supported reasoning, not native-speaker signoff; the direct Cambridge page fetch returned 403. Its macOS CI rank-up is now satisfied. No redundant re-review is requested for this unchanged source.

The coordinating maintainer explicitly accepts the repository's documented concrete-UI-infeasibility exception for this three-value resource correction. Native UI remains UNEXECUTED for the isolation reasons above. Matching signing identity exists. No running-app layout/interaction proof or screenshots are claimed; the Foundation probe is not UI evidence, and this decision is not a blanket UI waiver.

The final source inspection reconfirms exactly three leaves, both format tokens intact, resources +3/-3 (net 0), runtime/tests 0. Current main retains the old values; owner/caller/compiler/test context remains unchanged. An unrelated main update only extends Git-owner CI routing to workflow-sanity, leaving native-i18n selection intact. The existing native review artifacts were refreshed and validated through scripts/pr review-validate-artifacts 132176, with the retained passing tests and their original execution identities explicitly recorded. Normal OPENCLAW_TESTBOX=1 scripts/pr prepare-run 132176 and scripts/pr merge-run 132176 remain responsible for final admission and the actual landing receipt.

@steipete steipete self-assigned this Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: ios App: ios app: macos App: macos size: XS maintainer Maintainer-authored PR labels Aug 28, 2026
@steipete
steipete marked this pull request as ready for review August 28, 2026 22:45
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 7:47 PM ET / 23:47 UTC.

ClawSweeper review

What this changes

The PR replaces the Hindi search-count wording in the canonical native inventory and synchronized iOS/macOS localization catalogs with explicit match and total labels.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

The resource edits are internally consistent, but the reported argument-order defect is not present: the existing Hindi value already expresses the first value “out of” the second. Keep this maintainer-owned PR open for a wording decision rather than treating it as an established bug fix.

Priority: P3
Reviewed head: 3b9c0751824a60f59bd7f69434aee511cd425710
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The resource edit is coherent and synchronized, but its stated bug premise is not supported by the current format call or existing Hindi wording.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-owned PR is exempt from the external-contributor proof gate. Its body nonetheless documents compiled-resource before/after output; a real native UI run remains explicitly infeasible in the supplied environment and is not claimed here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-owned PR is exempt from the external-contributor proof gate. Its body nonetheless documents compiled-resource before/after output; a real native UI run remains explicitly infeasible in the supplied environment and is not claimed here.
Evidence reviewed 6 items Search call preserves current-then-total order: The UI passes index + 1 first and results.messageIDs.count second to the localized %lld of %lld format.
Canonical inventory ties the key to this caller: The native source inventory maps the changed Hindi ID to %lld of %lld at the conversation-search Swift source.
Generated catalog path preserves placeholders: The Apple generator builds both catalogs from the native translations and rejects a locale whose format tokens differ from the English key.
Findings None None.
Security None None.

How this fits together

The macOS conversation search view passes the selected match position followed by the total number of matches to a localized format string. The native Hindi inventory supplies that resource to the generated iOS and macOS Apple catalogs.

flowchart LR
A[Search result position] --> B[Conversation search view]
B --> C[Localized count format]
D[Hindi native inventory] --> E[Apple resource catalogs]
E --> C
C --> F[Hindi match counter]
Loading

Decision needed

Question Recommendation
Should OpenClaw replace the existing Hindi current-out-of-total wording with the more explicit “match …, total …” copy even though both forms preserve the runtime argument order? Retain the existing wording: Close the PR because the current translation already renders the selected match before the total.

Why: Source shows no formatter mismatch; choosing between two valid localized phrasings is a product and language-quality decision, not a mechanical bug repair.

Before merge

  • Resolve merge risk (P1) - The wording change is a localization preference, not a demonstrated correction to argument order; the PR description should not establish a nonexistent formatting defect as release context.
  • Resolve merge risk (P1) - Exact-head CI was still in progress in the supplied review context, so the prior required macOS result has not yet been confirmed.
  • Complete next step (P2) - A maintainer must decide whether the explicit Hindi labels are preferred; no mechanical repair is warranted by the source contract.
Agent review details

Security

None.

PR surface

Other 0. Total 0 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 3 3 0
Total 3 3 3 0

Review metrics

Metric Value Why it matters
Resource implementation delta product resources +3/-3; runtime +0; tests +0 The patch changes one Hindi value in its canonical inventory and two generated Apple catalog projections without altering formatting code.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Either retain the existing idiomatic current-out-of-total phrase, or explicitly approve the labeled phrasing as a Hindi copy improvement and describe it that way rather than as an argument-order repair.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Either retain the existing idiomatic current-out-of-total phrase, or explicitly approve the labeled phrasing as a Hindi copy improvement and describe it that way rather than as an argument-order repair.

Do we have a high-confidence way to reproduce the issue?

No: source inspection shows the caller supplies current match then total, and current main’s Hindi phrase uses that same order. The reported reversal cannot be reproduced from the current implementation.

Is this the best way to solve the issue?

No as a bug fix: the current translation already matches the arguments. The replacement can still be accepted as a deliberate copy preference, but that requires a maintainer language/product choice.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4432c568ae33.

Labels

Label justifications:

  • P3: This is a limited localization-copy decision with no demonstrated runtime defect.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-owned PR is exempt from the external-contributor proof gate. Its body nonetheless documents compiled-resource before/after output; a real native UI run remains explicitly infeasible in the supplied environment and is not claimed here.

Evidence

What I checked:

Likely related people:

  • unknown: The blamed commit carries this line unchanged from a recorded parent; no introducing author is attributed. (role: carried-forward source line; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Resolve the wording decision and wait for the exact-head macOS CI result before landing.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-28T22:54:49.316Z sha d63ff97 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-29T02:11:56.833Z sha d63ff97 :: needs maintainer review before merge. :: none

Label the current match before the total count, matching the existing Swift
format arguments. Regenerate only the Hindi entries in the canonical Apple
catalogs; keep all other translations and the source inventory unchanged.
@steipete
steipete force-pushed the steipete/hi-match-counter-20260828 branch from d63ff97 to 3b9c075 Compare August 29, 2026 23:41
@steipete

steipete commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 3b9c0751824a60f59bd7f69434aee511cd425710, parent 4f92bd5064f11c0271e703fbffd52390cadf2307. This updates the existing refresh proof; source is unchanged.

The correction names the current match and total explicitly in the canonical Hindi inventory and its iOS/macOS catalog projections. The shared Swift owner passes current index + 1 then total as Int64. Existing catalog builders preserve translated units, so all three values must change together. Exactly three JSON leaves change; every surrounding value is preserved. Resources +3/-3 (net 0), executable runtime/tests 0. Swapping shared arguments or adding a locale-specific formatter would change the wrong owner.

Retained exact-head proof (completed before this final continuation): strict native/Android/Apple parity passed; all 29 existing i18n tests passed; canonical serializers/diffcheck and both macOS resource compiles passed. The identical Foundation probe (SHA256 e90fc3ecef4ccd8b9a499961c7963c774a338cbd04430312f496e20f3b1abc5a) gave 3 intended RED assertions on immutable parent resources and 3 GREEN on H at 1/3, 2/3, 3/3. Only hi.lproj/Localizable.strings differs among 43 compiled files. No test rerun in this continuation.

Exact retained commands (PROOF is the task-local artifact directory; before-tree is an immutable input copy):

node --import ./scripts/tsx.mjs scripts/native-app-i18n.ts check
OPENCLAW_VITEST_MAX_WORKERS=4 node scripts/run-vitest.mjs test/scripts/native-app-i18n.test.ts test/scripts/apple-app-i18n.test.ts
node --import ./scripts/tsx.mjs "$PROOF/before-tree/scripts/apple-app-i18n.ts" compile-macos --output "$PROOF/before-resources"
node --import ./scripts/tsx.mjs scripts/apple-app-i18n.ts compile-macos --output "$PROOF/candidate-resources"
swift "$PROOF/hindi-format-probe.swift" "$PROOF/before-resources/hi.lproj/Localizable.strings"
swift "$PROOF/hindi-format-probe.swift" "$PROOF/candidate-resources/hi.lproj/Localizable.strings"
node --import ./scripts/tsx.mjs "$PROOF/format-resources.mts"
git diff --check 4f92bd5064f11c0271e703fbffd52390cadf2307...HEAD

Prior managed Codex P0 review is reused at its actual head 457cb8cb284323b178333c1e2f95e56caa177f48 / base cc374dff6ba3cb553e08f2d2deb78176e7277fcf, completed 2026-08-29 22:50:02 UTC, exit 0, no P0 findings. Semantic delta and relevant owner/caller/compiler/test blobs remain identical. This is not a new-head review execution or a claim of all-priority review.

Fresh read confirms CI 33281571399/a1 COMPLETED SUCCESS on exact H, including macos-swift 99177591227, native-i18n 99177591206, and required ci-gate 99180799139. No dispatch or CI rerun. The historical failed Swift run and two resolved prerequisites remain documented in the PR body.

The latest ClawSweeper review is fresh on H with no mechanical findings. Every actionable item/rank-up move is accounted for: the sourced wording disposition keeps explicit labels, and exact-head macOS CI is green. No native-speaker signoff or successful full-page Cambridge fetch is claimed. No redundant re-review request.

Native UI remains UNEXECUTED. A named profile still opens installation-wide PortGuardian/chat stores. The available stopped macOS VM has sharing enabled and exclusive clean baseline ownership is unestablished. Matching signing identity exists. The coordinating maintainer accepts this documented concrete-infeasibility exception for the bounded resource correction; it does not turn compiler output into UI proof or waive UI requirements generally. No app/VM/signing/operator-state action or screenshot/upload occurred.

Native review artifacts now record the final decision and retained passing evidence; scripts/pr review-validate-artifacts 132176 passed. The first validation rejected the inherited per-stage not_run test enum; it was corrected to reference the real prior passing execution, after the failed command and children joined and its exact target lock was recovered using the documented command. No test/gate or wrapper was weakened. Only the unmodified native prepare/merge flow will perform landing; no merge is claimed by this comment.

@clawsweeper

clawsweeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor Author

Addressing the wording premise in the latest review: I’m retaining the explicit match/total labels.

The review reads %lld में से %lld as “first out of second,” but the Hindi partitive puts the total first. Cambridge’s English–Hindi entry for “out of” illustrates “Nine out of ten” as “दस में से नौ” — ten first, nine second. The unchanged Swift call supplies current match, then total. Its old resource therefore produces 1 में से 3 for the first of three matches, rather than a total-first Hindi partitive.

मिलान 1, कुल 3 names those two values explicitly and agrees with the existing argument order. That is why this change updates the canonical Hindi value and its two catalog projections, rather than reversing shared Swift arguments or changing placeholder syntax. The exact-head compiled-resource probe verifies 1/3, 2/3 and 3/3; it is not being presented as native UI proof.

This resolves the wording decision without changing head 3b9c0751824a60f59bd7f69434aee511cd425710. Exact-head macOS/required CI remains a separate prerequisite for landing, and the native UI isolation gap remains documented in the PR body. No merge or completed UI verification is claimed here.

@steipete
steipete merged commit c72ce0b into main Aug 30, 2026
156 of 157 checks passed
@steipete
steipete deleted the steipete/hi-match-counter-20260828 branch August 30, 2026 01:11
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 30, 2026
…#132176)

Label the current match before the total count, matching the existing Swift
format arguments. Regenerate only the Hindi entries in the canonical Apple
catalogs; keep all other translations and the source inventory unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios app: macos App: macos maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant