strings in the query-suggestions and recent-searches plugins cannot be translated without replacing entire template
Closed this issue · 3 comments
justinedelson commented
Description
While autocomplete-js allows for the submit/clear button strings to be localized externally, there are strings in the query-suggestions and recent-searches plugins that cannot be localized.
recent-searches
- Remove this search
- Fill query with "${item.label}"
query-suggestions
- Fill query with "${item.query}"
Reproduction
There's not really a way to reproduce this cleanly since it is a gap in the API of these plugins.
Expected behavior
Plugins should allow for localized strings to be provided.
Environment
- OS: any
- Browser: any
- Autocomplete version: latest
Haroenv commented
That's a good point. Would you be willing to add a translations option as is the case for core? It was originally introduced in #581 for reference
justinedelson commented
Would you be willing to add a translations option as is the case for core?
Sure. Would you prefer one PR for both plugins or a separate PR per plugin?
Haroenv commented
One PR with tests for both plugins will be sufficient, thanks!