11export default {
22 icon : '<i class="fa-regular fa-eye-slash fa-lg"></i>' ,
33 name : {
4- en : "Create invisible text " ,
4+ en : "Create invisible message " ,
55 vi : "Tạo tin nhắn tàng hình" ,
66 } ,
77 description : {
8- en : "Create invisible text to hide messages. Receiver to use this feature to decode messages." ,
8+ en : "Create invisible text to hide secret messages. Receiver to use this feature to decode messages." ,
99 vi : "Tạo tin nhắn tàng hình, giúp ẩn đi thông tin quan trọng, người nhận cần dùng chức năng này để có thể giải mã." ,
1010 } ,
1111
@@ -15,14 +15,15 @@ export default {
1515
1616 popupScript : {
1717 onClick : async ( ) => {
18+ const { t } = await import ( "../popup/helpers/lang.js" ) ;
1819 Swal . fire ( {
1920 icon : "info" ,
20- title : "Tin nhắn tàng hình" ,
21- text : "Vui lòng chọn" ,
21+ title : t ( { vi : "Tin nhắn tàng hình" , en : "Invisible messages" } ) ,
22+ text : t ( { vi : "Vui lòng chọn" , en : "Please choose" } ) ,
2223 showDenyButton : true ,
2324 showCancelButton : false ,
24- confirmButtonText : "Tạo tin nhắn" ,
25- denyButtonText : "Giải mã tin nhắn" ,
25+ confirmButtonText : t ( { vi : "Tạo tin nhắn" , en : "Create message" } ) ,
26+ denyButtonText : t ( { vi : "Giải mã tin nhắn" , en : "Decode message" } ) ,
2627 } ) . then ( ( result ) => {
2728 if ( result . isConfirmed ) {
2829 doEncode ( ) ;
@@ -34,17 +35,29 @@ export default {
3435 function doEncode ( ) {
3536 Swal . fire ( {
3637 icon : "question" ,
37- title : "Nhập tin nhắn" ,
38- html : "Đặt ngoặc nhọn >< bao ngoài những nội dung muốn tành hình<br/><br/> Ví dụ: Hôm nay <b>>đi chơi không<</b> trời đẹp quá." ,
38+ title : t ( { vi : "Nhập tin nhắn" , en : "Enter message" } ) ,
39+ html : t ( {
40+ vi : "Đặt ngoặc nhọn >< bao ngoài những nội dung muốn tành hình<br/><br/> Ví dụ: Gọi tôi <b>>0123456789<</b> là Hoang." ,
41+ en : "Wrap text in >< to hide message<br/><br/> Example: Call me <b>>0123456789, abc street<</b> Jane." ,
42+ } ) ,
3943 input : "textarea" ,
4044 showCancelButton : true ,
4145 } ) . then ( ( result ) => {
4246 if ( result . isConfirmed ) {
4347 let encoded = encode ( result . value ) ;
4448 Swal . fire ( {
4549 icon : "success" ,
46- title : "Tạo tin tàng hình thành công" ,
47- html : result . value + "<br/> Bạn hãy copy và sử dụng nhé" ,
50+ title : t ( {
51+ vi : "Tạo tin tàng hình thành công" ,
52+ en : "Create invisible message successfully" ,
53+ } ) ,
54+ html :
55+ result . value +
56+ "<br/><br/>" +
57+ t ( {
58+ vi : " Bạn hãy copy và sử dụng nhé" ,
59+ en : " Please copy and use" ,
60+ } ) ,
4861 input : "textarea" ,
4962 inputValue : encoded ,
5063 } ) ;
@@ -72,7 +85,7 @@ export default {
7285 } else {
7386 Swal . fire ( {
7487 icon : "info" ,
75- title : "Tin nhắn này chưa được mã hoá " ,
88+ title : "Tin nhắn này không có nội dung tàng hình " ,
7689 text : result . value ,
7790 } ) ;
7891 }
0 commit comments