Skip to content

copy(preferences): "Usage data sharing" toggle + accurate disclosure (main backport of #956) - #959

Open
piyalbasu wants to merge 2 commits into
mainfrom
backport/usage-data-sharing-main
Open

copy(preferences): "Usage data sharing" toggle + accurate disclosure (main backport of #956)#959
piyalbasu wants to merge 2 commits into
mainfrom
backport/usage-data-sharing-main

Conversation

@piyalbasu

Copy link
Copy Markdown
Contributor

TL;DR

Trunk backport of #956 (rename the data-sharing toggle to "Usage data sharing" + accurate disclosure copy). #956 was retargeted onto the in-flight v1.21.27 release branch for the current beta; this PR lands the same copy on main.

Implementation details (for agents)

What changed: PreferencesScreen.tsx (2 t() refs), i18n/locales/en/translations.json and pt/translations.jsonanonymousDataSharingusageDataSharing, new title/description, and the ATT permission-modal wording. Cherry-picked #956's two commits onto current main (clean auto-merge; JSON validated).

Relationship to #956: #956 → base v1.21.27 (beta); this PR → base main (trunk).

piyalbasu and others added 2 commits July 29, 2026 14:57
… + accurate disclosure

The toggle was labeled "Anonymous data sharing" and claimed we collect "public keys, transaction amounts, and balances" only. Relabel to "Usage data sharing" (i18n key anonymousDataSharing -> usageDataSharing) and replace the description with an accurate disclosure covering usage/device/activity data, public keys, IP address, and the persistent cross-platform ID sent to our analytics and crash-reporting providers. Also aligns the ATT permission-modal wording. Removes the stale pt strings so they fall back to English until a professional pt translation is added.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…T modal

Addresses review feedback on #956, which caught that removing only the pt
`anonymousDataSharing` block left the ATT permission modal saying
"compartilhamento de dados anônimos" — the exact term this PR retires. A
Portuguese user toggling the setting saw the modal contradict the (English
fallback) toggle description, and still saw "anonymous", which is the
inaccuracy the change exists to fix.

Fixed by translating rather than deleting, so Portuguese users stay in
Portuguese:

- Restored `preferences.usageDataSharing` in pt with Brazilian Portuguese
  for title + description.
- `permissionModal.enable.description` and `.disable.description`:
  "compartilhamento de dados anônimos" -> "compartilhamento de dados de uso",
  matching the en strings this PR already aligned.

The reviewer's suggested fix was to delete the two modal descriptions too
and let `fallbackLng: "en"` cover them. That resolves the contradiction but
regresses two already-translated strings to English; since the toggle copy
needed pt anyway, translating all four keeps the screen in one language.

Copy is byte-identical to stellar/freighter#2922 (extension) for all four
en/pt strings, verified programmatically — these two PRs exist to make the
disclosure consistent across platforms, so drift between them would defeat
the point. Terminology follows the existing catalog: "Política de
Privacidade", "chave pública", "dispositivo", "carteira", "extensão", and
the "o Freighter" article convention.

Verified: 940/940 en/pt leaf-key parity (was 938/940 on this branch, so the
gap this PR opened is closed); zero occurrences of "anônim" left in pt and
zero of "anonymous" in en; `yarn lint:translations` reports no
missing-translations errors; `yarn lint:ts` clean; prettier clean; 13 tests
pass across PreferencesScreen.test.tsx and ducks/preferences.test.ts.

The 6 `import/order` errors from `lint:translations` are pre-existing on
main in parseTransaction.ts / buildAuthJwt.ts / deriveAuthKeypair.ts and
unrelated to this change — confirmed by running eslint on those files at
main.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 29, 2026 18:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates preferences copy to accurately disclose usage-data collection on main.

Changes:

  • Renames the data-sharing translation key and UI label.
  • Adds updated English and Portuguese disclosures.
  • Aligns permission-modal wording with the new terminology.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
PreferencesScreen.tsx Uses the renamed translation keys.
en/translations.json Updates English disclosure copy.
pt/translations.json Updates Portuguese disclosure copy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown
Contributor

iOS Simulator preview build is ready: https://github.com/stellar/freighter-mobile/releases/tag/untagged-046b41dbe6757847ea4c (SDF collaborators only — install instructions in the release description)

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.

3 participants