fix: make hardcoded strings in home fragment dynamic

This commit is contained in:
Jaime García 2025-08-09 13:22:25 +02:00
parent bfd6f28d7a
commit 77ac195f32
No known key found for this signature in database
GPG key ID: BC4E5F71A71BDA5B
3 changed files with 9 additions and 3 deletions

View file

@ -80,13 +80,13 @@ public class HomeFragment extends Fragment {
private void initHomePager() {
HomePager pager = new HomePager(this);
pager.addFragment(new HomeTabMusicFragment(), "Music", R.drawable.ic_home);
pager.addFragment(new HomeTabMusicFragment(), getString(R.string.home_section_music), R.drawable.ic_home);
if (Preferences.isPodcastSectionVisible())
pager.addFragment(new HomeTabPodcastFragment(), "Podcast", R.drawable.ic_graphic_eq);
pager.addFragment(new HomeTabPodcastFragment(), getString(R.string.home_section_podcast), R.drawable.ic_graphic_eq);
if (Preferences.isRadioSectionVisible())
pager.addFragment(new HomeTabRadioFragment(), "Radio", R.drawable.ic_play_for_work);
pager.addFragment(new HomeTabRadioFragment(), getString(R.string.home_section_radio), R.drawable.ic_play_for_work);
bind.homeViewPager.setAdapter(pager);
bind.homeViewPager.setOffscreenPageLimit(3);

View file

@ -104,6 +104,9 @@
<string name="home_rearrangement_dialog_positive_button">Guardar</string>
<string name="home_rearrangement_dialog_title">Reorganizar la página de inicio</string>
<string name="home_rearrangement_dialog_subtitle">Tenga en cuenta que para que los cambios surtan efecto, hay que reiniciar la aplicación.</string>
<string name="home_section_music">Música</string>
<string name="home_section_podcast">Pódcasts</string>
<string name="home_section_radio">Radio</string>
<string name="home_subtitle_best_of">Mejores pistas de tus artistas favoritos</string>
<string name="home_subtitle_made_for_you">Iniciar mix desde una cación que te gustó</string>
<string name="home_subtitle_new_internet_radio_station">Añadir una nueva emisora de radio</string>

View file

@ -105,6 +105,9 @@
<string name="home_rearrangement_dialog_positive_button">Save</string>
<string name="home_rearrangement_dialog_title">Rearrange home</string>
<string name="home_rearrangement_dialog_subtitle">Please note that in order for the changes made to take effect, it is necessary to restart the application.</string>
<string name="home_section_music">Music</string>
<string name="home_section_podcast">Podcast</string>
<string name="home_section_radio">Radio</string>
<string name="home_subtitle_best_of">Top songs of your favorite artists</string>
<string name="home_subtitle_made_for_you">Start mix from a song you liked</string>
<string name="home_subtitle_new_internet_radio_station">Add a new radio</string>