| @@ -1,7 +1,8 @@ | ||
| 1 | 1 | import React, { ReactNode, useEffect } from "react"; |
| 2 | 2 | import { createPortal } from "react-dom"; |
| 3 | 3 | import { X } from "lucide-react"; |
| 4 | +import { __ } from "../../lib/i18n"; | |
| 4 | 5 | |
| 5 | 6 | type ModalSize = "sm" | "md" | "lg" | "xl" | "full"; |
| 6 | 7 | |
| 7 | 8 | const sizeClasses: Record<ModalSize, string> = { |
| @@ -111,9 +112,11 @@ | ||
| 111 | 112 | d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" |
| 112 | 113 | /> |
| 113 | 114 | </svg> |
| 114 | 115 | </div> |
| 115 | - <p className="text-red-600 dark:text-red-400 font-medium mb-2">Error</p> | |
| 116 | + <p className="text-red-600 dark:text-red-400 font-medium mb-2"> | |
| 117 | + {__("Error", "yatra")} | |
| 118 | + </p> | |
| 116 | 119 | <p className="text-gray-600 dark:text-gray-400 text-sm">{error}</p> |
| 117 | 120 | </div> |
| 118 | 121 | ) : null; |
| 119 | 122 | |
| @@ -153,9 +156,9 @@ | ||
| 153 | 156 | type="button" |
| 154 | 157 | onClick={onClose} |
| 155 | 158 | disabled={loading} |
| 156 | 159 | className="p-2 rounded-full text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 disabled:opacity-50 disabled:cursor-not-allowed" |
| 157 | - aria-label="Close modal" | |
| 160 | + aria-label={__("Close modal", "yatra")} | |
| 158 | 161 | > |
| 159 | 162 | <X className="w-5 h-5" /> |
| 160 | 163 | </button> |
| 161 | 164 | )} |