@@ -211,9 +211,9 @@ export default function TransactionHistoryPage() {
211211 onChange = { handleTypeChange }
212212 >
213213 < option value = "all" > { t ( 'history.filters.allTypes' ) } </ option >
214- < option value = "premium" > Premium </ option >
215- < option value = "payout" > Payout </ option >
216- < option value = "refund" > Refund </ option >
214+ < option value = "premium" > { t ( 'history.filters.types.premium' ) } </ option >
215+ < option value = "payout" > { t ( 'history.filters.types.payout' ) } </ option >
216+ < option value = "refund" > { t ( 'history.filters.types.refund' ) } </ option >
217217 </ select >
218218 </ div >
219219
@@ -228,9 +228,9 @@ export default function TransactionHistoryPage() {
228228 onChange = { handleStatusChange }
229229 >
230230 < option value = "all" > { t ( 'history.filters.allStatuses' ) } </ option >
231- < option value = "successful" > Successful </ option >
232- < option value = "pending" > Pending </ option >
233- < option value = "failed" > Failed </ option >
231+ < option value = "successful" > { t ( 'history.filters.statuses.successful' ) } </ option >
232+ < option value = "pending" > { t ( 'history.filters.statuses.pending' ) } </ option >
233+ < option value = "failed" > { t ( 'history.filters.statuses.failed' ) } </ option >
234234 </ select >
235235 </ div >
236236
@@ -329,16 +329,16 @@ export default function TransactionHistoryPage() {
329329 } }
330330 >
331331 < Icon name = "refresh" size = "sm" aria-hidden = "true" />
332- Clear filters
332+ { t ( 'history.empty.clearFilters' ) }
333333 </ button >
334334 ) : (
335335 < Link href = "/create" className = "cta-primary" >
336336 < Icon name = "plus" size = "sm" aria-hidden = "true" />
337- Create your first policy
337+ { t ( 'history.empty.createFirstPolicy' ) }
338338 </ Link >
339339 ) }
340340 < Link href = "/policies" className = "cta-secondary" >
341- View policies
341+ { t ( 'history.empty.viewPolicies' ) }
342342 </ Link >
343343 </ div >
344344 </ div >
@@ -421,11 +421,6 @@ export default function TransactionHistoryPage() {
421421 < React . Fragment key = { tx . id } >
422422 < tr
423423 className = { `tx-row ${ expandedId === tx . id ? 'tx-row--expanded' : '' } ` }
424- onClick = { ( ) =>
425- setExpandedId ( expandedId === tx . id ? null : tx . id )
426- }
427- style = { { cursor : 'pointer' } }
428- aria-expanded = { expandedId === tx . id }
429424 >
430425 < td data-label = "Date" > { formatDate ( tx . created_at ) } </ td >
431426 < td data-label = "Type" >
@@ -446,7 +441,6 @@ export default function TransactionHistoryPage() {
446441 target = "_blank"
447442 rel = "noopener noreferrer"
448443 className = "tx-hash-link"
449- onClick = { ( e ) => e . stopPropagation ( ) }
450444 aria-label = { `View transaction ${ shortenHash ( tx . transaction_hash ) } on Stellar Explorer` }
451445 >
452446 < span > { shortenHash ( tx . transaction_hash ) } </ span >
@@ -462,10 +456,15 @@ export default function TransactionHistoryPage() {
462456 < td data-label = "Details" >
463457 < button
464458 className = "tx-expand-btn"
459+ aria-expanded = { expandedId === tx . id }
460+ aria-controls = { `tx-detail-${ tx . id } ` }
465461 aria-label = { `${ expandedId === tx . id ? 'Collapse' : 'Expand' } transaction ${ tx . id } details` }
466- onClick = { ( e ) => {
467- e . stopPropagation ( ) ;
468- setExpandedId ( expandedId === tx . id ? null : tx . id ) ;
462+ onClick = { ( ) => setExpandedId ( expandedId === tx . id ? null : tx . id ) }
463+ onKeyDown = { ( e ) => {
464+ if ( e . key === 'Enter' || e . key === ' ' ) {
465+ e . preventDefault ( ) ;
466+ setExpandedId ( expandedId === tx . id ? null : tx . id ) ;
467+ }
469468 } }
470469 >
471470 < Icon
@@ -483,6 +482,8 @@ export default function TransactionHistoryPage() {
483482 { expandedId === tx . id && (
484483 < tr
485484 className = "tx-detail-row"
485+ id = { `tx-detail-${ tx . id } ` }
486+ role = "region"
486487 aria-label = "Transaction detail"
487488 >
488489 < td colSpan = { 6 } >
@@ -514,8 +515,7 @@ export default function TransactionHistoryPage() {
514515 />
515516 < div >
516517 < p className = "tx-detail-retry-message" >
517- This transaction failed. Would you like
518- to retry it?
518+ { t ( 'history.details.retryPrompt' ) }
519519 </ p >
520520 </ div >
521521 </ div >
@@ -531,22 +531,22 @@ export default function TransactionHistoryPage() {
531531 size = "sm"
532532 aria-hidden = "true"
533533 />
534- Start Retry
534+ { t ( 'history.details.startRetry' ) }
535535 </ button >
536536 </ div >
537537 ) }
538538 < div className = "tx-detail-grid" >
539539 < div >
540540 < span className = "tx-detail-label" >
541- Transaction ID
541+ { t ( 'history.details.transactionId' ) }
542542 </ span >
543543 < span className = "tx-detail-value" >
544544 #{ tx . id }
545545 </ span >
546546 </ div >
547547 < div >
548548 < span className = "tx-detail-label" >
549- Full Hash
549+ { t ( 'history.details.fullHash' ) }
550550 </ span >
551551 < span className = "tx-detail-value tx-detail-hash" >
552552 { tx . transaction_hash }
@@ -555,7 +555,7 @@ export default function TransactionHistoryPage() {
555555 { tx . policy_id && (
556556 < div >
557557 < span className = "tx-detail-label" >
558- Policy ID
558+ { t ( 'history.details.policyId' ) }
559559 </ span >
560560 < Link
561561 className = "tx-detail-link"
@@ -564,14 +564,14 @@ export default function TransactionHistoryPage() {
564564 event : React . MouseEvent < HTMLAnchorElement >
565565 ) => event . stopPropagation ( ) }
566566 >
567- #{ tx . policy_id } policy snapshot
567+ #{ tx . policy_id } { t ( 'history.details.policySnapshot' ) }
568568 </ Link >
569569 </ div >
570570 ) }
571571 { tx . claim_id && (
572572 < div >
573573 < span className = "tx-detail-label" >
574- Claim ID
574+ { t ( 'history.details.claimId' ) }
575575 </ span >
576576 < span className = "tx-detail-value" >
577577 #{ tx . claim_id }
@@ -580,15 +580,15 @@ export default function TransactionHistoryPage() {
580580 ) }
581581 < div >
582582 < span className = "tx-detail-label" >
583- Explorer
583+ { t ( 'history.details.explorer' ) }
584584 </ span >
585585 < a
586586 href = { `${ STELLAR_EXPLORER_BASE } ${ tx . transaction_hash } ` }
587587 target = "_blank"
588588 rel = "noopener noreferrer"
589589 className = "tx-detail-link tx-detail-link--with-icon"
590590 >
591- < span > View on Stellar Expert </ span >
591+ < span > { t ( 'history.details.viewOnStellarExpert' ) } </ span >
592592 < Icon
593593 name = "arrow-up-right"
594594 size = "sm"
@@ -620,7 +620,7 @@ export default function TransactionHistoryPage() {
620620 disabled = { page === 1 }
621621 aria-label = "Previous page"
622622 >
623- Prev
623+ { t ( 'history.pagination.prev' ) }
624624 </ button >
625625
626626 < div className = "tx-page-numbers" role = "list" >
@@ -664,14 +664,14 @@ export default function TransactionHistoryPage() {
664664 disabled = { page === totalPages }
665665 aria-label = "Next page"
666666 >
667- Next
667+ { t ( 'history.pagination.next' ) }
668668 </ button >
669669 </ nav >
670670 ) }
671671
672672 < p className = "tx-pagination-info" aria-live = "polite" >
673- Showing { Math . min ( ( page - 1 ) * PER_PAGE + 1 , total ) } -
674- { Math . min ( page * PER_PAGE , total ) } of { total }
673+ { t ( 'history.pagination.showing' ) } { Math . min ( ( page - 1 ) * PER_PAGE + 1 , total ) } -
674+ { Math . min ( page * PER_PAGE , total ) } { t ( 'history.pagination.of' ) } { total }
675675 </ p >
676676 </ main >
677677 ) ;
0 commit comments