File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8989 </ ul >
9090 </ div >
9191
92- < button id ="btnLoadNew " class ="btn btn-outline-light btn-sm " type ="button " data-i18n-title ="navbar.loadAnother ">
92+ < button id ="btnLoadNew " class ="btn btn-outline-light btn-sm " type ="button "
93+ data-bs-toggle ="tooltip " data-bs-placement ="bottom " data-i18n-title ="navbar.loadAnother ">
9394 < i class ="bi bi-escape me-1 "> </ i >
9495 < span class ="d-none d-sm-inline " data-i18n ="navbar.newFile "> Exit</ span >
9596 </ button >
Original file line number Diff line number Diff line change 10921092 if ( elements . btnNewWindow ) {
10931093 new bootstrap . Tooltip ( elements . btnNewWindow ) ;
10941094 }
1095+ if ( elements . btnLoadNew ) {
1096+ new bootstrap . Tooltip ( elements . btnLoadNew ) ;
1097+ }
10951098
10961099 // Setup language selector
10971100 setupLanguageSelector ( ) ;
Original file line number Diff line number Diff line change @@ -143,10 +143,17 @@ const i18n = (function() {
143143 element . placeholder = t ( key ) ;
144144 } ) ;
145145
146- // Update titles
146+ // Update titles and Bootstrap tooltips
147147 document . querySelectorAll ( '[data-i18n-title]' ) . forEach ( element => {
148148 const key = element . getAttribute ( 'data-i18n-title' ) ;
149- element . title = t ( key ) ;
149+ const newTitle = t ( key ) ;
150+ element . title = newTitle ;
151+
152+ // Update Bootstrap tooltip instance if it exists
153+ const tooltipInstance = bootstrap . Tooltip . getInstance ( element ) ;
154+ if ( tooltipInstance ) {
155+ tooltipInstance . setContent ( { '.tooltip-inner' : newTitle } ) ;
156+ }
150157 } ) ;
151158
152159 // Update aria-labels
You can’t perform that action at this time.
0 commit comments