-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement]: Add Multi-Language Support for Yearly Overview Images in Statistics Section #3260
Comments
This one is a bit trickier since we are generating an image using HTML canvas with hard-coded pixel values. The translated text could be a lot longer causing overflow. For anyone that might want to tackle this one there are 4 YearInReview components. There may be a better way to generate the image but if we keep with this method I already wrote a function for checking the length of the text and truncating it if it overflows. audiobookshelf/client/components/stats/YearInReview.vue Lines 58 to 69 in e81b346
|
Like limiting how long the string can be in Weblate? I don't think there's a way to limit it per string. Weblate gives a warning if the source string (in English) and the destination string (in another language) have too big of a difference of character count, but it's not a hard limit. Part of the problem is also the width of specific characters, so even if both strings are 10 characters long, they will take a different amount of horizontal space. |
I want to say thank you for the really quick response and direct implementation! |
Type of Enhancement
Web Interface/Frontend
Describe the Feature/Enhancement
would like to propose adding language support for the statistics section, particularly the yearly overview images. Currently, these images are generated in English only. It would be great if they could also be available in other languages, such as German.
Why would this be helpful?
Adding language support for the yearly overview images would make the statistics more accessible and intuitive for non-English speakers. It would enhance the user experience by allowing users to interact with their listening data in their native language, making the platform more relatable and encouraging regular use.
Future Implementation (Screenshot)
I have attached a screenshot to help visualize the current implementation of the yearly overview images. The feature could potentially work by detecting the language settings of the user’s device or allowing the user to manually select their preferred language for the statistics display. This would then generate the yearly overview images in the chosen language.
Audiobookshelf Server Version
2.12.2
Current Implementation (Screenshot)
I have attached a screenshot to help visualize the current implementation of the yearly overview images. The feature could potentially work by detecting the language settings of the user’s device or allowing the user to manually select their preferred language for the statistics display. This would then generate the yearly overview images in the chosen language.
The text was updated successfully, but these errors were encountered: