helpers.translate() not working
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 12:06 AM
UX Client Script Translation Not Working in UI Builder Component
Issue
I'm having an issue with translations not working in a UX Client Script. I've installed the Brazilian Portuguese language pack (
com.snc.i18n.brazilian_portuguese
) and all necessary plugins, but the translations are not appearing in the UI.
Script Details
The script is part of a UI Builder component that handles "Watch Topics" refresh status:
<sys_ux_client_script action="INSERT_OR_UPDATE">
<includes/>
<macroponent display_value="Watch topics">d6f8cbf5e736201068c30b63c2f6a9d1</macroponent>
<name>Refresh Event Sucess Callback</name>
<required_translations>[ {
"message": "The Watch Topic refresh is in progress. Please check Refresh Status after some time."
} ]</required_translations>
<script><![CDATA[/**
* @Param {params} params
* @Param {api} params.api
* @Param {any} params.event
* @Param {any} params.imports
* @Param {ApiHelpers} params.helpers
*/
function handler({
api,
event,
helpers,
imports
}) {
api.setState("refreshStatus", "in_progress");
helpers.translate("The Watch Topic refresh is in progress. Please check Refresh Status after some time.").then((value) => {
api.emit("NOW_UXF_PAGE#ADD_NOTIFICATIONS", {
items: [{
"id": "alert-succeded-to-resolve",
"status": "info",
"icon": "info-circle-outline",
"content": value,
"action": {
"type": "dismiss"
}
}]
});
});
}]]></script>
<script_api_version>2.0.0</script_api_version>
<sys_class_name>sys_ux_client_script</sys_class_name>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2022-12-14 15:50:22</sys_created_on>
<sys_id>843dda89197b1110f877e171dd1ce98b</sys_id>
<sys_mod_count>5</sys_mod_count>
<sys_name>Refresh Event Sucess Callback</sys_name>
<sys_package display_value="Vulnerability Response" source="sn_vul">054cdcc2ff200200158bffffffffff94</sys_package>
<sys_policy/>
<sys_scope display_value="Vulnerability Response">054cdcc2ff200200158bffffffffff94</sys_scope>
<sys_update_name>sys_ux_client_script_843dda89197b1110f877e171dd1ce98b</sys_update_name>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2025-07-16 16:24:38</sys_updated_on>
<type>default</type>
</sys_ux_client_script>
Has anyone encountered a similar issue or knows what might be causing the translation function to not work correctly in UI Builder client scripts?
Has anyone encountered a similar issue or knows what might be causing the translation function to not work correctly in UI Builder client scripts?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 07:03 AM
Hi @SadikA344125392,
you said:
"but the translations are not appearing in the UI"
could you please be more specific about your issue?
———
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */