mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-10 15:40:24 +00:00
Translate command label on top command dropdown menu (#1792)
* collect i18n with playwright * Add command label translation * Normalize i18n object key
This commit is contained in:
@@ -127,3 +127,11 @@ export function getPathDetails(path: string) {
|
||||
const fullFilename = path.split('/').pop() ?? path
|
||||
return { directory, fullFilename, ...getFilenameDetails(fullFilename) }
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes a string to be used as an i18n key.
|
||||
* Replaces dots with underscores.
|
||||
*/
|
||||
export function normalizeI18nKey(key: string) {
|
||||
return key.replace(/\./g, '_')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user