Skip to content

Localize search section titles - #4360

Open
asetsiya wants to merge 1 commit into
MetrolistGroup:mainfrom
asetsiya:localize-search-titles
Open

asetsiya wants to merge 1 commit into
MetrolistGroup:mainfrom
asetsiya:localize-search-titles

Conversation

@asetsiya

@asetsiya asetsiya commented Sep 9, 2026

Copy link
Copy Markdown

Problem

Search section titles (e.g. "Top result", "Songs", "Albums") were displayed as hardcoded English strings, making them impossible to localize.

Cause

The raw internal string identifiers were being used directly as the UI display text.

Solution

  • Re-opened and cleaned up the changes from stale PR Localize search section titles #4213 directly on top of the latest main.
  • Reused existing string resources (e.g., filter_videos, filter_podcasts, etc.) instead of creating new ones. Added only the missing base strings (top_result and other) to app/src/main/res/values/metrolist_strings.xml in accordance with the project's Weblate policy.

Testing

Verified clean Android build and confirmed search section titles render localized strings correctly while maintaining original grouping and sorting logic.

Related Issues

Summary by CodeRabbit

  • New Features
    • Search section headers are now localized on the online search screen.
    • Added localized labels for top results and other results, along with categories such as songs, videos, albums, artists, playlists, podcasts, episodes, and profiles.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: db46c5e1-7d98-49f0-9012-4c3d9e66420f

📥 Commits

Reviewing files that changed from the base of the PR and between 7c5ba3a and b5374fc.

📒 Files selected for processing (2)
  • app/src/main/kotlin/com/metrolist/music/ui/screens/search/OnlineSearchResult.kt
  • app/src/main/res/values/metrolist_strings.xml

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The online search screen now localizes known section titles during rendering. Unknown titles remain unchanged. Two missing English string resources were added.

Changes

Search section localization

Layer / File(s) Summary
Localized section rendering
app/src/main/kotlin/com/metrolist/music/ui/screens/search/OnlineSearchResult.kt, app/src/main/res/values/metrolist_strings.xml
The navigation title maps known YouTube section identifiers to localized resources and falls back to the original title. The top_result and other resources were added.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to b5374

Search section headings now display localized labels without changing grouping, sorting, or ordering behavior. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the primary change: localizing search section titles.
Description check ✅ Passed The description includes the required Problem, Cause, Solution, Testing, and Related Issues sections. It explains the issue, implementation, and reported validation.
Linked Issues check ✅ Passed The changes satisfy issue #4213. They localize titles at UI rendering time, preserve internal identifiers and search behavior, and add the missing string resources.
Out of Scope Changes check ✅ Passed The changes are limited to search section title localization and the required string resources. No unrelated code changes are identified.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant