Skip to content

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

Merged
piyalbasu merged 1 commit into
v5.44.0from
copy/usage-data-sharing
Jul 29, 2026
Merged

copy(preferences): "Usage data sharing" toggle + accurate disclosure#2922
piyalbasu merged 1 commit into
v5.44.0from
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 claimed Freighter "will never collect your personal information such as IP address, keys, balance or transaction amounts" — which isn't true.

Both strings are translated into Portuguese as well. The Portuguese copy needs native-speaker sign-off before merge — see the review thread for the rationale and the two wording calls worth a second opinion.

Implementation details (for agents)

Why: the toggle's data actually includes public keys (the seed-derived auth key as user_id, plus 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" and the "never collects…" line were inaccurate.

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." Label: "Compartilhamento de dados de uso". Terminology follows the existing catalog (Política de Privacidade, chave pública, dispositivo, carteira, extensão, and the catalog's o Freighter article convention) rather than introducing new terms.

Changes:

  • Preferences/index.tsx: label → Usage data sharing; description → the new single string, replacing a two-string concatenation.
  • locales/en/translation.json: added the new label + description keys; removed the two now-false/orphaned description strings and the old label.
  • locales/pt/translation.json: same key changes, with Portuguese values.

Verification:

  • Catalogs at 841/841 en/pt key parity, 0 keys missing in pt; the count of pt values still identical to their English key is 39, all pre-existing — neither new key is a placeholder.
  • The three removed strings are gone from both catalogs with no remaining references anywhere in the repo; no test asserts on the old copy.
  • Ran the translation build against this branch and confirmed it is a no-op on both new keys — the parser preserves existing pt values instead of overwriting them with the English default, and the sort positions match what it generates exactly. (Required patching in fix(build): repair yarn build:translations + stop pre-commit hook swallowing its failure #2923 locally, because yarn build:translations is broken on master.)
  • npx tsc --noEmit clean; npx prettier --check clean on all changed files.
  • New label is 32 chars vs the 33-char label it replaces, so the section title that renders inline with the toggle carries no new overflow risk.

Related / follow-ups:

  • fix(build): repair yarn build:translations + stop pre-commit hook swallowing its failure #2923 fixes yarn build:translations, which fails at webpack config load on master, and stops the pre-commit hook from swallowing that failure. Independent of this PR; no file overlap beyond two unrelated sort corrections in the T… block of each catalog.
  • If "Privacy Policy" should be a link rather than plain text, that still needs wiring — left as provided.
  • The mobile app carries the equivalent toggle; matching copy PR filed separately.

🤖 Generated with Claude Code

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

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 the Preferences analytics toggle with more accurate data-sharing disclosure.

Changes:

  • Renames the toggle to “Usage data sharing.”
  • Replaces the inaccurate disclosure.
  • Removes obsolete English and Portuguese strings.

Reviewed changes

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

File Description
Preferences/index.tsx Updates toggle copy and disclosure.
locales/en/translation.json Adds new English strings and removes obsolete copy.
locales/pt/translation.json Removes obsolete Portuguese strings without replacements.

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

<div className="Preferences--section">
<div className="Preferences--section--title">
<span>{t("Anonymous data sharing")} </span>
<span>{t("Usage data sharing")} </span>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed the catalog issue in a05db85 — and it turned up a second deviation you didn't flag, plus a broken build script.

What was actually wrong: the two new keys were missing from the Portuguese catalog, and both new English keys were dropped into the wrong sort position (they landed where the old Anonymous data sharing key sat). Both are fixed: en and pt are back to 841/841 key parity, and the keys are in sort order.

Partial pushback on "before shipping": the Portuguese values are English placeholders, not translated copy, and I don't think a reviewed pt translation should gate this PR. Placeholders are the repo's existing convention (39 keys already ship that way), and they render identically to the fallbackLng: "en" behavior — so this change doesn't alter what a Portuguese user sees either way. What it fixes is catalog alignment. Blocking on translation would keep the current copy live, and the current copy tells users Freighter "will never collect your personal information such as IP address, keys, balance or transaction amounts" — which is false. Accurate English beats inaccurate Portuguese. Translation stays a tracked follow-up.

Separately: yarn build:translations is broken on master and cannot be run as you suggested. Details below; fixing separately, not in this PR.


Detailed explanation (for agents)

Deviation 1 — missing pt keys (as reported). Before this PR the catalogs were at 839/839 parity; the copy commit took en to 841 and left pt at 839. Both keys added to pt with the English string as the value, matching the parser's useKeysAsDefaultValue: true:

options: {
createOldCatalogs: false,
locales: LOCALES,
defaultNamespace: "translation",
ns: ["translation"],
output: "src/popup/locales/$LOCALE/$NAMESPACE.json",
sort: true,
useKeysAsDefaultValue: true,
keepRemoved: true,
removeUnusedKeys: false,
keySeparator: false,

39 pre-existing pt keys are already English placeholders (Blockaid, Memo, Copied, About verified tokens, …), so this is the established state for untranslated strings, not a new gap. Since fallbackLng is en, the placeholder and the missing-key path produce byte-identical rendered output — the reason to add the keys is so the catalogs match what the parser would emit, i.e. so the build is a no-op rather than a diff.

Deviation 2 — sort placement (not flagged in the review). The copy commit inserted both keys at the old Anonymous data sharing position, inside the An… block, because it was a textual replacement of the key it superseded. With sort: true set, a build would have moved them. Corrected placement, verified against localeCompare ordering of each key's immediate neighbors:

  • "Help us improve Freighter by sharing usage, device…" → index 290, after "Help", before "Hidden collectibles"
  • "Usage data sharing" → index 749, after "Upload Contract Wasm", before "Use caution when connecting to domains without an SSL certificate."

Same index in both catalogs.

Verification (both catalogs, post-fix):

  • Valid JSON; 841 keys each; 0 missing in pt, 0 extra in pt.
  • Both new keys present in en and pt; each is localeCompare-ordered w.r.t. its immediate predecessor and successor in both files.
  • The three removed strings (Anonymous data sharing, Allow Freighter to collect anonymous information about usage., Freighter will never collect your personal information such as…) are absent from both catalogs and have no remaining references anywhere in the repo — grepped, only hits are the two catalogs and Preferences/index.tsx. No test asserts on the old copy.
  • npx tsc --noEmit clean; npx prettier --check clean on all three changed files.

Why the build wasn't used to generate this. yarn build:translations fails at config load on master, independent of this PR:

[webpack-cli] ✖ TypeError: I18nextWebpackPlugin is not a constructor
    at prodConfig (extension/webpack.extension.js:76:13)

i18next-scanner-webpack@1.0.0 is ESM-transpiled and exports the plugin as .default, so the CommonJS require yields { __esModule: true, default: [Function] }:

const { merge } = require("webpack-merge");
const webpack = require("webpack");
const I18nextWebpackPlugin = require("i18next-scanner-webpack");
const { commonConfig } = require("./webpack.common.js");
const Dotenv = require("dotenv-webpack");

Confirmed the one-line unwrap constructs correctly:

const P = require("i18next-scanner-webpack");
const C = P.default || P;
new C({ async: true, dest: "./", extensions: [".ts", ".tsx"], options: {} });
// => I18nextWebpackPlugin { apply: [Function] }

Consequence worth noting for the locale workflow generally: .husky/pre-commit runs .husky/addTranslations.sh, which calls yarn build:extension:translations and then unconditionally git adds the locales directory. The script has no set -e, so the build failure is swallowed and the hook reports success. Every commit since the plugin version drifted has been silently skipping catalog generation — which is how a hand-edited, out-of-sort key got past the hook in the first place. That's a master bug, out of scope for a copy change; filing separately rather than widening this PR.

Remaining follow-up: reviewed Portuguese translation of the new label + disclosure. Deliberately not machine-translated here — an unreviewed translation of a privacy disclosure risks misstating what data is collected, which is the exact class of error this PR exists to fix.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Build fix filed separately as #2923yarn build:translations runs again there, and the pre-commit hook no longer swallows its failure. Its first working run produced only two sort corrections in the T… block of each catalog, so no conflict with this PR's H…/U… edits.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Portuguese translation added in ee44a7b, replacing the English placeholders. Needs native-speaker review@piyalbasu is lining that up.

Label: Usage data sharing"Compartilhamento de dados de uso"

Disclosure:"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."

Reviewer: the one call worth a second opinion is the em-dash pair, and the two rendering choices called out below. Everything else follows terminology already in the catalog.


Translation rationale + verification (for reviewers)

Terminology taken from the existing catalog, not invented:

English Portuguese Precedent in pt/translation.json
Privacy Policy Política de Privacidade existing key, used verbatim
public key chave pública "Enter issuer public key or contract ID""Inserir chave pública do issuer…"
device dispositivo "Detect device""Detectar dispositivo"
wallet carteira "Add a wallet""Adicionar uma carteira"
extension extensão "…outside of the extension.""…fora da extensão."
Freighter o Freighter "O Freighter nunca pedirá sua chave secreta…" — catalog uses the definite article
data sharing Compartilhamento de dados the label this replaces was "Compartilhamento anônimo de dados"

Why the em-dash pair. In the English, with our analytics and crash-reporting providers attaches to sharing — not to the enumerated data. A comma-only Portuguese rendering leaves com nossos provedores stranded far from compartilhando, where it can be misread as scoping only the persistent ID. That would understate what is shared, which is exactly the class of error this PR exists to correct, so I kept the nesting explicit. The catalog already contains one em dash ("…as chaves da sua carteira—guarde-as com segurança…"), though unspaced; I used spaced dashes per standard Brazilian typography for a parenthetical aside.

If you'd rather avoid dashes entirely, the unambiguous alternative is to split into two sentences — same disclosure content, one extra sentence:

"Ajude-nos a melhorar o Freighter compartilhando dados de uso, do dispositivo e de atividade com nossos provedores de análise de dados e de relatórios de falhas. Esses dados incluem suas chaves públicas, endereço IP e um ID persistente que vincula sua carteira entre a extensão e o aplicativo móvel. Você pode desativar essa opção a qualquer momento. Consulte nossa Política de Privacidade para mais detalhes."

Two judgment calls a native speaker should confirm:

  1. mobileo aplicativo móvel. The catalog treats Freighter Mobile as a product name ("Apresentando Freighter Mobile"), but here extension and mobile names the two platforms generically, so I used the common noun. If the team wants the product name, this becomes entre a extensão e o Freighter Mobile.
  2. analytics providersprovedores de análise de dados, not provedores de analytics. The catalog does keep some English tech terms (issuer, trustline, popup), so analytics would not be out of place — I chose the Portuguese because this string is consumer-facing privacy copy rather than developer-facing UI.

Layout: the new label is 32 characters against the 33-character label it replaces, so the section title that renders inline with the toggle carries no new overflow risk.

Verification:

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

PR Preview build is ready: https://github.com/stellar/freighter/releases/tag/untagged-9e93ae5b135b2ed32e21 (SDF collaborators only — install instructions in the release description)

piyalbasu added a commit that referenced this pull request Jul 29, 2026
Addresses review feedback on #2922. Two deviations from the locale
workflow in extension/LOCALIZATION.MD:

- The two new keys were missing from pt/translation.json. Every other
  key (839/839 before this PR) exists in both catalogs, with the English
  string as the value where no translation exists yet (39 such keys).
  Added both keys to pt with English placeholder values, matching
  `useKeysAsDefaultValue: true` in webpack.extension.js — same rendered
  output as the fallbackLng path, but the catalogs stay aligned so
  `yarn build:translations` produces no diff.
- Both new en keys were inserted where the old "Anonymous data sharing"
  key sat (the `An…` block) rather than in sort order. Moved to their
  correct positions ("Help us improve…" after "Help", "Usage data
  sharing" after "Upload Contract Wasm") so `sort: true` is a no-op.

A reviewed Portuguese translation of the new label + disclosure remains
a follow-up; leaving unreviewed machine translation out of a privacy
disclosure on purpose.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
piyalbasu added a commit to stellar/freighter-mobile 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>
piyalbasu added a commit to stellar/freighter-mobile 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>
Squashed for the v5.44.0 release branch (retargeted from master). Renames the
data-sharing toggle from "Anonymous data sharing" to "Usage data sharing" and
replaces the disclosure copy with an accurate description of what is collected
(usage/device/activity data, public keys, IP, cross-platform persistent id) and
who receives it (analytics + crash-reporting providers). pt catalog updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
piyalbasu added a commit to stellar/freighter-mobile that referenced this pull request Jul 29, 2026
…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>
@piyalbasu
piyalbasu merged commit e98ed16 into v5.44.0 Jul 29, 2026
12 of 14 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
* v5.44.0

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

Squashed for the v5.44.0 release branch (retargeted from master). Renames the
data-sharing toggle from "Anonymous data sharing" to "Usage data sharing" and
replaces the disclosure copy with an accurate description of what is collected
(usage/device/activity data, public keys, IP, cross-platform persistent id) and
who receives it (analytics + crash-reporting providers). pt catalog updated.

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>
piyalbasu added a commit to stellar/freighter-mobile 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