File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
packages/mux-uploader/src Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export const fileSelectFragment = /*html*/ `
3232
3333 </style>
3434
35- <button id="file-select" type="button" part="file-select-button"></button>
35+ <button id="file-select" type="button" part="file-select-button">Upload a video </button>
3636` ;
3737
3838const template = document . createElement ( 'template' ) ;
@@ -158,13 +158,7 @@ class MuxUploaderFileSelectElement extends globalThis.HTMLElement {
158158 const text = t ( 'Upload a video' , locale ) ;
159159
160160 if ( this . filePickerEl ) {
161- // Don't translate text if it's a custom button
162- const isCustomButton = ! this . shadowRoot ?. contains ( this . filePickerEl ) && this . filePickerEl . hasAttribute ( 'slot' ) ;
163-
164- if ( ! isCustomButton ) {
165- this . filePickerEl . textContent = text ;
166- }
167- } else {
161+ // Translate text only if it's the default button (inside the shadow DOM)
168162 const buttonEl = this . shadowRoot ?. querySelector ( '#file-select' ) as HTMLButtonElement ;
169163 if ( buttonEl ) {
170164 buttonEl . textContent = text ;
You can’t perform that action at this time.
0 commit comments