Skip to content

feat: [IOPLT-1555] Properly handles app language selection and persistence#7817

Merged
CrisTofani merged 44 commits intomasterfrom
IOPLT-1555
Mar 13, 2026
Merged

feat: [IOPLT-1555] Properly handles app language selection and persistence#7817
CrisTofani merged 44 commits intomasterfrom
IOPLT-1555

Conversation

@CrisTofani
Copy link
Copy Markdown
Contributor

@CrisTofani CrisTofani commented Jan 29, 2026

Short description

This pull request refactors and simplifies the language and locale selection logic in the application streamlining related state management. It also cleans up unused saga code related to language preference synchronization and sets a default preferred language. The changes focus on improving maintainability and user experience for language selection in the preferences screen.

List of changes proposed in this pull request

  • Changes on the Language Selection screen
  • Removes Saga handler that update local language selection from saved profile language
  • split up the logical handle and preferences save

How to test

Change the selected language on Preferences > Preferred Language screen

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-03-02.at.15.58.01.mov

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 29, 2026

Jira Pull Request Link

This Pull Request refers to Jira issues:

@github-actions
Copy link
Copy Markdown
Contributor

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 54.54545% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.04%. Comparing base (d8da09a) to head (7d33270).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...preferences/screens/LanguagesPreferencesScreen.tsx 50.00% 14 Missing ⚠️
ts/components/ui/IOScrollViewWithLargeHeader.tsx 80.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7817      +/-   ##
==========================================
+ Coverage   60.02%   60.04%   +0.02%     
==========================================
  Files        1966     1966              
  Lines       43860    43844      -16     
  Branches    10144    10061      -83     
==========================================
+ Hits        26326    26327       +1     
+ Misses      17446    17438       -8     
+ Partials       88       79       -9     
Files with missing lines Coverage Δ
ts/config.ts 98.70% <ø> (-0.02%) ⬇️
ts/i18n.ts 100.00% <ø> (ø)
ts/sagas/preferences.ts 0.00% <ø> (ø)
ts/sagas/startup.ts 38.70% <ø> (+0.97%) ⬆️
ts/store/actions/persistedPreferences.ts 100.00% <ø> (ø)
ts/store/reducers/persistedPreferences.ts 72.58% <ø> (ø)
ts/components/ui/IOScrollViewWithLargeHeader.tsx 92.30% <80.00%> (-1.81%) ⬇️
...preferences/screens/LanguagesPreferencesScreen.tsx 58.46% <50.00%> (+1.31%) ⬆️

... and 11 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d8da09a...7d33270. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread ts/features/settings/preferences/screens/LanguagesPreferencesScreen.tsx Outdated
dmnplb
dmnplb previously approved these changes Mar 10, 2026
Copy link
Copy Markdown
Contributor

@dmnplb dmnplb left a comment

Choose a reason for hiding this comment

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

Just fixed some wrong (or missing) translations in the de and en locales, then added a logic to display the locales in the following order, according to the design specs:

  • it, en (pinned)
  • the other ones sorted alphabetically

In my opinion, we can release the new screen without hesitation ✌🏻

Copy link
Copy Markdown
Contributor

@LeleDallas LeleDallas left a comment

Choose a reason for hiding this comment

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

We can omit some unnecessary assertions

Comment thread ts/features/settings/preferences/screens/LanguagesPreferencesScreen.tsx Outdated
Comment thread ts/features/settings/preferences/screens/LanguagesPreferencesScreen.tsx Outdated
Comment thread ts/features/settings/preferences/screens/LanguagesPreferencesScreen.tsx Outdated
Comment thread ts/features/settings/preferences/screens/LanguagesPreferencesScreen.tsx Outdated
@CrisTofani
Copy link
Copy Markdown
Contributor Author

We can omit some unnecessary assertions

@LeleDallas All addressed in 9c35d21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i18n Activities related to internationalization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants