Skip to content

fix(mobile): correct the Sinhala spend-alert wording - #6847

Merged
iscekic merged 1 commit into
mainfrom
kwf/owner-i18n-si-spend-alert-20260929
Sep 29, 2026
Merged

iscekic merged 1 commit into
mainfrom
kwf/owner-i18n-si-spend-alert-20260929

Conversation

@iscekic

@iscekic iscekic commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Changelog for users

  • Sinhala push notifications now show the spend alert as "{{scopeName}} වියදම $… ඉක්මවා ගියේය".

Changelog for maintainers

  • The Sinhala spend-alert body moves the scope name onto the spend noun, matching the English source and the sibling low-balance body.
  • The new catalog test pins the Sinhala key set and per-key placeholders to English; a key or placeholder drift now fails.
  • Review the test's hard-coded spend-alert string first: it asserts the chosen wording, so a future wording change must update both files.
  • Only the si.json spend-alert body changed; the other keys and the rest of the catalog are untouched.

E2E proof

Sinhala push catalog uses the restored compound spend-alert wording and matches the English source

Asserted value: spendAlert body: {{scopeName}} වියදම ${{amountUsd}} ඉක්මවා ගියේය. Sense check (jev): probability 0.94

Base log: backend-assert 871323841cc3 exited 1
$ set -euo pipefail
$ cd packages/notifications
$ cat > src/kwf-si-spend-alert.test.ts <<'TS'
$ import { describe, expect, it } from 'vitest';
$ import en from './locales/en.json';
$ import si from './locales/si.json';
$ function flatten(
$   value: unknown,
$   prefix = '',
$   out = new Map<string, string>()
$ ): Map<string, string> {
$   if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
$ … 31 more line(s)
 ❯ src/kwf-si-spend-alert.test.ts (3 tests | 1 failed) 12ms
 Test Files  1 failed (1)
      Tests  1 failed | 2 passed (3)
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
 FAIL  src/kwf-si-spend-alert.test.ts > Sinhala push catalog spend alert > uses the compound spend-alert body with the English scopeName/spend order
AssertionError: expected '{{scopeName}} හි වියදම ${{amountUsd}}…' to be '{{scopeName}} වියදම ${{amountUsd}} ඉක…' // Object.is equality
Expected: "{{scopeName}} වියදම ${{amountUsd}} ඉක්මවා ගියේය"
 ❯ src/kwf-si-spend-alert.test.ts:42:48
     40|
     41|   it('uses the compound spend-alert body with the English scopeName/sp…
     42|     expect(SI.get('internal.spendAlert.body')).toBe('{{scopeName}} විය…
       |                                                ^
     43|   });
     44| });
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
Head log: backend-assert 871323841cc3 exited 0
$ set -euo pipefail
$ cd packages/notifications
$ cat > src/kwf-si-spend-alert.test.ts <<'TS'
$ import { describe, expect, it } from 'vitest';
$ import en from './locales/en.json';
$ import si from './locales/si.json';
$ function flatten(
$   value: unknown,
$   prefix = '',
$   out = new Map<string, string>()
$ ): Map<string, string> {
$   if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
$ … 31 more line(s)
spendAlert body: {{scopeName}} වියදම ${{amountUsd}} ඉක්මවා ගියේය
 RUN  v4.1.11 /tmp/kwf-script-8b3e0a58dcb06b8b4598b27ff877b414c7e698347d3869be61d3dfcb4ca32e18/packages/notifications
 ✓ src/kwf-si-spend-alert.test.ts (3 tests) 6ms
 Test Files  1 passed (1)
      Tests  3 passed (3)
   Start at  04:38:11
   Duration  229ms (transform 41ms, setup 0ms, import 60ms, tests 6ms, environment 0ms)
Owner request

Mobile app i18n, Sinhala (si): the superseded item janitor-mobile-notifications-2b0fcf48c6 lost a wording change when its PR cloud#6747 was closed unmerged. Evidence: product main si.json at 6291d9fb has "{{scopeName}} වියදම $..." while the closed branch kwf/janitor-mobile-notifications-2b0fcf48c6 at 1d81795 had "{{scopeName}} හි වියදම $..."; pl.json is byte-identical on both. Task: decide the correct Sinhala spend-alert wording (with a native-quality check against the surrounding si.json style and the English source), apply it to the si.json spend-alert keys if the closed branch version is better, and correct any other si.json string that the closed branch changed. Proof: the resulting si.json keys with the chosen wording, plus a test or check that the catalog parses and the keys match the English source. Note: the branch is still on origin if its diff is needed.

@iscekic iscekic self-assigned this Sep 29, 2026
@iscekic
iscekic marked this pull request as ready for review September 29, 2026 05:05
@kilo-code-bot

kilo-code-bot Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/notifications/src/locale-catalog.test.ts
  • packages/notifications/src/locales/si.json

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants