@@ -28,7 +28,7 @@ public function postProcess()
2828 $ this ->ajaxRender (
2929 json_encode ([
3030 'success ' => false ,
31- 'message ' => $ this ->module -> l ('You aren \'t logged in ' , ' mywishlist ' ),
31+ 'message ' => $ this ->trans ('You aren \'t logged in ' , [], ' Modules.Blockwishlist.Shop ' ),
3232 ])
3333 );
3434 exit ;
@@ -45,7 +45,7 @@ public function postProcess()
4545 $ this ->ajaxRender (
4646 json_encode ([
4747 'success ' => false ,
48- 'message ' => $ this ->module -> l ( ' Unknow action ' , ' mywishlist ' ),
48+ 'message ' => $ this ->trans ( ' Unknown action ' , [], ' Modules.Blockwishlist.Shop ' ),
4949 ])
5050 );
5151 exit ;
@@ -83,7 +83,7 @@ private function addProductToWishListAction($params)
8383 return $ this ->ajaxRender (
8484 json_encode ([
8585 'success ' => false ,
86- 'message ' => $ this ->module -> l ('There was an error adding the product ' , ' mywishlist ' ),
86+ 'message ' => $ this ->trans ('There was an error adding the product ' , [], ' Modules.Blockwishlist.Shop ' ),
8787 ])
8888 );
8989 }
@@ -93,7 +93,7 @@ private function addProductToWishListAction($params)
9393 return $ this ->ajaxRender (
9494 json_encode ([
9595 'success ' => true ,
96- 'message ' => $ this ->module -> l ('Product added ' , ' mywishlist ' ),
96+ 'message ' => $ this ->trans ('Product added ' , [], ' Modules.Blockwishlist.Shop ' ),
9797 ])
9898 );
9999 }
@@ -112,7 +112,7 @@ private function createNewWishListAction($params)
112112 return $ this ->ajaxRender (
113113 json_encode ([
114114 'success ' => true ,
115- 'message ' => $ this ->module -> l ('The list has been properly created ' , ' mywishlist ' ),
115+ 'message ' => $ this ->trans ('The list has been properly created ' , [], ' Modules.Blockwishlist.Shop ' ),
116116 'datas ' => [
117117 'name ' => $ wishlist ->name ,
118118 'id_wishlist ' => $ wishlist ->id ,
@@ -124,14 +124,14 @@ private function createNewWishListAction($params)
124124 return $ this ->ajaxRender (
125125 json_encode ([
126126 'success ' => false ,
127- 'message ' => $ this ->module -> l ('Error saving the new wishlist ' , ' mywishlist ' ),
127+ 'message ' => $ this ->trans ('Error saving the new list ' , [], ' Modules.Blockwishlist.Shop ' ),
128128 ])
129129 );
130130 } else {
131131 return $ this ->ajaxRender (
132132 json_encode ([
133133 'success ' => false ,
134- 'message ' => $ this ->module -> l ('Missing name parameter ' , ' mywishlist ' ),
134+ 'message ' => $ this ->trans ('Missing name parameter ' , [], ' Modules.Blockwishlist.Shop ' ),
135135 ])
136136 );
137137 }
@@ -150,15 +150,15 @@ private function renameWishListAction($params)
150150 return $ this ->ajaxRender (
151151 json_encode ([
152152 'success ' => true ,
153- 'message ' => $ this ->module -> l ( ' WishList has been renamed ' , ' mywishlist ' ),
153+ 'message ' => $ this ->trans ( ' List has been renamed ' , [], ' Modules.Blockwishlist.Shop ' ),
154154 ])
155155 );
156156 }
157157
158158 return $ this ->ajaxRender (
159159 json_encode ([
160160 'success ' => false ,
161- 'message ' => $ this ->module -> l ( " WishList couldn't been renamed" , ' mywishlist ' ),
161+ 'message ' => $ this ->trans ( ' List could not be renamed' , [], ' Modules.Blockwishlist.Shop ' ),
162162 ])
163163 );
164164 }
@@ -178,15 +178,15 @@ private function deleteWishListAction($params)
178178 return $ this ->ajaxRender (
179179 json_encode ([
180180 'success ' => true ,
181- 'message ' => $ this ->module -> l ( ' WishList has been removed ' , ' mywishlist ' ),
181+ 'message ' => $ this ->trans ( ' List has been removed ' , [], ' Modules.Blockwishlist.Shop ' ),
182182 ])
183183 );
184184 }
185185
186186 return $ this ->ajaxRender (
187187 json_encode ([
188188 'success ' => false ,
189- 'message ' => $ this ->module -> l ( " WishList couldn't been removed " , ' mywishlist ' ),
189+ 'message ' => $ this ->trans ( ' List deletion was unsuccessful ' , [], ' Modules.Blockwishlist.Shop ' ),
190190 ])
191191 );
192192 }
@@ -217,15 +217,15 @@ private function deleteProductFromWishListAction($params)
217217 return $ this ->ajaxRender (
218218 json_encode ([
219219 'success ' => true ,
220- 'message ' => $ this ->module -> l ('Product succesfully removed ' , ' mywishlist ' ),
220+ 'message ' => $ this ->trans ('Product succesfully removed ' , [], ' Modules.Blockwishlist.Shop ' ),
221221 ])
222222 );
223223 }
224224
225225 return $ this ->ajaxRender (
226226 json_encode ([
227227 'success ' => false ,
228- 'message ' => $ this ->module -> l ('Unable to remove product from wishlist ' , ' mywishlist ' ),
228+ 'message ' => $ this ->trans ('Unable to remove product from list ' , [], ' Modules.Blockwishlist.Shop ' ),
229229 ])
230230 );
231231 }
@@ -259,15 +259,15 @@ private function updateProductFromWishListAction($params)
259259 return $ this ->ajaxRender (
260260 json_encode ([
261261 'success ' => true ,
262- 'message ' => $ this ->module -> l ('Product succesfully updated ' , ' mywishlist ' ),
262+ 'message ' => $ this ->trans ('Product succesfully updated ' , [], ' Modules.Blockwishlist.Shop ' ),
263263 ])
264264 );
265265 }
266266
267267 return $ this ->ajaxRender (
268268 json_encode ([
269269 'success ' => false ,
270- 'message ' => $ this ->module -> l ('Unable to update product from wishlist ' , ' mywishlist ' ),
270+ 'message ' => $ this ->trans ('Unable to update product from wishlist ' , [], ' Modules.Blockwishlist.Shop ' ),
271271 ])
272272 );
273273 }
@@ -317,7 +317,7 @@ private function ajaxRenderMissingParams()
317317 return $ this ->ajaxRender (
318318 json_encode ([
319319 'success ' => false ,
320- 'message ' => $ this ->module -> l ('Request is missing one or multiple parameters ' , ' mywishlist ' ),
320+ 'message ' => $ this ->trans ('Request is missing one or multiple parameters ' , [], ' Modules.Blockwishlist.Shop ' ),
321321 ])
322322 );
323323 }
@@ -345,14 +345,14 @@ private function addProductToCartAction($params)
345345 return $ this ->ajaxRender (
346346 json_encode ([
347347 'success ' => true ,
348- 'message ' => $ this ->module -> l ('Product added to cart ' ),
348+ 'message ' => $ this ->trans ('Product added to cart ' , [], ' Modules.Blockwishlist.Shop ' ),
349349 ])
350350 );
351351 } else {
352352 return $ this ->ajaxRender (
353353 json_encode ([
354354 'success ' => false ,
355- 'message ' => $ this ->module -> l ( ' error when adding product to cart ' ),
355+ 'message ' => $ this ->trans ( ' Error when adding product to cart' , [], ' Modules.Blockwishlist.Shop ' ),
356356 ])
357357 );
358358 }
@@ -384,7 +384,7 @@ private function assertWriteAccess(WishList $wishlist)
384384 $ this ->ajaxRender (
385385 json_encode ([
386386 'success ' => false ,
387- 'message ' => $ this ->module -> l ('You \'re not allowed to manage this list. ' , ' mywishlist ' ),
387+ 'message ' => $ this ->trans ('You \'re not allowed to manage this list. ' , [], ' Modules.Blockwishlist.Shop ' ),
388388 ])
389389 );
390390 exit ;
0 commit comments