Fix locale types between dashboard and status-bar (#5878)

Ref:
https://github.com/transloadit/uppy/pull/5728#issuecomment-3031052997
Closes #5811
This commit is contained in:
Merlijn Vos 2025-08-05 16:22:57 +02:00 committed by GitHub
parent c4d97cd972
commit c15c6fd895
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 2 deletions

View file

@ -0,0 +1,6 @@
---
"@uppy/status-bar": patch
"@uppy/dashboard": patch
---
Make each entry in `strings` in locale type optional

View file

@ -171,7 +171,7 @@ interface DashboardMiscOptions<M extends Meta, B extends Body>
thumbnailWidth?: number
trigger?: string | Element | null
waitForThumbnailsBeforeUpload?: boolean
locale?: LocaleStrings<typeof locale> & typeof StatusBarLocale
locale?: LocaleStrings<typeof locale> & LocaleStrings<typeof StatusBarLocale>
}
export type DashboardOptions<

View file

@ -1,4 +1,5 @@
import type { UIPluginOptions } from '@uppy/core/lib/UIPlugin.js'
import type { LocaleStrings } from '@uppy/utils/lib/Translator'
import type StatusBarLocale from './locale.js'
export interface StatusBarOptions extends UIPluginOptions {
@ -9,5 +10,5 @@ export interface StatusBarOptions extends UIPluginOptions {
hidePauseResumeButton?: boolean
hideCancelButton?: boolean
doneButtonHandler?: (() => void) | null
locale?: typeof StatusBarLocale
locale?: LocaleStrings<typeof StatusBarLocale>
}