Skip to content

fix(loc): wire citizen login toggle keys + retitle CS_COMMON_HELPLINE - #13

Open
KDwevedi wants to merge 1 commit into
ChakshuGautam:masterfrom
KDwevedi:fix/citizen-login-helpline-loc
Open

fix(loc): wire citizen login toggle keys + retitle CS_COMMON_HELPLINE#13
KDwevedi wants to merge 1 commit into
ChakshuGautam:masterfrom
KDwevedi:fix/citizen-login-helpline-loc

Conversation

@KDwevedi

Copy link
Copy Markdown
Collaborator

Summary

  • Citizen UI walk on naipepea (digit-integration-tests#12) found two raw-key leaks under the citizen sidebar/login.
  • CS_COMMON_HELPLINE shipped with the literal value HELPLINE (uppercase) — visually indistinguishable from a missing translation. Retitled to Helpline.
  • The mobile/email toggle below the login mobile-number input (CS_LOGIN_REGISTER_WITH_EMAIL, CS_USE_MOBILE_INSTEAD, plus the LOGIN_WITH_EMAIL / LOGIN_WITH_MOBILE mobile-viewport variants in packages/modules/core/src/pages/citizen/Login/SelectMobileNumber.js) was referenced in source but never seeded — added to both default and en_IN.

Mirrored into default/ and en_IN/ so fresh tenant bootstraps don't reintroduce the gap.

What's already live

The same 5 entries (en_IN) plus 4 sw_KE translations were upserted into the live naipepea localization service today via /localization/messages/v1/_upsert, so the running citizen UI no longer leaks these keys after a hard refresh / cache bust. This PR captures the change in source-of-truth so re-seeding from default-data-handler matches.

Code Module Locale Message
CS_COMMON_HELPLINE rainmaker-common default, en_IN Helpline (was HELPLINE)
CS_LOGIN_REGISTER_WITH_EMAIL rainmaker-common default, en_IN Login or register with email
CS_USE_MOBILE_INSTEAD rainmaker-common default, en_IN Use mobile number instead
LOGIN_WITH_EMAIL rainmaker-common default, en_IN Login with email
LOGIN_WITH_MOBILE rainmaker-common default, en_IN Login with mobile

Out of scope (separate fixes)

Two of the four "localization gaps" called out in issue #12 are not actually localization-resolvable — flagging here so they don't get re-filed against this PR:

  • Subtype dropdown raw codes (LAND OWNERSHIP DISPUTE, SURVEYING DELAY, …) — products/pgr/src/pages/citizen/Create/FormExplorer.js populates the dropdown straight from the MDMS RAINMAKER-PGR.ServiceDefs.name field with no t() wrap. The MDMS data ships these names in literal upper-snake. Needs either (a) MDMS data fix to title-case the name field on the 37 ke.nairobi service defs, or (b) a UI patch to wrap each option's display text in t(\SERVICEDEFS.${serviceCode.toUpperCase()}`)(the keys exist inrainmaker-pgr` already).
  • NAIROBI_CENTRAL boundary code on the complaint detail Address rowproducts/pgr/src/pages/citizen/ComplaintDetails.js renders address?.locality?.name || address?.locality?.code directly (no t()). The stored complaint has locality.name=null, so the code-fallback shows. Needs either a UI patch to wrap the fallback in t() and seed NAIROBI_CENTRAL (and the other 16 sub-county codes), or a fix at the create-complaint payload layer to populate locality.name from the boundary-service lookup.

Test plan

  • Live naipepea: curl /localization/messages/v1/_search for each of the 5 codes returns the new value in en_IN and the 4 toggle-link codes return Swahili in sw_KE.
  • After cache bust on the browser, citizen sidebar shows "Helpline" instead of "HELPLINE", and the login toggle below the mobile input shows "Login or register with email" / "Use mobile number instead" instead of raw keys.
  • Fresh default-data-handler seed of a new tenant picks up the corrected values automatically.

🤖 Generated with Claude Code

Citizen UI walk on naipepea (digit-integration-tests#12) found the
sidebar HELPLINE label rendered as the literal upper-case word and the
mobile/email toggle below the login mobile-number input rendered as
raw localization keys. The toggle keys (CS_LOGIN_REGISTER_WITH_EMAIL,
CS_USE_MOBILE_INSTEAD, plus the LOGIN_WITH_EMAIL / LOGIN_WITH_MOBILE
mobile-viewport variants) were referenced by SelectMobileNumber.js but
never seeded; CS_COMMON_HELPLINE shipped with the placeholder value
"HELPLINE", which reads as a raw key on the rendered sidebar.

Mirrored the same change into both the en_IN and default seed files so
fresh tenants don't reintroduce the gap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 29, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@KDwevedi has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 9 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 737db61f-82c4-452b-93b7-773836dcb834

📥 Commits

Reviewing files that changed from the base of the PR and between 82fec98 and bcf952d.

📒 Files selected for processing (2)
  • utilities/default-data-handler/src/main/resources/localisations/default/rainmaker-common.json
  • utilities/default-data-handler/src/main/resources/localisations/en_IN/rainmaker-common.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 22 minutes and 9 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

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