0

I am having a hard time finding out how to localize this string that appears to be coming from ember-power-select: "No results found"

"No results found" text in dropdown

This string is nowhere to be found in our app's codebase.

Searching around google did not yield any results, so, while the solution may be in the docs, it'd be nice to have an easy to find stack overflow page linking to it.

EDIT: In the docs, I see I should use the noMatchesMessage: http://ember-power-select.com/docs/api-reference (I'll also be setting loadingMessage and searchMessage)

HOWEVER

I don't know how to set these options globally.

Devin Rhode
  • 23,026
  • 8
  • 58
  • 72
  • Did you considered to extend the component by your default implementation to change the default `noMatchesMessage`? – jelhan Mar 30 '18 at 17:31
  • I did think of creating a new component that simply wraps power-select.. I guess that wouldn't be so bad, search and replace all `{{#power-select` references in *.hbs files with `{{#localized-power-select` – Devin Rhode Mar 30 '18 at 18:02
  • You could also create a component in your application with the same name that extends power-select. But could get confusing since application power-select component behaves different from docs then. Another option would be to reopen power-select component. – jelhan Mar 31 '18 at 08:25

1 Answers1

3

In the docs, use the noMatchesMessage: http://ember-power-select.com/docs/api-reference

Devin Rhode
  • 23,026
  • 8
  • 58
  • 72