Customize Text Content Search results missing

I’ve tried, at various stages, to review and customise the text in the Narrative Bot process. Each time I failed to find the relevant files and became frustrated.

I have now realised that when you do a search in the ‘Text Content’ admin page, it only lists (I believe) the first 50 results. There is no pagination to search beyond this list, but no indication that there are further results or how to filter that list. Is this intentional?

Since there is no clear list of narrative bot filenames (that I know of), I simply searched for narrative and the majority of results relate to 8-ball and quotes. I couldn’t see a single relevant file.

Thankfully I found a link to part of the discobot welcome message, and using that insight I searched for new_user_narrative instead to find a whole list of text elements that I had never found before.

Is it correct that search results should be limited to the Top 50 with no indication that there were more results not showing?

Also, regarding the Narrative Bot, would it be possible to pull this process together in some way, or give some list of filenames and order, so we can edit it with a clear overview?

3 Likes

Sincerly I’ve zero difficult to find the text to translate or change inside the text content and I’ve never had 50 results to check.
When I don’t know the strings , I search for text or terms first (e.g. the first message of discobot is: “Thanks for joining Discourse Meta, and welcome!”, so I can search “Thanks for joining” with only 2 results:

If you know the text, that works. I did not have it specifically (in this case) but knew more or less what the code name should be, so searched for that.

I was not aware that I would be limited to 50 results, so when I found a long list of results, none of which contained the file(s) I was looking for, I was confused.

I just think it should be clear that these are not all the results, especially since I don’t think the search box uses Boolean and so you can’t use key terms, only exact text search

I don’t know if this is the correct way but you can search the strings that you can find on github for discobot.

For example take a look on the lines 147 and 148, you can search “reset_trigger” and “cert_title” and so on

For the rest, you have to wait for a team member to answer you, sorry.

3 Likes

Ooops wait a minute, I think I got a little too excited answering my search terms! I don’t think this is fixed, apologies :frowning:

Ah, I assumed it wasn’t working for me since it might not be updated on our site yet - will await further instructions :slight_smile:

2 Likes

This was probably never fixed and is super confusing when searching for a setting under the known group of settings, like user_notifications.

I was looking for a footer type setting and couldn’t find it, but only then realized that the setting I already edited before is also missing from the list (.header_instructions). Upon investigation I can confirm that the filter only shows 51 items in no particular order: they are ordered neither alphabetically nor by item order in the corresponding yml file.

Eventually I did look into https://github.com/discourse/discourse/blob/2312caccdc27f7947254a1a31baa61d3d5c94eb0/config/locales/server.en.yml#L2946 (and didn’t find what I was looking for), but looking directly in the yml file is cumbersome as there are literally thousands of settings there.

If it is possible it would be very helpful if the filtered list could be improved by either:

  • showing the complete list (probably a bad idea for short search terms)
  • showing first 50 alphabetically ordered results with the button at the bottom to “Load next 50”
  • a disclaimer at the bottom: “More than 50 results found, please refine search term”.
3 Likes

We do this in site settings, and it works quite well there. Perhaps we can add support for it here too?

3 Likes

Would love to work on this if okay.

EDIT: Opened a PR :slight_smile:

https://github.com/discourse/discourse/pull/7136

2 Likes

This topic was automatically closed after 2536 days. New replies are no longer allowed.