Skip to main content

Just getting started with setting up our new site theme, and right above the search bar is the text “Hi, how can we help you?”

In the portal_home file, there is code that sets the value of the search text: 

{% assign search_text = 'portal_translations.banner.search_text' | t %}

{{ portal | search_element: search_text }}

I can’t find where to go to edit the portal_translations object, which I assume is a data file with all the UI strings. There’s not even an <h1> element available so I can hard code the text. 
 

An email from support suggested we use a jQuery search/replace to edit the text, but I have a hard time believing that the only way for us to manage content is by running a client side script. 

I’m running into the exact same problem. Can somebody please help?

And frankly editing such strings by inputting a jQuery feels like hacking...


From what I have learned, the Freshdesk pages are based on the Shopify Liquid templating language and I believe the “| t” simply pulls a translation from a .liquid file that we have no access to update. 

It holds the translations for many of the portal prompts and I think it simply looks up the term “Hi, how can we help you?” in that file and displays the translated equivalent of that exact phrase.

We don’t need the heading nor ans translations of it so I simply cleared it:

{% assign search_text = 'portal_translations.banner.search_text' | t %}

<!-- (remove "Hi, how can we help you?" text) -->{% assign search_text = ''%}      

{{ portal | search_element: search_text }}

I think if you want to change the prompt and have it support your various portal languages, you’ll need to use a case condition as per https://shopify.github.io/liquid/tags/control-flow/ checking for the users selected language and set the ‘search_text’ to your translated equiv.

Something like this (please bear in mind this is untested but should work).

{% assign search_text = 'portal_translations.banner.search_text' | t %}

{% case {{portal.current_language.code}} %}

  {% when "fr" %}

     {% assign search_text = 'Comment pouvons-nous aider?' %}

  {% else %}

     {% assign search_text = 'How can we help?' %}

{% endcase %}    

{{ portal | search_element: search_text }}

 


Reply