Automattic / Automattic/pocket-casts-android

Storage choice is persisted as localized string

Open
#741 1 comment 0 reactions 0 assignees View on GitHub
[Area] Settings [Priority] Low [Type] Bug
Dominant language
Kotlin
Stars
2.8k
Forks
308
Avg merge
1d 13h
Merged PRs (30d)
143

Description

### Description

When selecting a storage choice in the "Storage & data use" section of the app's settings, we are saving (and retrieving) the localized label for the storage choice. This means that if you set a storage choice with the OS under one language, and then switch the OS to a different language, the rest of the app updates to the new language, but your storage choice is still displayed in the previous language.

This is occurring because we persist (and retrieve) the _localized_ label for the storage choice in Shared Preferences under the `Settings.PREFERENCE_STORAGE_CHOICE` key.

### Step-by-step reproduction instructions

1. Go to the Profile tab → ⚙️ → "Storage & data use"
2. Select an option under "Store podcasts on"
3. Switch the language the OS is using
4. 💥 Observe that the selected option under "Store podcasts on" is still in the previous language.

### Screenshots or screen recording

[device-2023-01-30-173349.webm](https://user-images.githubusercontent.com/4656348/215611405-22719488-9fdc-4b2a-a7df-ffda4e5794e1.webm)

### Did you search for existing bug reports?

- [X] I have searched for existing bug reports.

### Device, Operating system, and Pocket Casts app version

Pixel 4 emulator running Android api 24, Pocket Casts 7.31 pre-release build.

Contributor guide

Open the contributing guide

Research direction

Search the codebase for Settings.PREFERENCE_STORAGE_CHOICE and trace where the storage choice is written to and read from Shared Preferences. Reproduce the language-switch scenario on the Storage & data use screen, then verify that a language-independent choice remains selected while its displayed label follows the current OS language.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
localization, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.