File tree Expand file tree Collapse file tree 4 files changed +19
-7
lines changed
Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -2,40 +2,44 @@ interface NotificationOptions {
22 content : string
33}
44export function notifyError ( options : NotificationOptions ) {
5+ const { t } = useI18n ( )
56 const toast = useToast ( )
67
78 toast . add ( {
8- title : 'Error' ,
9+ title : t ( 'Error' ) ,
910 description : options . content ,
1011 color : 'error' ,
1112 } )
1213}
1314
1415export function notifySuccess ( options : NotificationOptions ) {
16+ const { t } = useI18n ( )
1517 const toast = useToast ( )
1618
1719 toast . add ( {
18- title : 'Success' ,
20+ title : t ( 'Success' ) ,
1921 description : options . content ,
2022 color : 'success' ,
2123 } )
2224}
2325
2426export function notifyWarning ( options : NotificationOptions ) {
27+ const { t } = useI18n ( )
2528 const toast = useToast ( )
2629
2730 toast . add ( {
28- title : 'Warning' ,
31+ title : t ( 'Warning' ) ,
2932 description : options . content ,
3033 color : 'warning' ,
3134 } )
3235}
3336
3437export function notifyInfo ( options : NotificationOptions ) {
38+ const { t } = useI18n ( )
3539 const toast = useToast ( )
3640
3741 toast . add ( {
38- title : 'Infor' ,
42+ title : t ( 'Infor' ) ,
3943 description : options . content ,
4044 color : 'info' ,
4145 } )
Original file line number Diff line number Diff line change 221221 "You are not subscribed to any monthly plan" : " You are not subscribed to any monthly plan" ,
222222 "View Subscriptions" : " View Subscriptions" ,
223223 "Most popular" : " Most popular" ,
224- "You are not authorized to perform this action." : " You are not authorized to perform this action."
224+ "You are not authorized to perform this action." : " You are not authorized to perform this action." ,
225+ "Error" : " Error" ,
226+ "Success" : " Success" ,
227+ "Warning" : " Warning" ,
228+ "Infor" : " Infor"
225229}
Original file line number Diff line number Diff line change 221221 "You are not subscribed to any monthly plan" : " Bạn chưa đăng ký gói hàng tháng nào" ,
222222 "View Subscriptions" : " Xem các gói đăng ký" ,
223223 "Most popular" : " Phổ biến nhất" ,
224- "You are not authorized to perform this action." : " Bạn không có quyền thực hiện hành động này."
224+ "You are not authorized to perform this action." : " Bạn không có quyền thực hiện hành động này." ,
225+ "Error" : " Lỗi" ,
226+ "Success" : " Thành công" ,
227+ "Warning" : " Cảnh báo" ,
228+ "Infor" : " Thông tin"
225229}
Original file line number Diff line number Diff line change 11{
22 "name" : " @thecodeorigin/nuxt" ,
33 "type" : " module" ,
4- "version" : " 2.5.5 " ,
4+ "version" : " 2.5.6 " ,
55 "publishConfig" : {
66 "registry" : " https://registry.npmjs.org" ,
77 "access" : " public"
You can’t perform that action at this time.
0 commit comments