Skip to content

Refactor app localization, resource cleanup, and UI localizations#2321

Merged
theovilardo merged 6 commits into
PixelPlayerHQ:masterfrom
adlifarizi:integration/localization
Jun 11, 2026
Merged

Refactor app localization, resource cleanup, and UI localizations#2321
theovilardo merged 6 commits into
PixelPlayerHQ:masterfrom
adlifarizi:integration/localization

Conversation

@adlifarizi

Copy link
Copy Markdown
Contributor

Overview

This PR focuses on improving and cleaning up the application's localization architecture. It reorganizes string resource files to be more modular/feature-based, refactors core UI components (Navigation, Library Tabs, and Sort Options) to support dynamic localization, and updates time/duration formatting to respect user locales and system 12/24-hour preferences.

Note

The large diff size (~28k insertions, ~30k deletions) is primarily due to the cleanup and migration of string resources from batch-based monolithic files (strings_presentation_batch_*.xml) to feature-focused resource files (e.g., strings_home_screen.xml, strings_library.xml).


Key Changes

1. String Resource Migration & Modularization

  • Removed deprecated strings_presentation_batch_*.xml files and consolidated translations into modular files such as strings_home_screen.xml, strings_library.xml, strings_player.xml, strings_settings.xml, strings_equalizer.xml, etc.
  • Cleaned up the Python migration script (migrate_presentation_strings.py) used during the transition.

2. Navigation, Library Tabs, and Sorting Localization

  • Refactored LibraryTabId and SortOption data models to use resource ID references rather than hardcoded string labels.
  • Localized the bottom/internal navigation bar labels, library tabs, and sorting sheets dynamically.
  • Added localization translations across all supported languages (DE, ES, FR, IN, IT, KO, NB, RU, TR, ZH-CN).

3. Localized Time, Duration, and 12/24h Prefs

  • Updated Formats.kt to localize duration and time formatting based on device locale.
  • Supported system 12-hour/24-hour display preferences in the statistics panels (StatsScreen, StatsOverviewCard).
  • Localized header/time-range components in stats and home screen modules.

4. UI changes

  • Updated some UI like CollapsibleCommonTopBar and PlaylistContainer which were affected by localization
  • Delete some UI kotlin files as we doesn't use them anymore (AiMetadataSheet.kt, ExpressiveSongListItem.kt, and SelectionHeader.kt)

All changes during the refactoring process have been merged/rebased with master branch and the latest commit.

@theovilardo

Copy link
Copy Markdown
Collaborator

Hi! There's some conflicts so I can't currently merge this

@adlifarizi

Copy link
Copy Markdown
Contributor Author

Hi! There's some conflicts so I can't currently merge this

I'll check it

@adlifarizi

adlifarizi commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

I merged branch master to resolve conflict where file tools/migrate_presentation_strings.py is deleted in this PR since we don't use it anymore (only used when first migrating string resources by lostf1sh)

@theovilardo theovilardo merged commit 2539685 into PixelPlayerHQ:master Jun 11, 2026
5 checks passed
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.

2 participants