Add localized duration formatting and related string resources (#1571)
## Description Instead of using English-only duration format (e.g. `HHh MMm SSs`) in various places, I've added a format function that is based on several new localized resources keys. That includes: 1. Media runtime in Item view 2. Time remaining in Item view 3. End time in Player view 4. Time passed and time remained in Player view ### Related issues None ### Testing I installed the app on my Google TV Streamer, switched to my language, browsed all item views that I could think of to see that the duration labels are all localized in my language. I didn't commit those strings, I will do it through the Weblate after it will get merged. I also played a few items and saw that the labels there are localized as well. ## Screenshots It looks the same in English as before, currently no other language has custom resources for it yet. ## AI or LLM usage Used Claude Sonnet to detect places that I missed that are related to this localization change. Also it helped me to get access to my format function from various places in the code. --------- Co-authored-by: Damontecres <damontecres@gmail.com>
This commit is contained in:
parent
1d7ddd713b
commit
f6e00c7820
14 changed files with 86 additions and 25 deletions
|
|
@ -26,6 +26,12 @@
|
|||
<string name="continue_watching">Continue watching</string>
|
||||
<string name="critic_rating">Critic Rating</string>
|
||||
<string name="decimal_seconds">%.2f seconds</string>
|
||||
<string name="duration_hours_minutes_seconds">%1$dh %2$dm %3$ds</string>
|
||||
<string name="duration_hours_minutes">%1$dh %2$dm</string>
|
||||
<string name="duration_minutes_seconds">%1$dm %2$ds</string>
|
||||
<string name="duration_hours">%1$dh</string>
|
||||
<string name="duration_minutes">%1$dm</string>
|
||||
<string name="duration_seconds">%1$ds</string>
|
||||
<string name="default_track">Default</string>
|
||||
<string name="delete">Delete</string>
|
||||
<string name="died">Died</string>
|
||||
|
|
@ -144,6 +150,7 @@
|
|||
<string name="suggestions">Suggestions</string>
|
||||
<string name="switch_servers">Switch servers</string>
|
||||
<string name="switch_user">Switch</string>
|
||||
<string name="time_left">%1$s left</string>
|
||||
<string name="top_unwatched">Top Rated Unwatched</string>
|
||||
<string name="trailers_title">Trailers</string>
|
||||
<string name="tv_dvr_schedule">DVR Schedule</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue