File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed
Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ export const $api = $fetch.create({
1414 options . headers . set ( 'Csrf-Token' , authStore . crsfToken )
1515 } ,
1616 async onResponseError ( error ) {
17+ const { t } = useI18n ( )
18+
1719 const isRequestFromExternalUrl = ! String ( error . response . url ) . startsWith ( String ( useRuntimeConfig ( ) . public . appBaseUrl ) )
1820 switch ( error . response ?. status ) {
1921 case 401 :
@@ -28,13 +30,13 @@ export const $api = $fetch.create({
2830 navigateTo ( { path : '/sign-in' } , { external : true } )
2931
3032 notifyError ( {
31- content : 'You are not authorized to perform this action.' ,
33+ content : t ( 'You are not authorized to perform this action.' ) ,
3234 } )
3335 }
3436 break
3537 default :
3638 notifyError ( {
37- content : getErrorMessage ( error ) ,
39+ content : t ( getErrorMessage ( error ) ) ,
3840 } )
3941 break
4042 }
Original file line number Diff line number Diff line change 220220 "days remaining" : " days remaining" ,
221221 "You are not subscribed to any monthly plan" : " You are not subscribed to any monthly plan" ,
222222 "View Subscriptions" : " View Subscriptions" ,
223- "Most popular" : " Most popular"
223+ "Most popular" : " Most popular" ,
224+ "You are not authorized to perform this action." : " You are not authorized to perform this action."
224225}
Original file line number Diff line number Diff line change 220220 "days remaining" : " ngày còn lại" ,
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ý" ,
223- "Most popular" : " Phổ biến nhất"
223+ "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."
224225}
Original file line number Diff line number Diff line change 11{
22 "name" : " @thecodeorigin/nuxt" ,
33 "type" : " module" ,
4- "version" : " 2.4.1 " ,
4+ "version" : " 2.4.2 " ,
55 "publishConfig" : {
66 "registry" : " https://registry.npmjs.org" ,
77 "access" : " public"
You can’t perform that action at this time.
0 commit comments