Skip to content

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

Merged
piyalbasu merged 2 commits into
v1.21.27from
copy/usage-data-sharing
Jul 29, 2026
Merged

copy(preferences): "Usage data sharing" toggle + accurate disclosure#956
piyalbasu merged 2 commits into
v1.21.27from
copy/usage-data-sharing

Conversation

@piyalbasu

@piyalbasu piyalbasu commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Renames the Preferences data-sharing toggle from "Anonymous data sharing" to "Usage data sharing" and replaces its description with an accurate disclosure. The old copy said we collect only "public keys, transaction amounts, and balances," which understated what's actually sent.

Both strings are translated into Portuguese, and the ATT permission-modal wording is aligned in both languages. The Portuguese copy needs native-speaker sign-off before merge — see the review thread.

Paired with stellar/freighter#2922, which makes the identical change in the extension. The copy is deliberately byte-identical across both.

Implementation details (for agents)

Why: the toggle's data includes usage/device/activity events, public keys (the seed-derived auth key as user_id + a hashed account key), IP address (→ approximate geolocation), and a persistent ID that links a wallet across extension and mobile, sent to our analytics (Amplitude) and crash-reporting (Sentry) providers. "Anonymous" was inaccurate, and so was the narrow list of collected fields.

New English copy: "Help us improve Freighter by sharing usage, device, and activity data, including your public keys, IP address, and a persistent ID that links your wallet across extension and mobile, with our analytics and crash-reporting providers. You can turn this off at any time. See our Privacy Policy for details."

New Portuguese copy: "Ajude-nos a melhorar o Freighter compartilhando dados de uso, do dispositivo e de atividade — incluindo suas chaves públicas, endereço IP e um ID persistente que vincula sua carteira entre a extensão e o aplicativo móvel — com nossos provedores de análise de dados e de relatórios de falhas. Você pode desativar essa opção a qualquer momento. Consulte nossa Política de Privacidade para mais detalhes." Title: "Compartilhamento de dados de uso". Terminology follows the existing catalog (Política de Privacidade, chave pública, dispositivo, carteira, extensão, and the o Freighter article convention).

Changes:

  • en/translations.json: renamed key preferences.anonymousDataSharingusageDataSharing; title → "Usage data sharing"; description → the new copy. Aligned the two ATT permission-modal descriptions ("anonymous" → "usage data sharing").
  • PreferencesScreen.tsx: updated the two t() references to the renamed key.
  • pt/translations.json: same key changes with Portuguese values, plus the two permission-modal descriptions moved off "compartilhamento de dados anônimos" — without that, Portuguese users saw the modal contradict the toggle description and still read "anonymous", the inaccuracy this PR removes.

Verification:

  • 940/940 en/pt leaf-key parity, 0 missing, 0 extra. 35 pt values are pre-existing English placeholders; neither new key is among them.
  • 0 occurrences of anônim left in pt, 0 of anonymous in en, and 0 remaining references to the old anonymousDataSharing key anywhere in src/, e2e/, or __tests__/ — the rename is complete.
  • All four en/pt strings verified byte-identical to copy(preferences): "Usage data sharing" toggle + accurate disclosure freighter#2922.
  • yarn lint:translations → no missing-translations errors; yarn lint:ts clean; prettier clean.
  • Full test suite green: 209 suites, 2793 passed, 6 skipped, 0 failures. Targeted PreferencesScreen.test.tsx + ducks/preferences.test.ts → 13/13.
  • Pre-existing and unrelated: 6 import/order errors in parseTransaction.ts, buildAuthJwt.ts, deriveAuthKeypair.ts, confirmed identical on main.

Follow-ups:

  • If "Privacy Policy" should be a link rather than plain text, that needs wiring — left as provided.
  • The list item keeps testID="anonymous-data-sharing-item". Not user-visible; renaming it is a gratuitous break risk in a copy PR, so it's better bundled with the next real change to this screen.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 29, 2026 16:59

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 analytics consent copy to accurately describe shared usage data.

Changes:

  • Renames the English data-sharing label and expands its disclosure.
  • Updates translation references in Preferences.
  • Removes stale Portuguese toggle copy to use English fallback.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/i18n/locales/en/translations.json Adds accurate usage-sharing copy.
src/i18n/locales/pt/translations.json Removes stale Portuguese toggle translation.
PreferencesScreen.tsx Uses the renamed translation keys.

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

Comment thread src/i18n/locales/pt/translations.json
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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

piyalbasu added a commit that referenced this pull request Jul 29, 2026
…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>
… + 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>
@piyalbasu
piyalbasu force-pushed the copy/usage-data-sharing branch from 9a7d9d0 to 4ce9ade Compare July 29, 2026 18:58
@piyalbasu
piyalbasu changed the base branch from main to v1.21.27 July 29, 2026 18:58
@piyalbasu
piyalbasu merged commit 9b877f0 into v1.21.27 Jul 29, 2026
61 of 64 checks passed
@piyalbasu
piyalbasu deleted the copy/usage-data-sharing branch July 29, 2026 21:47
piyalbasu added a commit that referenced this pull request Jul 30, 2026
* chore: bump app version to v1.21.27

* fix(sentry): turn Sentry fully off when data sharing is off (mirror extension) (#955)

Squashed for the v1.21.27 release branch (retargeted from main). Consent now
controls Sentry initialization, event delivery, and runtime shutdown:
- initializeSentry() no-ops during e2e, when already initialized (idempotent),
  or when data sharing is OFF (master switch).
- beforeSend hard-drops every event while sharing is off.
- syncSentryEnablement() reconciles on toggle: inits when turned on, and on
  opt-out clears the user and disables the client by flipping enabled=false
  (NOT close()/close(0), which full-drain the transport backlog); guarded on
  persist.hasHydrated() so the store subscription can't init off the
  pre-hydration Android default.
- App startup + updateSentryContext consent-gate the Sentry user identity.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* copy(preferences): "Usage data sharing" toggle + accurate disclosure (#956)

* copy(preferences): rename data-sharing toggle to "Usage data sharing" + 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>

* i18n(pt): translate usage-data-sharing copy + drop "anônimos" from ATT 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>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <pbasu235@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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