Skip to content
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

Search Refiners checkbox label language is not translated. #238

Open
1 of 3 tasks
AhmedAldhubaibi opened this issue Jul 26, 2019 · 8 comments
Open
1 of 3 tasks

Search Refiners checkbox label language is not translated. #238

AhmedAldhubaibi opened this issue Jul 26, 2019 · 8 comments

Comments

@AhmedAldhubaibi
Copy link

AhmedAldhubaibi commented Jul 26, 2019

Category

  • Question
  • Bug
  • Enhancement

I am using the modern search web part and I have added a search refiners web part. The problem is that, the result checkbox labels are not being translated.

Hier are my used managed properties for date and size:
edit refiners

The results options are being displayed in English:

Englich labels

For the managed properties Created and Size there are no ows_taxid properties. Also There are no labels translation in loc file for these values.

I know that these values (or later, and up ..) are coming form the api search results. Any suggestions?

Authors

@FranckyC @VesaJuvonen

@FranckyC
Copy link
Member

FranckyC commented Jul 26, 2019

Hi @AhmedAldhubaibi, you're right, these values comes directly from the search call response and we don't translate them in the current code. Maybe we could format the output using custom code and current locale for instance, using moment.js. @wobba, can we get these strings according to current locale? Is there any search parameter we can use?

@wobba
Copy link
Contributor

wobba commented Jul 26, 2019

I always assumed query language should impact these. Are we passing lcid on query?

@FranckyC
Copy link
Member

FranckyC commented Jul 26, 2019 via email

@wobba
Copy link
Contributor

wobba commented Aug 5, 2019

Did some tests and seems they are always returned in English, which means we need to provide string replacement translations for them:

  • From
  • Before
  • up to
  • or later

@AhmedAldhubaibi
Copy link
Author

Did some tests and seems they are always returned in English, which means we need to provide string replacement translations for them:

  • From
  • Before
  • up to
  • or later

These phrases and also many others are not the only matter regarding this issue. I mean the core functionality of the search refiners needs to be improved. Consider that the key user wants to filter .docx and .pdf files at the same time, which is not possible in the current logic of the search refiners web part. So as soon as you select .docx another request will immediately occurs to fetch new refiners values for .docx until you soon reaches "any value" refiner. The Size refiner is always returned in Byte values which is somehow a little misleading thing.

So my suggestion is that we actually need to keep the refiner's being dynamically fetched from the search api and at the same time having the possibility to multi filter and be able to use localization for the resources. Something like this:

Suggestion

@FranckyC
Copy link
Member

FranckyC commented Aug 5, 2019

Consider that the key user wants to filter .docx and .pdf files at the same time, which is not possible in the current logic of the search refiners web part.

Or you can select the 'multi-value item refinement' template... The current logic follows the SharePoint one based on classic search web parts. For the 'Size' refiner, it is here a special scenario an yes maybe I should provide a more human readable output format. If you have ideas, don't hesitate to make a PR ;)

@AhmedAldhubaibi
Copy link
Author

Consider that the key user wants to filter .docx and .pdf files at the same time, which is not possible in the current logic of the search refiners web part.

Or you can select the 'multi-value item refinement' template... The current logic follows the SharePoint one based on classic search web parts. For the 'Size' refiner, it is here a special scenario an yes maybe I should provide a more human readable output format. If you have ideas, don't hesitate to make a PR ;)

I know that we can use the multi value refiner template, but unfortunately we cannot use two multi filters at the same time since the last one will always overwrite the other/s.

@FranckyC
Copy link
Member

FranckyC commented Aug 8, 2019

I'll see if I can make the 'Apply' button applying all selected filters at once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants