Skip to content

Commit

Permalink
fix: Translation-Related Issues with daterange picker and SweetAlert (#…
Browse files Browse the repository at this point in the history
…2139)

* fix: Translation-Related Issues with dateramge picker

* fix: Translation-Related Issues with Dokan Sweetallert
  • Loading branch information
shohag121 authored Jan 23, 2024
1 parent 3c6bb3f commit 294befa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assets/src/js/dokan-daterangepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Set date range data.
let localeData = {
format : dokan_get_daterange_picker_format(),
...dokan_helper.locale
...dokan_helper.daterange_picker_local
};

// Date range picker handler.
Expand Down
1 change: 1 addition & 0 deletions assets/src/js/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@
showCancelButton : true,
confirmButtonColor:'#28a745',
cancelButtonColor :'#dc3545',
...dokan_helper.sweetalert_local
};

const args = { ...defaults, ...options };
Expand Down
7 changes: 7 additions & 0 deletions includes/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,13 @@ public function load_dokan_global_scripts() {
__( 'December', 'dokan-lite' ),
],
],
'sweetalert_local' => [
'cancelButtonText' => __( 'Cancel', 'dokan-lite' ),
'closeButtonText' => __( 'Close', 'dokan-lite' ),
'confirmButtonText' => __( 'OK', 'dokan-lite' ),
'denyButtonText' => __( 'No', 'dokan-lite' ),
'closeButtonAriaLabel' => __( 'Close this dialog', 'dokan-lite' ),
],
]
);

Expand Down

0 comments on commit 294befa

Please sign in to comment.