[Enhancement]: Server generated strings to be localized #2192

Closed
opened 2026-04-25 00:04:48 +02:00 by adam · 4 comments
Owner

Originally created by @nichwall on GitHub (Aug 19, 2024).

Type of Enhancement

None

Describe the Feature/Enhancement

Client strings are able to be translated, but strings generated by the server are not able to be translated right now. This was originally mentioned in https://github.com/advplyr/audiobookshelf/issues/3242 under point 5, where the Tasks are not translated.

Currently, Weblate is only looking at the string resource in client/strings/. We can add the localization for the client include these strings for the server, but having the server reference a resource file as ../client/strings feels a little clunky. Not sure what the best way to handle that is.

Why would this be helpful?

Ability to localize tasks and other server generated strings.

Future Implementation (Screenshot)

N/A

Audiobookshelf Server Version

v2.12.3

Current Implementation (Screenshot)

Task strings are generated by the server

image

Originally created by @nichwall on GitHub (Aug 19, 2024). ### Type of Enhancement None ### Describe the Feature/Enhancement Client strings are able to be translated, but strings generated by the server are not able to be translated right now. This was originally mentioned in https://github.com/advplyr/audiobookshelf/issues/3242 under point 5, where the Tasks are not translated. Currently, Weblate is only looking at the string resource in `client/strings/`. We can add the localization for the client include these strings for the server, but having the server reference a resource file as `../client/strings` feels a little clunky. Not sure what the best way to handle that is. ### Why would this be helpful? Ability to localize tasks and other server generated strings. ### Future Implementation (Screenshot) N/A ### Audiobookshelf Server Version v2.12.3 ### Current Implementation (Screenshot) Task strings are generated by the server ![image](https://github.com/user-attachments/assets/6ecc443e-ed43-400e-bb20-3f778955bff0)
adam added the enhancement label 2026-04-25 00:04:48 +02:00
adam closed this issue 2026-04-25 00:04:49 +02:00
Author
Owner

@advplyr commented on GitHub (Aug 19, 2024):

Since the client is where users are selecting their language (besides the server default language) the translation should remain client side.

The way I solved this for the home page shelves is with an additional labelStringKey for each shelf and that key maps to a string in client/strings/...
3rd party clients can optionally continue using the english only label or localize.

https://github.com/advplyr/audiobookshelf/blob/27b3a4414726a6a2778fb19e6038ce3ac1195aee/server/models/LibraryItem.js#L622-L629

It won't be exactly the same for these task descriptions since they also include a variable in the string, but a similar solution can be used.

@advplyr commented on GitHub (Aug 19, 2024): Since the client is where users are selecting their language (besides the server default language) the translation should remain client side. The way I solved this for the home page shelves is with an additional `labelStringKey` for each shelf and that key maps to a string in `client/strings/..`. 3rd party clients can optionally continue using the english only label or localize. https://github.com/advplyr/audiobookshelf/blob/27b3a4414726a6a2778fb19e6038ce3ac1195aee/server/models/LibraryItem.js#L622-L629 It won't be exactly the same for these task descriptions since they also include a variable in the string, but a similar solution can be used.
Author
Owner

@nichwall commented on GitHub (Aug 19, 2024):

Ah, great. Yeah, I specifically mean things like the watcher where it's hard coded, but something like you shared for the shelves should work.

https://github.com/advplyr/audiobookshelf/blob/27b3a4414726a6a2778fb19e6038ce3ac1195aee/server/Watcher.js#L287

@nichwall commented on GitHub (Aug 19, 2024): Ah, great. Yeah, I specifically mean things like the watcher where it's hard coded, but something like you shared for the shelves should work. https://github.com/advplyr/audiobookshelf/blob/27b3a4414726a6a2778fb19e6038ce3ac1195aee/server/Watcher.js#L287
Author
Owner

@advplyr commented on GitHub (Aug 19, 2024):

All the tasks made with the TaskManager are hard coded so whatever solution we come up with should work for all tasks and be an update to the Task object.

@advplyr commented on GitHub (Aug 19, 2024): All the tasks made with the TaskManager are hard coded so whatever solution we come up with should work for all tasks and be an update to the Task object.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 5, 2024):

Fixed in v2.14.0.

@github-actions[bot] commented on GitHub (Oct 5, 2024): Fixed in [v2.14.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.14.0).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#2192