Skip to content

Commit 57e3ea9

Browse files
committed
Merge branch 'dev' into release/1.33.5
2 parents e1d898b + 1e8d01c commit 57e3ea9

84 files changed

Lines changed: 2238 additions & 1313 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎ARCHITECTURE.md‎

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,35 @@ The design system provides:
614614

615615
`SessionMaterialTheme` installs both the custom tokens and Material 3. Most Compose entry points use `setThemedContent { ... }` so screens can remain thin.
616616

617-
## 13. Dependency Injection
617+
## 13. Localization and Translations
618+
619+
UI strings are managed on **Crowdin** (project ID `618696`), not in this repo. This matters because the string resources here are **generated artifacts**, not editable sources.
620+
621+
### Source of truth
622+
623+
Every `app/src/main/res/values*/strings.xml` — including the base English `values/strings.xml` — plus `NonTranslatableStringConstants.kt` (the `{app_name}`, `{entity_stf_short}`, … substitution values) is generated from Crowdin. **Do not hand-edit these files**; changes are overwritten on the next sync. String source text (English) and translations are both authored/managed on Crowdin.
624+
625+
### The sync automation lives in a different repo
626+
627+
There is no Crowdin workflow in this repo. The automation is in **`session-foundation/session-shared-scripts`**, workflow `.github/workflows/check_for_crowdin_updates.yml`:
628+
629+
- Triggers: scheduled (Mondays 00:00 UTC) or manual `workflow_dispatch` (input `UPDATE_PULL_REQUESTS=true`).
630+
- Downloads from Crowdin, regenerates all `values*/strings.xml` + `NonTranslatableStringConstants.kt` (`crowdin/generate_android_strings.py`), validates via a gradle resource build, then opens/updates a PR using `peter-evans/create-pull-request`.
631+
- The PR targets the fixed head branch `feature/update-crowdin-translations` → `dev`, opened by the `stfsession` service account. Because the branch is fixed, there is only ever one open translations PR at a time; a re-run updates it in place (unless the previous one was already merged).
632+
- The same run produces the equivalent PRs for iOS and the desktop localization module.
633+
634+
### Approved-only export
635+
636+
The download requests translations with `exportApprovedOnly=true` and `skipUntranslatedStrings=true`. Consequently, machine/AI pre-translations are **excluded until a proofreader approves them** in Crowdin — unapproved strings are treated as untranslated and dropped. Approval requires a Proofreader/Manager role on the Crowdin project. (A helper for bulk-approving specific string identifiers lives at `session-shared-scripts/crowdin/approve_strings.py`.)
637+
638+
### Shipping a text change
639+
640+
1. Edit/add the source strings on Crowdin (new copy usually warrants **new string keys** — reusing a key keeps its now-stale translations, which will resurface as mismatched text).
641+
2. Approve the translations you want (see above), or they won't export.
642+
3. Run `check_for_crowdin_updates.yml` and merge the resulting Crowdin PR — this brings the keys into `strings.xml`.
643+
4. Only then merge any code referencing the new keys (`R.string.<key>` won't compile until the sync has landed them).
644+
645+
## 14. Dependency Injection
618646

619647
Hilt is the application-wide DI framework.
620648

@@ -629,7 +657,7 @@ Important modules include:
629657

630658
The most important architectural convention here is not just "use Hilt", but "inject long-lived managers plus a manager-scoped coroutine scope and let them expose reactive state."
631659

632-
## 14. Other Important Runtime Components
660+
## 15. Other Important Runtime Components
633661

634662
- `ExpiringMessageManager`: disappearing-message lifecycle
635663
- `AvatarUploadManager`: avatar upload/sync behavior
@@ -640,7 +668,7 @@ The most important architectural convention here is not just "use Hilt", but "in
640668

641669
If a bug seems to "happen in the background" but does not fit config, polling, notifications, or Pro, it often lives in one of these auth-aware managers.
642670

643-
## 15. End-to-End Flow Summaries
671+
## 16. End-to-End Flow Summaries
644672

645673
### App startup and login
646674

@@ -695,7 +723,7 @@ User action
695723
-> reactive flows refresh UI
696724
```
697725

698-
## 16. Practical Notes for new Developers
726+
## 17. Practical Notes for new Developers
699727

700728
For a new developer, the highest-value mental model is:
701729

‎app/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,11 @@ interface TextSecurePreferences {
364364

365365

366366
// Donation
367-
const val HAS_DONATED = "has_donated_v3"
368-
const val HAS_COPIED_DONATION_URL = "has_copied_donation_url_v3"
369-
const val SEEN_DONATION_CTA_AMOUNT = "seen_donation_cta_amount_v3"
370-
const val LAST_SEEN_DONATION_CTA = "last_seen_donation_cta_v3"
371-
const val SHOW_DONATION_CTA_FROM_POSITIVE_REVIEW = "show_donation_cta_from_positive_review_v3"
367+
const val HAS_DONATED = "has_donated_v4"
368+
const val HAS_COPIED_DONATION_URL = "has_copied_donation_url_v4"
369+
const val SEEN_DONATION_CTA_AMOUNT = "seen_donation_cta_amount_v4"
370+
const val LAST_SEEN_DONATION_CTA = "last_seen_donation_cta_v4"
371+
const val SHOW_DONATION_CTA_FROM_POSITIVE_REVIEW = "show_donation_cta_from_positive_review_v4"
372372

373373
const val DEBUG_HAS_DONATED = "debug_has_donated"
374374
const val DEBUG_HAS_COPIED_DONATION_URL = "debug_has_copied_donation_url"

‎app/src/main/java/org/thoughtcrime/securesms/home/HomeDialogs.kt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,11 @@ fun DonationDialog(
276276
sendCommand(HideDonationCTADialog)
277277
}
278278

279-
val title = Phrase.from(context,R.string.finalAppeal)
279+
val title = Phrase.from(context,R.string.ongoingAppeal)
280280
.put(StringSubstitutionConstants.APP_NAME_KEY, NonTranslatableStringConstants.APP_NAME)
281281
.format()
282282

283-
val text = Phrase.from(context,R.string.finalAppealDescription)
283+
val text = Phrase.from(context,R.string.ongoingAppealDescription)
284284
.put(StringSubstitutionConstants.ENTITY_STF_SHORT_KEY, NonTranslatableStringConstants.ENTITY_STF_SHORT)
285285
.put(StringSubstitutionConstants.APP_NAME_KEY, NonTranslatableStringConstants.APP_NAME)
286286
.format()
179 KB
Loading

‎app/src/main/res/values-b+af+ZA/strings.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,8 @@
623623
<string name="onboardingPrivacy">Privaatheidsbeleid</string>
624624
<string name="onboardingTos">Diensvoorwaardes</string>
625625
<string name="onboardingTosPrivacy">Deur hierdie diens te gebruik, stem jy in tot ons <b>Diensvoorwaardes</b> en <b>Privaatheidsbeleid</b></string>
626+
<string name="ongoingAppeal">Nuwe hoop vir {app_name}</string>
627+
<string name="ongoingAppealDescription">Toe dit gelyk het of {app_name} dalk sou verdwyn, het jy ingespring.\n\nJou skenkings het die {entity_stf_short} genoeg befondsing gegee om \'n klein span bydraers in staat te stel om die toepassing te onderhou.\n\nOp die oomblik is die fokus daarop om {app_name} veilig, stabiel en aanlyn te hou.\n\nJou skenkings kan help om {app_name} in hierdie kritieke tyd te ondersteun. Bykomende skenkings kan dit moontlik maak om nog ontwikkelaars aan te stel en help om die funksies te lewer wat nodig is om {app_name} vinniger te bevorder.</string>
626628
<string name="onionRoutingPath">Pad</string>
627629
<string name="onionRoutingPathDescription">{app_name} versteek jou IP deur jou boodskappe deur verskeie Service Nodes in {app_name} se gedesentraliseerde netwerk te stuur. Dit is jou huidige pad:</string>
628630
<string name="onionRoutingPathDestination">Bestemming</string>

0 commit comments

Comments
 (0)