Fix: revert st function change (#7387)

Update the 'st' function to use fallback message correctly.

## Summary

Will follow-up to figure out why some custom node descriptions trigger
an issue here.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7387-Fix-revert-st-function-change-2c66d73d3650816991a3ecc2a4740716)
by [Unito](https://www.unito.io)
This commit is contained in:
Alexander Brown
2025-12-11 11:32:54 -08:00
committed by GitHub
parent 8ba8b21fa0
commit ca5f24fcd9

View File

@@ -205,8 +205,8 @@ export const { t, te, d } = i18n.global
*
* @param key - The key to translate.
* @param fallbackMessage - The fallback message to use if the key is not found.
* @deprecated Remove, use the defaultMsg overload
*/
export function st(key: string, fallbackMessage: string) {
return t(key, fallbackMessage)
// The normal defaultMsg overload fails in some cases for custom nodes
return te(key) ? t(key) : fallbackMessage
}