mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user