From fb6d47409f61dde343433e147ea5949beca8014b Mon Sep 17 00:00:00 2001 From: kirukib Date: Sun, 21 Dec 2025 23:47:01 +0300 Subject: [PATCH] lang-option --- src/App.tsx | 11 +- src/components/checkout/CheckoutPage.tsx | 70 +-- src/components/checkout/DonationSection.tsx | 13 +- src/components/checkout/PromotionalPanel.tsx | 17 +- src/components/checkout/RequesterDetails.tsx | 51 +- src/components/checkout/SuccessPage.tsx | 30 +- src/contexts/LanguageContext.tsx | 574 +++++++++++++++++++ 7 files changed, 675 insertions(+), 91 deletions(-) create mode 100644 src/contexts/LanguageContext.tsx diff --git a/src/App.tsx b/src/App.tsx index 5888ddf..a08e22f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { BrowserRouter, Routes, Route, useLocation } from 'react-router-dom'; +import { LanguageProvider } from './contexts/LanguageContext'; import { ChatButton } from './components/ui/ChatButton'; import { AccountSelectionPage } from './pages/AccountSelectionPage'; import { CheckoutPageRoute } from './pages/CheckoutPageRoute'; @@ -30,10 +31,12 @@ const AppRoutes: React.FC = () => { function App() { return ( - - - - + + + + + + ); } diff --git a/src/components/checkout/CheckoutPage.tsx b/src/components/checkout/CheckoutPage.tsx index 34f1094..99b4a18 100644 --- a/src/components/checkout/CheckoutPage.tsx +++ b/src/components/checkout/CheckoutPage.tsx @@ -5,6 +5,7 @@ import { Input } from '../ui/Input'; import { Card } from '../ui/Card'; import { Logo } from '../ui/Logo'; import { DonationSection } from './DonationSection'; +import { useLanguage } from '../../contexts/LanguageContext'; import { FiLock, FiArrowLeft, FiEye, FiEyeOff, FiInfo, FiShield, FiCheck, FiCreditCard } from 'react-icons/fi'; interface CheckoutFormData { @@ -44,6 +45,7 @@ export const CheckoutPage: React.FC = ({ const [referralCode, setReferralCode] = useState(''); const [paymentMethod, setPaymentMethod] = useState<'card' | 'googlepay' | 'applepay'>('card'); const navigate = useNavigate(); + const { t } = useLanguage(); const [isProcessing, setIsProcessing] = useState(false); @@ -189,7 +191,7 @@ export const CheckoutPage: React.FC = ({ .{((total % 1) * 100).toFixed(0).padStart(2, '0')} -

Total amount

+

{t('checkout.totalAmount')}

{/* Selected Plan/Transaction Box */} @@ -213,20 +215,20 @@ export const CheckoutPage: React.FC = ({ {/* Order Summary */}
-

Order Summary

+

{t('checkout.orderSummary')}

- Subtotal + {t('common.subtotal')} {formatCurrency(subtotal)}
- Transaction Fee + {t('checkout.transactionFee')} {formatCurrency(transactionFee)}
{donationAmount > 0 && (
- Donation + {t('common.donation')} {formatCurrency(donationAmount)}
)} @@ -235,11 +237,11 @@ export const CheckoutPage: React.FC = ({ {/* Referral Code Input */}
setReferralCode(e.target.value)} className="w-full px-4 py-2 bg-white/10 border border-white/20 rounded-lg text-white placeholder-primary-200 focus:outline-none focus:ring-2 focus:ring-white/50 focus:border-white/40" @@ -248,7 +250,7 @@ export const CheckoutPage: React.FC = ({ {/* Total Due */}
- Total due today + {t('checkout.totalDue')} {formatCurrency(total)} @@ -262,10 +264,10 @@ export const CheckoutPage: React.FC = ({

@@ -276,7 +278,7 @@ export const CheckoutPage: React.FC = ({
-

Payment Method

+

{t('checkout.paymentMethod')}

{/* Payment Method Selector */}
@@ -293,7 +295,7 @@ export const CheckoutPage: React.FC = ({
- Card + {t('payment.card')}
@@ -316,7 +318,7 @@ export const CheckoutPage: React.FC = ({ - Google Pay + {t('payment.googlePay')}
@@ -336,7 +338,7 @@ export const CheckoutPage: React.FC = ({ - Apple Pay + {t('payment.applePay')}
@@ -348,15 +350,15 @@ export const CheckoutPage: React.FC = ({ {/* Email */}
@@ -365,7 +367,7 @@ export const CheckoutPage: React.FC = ({ {/* Card Details */}
{/* Card Number */} @@ -378,7 +380,7 @@ export const CheckoutPage: React.FC = ({ errors.cardNumber ? 'border-red-500' : 'border-gray-300' }`} {...register('cardNumber', { - required: 'Card number is required', + required: t('error.required'), onChange: (e) => { const formatted = formatCardNumber(e.target.value); e.target.value = formatted; @@ -427,7 +429,7 @@ export const CheckoutPage: React.FC = ({ errors.expiryDate ? 'border-red-500' : 'border-gray-300' }`} {...register('expiryDate', { - required: 'Expiry date is required', + required: t('error.required'), })} /> {errors.expiryDate && ( @@ -443,7 +445,7 @@ export const CheckoutPage: React.FC = ({ errors.cvv ? 'border-red-500' : 'border-gray-300' }`} {...register('cvv', { - required: 'CVC is required', + required: t('error.required'), })} /> @@ -458,12 +460,12 @@ export const CheckoutPage: React.FC = ({ {/* Name on card */}
@@ -474,12 +476,12 @@ export const CheckoutPage: React.FC = ({ {/* Billing Address */}
@@ -500,7 +502,7 @@ export const CheckoutPage: React.FC = ({ className="mt-1 w-4 h-4 text-primary-600 border-gray-300 rounded focus:ring-primary-500" />
{errors.agreeToTerms && ( @@ -513,7 +515,7 @@ export const CheckoutPage: React.FC = ({ disabled={isSubmitting} className="w-full bg-primary-500 hover:bg-primary-600 text-white font-medium py-4 px-6 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed" > - {isSubmitting ? 'Processing...' : 'Pay'} + {isSubmitting ? t('common.processing') : t('common.pay')} )} @@ -548,7 +550,7 @@ export const CheckoutPage: React.FC = ({ - {isProcessing ? 'Processing...' : 'Pay with Google Pay'} + {isProcessing ? t('common.processing') : t('payment.payWithGoogle')} )} @@ -580,7 +582,7 @@ export const CheckoutPage: React.FC = ({ - {isProcessing ? 'Processing...' : 'Pay with Apple Pay'} + {isProcessing ? t('common.processing') : t('payment.payWithApple')} )} @@ -599,12 +601,12 @@ export const CheckoutPage: React.FC = ({ type="checkbox" id="agreeToTermsAlt" {...register('agreeToTerms', { - required: 'You must agree to the terms and conditions', + required: t('error.required'), })} className="mt-1 w-4 h-4 text-primary-600 border-gray-300 rounded focus:ring-primary-500" />
{errors.agreeToTerms && ( @@ -617,7 +619,7 @@ export const CheckoutPage: React.FC = ({
- Verified checkout page by + {t('checkout.verifiedBy')} AmbaPay
diff --git a/src/components/checkout/DonationSection.tsx b/src/components/checkout/DonationSection.tsx index 4cd8be8..2045ff5 100644 --- a/src/components/checkout/DonationSection.tsx +++ b/src/components/checkout/DonationSection.tsx @@ -1,4 +1,5 @@ import React, { useState, useRef, useEffect } from "react"; +import { useLanguage } from "../../contexts/LanguageContext"; import { FiHeart, FiX, FiChevronLeft, FiChevronRight } from "react-icons/fi"; interface DonationCause { @@ -43,6 +44,7 @@ const mockCauses: DonationCause[] = [ export const DonationSection: React.FC = ({ onDonationChange, }) => { + const { t } = useLanguage(); const [donationAmount, setDonationAmount] = useState(""); const [selectedCause, setSelectedCause] = useState( null @@ -111,7 +113,12 @@ export const DonationSection: React.FC = ({ // Add "None" option to causes const allCauses = [ - { id: "none", name: "None", description: "No donation", category: "None" }, + { + id: "none", + name: t("donation.none"), + description: t("donation.noDonation"), + category: "None", + }, ...mockCauses, ]; @@ -119,7 +126,7 @@ export const DonationSection: React.FC = ({
= ({
{/* Left Scroll Button */} diff --git a/src/components/checkout/PromotionalPanel.tsx b/src/components/checkout/PromotionalPanel.tsx index 4a8ba4b..08a1daa 100644 --- a/src/components/checkout/PromotionalPanel.tsx +++ b/src/components/checkout/PromotionalPanel.tsx @@ -1,8 +1,11 @@ import React from 'react'; import { Logo } from '../ui/Logo'; +import { useLanguage } from '../../contexts/LanguageContext'; import { FiFacebook, FiTwitter, FiInstagram, FiLinkedin, FiSmartphone } from 'react-icons/fi'; export const PromotionalPanel: React.FC = () => { + const { t } = useLanguage(); + return (
{

- Start searching for homes or posting ads now. + {t('promo.title')}

- Interfaces are well designed for all ages and target audiences are extremely simple and work with social media integrations + {t('promo.description')}

{/* Download App Buttons */}
-

Download the Amba App

+

{t('promo.downloadApp')}

@@ -80,11 +83,11 @@ export const PromotionalPanel: React.FC = () => { {/* Footer Links */}
diff --git a/src/components/checkout/RequesterDetails.tsx b/src/components/checkout/RequesterDetails.tsx index bfadf3d..78f4e0a 100644 --- a/src/components/checkout/RequesterDetails.tsx +++ b/src/components/checkout/RequesterDetails.tsx @@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react"; import { Card } from "../ui/Card"; import { PromotionalPanel } from "./PromotionalPanel"; import type { RecipientBankAccount } from "../../types"; +import { useLanguage, languages } from "../../contexts/LanguageContext"; import { FiBriefcase, FiUser, @@ -38,15 +39,9 @@ export const RequesterDetails: React.FC = ({ const [showFlagModal, setShowFlagModal] = useState(false); const [flagReason, setFlagReason] = useState(""); const [showLanguageMenu, setShowLanguageMenu] = useState(false); - const [selectedLanguage, setSelectedLanguage] = useState("English"); - - const languages = [ - { code: "en", name: "English" }, - { code: "fr", name: "French" }, - { code: "am", name: "Amharic" }, - { code: "om", name: "Oromo" }, - { code: "ti", name: "Tigrinya" }, - ]; + const { currentLanguage, setLanguage, t } = useLanguage(); + + const currentLangName = languages.find(l => l.code === currentLanguage)?.name || 'English'; const formatCurrency = (amount: number) => { return new Intl.NumberFormat("en-US", { style: "currency", @@ -75,7 +70,7 @@ export const RequesterDetails: React.FC = ({

- Payment Request + {t('requester.paymentRequest')}

{/* Language Selector */} @@ -86,7 +81,7 @@ export const RequesterDetails: React.FC = ({ > - {selectedLanguage} + {currentLangName} = ({ )}
@@ -159,7 +152,7 @@ export const RequesterDetails: React.FC = ({

- Requesting + {t('requester.requesting')}

{formatCurrency(requester.requestAmount)} @@ -184,10 +177,10 @@ export const RequesterDetails: React.FC = ({

- Choose recipient account + {t('requester.chooseRecipient')}

- Select which account to send the money to + {t('requester.chooseRecipientDesc')}

@@ -237,10 +230,10 @@ export const RequesterDetails: React.FC = ({

- Recipient Account + {t('requester.recipientAccount')}

- Money will be sent to this account + {t('requester.recipientAccountDesc')}

@@ -292,7 +285,7 @@ export const RequesterDetails: React.FC = ({ }} className="w-full bg-primary-500 hover:bg-primary-600 text-white font-medium py-3 px-6 rounded-lg transition-colors" > - Next Step + {t('common.next')} )} @@ -303,7 +296,7 @@ export const RequesterDetails: React.FC = ({

- Report User + {t('requester.reportUser')}

diff --git a/src/components/checkout/SuccessPage.tsx b/src/components/checkout/SuccessPage.tsx index 477c43f..cc9446a 100644 --- a/src/components/checkout/SuccessPage.tsx +++ b/src/components/checkout/SuccessPage.tsx @@ -2,6 +2,7 @@ import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { Card } from '../ui/Card'; import { Logo } from '../ui/Logo'; +import { useLanguage } from '../../contexts/LanguageContext'; import { FiCheckCircle, FiMail, FiSmartphone, FiDownload } from 'react-icons/fi'; interface SuccessPageProps { @@ -17,6 +18,7 @@ export const SuccessPage: React.FC = ({ }) => { const [emailSent, setEmailSent] = useState(false); const navigate = useNavigate(); + const { t } = useLanguage(); const formatCurrency = (amount: number) => { return new Intl.NumberFormat('en-US', { @@ -53,21 +55,21 @@ export const SuccessPage: React.FC = ({

- Payment Successful! + {t('success.title')}

- Your payment of {formatCurrency(amount)} has been processed successfully. + {t('success.message').replace('{amount}', formatCurrency(amount))}

-

Transaction ID: {transactionId}

+

{t('success.transactionId')}: {transactionId}

{/* Download App Section */}

- Download the Amba App + {t('success.downloadApp')}

- Get the Amba app to manage your payments and transactions on the go. + {t('success.downloadDesc')}

{/* Download Buttons */} @@ -78,8 +80,8 @@ export const SuccessPage: React.FC = ({ >
-

Download on the

-

App Store

+

{t('success.downloadAppStore')}

+

{t('success.appStore')}

@@ -100,7 +102,7 @@ export const SuccessPage: React.FC = ({
-

Send download link via email

+

{t('success.sendEmail')}

{email}

@@ -109,12 +111,12 @@ export const SuccessPage: React.FC = ({ disabled={emailSent} className="px-4 py-2 bg-primary-500 hover:bg-primary-600 text-white rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium" > - {emailSent ? 'Sent!' : 'Send Link'} + {emailSent ? t('success.sent') : t('success.sendLink')}
{emailSent && (
- Download link has been sent to your email! + {t('success.emailSent')}
)}
@@ -126,14 +128,14 @@ export const SuccessPage: React.FC = ({ onClick={() => navigate('/')} className="flex-1 px-6 py-3 bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors font-medium" > - Back to Home + {t('success.backHome')}
diff --git a/src/contexts/LanguageContext.tsx b/src/contexts/LanguageContext.tsx new file mode 100644 index 0000000..89ca4b8 --- /dev/null +++ b/src/contexts/LanguageContext.tsx @@ -0,0 +1,574 @@ +import React, { createContext, useContext, useState, ReactNode, useEffect } from 'react'; + +export type LanguageCode = 'en' | 'fr' | 'am' | 'om' | 'ti'; + +interface Language { + code: LanguageCode; + name: string; +} + +export const languages: Language[] = [ + { code: 'en', name: 'English' }, + { code: 'fr', name: 'French' }, + { code: 'am', name: 'Amharic' }, + { code: 'om', name: 'Oromo' }, + { code: 'ti', name: 'Tigrinya' }, +]; + +interface LanguageContextType { + currentLanguage: LanguageCode; + setLanguage: (code: LanguageCode) => void; + t: (key: string) => string; +} + +const LanguageContext = createContext(undefined); + +export const LanguageProvider: React.FC<{ children: ReactNode }> = ({ children }) => { + const [currentLanguage, setCurrentLanguageState] = useState(() => { + // Get language from localStorage or default to English + const saved = localStorage.getItem('language') as LanguageCode; + return saved && languages.some(l => l.code === saved) ? saved : 'en'; + }); + + useEffect(() => { + localStorage.setItem('language', currentLanguage); + }, [currentLanguage]); + + const setLanguage = (code: LanguageCode) => { + setCurrentLanguageState(code); + }; + + // Translation function - will be implemented with actual translations + const t = (key: string): string => { + const translations = getTranslations(currentLanguage); + return translations[key] || key; + }; + + return ( + + {children} + + ); +}; + +export const useLanguage = () => { + const context = useContext(LanguageContext); + if (context === undefined) { + throw new Error('useLanguage must be used within a LanguageProvider'); + } + return context; +}; + +// Translation data +const translations: Record> = { + en: { + // Common + 'common.next': 'Next Step', + 'common.back': 'Back', + 'common.cancel': 'Cancel', + 'common.submit': 'Submit', + 'common.loading': 'Loading...', + 'common.email': 'Email', + 'common.address': 'Address', + 'common.name': 'Name', + 'common.phone': 'Phone', + 'common.amount': 'Amount', + 'common.total': 'Total', + 'common.subtotal': 'Subtotal', + 'common.fee': 'Fee', + 'common.donation': 'Donation', + 'common.terms': 'Terms', + 'common.privacy': 'Privacy Policy', + 'common.report': 'Report', + 'common.select': 'Select', + 'common.continue': 'Continue', + 'common.pay': 'Pay', + 'common.processing': 'Processing...', + + // Requester Details + 'requester.paymentRequest': 'Payment Request', + 'requester.chooseRecipient': 'Choose recipient account', + 'requester.chooseRecipientDesc': 'Select which account to send the money to', + 'requester.recipientAccount': 'Recipient Account', + 'requester.recipientAccountDesc': 'Money will be sent to this account', + 'requester.requesting': 'Requesting', + 'requester.reportUser': 'Report User', + 'requester.reportReason': 'Why are you reporting', + 'requester.spam': 'Spam or suspicious activity', + 'requester.unknown': "I don't know this person", + 'requester.other': 'Other', + + // Checkout + 'checkout.paymentMethod': 'Payment Method', + 'checkout.paymentTo': 'Payment to', + 'checkout.completePayment': 'Complete your payment to proceed', + 'checkout.totalAmount': 'Total amount', + 'checkout.orderSummary': 'Order Summary', + 'checkout.transactionFee': 'Transaction Fee', + 'checkout.totalDue': 'Total due today', + 'checkout.payWithCard': 'Pay With Card', + 'checkout.cardDetails': 'Card details', + 'checkout.cardNumber': 'Card Number', + 'checkout.nameOnCard': 'Name on card', + 'checkout.expiryDate': 'Expiry Date', + 'checkout.cvc': 'CVC', + 'checkout.billingAddress': 'Billing address', + 'checkout.agreeTerms': 'By confirming your payment, you allow us to charge your card for this and future payments in accordance with terms. You can always cancel your subscription.', + 'checkout.verifiedBy': 'Verified checkout page by', + 'checkout.referralCode': 'Referral Code', + 'checkout.enterCode': 'Enter code', + + // Payment Methods + 'payment.card': 'Card', + 'payment.googlePay': 'Google Pay', + 'payment.applePay': 'Apple Pay', + 'payment.payWithGoogle': 'Pay with Google Pay', + 'payment.payWithApple': 'Pay with Apple Pay', + + // Donation + 'donation.addDonation': 'Add donation to institution', + 'donation.selectCause': 'Select Cause', + 'donation.none': 'None', + 'donation.noDonation': 'No donation', + + // Success + 'success.title': 'Payment Successful!', + 'success.message': 'Your payment of {amount} has been processed successfully.', + 'success.transactionId': 'Transaction ID', + 'success.downloadApp': 'Download the Amba App', + 'success.downloadDesc': 'Get the Amba app to manage your payments and transactions on the go.', + 'success.downloadAppStore': 'Download on the', + 'success.downloadGooglePlay': 'Get it on', + 'success.appStore': 'App Store', + 'success.googlePlay': 'Google Play', + 'success.sendEmail': 'Send download link via email', + 'success.sendLink': 'Send Link', + 'success.sent': 'Sent!', + 'success.emailSent': 'Download link has been sent to your email!', + 'success.backHome': 'Back to Home', + 'success.downloadReceipt': 'Download Receipt', + + // Promotional Panel + 'promo.title': 'Start searching for homes or posting ads now.', + 'promo.description': 'Interfaces are well designed for all ages and target audiences are extremely simple and work with social media integrations', + 'promo.downloadApp': 'Download the Amba App', + 'promo.ios': 'iOS', + 'promo.android': 'Android', + + // Errors + 'error.required': 'This field is required', + 'error.invalidEmail': 'Invalid email address', + 'error.invalidCard': 'Invalid card number', + 'error.invalidExpiry': 'Invalid expiry date', + 'error.invalidCvc': 'Invalid CVC', + }, + fr: { + // Common + 'common.next': 'Étape suivante', + 'common.back': 'Retour', + 'common.cancel': 'Annuler', + 'common.submit': 'Soumettre', + 'common.loading': 'Chargement...', + 'common.email': 'E-mail', + 'common.address': 'Adresse', + 'common.name': 'Nom', + 'common.phone': 'Téléphone', + 'common.amount': 'Montant', + 'common.total': 'Total', + 'common.subtotal': 'Sous-total', + 'common.fee': 'Frais', + 'common.donation': 'Don', + 'common.terms': 'Conditions', + 'common.privacy': 'Politique de confidentialité', + 'common.report': 'Signaler', + 'common.select': 'Sélectionner', + 'common.continue': 'Continuer', + 'common.pay': 'Payer', + 'common.processing': 'Traitement...', + + // Requester Details + 'requester.paymentRequest': 'Demande de paiement', + 'requester.chooseRecipient': 'Choisir le compte du bénéficiaire', + 'requester.chooseRecipientDesc': 'Sélectionnez le compte vers lequel envoyer l\'argent', + 'requester.recipientAccount': 'Compte bénéficiaire', + 'requester.recipientAccountDesc': 'L\'argent sera envoyé à ce compte', + 'requester.requesting': 'Demande', + 'requester.reportUser': 'Signaler l\'utilisateur', + 'requester.reportReason': 'Pourquoi signalez-vous', + 'requester.spam': 'Spam ou activité suspecte', + 'requester.unknown': 'Je ne connais pas cette personne', + 'requester.other': 'Autre', + + // Checkout + 'checkout.paymentMethod': 'Méthode de paiement', + 'checkout.paymentTo': 'Paiement à', + 'checkout.completePayment': 'Complétez votre paiement pour continuer', + 'checkout.totalAmount': 'Montant total', + 'checkout.orderSummary': 'Résumé de la commande', + 'checkout.transactionFee': 'Frais de transaction', + 'checkout.totalDue': 'Total dû aujourd\'hui', + 'checkout.payWithCard': 'Payer par carte', + 'checkout.cardDetails': 'Détails de la carte', + 'checkout.cardNumber': 'Numéro de carte', + 'checkout.nameOnCard': 'Nom sur la carte', + 'checkout.expiryDate': 'Date d\'expiration', + 'checkout.cvc': 'CVC', + 'checkout.billingAddress': 'Adresse de facturation', + 'checkout.agreeTerms': 'En confirmant votre paiement, vous nous autorisez à débiter votre carte pour ce paiement et les paiements futurs conformément aux conditions. Vous pouvez toujours annuler votre abonnement.', + 'checkout.verifiedBy': 'Page de paiement vérifiée par', + 'checkout.referralCode': 'Code de parrainage', + 'checkout.enterCode': 'Entrer le code', + + // Payment Methods + 'payment.card': 'Carte', + 'payment.googlePay': 'Google Pay', + 'payment.applePay': 'Apple Pay', + 'payment.payWithGoogle': 'Payer avec Google Pay', + 'payment.payWithApple': 'Payer avec Apple Pay', + + // Donation + 'donation.addDonation': 'Ajouter un don à l\'institution', + 'donation.selectCause': 'Sélectionner une cause', + 'donation.none': 'Aucun', + 'donation.noDonation': 'Pas de don', + + // Success + 'success.title': 'Paiement réussi!', + 'success.message': 'Votre paiement de {amount} a été traité avec succès.', + 'success.transactionId': 'ID de transaction', + 'success.downloadApp': 'Télécharger l\'application Amba', + 'success.downloadDesc': 'Obtenez l\'application Amba pour gérer vos paiements et transactions en déplacement.', + 'success.downloadAppStore': 'Télécharger sur', + 'success.downloadGooglePlay': 'Obtenir sur', + 'success.appStore': 'App Store', + 'success.googlePlay': 'Google Play', + 'success.sendEmail': 'Envoyer le lien de téléchargement par e-mail', + 'success.sendLink': 'Envoyer le lien', + 'success.sent': 'Envoyé!', + 'success.emailSent': 'Le lien de téléchargement a été envoyé à votre e-mail!', + 'success.backHome': 'Retour à l\'accueil', + 'success.downloadReceipt': 'Télécharger le reçu', + + // Promotional Panel + 'promo.title': 'Commencez à rechercher des maisons ou à publier des annonces maintenant.', + 'promo.description': 'Les interfaces sont bien conçues pour tous les âges et les publics cibles sont extrêmement simples et fonctionnent avec des intégrations de médias sociaux', + 'promo.downloadApp': 'Télécharger l\'application Amba', + 'promo.ios': 'iOS', + 'promo.android': 'Android', + + // Errors + 'error.required': 'Ce champ est requis', + 'error.invalidEmail': 'Adresse e-mail invalide', + 'error.invalidCard': 'Numéro de carte invalide', + 'error.invalidExpiry': 'Date d\'expiration invalide', + 'error.invalidCvc': 'CVC invalide', + }, + am: { + // Common + 'common.next': 'የሚቀጥለው ደረጃ', + 'common.back': 'ተመለስ', + 'common.cancel': 'ተወዳዳሪ', + 'common.submit': 'ላክ', + 'common.loading': 'በመጫን ላይ...', + 'common.email': 'ኢሜይል', + 'common.address': 'አድራሻ', + 'common.name': 'ስም', + 'common.phone': 'ስልክ', + 'common.amount': 'መጠን', + 'common.total': 'ጠቅላላ', + 'common.subtotal': 'ንዑስ ጠቅላላ', + 'common.fee': 'ክፍያ', + 'common.donation': 'ልገሳ', + 'common.terms': 'ውሎች', + 'common.privacy': 'የግላዊነት ፖሊሲ', + 'common.report': 'ሪፖርት', + 'common.select': 'ምረጥ', + 'common.continue': 'ቀጥል', + 'common.pay': 'ክፍያ ይፈጽሙ', + 'common.processing': 'በማቀናበር ላይ...', + + // Requester Details + 'requester.paymentRequest': 'የክፍያ ጥያቄ', + 'requester.chooseRecipient': 'የተቀባዩን መለያ ይምረጡ', + 'requester.chooseRecipientDesc': 'ገንዘቡን ወደ የትኛው መለያ እንደሚላኩ ይምረጡ', + 'requester.recipientAccount': 'የተቀባይ መለያ', + 'requester.recipientAccountDesc': 'ገንዘቡ ወደዚህ መለያ ይላካል', + 'requester.requesting': 'ይጠይቃል', + 'requester.reportUser': 'ተጠቃሚውን ሪፖርት ያድርጉ', + 'requester.reportReason': 'ለምን ነው', + 'requester.spam': 'ስፓም ወይም አጠራጣሪ እንቅስቃሴ', + 'requester.unknown': 'ይህን ሰው አላውቅም', + 'requester.other': 'ሌላ', + + // Checkout + 'checkout.paymentMethod': 'የክፍያ ዘዴ', + 'checkout.paymentTo': 'ክፍያ ወደ', + 'checkout.completePayment': 'ክፍያዎን ለመጠናቀቅ ይቀጥሉ', + 'checkout.totalAmount': 'ጠቅላላ መጠን', + 'checkout.orderSummary': 'የትዕዛዝ ማጠቃለያ', + 'checkout.transactionFee': 'የግብይት ክፍያ', + 'checkout.totalDue': 'ዛሬ የሚከፈለው ጠቅላላ', + 'checkout.payWithCard': 'በካርድ ይክፈሉ', + 'checkout.cardDetails': 'የካርድ ዝርዝሮች', + 'checkout.cardNumber': 'የካርድ ቁጥር', + 'checkout.nameOnCard': 'በካርድ ላይ ያለ ስም', + 'checkout.expiryDate': 'የመጨረሻ ቀን', + 'checkout.cvc': 'CVC', + 'checkout.billingAddress': 'የክፍያ አድራሻ', + 'checkout.agreeTerms': 'ክፍያዎን በማረጋገጥ ላይ ካርድዎን ለዚህ እና ለወደፊት ክፍያዎች በውሎች መሠረት እንድንክፈል እንፈቅድልናል። ማስተናገድዎን ሁልጊዜ ማቋረጥ ይችላሉ።', + 'checkout.verifiedBy': 'የተረጋገጠ የክፍያ ገጽ በ', + 'checkout.referralCode': 'የማጣቀሻ ኮድ', + 'checkout.enterCode': 'ኮድ ያስገቡ', + + // Payment Methods + 'payment.card': 'ካርድ', + 'payment.googlePay': 'ጉግል ፔይ', + 'payment.applePay': 'አፕል ፔይ', + 'payment.payWithGoogle': 'በጉግል ፔይ ይክፈሉ', + 'payment.payWithApple': 'በአፕል ፔይ ይክፈሉ', + + // Donation + 'donation.addDonation': 'ለተቋም ልገሳ ያክሉ', + 'donation.selectCause': 'ምክንያት ይምረጡ', + 'donation.none': 'ምንም', + 'donation.noDonation': 'ምንም ልገሳ የለም', + + // Success + 'success.title': 'ክፍያ በተሳካ ሁኔታ!', + 'success.message': 'የ{amount} ክፍያዎ በተሳካ ሁኔታ ተከናውኗል።', + 'success.transactionId': 'የግብይት መለያ', + 'success.downloadApp': 'የአምባ መተግበሪያ ያውርዱ', + 'success.downloadDesc': 'ክፍያዎችዎን እና ግብይቶችዎን በመንቀሳቀስ ላይ ለመስተዳደር የአምባ መተግበሪያ ያግኙ።', + 'success.downloadAppStore': 'በ', + 'success.downloadGooglePlay': 'ከ', + 'success.appStore': 'አፕ ስቶር', + 'success.googlePlay': 'ጉግል ፕሌይ', + 'success.sendEmail': 'የማውረድ አገናኝ በኢሜይል ይላኩ', + 'success.sendLink': 'አገናኝ ይላኩ', + 'success.sent': 'ተልኳል!', + 'success.emailSent': 'የማውረድ አገናኝ ወደ ኢሜይልዎ ተልኳል!', + 'success.backHome': 'ወደ መነሻ ተመለስ', + 'success.downloadReceipt': 'ደረሰኝ ያውርዱ', + + // Promotional Panel + 'promo.title': 'አሁን ቤቶችን መፈለግ ወይም ማስታወቂያዎችን ማስቀመጥ ይጀምሩ።', + 'promo.description': 'መገናኛዎች ለሁሉም ዕድሜዎች በደንብ የተነደፉ እና የዓላማ ገጾች በጣም ቀላል ናቸው እና ከማህበራዊ ሚዲያ ውህደቶች ጋር ይሠራሉ', + 'promo.downloadApp': 'የአምባ መተግበሪያ ያውርዱ', + 'promo.ios': 'iOS', + 'promo.android': 'Android', + + // Errors + 'error.required': 'ይህ መስክ ያስፈልጋል', + 'error.invalidEmail': 'ልክ ያልሆነ ኢሜይል አድራሻ', + 'error.invalidCard': 'ልክ ያልሆነ የካርድ ቁጥር', + 'error.invalidExpiry': 'ልክ ያልሆነ የመጨረሻ ቀን', + 'error.invalidCvc': 'ልክ ያልሆነ CVC', + }, + om: { + // Common + 'common.next': 'Darbii Itti Aanu', + 'common.back': 'Deebi\'i', + 'common.cancel': 'Haqiisi', + 'common.submit': 'Ergi', + 'common.loading': 'Bakka bu\'aa jira...', + 'common.email': 'Imeelii', + 'common.address': 'Teessoo', + 'common.name': 'Maqaa', + 'common.phone': 'Bilbila', + 'common.amount': 'Hammam', + 'common.total': 'Waliigala', + 'common.subtotal': 'Waliigala gabaabaa', + 'common.fee': 'Kaffaltii', + 'common.donation': 'Kennaa', + 'common.terms': 'Haala', + 'common.privacy': 'Ilaalcha Iccitii', + 'common.report': 'Odeessi', + 'common.select': 'Filadhu', + 'common.continue': 'Itti fufi', + 'common.pay': 'Kaffalti', + 'common.processing': 'Odeeffannoo jira...', + + // Requester Details + 'requester.paymentRequest': 'Gaaffii Kaffaltii', + 'requester.chooseRecipient': 'Akkaawuntii qeebi\'aa filadhu', + 'requester.chooseRecipientDesc': 'Akkaawuntii qarshii erguuf filadhu', + 'requester.recipientAccount': 'Akkaawuntii Qeebi\'aa', + 'requester.recipientAccountDesc': 'Qarshin kun akkaawuntii kana irratti ergama', + 'requester.requesting': 'Gaafata', + 'requester.reportUser': 'Fayyadamaa Odeessi', + 'requester.reportReason': 'Maaliif', + 'requester.spam': 'Spam ykn hojii shakkii', + 'requester.unknown': 'Namni kun hin beeku', + 'requester.other': 'Kan biraa', + + // Checkout + 'checkout.paymentMethod': 'Karaa Kaffaltii', + 'checkout.paymentTo': 'Kaffalti gara', + 'checkout.completePayment': 'Kaffalti keessan guutaa itti fufaa', + 'checkout.totalAmount': 'Hammam Waliigala', + 'checkout.orderSummary': 'Gabaabaa Ajaja', + 'checkout.transactionFee': 'Kaffaltii Daldalaa', + 'checkout.totalDue': 'Har\'a Kaffaltamaa', + 'checkout.payWithCard': 'Kaardii Waliin Kaffalti', + 'checkout.cardDetails': 'Odeeffannoo Kaardii', + 'checkout.cardNumber': 'Lakkoofsi Kaardii', + 'checkout.nameOnCard': 'Maqaan Kaardii Irratti', + 'checkout.expiryDate': 'Guyyaa Xumuramaa', + 'checkout.cvc': 'CVC', + 'checkout.billingAddress': 'Teessoo Kaffaltii', + 'checkout.agreeTerms': 'Kaffalti keessan mirkaneessanii, kaardii keessan kanaafi kaffaltiwwan kan itti aanuuf haala waliin kaffaltuu nuu dhiheessitan. Abbaandhala keessan yeroo hundumaa dhaamsiisuu ni dandeessan.', + 'checkout.verifiedBy': 'Fuula kaffaltii mirkaneffame', + 'checkout.referralCode': 'Koodii Gargaarsa', + 'checkout.enterCode': 'Koodii Galchi', + + // Payment Methods + 'payment.card': 'Kaardii', + 'payment.googlePay': 'Google Pay', + 'payment.applePay': 'Apple Pay', + 'payment.payWithGoogle': 'Google Pay Waliin Kaffalti', + 'payment.payWithApple': 'Apple Pay Waliin Kaffalti', + + // Donation + 'donation.addDonation': 'Kennaa Hayyamaatti Dabaladhu', + 'donation.selectCause': 'Sababa Filadhu', + 'donation.none': 'Hin Qabne', + 'donation.noDonation': 'Kennaa Hin Qabne', + + // Success + 'success.title': 'Kaffalti Milkaa\'e!', + 'success.message': 'Kaffalti {amount} keessan milkaa\'inaan oggaamameera.', + 'success.transactionId': 'ID Daldalaa', + 'success.downloadApp': 'App Amba Buufadhu', + 'success.downloadDesc': 'App Amba argadhu kaffaltiwwan keessaniifi daldalliwwan keessan deemsa keessatti to\'achuuf.', + 'success.downloadAppStore': 'Buufadhu', + 'success.downloadGooglePlay': 'Argadhu', + 'success.appStore': 'App Store', + 'success.googlePlay': 'Google Play', + 'success.sendEmail': 'Linki Buufachuu Imeelii Ergi', + 'success.sendLink': 'Linki Ergi', + 'success.sent': 'Ergameera!', + 'success.emailSent': 'Linki buufachuu imeelii keessan irratti ergameera!', + 'success.backHome': 'Manaa Deebi\'i', + 'success.downloadReceipt': 'Risiitii Buufadhu', + + // Promotional Panel + 'promo.title': 'Amma Mana Barbaaduu ykn Ogeessitoota Dhiyeessuu Eegali.', + 'promo.description': 'Interfaces hundi umurri hundaaaf akka gaariitti ijaaramaniifi bakka maratni hundi baay\'ee salphaadhaafi media hawaasaa waliin hojjata', + 'promo.downloadApp': 'App Amba Buufadhu', + 'promo.ios': 'iOS', + 'promo.android': 'Android', + + // Errors + 'error.required': 'Bakka kana barbaachisa', + 'error.invalidEmail': 'Teessoo Imeelii Dogoggora', + 'error.invalidCard': 'Lakkoofsi Kaardii Dogoggora', + 'error.invalidExpiry': 'Guyyaa Xumuramaa Dogoggora', + 'error.invalidCvc': 'CVC Dogoggora', + }, + ti: { + // Common + 'common.next': 'እታሕተዋይ ደረጃ', + 'common.back': 'ተመለስ', + 'common.cancel': 'ኣቅርብ', + 'common.submit': 'ሰዲድ', + 'common.loading': 'እየተጻወተ...', + 'common.email': 'ኢ-መይል', + 'common.address': 'ኣድራሻ', + 'common.name': 'ስም', + 'common.phone': 'ተሌፎን', + 'common.amount': 'መጠን', + 'common.total': 'ድምር', + 'common.subtotal': 'ንእሽቶ ድምር', + 'common.fee': 'ክፍሊት', + 'common.donation': 'ልግሲ', + 'common.terms': 'ስምምዕታት', + 'common.privacy': 'ፖሊሲ ምስጢር', + 'common.report': 'ሪፖርት', + 'common.select': 'ምረጥ', + 'common.continue': 'ቀጽል', + 'common.pay': 'ክፍሊ', + 'common.processing': 'እየተሰርሐ...', + + // Requester Details + 'requester.paymentRequest': 'ሕቶ ክፍሊት', + 'requester.chooseRecipient': 'ናይ ተቐባሊ ኣካውንት ምረጥ', + 'requester.chooseRecipientDesc': 'ነዳዲ ናብ ኣየነዳድ ኣካውንት ከም ዝውሃብ ምረጥ', + 'requester.recipientAccount': 'ኣካውንት ተቐባሊ', + 'requester.recipientAccountDesc': 'ነዳዲ ናብ እዚ ኣካውንት ክውሃብ እዩ', + 'requester.requesting': 'ይሕትት', + 'requester.reportUser': 'ተጠቃሚ ሪፖርት ግበር', + 'requester.reportReason': 'ንምንታይ', + 'requester.spam': 'ስፓም ወይ ጐዳይ ንጥፈታት', + 'requester.unknown': 'እዚ ሰብ ኣይፈልጦን', + 'requester.other': 'ካልእ', + + // Checkout + 'checkout.paymentMethod': 'ኣገባብ ክፍሊት', + 'checkout.paymentTo': 'ክፍሊት ናብ', + 'checkout.completePayment': 'ክፍሊትካ ንምውዳእ ቀጽል', + 'checkout.totalAmount': 'ድምር መጠን', + 'checkout.orderSummary': 'ጽማቝ ትእዛዝ', + 'checkout.transactionFee': 'ክፍሊት ዕዋፍ', + 'checkout.totalDue': 'ሎሚ ዝክፈል ድምር', + 'checkout.payWithCard': 'ብካርድ ክፍሊ', + 'checkout.cardDetails': 'ዝርዝር ካርድ', + 'checkout.cardNumber': 'ቁጽሪ ካርድ', + 'checkout.nameOnCard': 'ስም ኣብ ካርድ', + 'checkout.expiryDate': 'ዕለት ዝዛዘም', + 'checkout.cvc': 'CVC', + 'checkout.billingAddress': 'ኣድራሻ ክፍሊት', + 'checkout.agreeTerms': 'ክፍሊትካ ብምርግጋጽ ንዚእን ንዝመጽእ ክፍሊትታት ንካርድካ ኣብ ስምምዕታት መሰረት ክንክፍል ንፈቐድና። ምዝገባኻ ኩሉ ግዜ ክትቋርጽ ትኽእል ኢኻ።', + 'checkout.verifiedBy': 'እተረጋገጸ ገጽ ክፍሊት ብ', + 'checkout.referralCode': 'ኮድ ምላሽ', + 'checkout.enterCode': 'ኮድ ኣእቱ', + + // Payment Methods + 'payment.card': 'ካርድ', + 'payment.googlePay': 'ጉግል ፔይ', + 'payment.applePay': 'ኣፕል ፔይ', + 'payment.payWithGoogle': 'ብጉግል ፔይ ክፍሊ', + 'payment.payWithApple': 'ብኣፕል ፔይ ክፍሊ', + + // Donation + 'donation.addDonation': 'ልግሲ ናብ ትካል ወስኽ', + 'donation.selectCause': 'ምክንያት ምረጥ', + 'donation.none': 'ኣይኮነን', + 'donation.noDonation': 'ልግሲ የለን', + + // Success + 'success.title': 'ክፍሊት ተዓወተ!', + 'success.message': 'ክፍሊት {amount}ኻ ብዓወት ተፈጺሙ።', + 'success.transactionId': 'ID ዕዋፍ', + 'success.downloadApp': 'ኣፕ ኣምባ ኣውርድ', + 'success.downloadDesc': 'ክፍሊትታትኻን ዕዋፋትኻን ኣብ ምንቅስቓስ ንምቕዳሕ ኣፕ ኣምባ ረኸብ።', + 'success.downloadAppStore': 'ኣውርድ', + 'success.downloadGooglePlay': 'ረኸብ', + 'success.appStore': 'ኣፕ ስቶር', + 'success.googlePlay': 'ጉግል ፕሌይ', + 'success.sendEmail': 'ሊንክ ምውራድ ብኢ-መይል ሰዲድ', + 'success.sendLink': 'ሊንክ ሰዲድ', + 'success.sent': 'ተሰዲዱ!', + 'success.emailSent': 'ሊንክ ምውራድ ናብ ኢ-መይልኻ ተሰዲዱ!', + 'success.backHome': 'ናብ ገዛ ተመለስ', + 'success.downloadReceipt': 'ረሲት ኣውርድ', + + // Promotional Panel + 'promo.title': 'ኣሁን ገዛታት ምድላይ ወይ ማስታወሻታት ምስጢር ይጅምሩ።', + 'promo.description': 'መገናኛታት ንኹሉ ዕድመ ብጽቡቕ ዝተነድፈ እዩ እሞ ዕላማ ሰባት ኣዝዩ ቀሊል እዩ እሞ ምስ ማሕበራዊ ሚድያ ውህደት ይሰርሕ', + 'promo.downloadApp': 'ኣፕ ኣምባ ኣውርድ', + 'promo.ios': 'iOS', + 'promo.android': 'Android', + + // Errors + 'error.required': 'እዚ ቦታ የድሊ', + 'error.invalidEmail': 'ዘይቅኑዕ ኢ-መይል ኣድራሻ', + 'error.invalidCard': 'ዘይቅኑዕ ቁጽሪ ካርድ', + 'error.invalidExpiry': 'ዘይቅኑዕ ዕለት ዝዛዘም', + 'error.invalidCvc': 'ዘይቅኑዕ CVC', + }, +}; + +function getTranslations(lang: LanguageCode): Record { + return translations[lang] || translations.en; +} +