Skip to content

Commit

Permalink
fix: some ui & i18n (#6328)
Browse files Browse the repository at this point in the history
* fix: some ui

* fix: android ui

---------

Co-authored-by: Leon <[email protected]>
  • Loading branch information
Kahnchan and originalix authored Dec 12, 2024
1 parent 1d891a7 commit 682e032
Show file tree
Hide file tree
Showing 24 changed files with 92 additions and 67 deletions.
7 changes: 4 additions & 3 deletions packages/kit/src/components/TxAction/TxActionSwapInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { useIntl } from 'react-intl';
import type { ISizableTextProps } from '@onekeyhq/components';
import {
Divider,
IconButton,
Image,
NumberSizeableText,
SizableText,
Expand Down Expand Up @@ -207,7 +206,7 @@ function TxActionSwapInfo(props: IProps) {
/>
</Stack>
</XStack>
<SizableText size="$bodyMd" color="$textSubdued">
<SizableText size="$bodyMd" color="$text">
{senderNetwork?.name}{receiverNetwork?.name}
</SizableText>
</XStack>
Expand All @@ -223,7 +222,9 @@ function TxActionSwapInfo(props: IProps) {
networkId={sender.accountInfo.networkId}
size="$5"
/>
<SizableText {...textStyle}>{senderNetwork?.name}</SizableText>
<SizableText {...textStyle} color="$text">
{senderNetwork?.name}
</SizableText>
</XStack>
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@ export function SwapServiceFeeOverview({
renderContent={
<Stack gap="$5" p="$4">
<SizableText size="$bodyMd" color="$textSubdued">
{intl.formatMessage({
id: ETranslations.provider_ios_popover_onekey_fee_content,
})}
{intl.formatMessage(
{
id: ETranslations.provider_ios_popover_onekey_fee_content,
},
{ num: `${serviceFee}%` },
)}
</SizableText>
<Stack gap="$2">
{protocolFeeInfoList.map((item) => renderProtocolFeeListItem(item))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const SwapInputActions = ({
<XStack
alignItems="center"
gap="$1"
pt={platformEnv.isNative ? '$1' : '$0'}
pt={platformEnv.isNativeIOS ? '$1' : '$0'}
>
<Icon name="CreditCardCvvOutline" size="$4" />
<SizableText size="$bodySmMedium" color="$textSubdued">
Expand Down
1 change: 1 addition & 0 deletions packages/shared/src/locale/enum/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,7 @@
provider_ios_popover_approval_require_title = 'provider.ios_popover.approval_require_title',
provider_ios_popover_onekey_fee = 'provider.ios_popover.onekey_fee',
provider_ios_popover_onekey_fee_content = 'provider.ios_popover.onekey_fee_content',
provider_ios_popover_onekey_fee_content_sub = 'provider.ios_popover.onekey_fee_content_sub',
provider_ios_popover_order_info_title = 'provider.ios_popover.order_info_title',
provider_ios_popover_title = 'provider.ios_popover.title',
provider_label_anti_mev = 'provider.label_anti_mev',
Expand Down
7 changes: 4 additions & 3 deletions packages/shared/src/locale/json/bn.json
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,8 @@
"provider.ios_popover.approval_require_msg": "অদলবদল করার আগে টোকেন অনুমোদন করতে হবে",
"provider.ios_popover.approval_require_title": "অনুমোদন প্রয়োজন",
"provider.ios_popover.onekey_fee": "OneKey fee",
"provider.ios_popover.onekey_fee_content": "OneKey ০.৩% ফি চার্জ করে (র‍্যাপিং লেনদেনের জন্য কোনো ফি নেই), যা আমাদের উচ্চ-মানের, নিরবচ্ছিন্ন অভিজ্ঞতা প্রদান করতে সহায়তা করে।",
"provider.ios_popover.onekey_fee_content": "OneKey একটি {num} ফি ধার্য করে (লেনদেন মোড়ানোর জন্য কোনো ফি নেই), যা ইতিমধ্যেই কোটে অন্তর্ভুক্ত রয়েছে, আমাদেরকে উচ্চ-মানের, নিরবচ্ছিন্ন অভিজ্ঞতা প্রদান করতে সহায়তা করে। ফি সম্পর্কে আপনার কোনো উদ্বেগ থাকলে, অনুগ্রহ করে আমাদের সাথে যোগাযোগ করুন।",
"provider.ios_popover.onekey_fee_content_sub": "দয়া করে মনে রাখবেন যে সেতু ফি, স্লিপেজ এবং ভাসমান হারগুলি প্রাপ্ত চূড়ান্ত পরিমাণকে প্রভাবিত করতে পারে। ফি সম্পর্কে আপনার যদি কোনো উদ্বেগ থাকে, তাহলে আমাদের সাথে যোগাযোগ করুন।",
"provider.ios_popover.order_info_title": "অর্ডারের তথ্য",
"provider.ios_popover.title": "তথ্য",
"provider.label_anti_mev": "এমইভি বিরোধী",
Expand Down Expand Up @@ -1922,8 +1923,8 @@
"transaction.to_contract": "চুক্তি করা",
"transaction__contract_interaction": "চুক্তি ইন্টারঅ্যাকশন",
"transaction__transaction_confirm": "লেনদেন নিশ্চিত করুন",
"transaction_confirm.batch_swap_tip": "এই অর্ডারটি জমা দেওয়ার মাধ্যমে, আপনি {provider} Api দ্বারা চালিত {chain} এ একটি বিনিময় নিশ্চিত করে ট্রেডিংয়ের জন্য {token} অনুমোদন করছেন।",
"transaction_confirm.single_swap_tip": "এই অর্ডারটি জমা দেওয়ার মাধ্যমে, আপনি {provider} Api দ্বারা চালিত {chain} এ একটি বিনিময় নিশ্চিত করছেন।",
"transaction_confirm.batch_swap_tip": "এই অর্ডারটি জমা দেওয়ার মাধ্যমে, আপনি {provider} API দ্বারা চালিত {chain} এ একটি বিনিময় নিশ্চিত করে ট্রেডিংয়ের জন্য {token} অনুমোদন করছেন। যদি অর্ডার সম্পর্কে আপনার কোনো উদ্বেগ থাকে, অনুগ্রহ করে আমাদের সাথে যোগাযোগ করুন",
"transaction_confirm.single_swap_tip": "এই অর্ডারটি জমা দেওয়ার মাধ্যমে, আপনি {provider} API দ্বারা চালিত {chain} এ একটি বিনিময় নিশ্চিত করছেন। যদি আপনার অর্ডার সম্পর্কে কোনো উদ্বেগ থাকে, অনুগ্রহ করে আমাদের সাথে যোগাযোগ করুন",
"troubleshooting.change_usb_port": "আপনার কম্পিউটারে ব্যবহৃত USB পোর্ট পরিবর্তন করুন।",
"troubleshooting.check_bluetooth": "আপনার OneKey ডিভাইসে ব্লুটুথ সক্রিয় করা নিশ্চিত করুন (যদি OneKey Pro ব্যবহার করেন তবে AirGap অক্ষম করুন)।",
"troubleshooting.check_bridge": "যাচাই করুন যে ব্রিজ সঠিকভাবে ইনস্টল করা হয়েছে। <tag>এখানে বিস্তারিত দেখুন</tag>।",
Expand Down
7 changes: 4 additions & 3 deletions packages/shared/src/locale/json/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,8 @@
"provider.ios_popover.approval_require_msg": "Token muss vor dem Tausch genehmigt werden",
"provider.ios_popover.approval_require_title": "Zustimmung erforderlich",
"provider.ios_popover.onekey_fee": "OneKey fee",
"provider.ios_popover.onekey_fee_content": "OneKey erhebt eine Gebühr von 0,3 % (keine Gebühren für Wrapping-Transaktionen), um uns dabei zu unterstützen, ein hochwertiges, nahtloses Erlebnis zu bieten.",
"provider.ios_popover.onekey_fee_content": "OneKey erhebt eine Gebühr von {num} (keine Gebühren für Wrapping-Transaktionen), die bereits im Angebot enthalten ist und uns dabei unterstützt, ein hochwertiges, nahtloses Erlebnis zu bieten. Wenn Sie Bedenken bezüglich der Gebühr haben, kontaktieren Sie uns bitte.",
"provider.ios_popover.onekey_fee_content_sub": "Bitte beachten Sie, dass Brückengebühren, Slippage und variable Wechselkurse den endgültigen Betrag beeinflussen können. Wenn Sie Bedenken bezüglich der Gebühr haben, kontaktieren Sie uns bitte.",
"provider.ios_popover.order_info_title": "Bestellinformationen",
"provider.ios_popover.title": "Information",
"provider.label_anti_mev": "Anti-MEV",
Expand Down Expand Up @@ -1922,8 +1923,8 @@
"transaction.to_contract": "Zum Vertrag",
"transaction__contract_interaction": "Vertragsinteraktion",
"transaction__transaction_confirm": "Transaktionsbestätigung",
"transaction_confirm.batch_swap_tip": "Durch das Absenden dieser Bestellung genehmigen Sie {token} für den Handel und bestätigen einen Tausch auf {chain}, betrieben von {provider} Api.",
"transaction_confirm.single_swap_tip": "Durch das Absenden dieser Bestellung bestätigen Sie einen Tausch auf {chain}, betrieben von {provider} Api.",
"transaction_confirm.batch_swap_tip": "Durch das Absenden dieser Bestellung genehmigen Sie {token} für den Handel und bestätigen einen Tausch auf {chain}, betrieben durch die {provider} API. Wenn Sie Bedenken bezüglich der Bestellung haben, kontaktieren Sie uns bitte.",
"transaction_confirm.single_swap_tip": "Durch das Absenden dieser Bestellung bestätigen Sie einen Tausch auf {chain}, der von der {provider} API unterstützt wird. Wenn Sie Bedenken bezüglich der Bestellung haben, kontaktieren Sie uns bitte.",
"troubleshooting.change_usb_port": "Ändern Sie den USB-Anschluss, den Sie an Ihrem Computer verwenden.",
"troubleshooting.check_bluetooth": "Stellen Sie sicher, dass Bluetooth auf Ihrem OneKey-Gerät aktiviert ist (deaktivieren Sie AirGap, wenn Sie OneKey Pro verwenden).",
"troubleshooting.check_bridge": "Überprüfen Sie, ob die Brücke korrekt installiert ist. <tag>Hier finden Sie Details</tag>.",
Expand Down
7 changes: 4 additions & 3 deletions packages/shared/src/locale/json/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,8 @@
"provider.ios_popover.approval_require_msg": "Need to approve token before swap",
"provider.ios_popover.approval_require_title": "Approval Required",
"provider.ios_popover.onekey_fee": "OneKey fee",
"provider.ios_popover.onekey_fee_content": "OneKey charges a 0.3% fee (no fees for wrapping transactions), supporting us in providing a high-quality, seamless experience.",
"provider.ios_popover.onekey_fee_content": "OneKey charges a {num} fee (no fees for wrapping transactions), which is already included in the quote, supporting us in providing a high-quality, seamless experience. If you have any concerns about the fee, please contact us.",
"provider.ios_popover.onekey_fee_content_sub": "Please note that bridge fees, slippage, and floating rates may affect the final amount received. If you have any concerns about the fee, please contact us.",
"provider.ios_popover.order_info_title": "Order Info",
"provider.ios_popover.title": "Information",
"provider.label_anti_mev": "Anti-MEV",
Expand Down Expand Up @@ -1922,8 +1923,8 @@
"transaction.to_contract": "To contract",
"transaction__contract_interaction": "Contract interaction",
"transaction__transaction_confirm": "Transaction confirm",
"transaction_confirm.batch_swap_tip": "By submitting this order, you are approving token for trading confirming a swap on chain powered by provider Api. ",
"transaction_confirm.single_swap_tip": "By submitting this order, you are confirming a swap on {chain} powered by {provider} Api.",
"transaction_confirm.batch_swap_tip": "By submitting this order, you are approving {token} for trading confirming a swap on {chain} powered by {provider} API. If you have any concerns about the order, please contact us.",
"transaction_confirm.single_swap_tip": "By submitting this order, you are confirming a swap on {chain} powered by {provider} API. If you have any concerns about the order, please contact us.",
"troubleshooting.change_usb_port": "Change the USB port used on your computer.",
"troubleshooting.check_bluetooth": "Ensure Bluetooth is enabled on your OneKey device (disable AirGap if using OneKey Pro).",
"troubleshooting.check_bridge": "Check if the Bridge is installed correctly. <tag>See details here</tag>.",
Expand Down
7 changes: 4 additions & 3 deletions packages/shared/src/locale/json/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,8 @@
"provider.ios_popover.approval_require_msg": "Need to approve token before swap",
"provider.ios_popover.approval_require_title": "Approval Required",
"provider.ios_popover.onekey_fee": "OneKey fee",
"provider.ios_popover.onekey_fee_content": "OneKey charges a 0.3% fee (no fees for wrapping transactions), supporting us in providing a high-quality, seamless experience.",
"provider.ios_popover.onekey_fee_content": "OneKey charges a {num} fee (no fees for wrapping transactions), which is already included in the quote, supporting us in providing a high-quality, seamless experience. If you have any concerns about the fee, please contact us.",
"provider.ios_popover.onekey_fee_content_sub": "Please note that bridge fees, slippage, and floating rates may affect the final amount received. If you have any concerns about the fee, please contact us.",
"provider.ios_popover.order_info_title": "Order Info",
"provider.ios_popover.title": "Information",
"provider.label_anti_mev": "Anti-MEV",
Expand Down Expand Up @@ -1922,8 +1923,8 @@
"transaction.to_contract": "To contract",
"transaction__contract_interaction": "Contract interaction",
"transaction__transaction_confirm": "Transaction confirm",
"transaction_confirm.batch_swap_tip": "By submitting this order, you are approving {token} for trading confirming a swap on {chain} powered by {provider} Api. ",
"transaction_confirm.single_swap_tip": "By submitting this order, you are confirming a swap on {chain} powered by {provider} Api.",
"transaction_confirm.batch_swap_tip": "By submitting this order, you are approving {token} for trading confirming a swap on {chain} powered by {provider} API. If you have any concerns about the order, please contact us.",
"transaction_confirm.single_swap_tip": "By submitting this order, you are confirming a swap on {chain} powered by {provider} API. If you have any concerns about the order, please contact us.",
"troubleshooting.change_usb_port": "Change the USB port used on your computer.",
"troubleshooting.check_bluetooth": "Ensure Bluetooth is enabled on your OneKey device (disable AirGap if using OneKey Pro).",
"troubleshooting.check_bridge": "Check if the Bridge is installed correctly. <tag>See details here</tag>.",
Expand Down
7 changes: 4 additions & 3 deletions packages/shared/src/locale/json/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,8 @@
"provider.ios_popover.approval_require_msg": "Es necesario aprobar el token antes del intercambio",
"provider.ios_popover.approval_require_title": "Aprobación Requerida",
"provider.ios_popover.onekey_fee": "OneKey fee",
"provider.ios_popover.onekey_fee_content": "OneKey cobra una tarifa del 0.3% (sin tarifas para transacciones de envoltura), apoyándonos en proporcionar una experiencia de alta calidad y sin interrupciones.",
"provider.ios_popover.onekey_fee_content": "OneKey cobra una tarifa de {num} (sin tarifas para transacciones de envoltura), que ya está incluida en la cotización, apoyándonos en brindar una experiencia de alta calidad y sin interrupciones. Si tiene alguna inquietud sobre la tarifa, por favor contáctenos.",
"provider.ios_popover.onekey_fee_content_sub": "Tenga en cuenta que las tarifas de puente, el deslizamiento y las tasas flotantes pueden afectar la cantidad final recibida. Si tiene alguna inquietud sobre la tarifa, por favor contáctenos.",
"provider.ios_popover.order_info_title": "Información del Pedido",
"provider.ios_popover.title": "Información",
"provider.label_anti_mev": "Anti-MEV",
Expand Down Expand Up @@ -1922,8 +1923,8 @@
"transaction.to_contract": "Para Contratar",
"transaction__contract_interaction": "Interacción de Contrato",
"transaction__transaction_confirm": "Confirmar Transacción",
"transaction_confirm.batch_swap_tip": "Al enviar este pedido, estás aprobando {token} para el comercio confirmando un intercambio en {chain} impulsado por la API de {provider}.",
"transaction_confirm.single_swap_tip": "Al enviar este pedido, estás confirmando un intercambio en {chain} impulsado por la API de {provider}.",
"transaction_confirm.batch_swap_tip": "Al enviar este pedido, estás aprobando {token} para el comercio confirmando un intercambio en {chain} impulsado por la API de {provider}. Si tienes alguna inquietud sobre el pedido, por favor contáctanos.",
"transaction_confirm.single_swap_tip": "Al enviar este pedido, estás confirmando un intercambio en {chain} impulsado por la API de {provider}. Si tienes alguna inquietud sobre el pedido, por favor contáctanos.",
"troubleshooting.change_usb_port": "Cambia el puerto USB utilizado en tu computadora.",
"troubleshooting.check_bluetooth": "Asegúrate de que el Bluetooth esté activado en tu dispositivo OneKey (desactiva AirGap si usas OneKey Pro).",
"troubleshooting.check_bridge": "Verifica si el Puente está instalado correctamente. <tag>Ver detalles aquí</tag>.",
Expand Down
7 changes: 4 additions & 3 deletions packages/shared/src/locale/json/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,8 @@
"provider.ios_popover.approval_require_msg": "Il faut approuver le jeton avant l'échange",
"provider.ios_popover.approval_require_title": "Approbation requise",
"provider.ios_popover.onekey_fee": "OneKey fee",
"provider.ios_popover.onekey_fee_content": "OneKey facture des frais de 0,3 % (pas de frais pour les transactions d'emballage), nous aidant à offrir une expérience de haute qualité et sans faille.",
"provider.ios_popover.onekey_fee_content": "OneKey facture des frais de {num} (pas de frais pour les transactions d'emballage), qui sont déjà inclus dans le devis, nous aidant à offrir une expérience de haute qualité et sans faille. Si vous avez des préoccupations concernant les frais, veuillez nous contacter.",
"provider.ios_popover.onekey_fee_content_sub": "Veuillez noter que les frais de pont, le glissement et les taux flottants peuvent affecter le montant final reçu. Si vous avez des préoccupations concernant les frais, veuillez nous contacter.",
"provider.ios_popover.order_info_title": "Informations de Commande",
"provider.ios_popover.title": "Information",
"provider.label_anti_mev": "Anti-MEV",
Expand Down Expand Up @@ -1922,8 +1923,8 @@
"transaction.to_contract": "À Contrat",
"transaction__contract_interaction": "Interaction de contrat",
"transaction__transaction_confirm": "Confirmation de transaction",
"transaction_confirm.batch_swap_tip": "En soumettant cette commande, vous approuvez {token} pour le trading en confirmant un échange sur {chain} propulsé par l'API de {provider}.",
"transaction_confirm.single_swap_tip": "En soumettant cette commande, vous confirmez un échange sur {chain} propulsé par l'API {provider}.",
"transaction_confirm.batch_swap_tip": "En soumettant cette commande, vous approuvez {token} pour le trading en confirmant un échange sur {chain} alimenté par l'API {provider}. Si vous avez des inquiétudes concernant la commande, veuillez nous contacter.",
"transaction_confirm.single_swap_tip": "En soumettant cette commande, vous confirmez un échange sur {chain} propulsé par l'API {provider}. Si vous avez des préoccupations concernant la commande, veuillez nous contacter.",
"troubleshooting.change_usb_port": "Changez le port USB utilisé sur votre ordinateur.",
"troubleshooting.check_bluetooth": "Assurez-vous que le Bluetooth est activé sur votre appareil OneKey (désactivez AirGap si vous utilisez OneKey Pro).",
"troubleshooting.check_bridge": "Vérifiez si le Bridge est correctement installé. <tag>Voir les détails ici</tag>.",
Expand Down
Loading

0 comments on commit 682e032

Please sign in to comment.