From d6c641242f3c2ead5ec64fe2c87fab7c188650ca Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 25 Sep 2023 15:20:11 +0300 Subject: [PATCH] CW-475-Better-error-message-if-there-isnt-enough-network-fee-asset-available (#1092) * Better error message * minor fixes * localization * Update strings_tl.arb * Update append_translation.sh --- lib/view_model/send/send_view_model.dart | 14 +++++++++++++- res/values/strings_ar.arb | 3 +++ res/values/strings_bg.arb | 1 + res/values/strings_cs.arb | 1 + res/values/strings_de.arb | 1 + res/values/strings_en.arb | 1 + res/values/strings_es.arb | 1 + res/values/strings_fr.arb | 1 + res/values/strings_ha.arb | 1 + res/values/strings_hi.arb | 1 + res/values/strings_hr.arb | 3 ++- res/values/strings_id.arb | 3 ++- res/values/strings_it.arb | 1 + res/values/strings_ja.arb | 1 + res/values/strings_ko.arb | 1 + res/values/strings_my.arb | 1 + res/values/strings_nl.arb | 1 + res/values/strings_pl.arb | 1 + res/values/strings_pt.arb | 1 + res/values/strings_ru.arb | 1 + res/values/strings_th.arb | 1 + res/values/strings_tl.arb | 4 +++- res/values/strings_tr.arb | 1 + res/values/strings_uk.arb | 1 + res/values/strings_ur.arb | 1 + res/values/strings_yo.arb | 1 + res/values/strings_zh.arb | 1 + scripts/append_translation.sh | 2 +- 28 files changed, 46 insertions(+), 5 deletions(-) diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index 329b3c4ad..72ce9fdb2 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -30,6 +30,7 @@ import 'package:cake_wallet/view_model/send/send_view_model_state.dart'; import 'package:cake_wallet/entities/parsed_address.dart'; import 'package:cake_wallet/bitcoin/bitcoin.dart'; import 'package:cake_wallet/haven/haven.dart'; +import 'package:cake_wallet/generated/i18n.dart'; part 'send_view_model.g.dart'; @@ -325,7 +326,8 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor state = TransactionCommitted(); } catch (e) { - state = FailureState(e.toString()); + String translatedError = translateErrorMessage(e.toString(), wallet.type, wallet.currency); + state = FailureState(translatedError); } } @@ -412,4 +414,14 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor selectedCryptoCurrency = wallet.currency; } } + + String translateErrorMessage(String error, WalletType walletType, CryptoCurrency currency,) { + if (walletType == WalletType.ethereum || walletType == WalletType.haven) { + if (error.contains('gas required exceeds allowance (0)') || error.contains('insufficient funds for gas')) { + return S.current.do_not_have_enough_gas_asset(currency.toString()); + } + } + + return error; + } } diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index b10dfbe8e..3a90aa308 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -689,5 +689,8 @@ "default_buy_provider": "مزود شراء الافتراضي", "ask_each_time": "اسأل في كل مرة", "buy_provider_unavailable": "مزود حاليا غير متوفر.", + + "do_not_have_enough_gas_asset": "ليس لديك ما يكفي من ${currency} لإجراء معاملة وفقًا لشروط شبكة blockchain الحالية. أنت بحاجة إلى المزيد من ${currency} لدفع رسوم شبكة blockchain، حتى لو كنت ترسل أصلًا مختلفًا.", "totp_auth_url": " TOTP ﺔﻗﺩﺎﺼﻤﻟ URL ﻥﺍﻮﻨﻋ" } + diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index 828af2102..39ce6196b 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -685,5 +685,6 @@ "default_buy_provider": "Доставчик по подразбиране купува", "ask_each_time": "Питайте всеки път", "buy_provider_unavailable": "Понастоящем доставчик не е наличен.", + "do_not_have_enough_gas_asset": "Нямате достатъчно ${currency}, за да извършите транзакция с текущите условия на блокчейн мрежата. Имате нужда от повече ${currency}, за да платите таксите за блокчейн мрежа, дори ако изпращате различен актив.", "totp_auth_url": "TOTP AUTH URL" } diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index ea4dc1856..0c063f0c9 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -685,5 +685,6 @@ "default_buy_provider": "Výchozí poskytovatel nákupu", "ask_each_time": "Zeptejte se pokaždé", "buy_provider_unavailable": "Poskytovatel aktuálně nedostupný.", + "do_not_have_enough_gas_asset": "Nemáte dostatek ${currency} k provedení transakce s aktuálními podmínkami blockchainové sítě. K placení poplatků za blockchainovou síť potřebujete více ${currency}, i když posíláte jiné aktivum.", "totp_auth_url": "URL AUTH TOTP" } diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 09538ccc0..4b2cba6d4 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -693,5 +693,6 @@ "default_buy_provider": "Standard-Kaufanbieter", "ask_each_time": "Jedes Mal fragen", "buy_provider_unavailable": "Anbieter derzeit nicht verfügbar.", + "do_not_have_enough_gas_asset": "Sie verfügen nicht über genügend ${currency}, um eine Transaktion unter den aktuellen Bedingungen des Blockchain-Netzwerks durchzuführen. Sie benötigen mehr ${currency}, um die Gebühren für das Blockchain-Netzwerk zu bezahlen, auch wenn Sie einen anderen Vermögenswert senden.", "totp_auth_url": "TOTP-Auth-URL" } diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 99ba22b18..7e3b1b55d 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -694,5 +694,6 @@ "ask_each_time": "Ask each time", "robinhood_option_description": "Buy and transfer instantly using your debit card, bank account, or Robinhood balance. USA only.", "buy_provider_unavailable": "Provider currently unavailable.", + "do_not_have_enough_gas_asset": "You do not have enough ${currency} to make a transaction with the current blockchain network conditions. You need more ${currency} to pay blockchain network fees, even if you are sending a different asset.", "totp_auth_url": "TOTP AUTH URL" } diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index a6175c6c0..f2b0729f3 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -693,5 +693,6 @@ "default_buy_provider": "Proveedor de compra predeterminado", "ask_each_time": "Pregunta cada vez", "buy_provider_unavailable": "Proveedor actualmente no disponible.", + "do_not_have_enough_gas_asset": "No tienes suficiente ${currency} para realizar una transacción con las condiciones actuales de la red blockchain. Necesita más ${currency} para pagar las tarifas de la red blockchain, incluso si envía un activo diferente.", "totp_auth_url": "URL de autenticación TOTP" } diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index f659f0b14..a081727fb 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -693,5 +693,6 @@ "default_buy_provider": "Fournisseur d'achat par défaut", "ask_each_time": "Demandez à chaque fois", "buy_provider_unavailable": "Fournisseur actuellement indisponible.", + "do_not_have_enough_gas_asset": "Vous n'avez pas assez de ${currency} pour effectuer une transaction avec les conditions actuelles du réseau blockchain. Vous avez besoin de plus de ${currency} pour payer les frais du réseau blockchain, même si vous envoyez un actif différent.", "totp_auth_url": "URL D'AUTORISATION TOTP" } diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index 2b55ffd2a..68051b5d9 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -671,5 +671,6 @@ "default_buy_provider": "Tsohuwar Siyarwa", "ask_each_time": "Tambaya kowane lokaci", "buy_provider_unavailable": "Mai ba da kyauta a halin yanzu babu.", + "do_not_have_enough_gas_asset": "Ba ku da isassun ${currency} don yin ma'amala tare da yanayin cibiyar sadarwar blockchain na yanzu. Kuna buƙatar ƙarin ${currency} don biyan kuɗaɗen cibiyar sadarwar blockchain, koda kuwa kuna aika wata kadara daban.", "totp_auth_url": "TOTP AUTH URL" } diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 69f37ab83..9f531bb29 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -693,5 +693,6 @@ "default_buy_provider": "डिफ़ॉल्ट खरीद प्रदाता", "ask_each_time": "हर बार पूछें", "buy_provider_unavailable": "वर्तमान में प्रदाता अनुपलब्ध है।", + "do_not_have_enough_gas_asset": "वर्तमान ब्लॉकचेन नेटवर्क स्थितियों में लेनदेन करने के लिए आपके पास पर्याप्त ${currency} नहीं है। ब्लॉकचेन नेटवर्क शुल्क का भुगतान करने के लिए आपको अधिक ${currency} की आवश्यकता है, भले ही आप एक अलग संपत्ति भेज रहे हों।", "totp_auth_url": "TOTP प्रामाणिक यूआरएल" } diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 3c4299092..4b56ef344 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -693,5 +693,6 @@ "default_buy_provider": "Zadani davatelj kupnje", "ask_each_time": "Pitajte svaki put", "buy_provider_unavailable": "Davatelj trenutno nije dostupan.", + "do_not_have_enough_gas_asset": "Nemate dovoljno ${currency} da izvršite transakciju s trenutačnim uvjetima blockchain mreže. Trebate više ${currency} da platite naknade za blockchain mrežu, čak i ako šaljete drugu imovinu.", "totp_auth_url": "TOTP AUTH URL" -} +} \ No newline at end of file diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index a5b2e3ffa..6200559e3 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -681,5 +681,6 @@ "default_buy_provider": "Penyedia beli default", "ask_each_time": "Tanyakan setiap kali", "buy_provider_unavailable": "Penyedia saat ini tidak tersedia.", + "do_not_have_enough_gas_asset": "Anda tidak memiliki cukup ${currency} untuk melakukan transaksi dengan kondisi jaringan blockchain saat ini. Anda memerlukan lebih banyak ${currency} untuk membayar biaya jaringan blockchain, meskipun Anda mengirimkan aset yang berbeda.", "totp_auth_url": "URL Otentikasi TOTP" -} +} \ No newline at end of file diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 98c13aa2d..e3fd1b94b 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -693,5 +693,6 @@ "default_buy_provider": "Provider di acquisto predefinito", "ask_each_time": "Chiedi ogni volta", "buy_provider_unavailable": "Provider attualmente non disponibile.", + "do_not_have_enough_gas_asset": "Non hai abbastanza ${currency} per effettuare una transazione con le attuali condizioni della rete blockchain. Hai bisogno di più ${currency} per pagare le commissioni della rete blockchain, anche se stai inviando una risorsa diversa.", "totp_auth_url": "URL DI AUT. TOTP" } diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index f5bea4b58..8dbf429c5 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -693,5 +693,6 @@ "default_buy_provider": "デフォルトの購入プロバイダー", "ask_each_time": "毎回尋ねてください", "buy_provider_unavailable": "現在、プロバイダーは利用できません。", + "do_not_have_enough_gas_asset": "現在のブロックチェーン ネットワークの状況では、トランザクションを行うのに十分な ${currency} がありません。別のアセットを送信する場合でも、ブロックチェーン ネットワーク料金を支払うにはさらに ${currency} が必要です。", "totp_auth_url": "TOTP認証URL" } diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 79455ff92..da9b99c2b 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -693,5 +693,6 @@ "default_buy_provider": "기본 구매 제공자", "ask_each_time": "매번 물어보십시오", "buy_provider_unavailable": "제공자는 현재 사용할 수 없습니다.", + "do_not_have_enough_gas_asset": "현재 블록체인 네트워크 조건으로 거래를 하기에는 ${currency}이(가) 충분하지 않습니다. 다른 자산을 보내더라도 블록체인 네트워크 수수료를 지불하려면 ${currency}가 더 필요합니다.", "totp_auth_url": "TOTP 인증 URL" } diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 4ea13bc27..043484feb 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -691,5 +691,6 @@ "default_buy_provider": "Default Provider ကိုဝယ်ပါ", "ask_each_time": "တစ်ခုချင်းစီကိုအချိန်မေးပါ", "buy_provider_unavailable": "လက်ရှိတွင်လက်ရှိမရနိုင်ပါ။", + "do_not_have_enough_gas_asset": "လက်ရှိ blockchain ကွန်ရက်အခြေအနေများနှင့် အရောင်းအဝယ်ပြုလုပ်ရန် သင့်တွင် ${currency} လုံလောက်မှုမရှိပါ။ သင်သည် မတူညီသော ပိုင်ဆိုင်မှုတစ်ခုကို ပေးပို့နေသော်လည်း blockchain ကွန်ရက်အခကြေးငွေကို ပေးဆောင်ရန် သင်သည် နောက်ထပ် ${currency} လိုအပ်ပါသည်။", "totp_auth_url": "TOTP AUTH URL" } diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 99a469945..2d9f3655e 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -693,5 +693,6 @@ "default_buy_provider": "Standaard Koopprovider", "ask_each_time": "Vraag het elke keer", "buy_provider_unavailable": "Provider momenteel niet beschikbaar.", + "do_not_have_enough_gas_asset": "U heeft niet genoeg ${currency} om een transactie uit te voeren met de huidige blockchain-netwerkomstandigheden. U heeft meer ${currency} nodig om blockchain-netwerkkosten te betalen, zelfs als u een ander item verzendt.", "totp_auth_url": "TOTP AUTH-URL" } diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 5d32ee12c..6f3a41d0b 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -693,5 +693,6 @@ "default_buy_provider": "Domyślny dostawca zakupu", "ask_each_time": "Zapytaj za każdym razem", "buy_provider_unavailable": "Dostawca obecnie niedostępny.", + "do_not_have_enough_gas_asset": "Nie masz wystarczającej ilości ${currency}, aby dokonać transakcji przy bieżących warunkach sieci blockchain. Potrzebujesz więcej ${currency}, aby uiścić opłaty za sieć blockchain, nawet jeśli wysyłasz inny zasób.", "totp_auth_url": "Adres URL TOTP AUTH" } diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index ca46a26e7..ea442420f 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -692,5 +692,6 @@ "default_buy_provider": "Provedor de compra padrão", "ask_each_time": "Pergunte cada vez", "buy_provider_unavailable": "Provedor atualmente indisponível.", + "do_not_have_enough_gas_asset": "Você não tem ${currency} suficiente para fazer uma transação com as condições atuais da rede blockchain. Você precisa de mais ${currency} para pagar as taxas da rede blockchain, mesmo se estiver enviando um ativo diferente.", "totp_auth_url": "URL de autenticação TOTP" } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index fb3883338..5e70bc544 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -693,5 +693,6 @@ "default_buy_provider": "По умолчанию поставщик покупки", "ask_each_time": "Спросите каждый раз", "buy_provider_unavailable": "Поставщик в настоящее время недоступен.", + "do_not_have_enough_gas_asset": "У вас недостаточно ${currency} для совершения транзакции при текущих условиях сети блокчейн. Вам нужно больше ${currency} для оплаты комиссий за сеть блокчейна, даже если вы отправляете другой актив.", "totp_auth_url": "URL-адрес TOTP-АВТОРИЗАЦИИ" } diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 0e31518eb..8778802a9 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -691,5 +691,6 @@ "default_buy_provider": "ผู้ให้บริการซื้อเริ่มต้น", "ask_each_time": "ถามทุกครั้ง", "buy_provider_unavailable": "ผู้ให้บริการไม่สามารถใช้งานได้ในปัจจุบัน", + "do_not_have_enough_gas_asset": "คุณมี ${currency} ไม่เพียงพอที่จะทำธุรกรรมกับเงื่อนไขเครือข่ายบล็อคเชนในปัจจุบัน คุณต้องมี ${currency} เพิ่มขึ้นเพื่อชำระค่าธรรมเนียมเครือข่ายบล็อคเชน แม้ว่าคุณจะส่งสินทรัพย์อื่นก็ตาม", "totp_auth_url": "URL การตรวจสอบสิทธิ์ TOTP" } diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index d65e36609..18c52aa83 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -687,5 +687,7 @@ "support_title_other_links": "Iba pang mga link sa suporta", "support_description_other_links": "Sumali sa aming mga komunidad o maabot sa amin ang aming mga kasosyo sa pamamagitan ng iba pang mga pamamaraan", "select_destination": "Mangyaring piliin ang patutunguhan para sa backup file.", - "save_to_downloads": "I -save sa mga pag -download" + "save_to_downloads": "I -save sa mga pag -download", + "do_not_have_enough_gas_asset": "Wala kang sapat na ${currency} para gumawa ng transaksyon sa kasalukuyang kundisyon ng network ng blockchain. Kailangan mo ng higit pang ${currency} upang magbayad ng mga bayarin sa network ng blockchain, kahit na nagpapadala ka ng ibang asset.", + "totp_auth_url": "TOTP AUTH URL" } \ No newline at end of file diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index 16ed18b96..fa4568e93 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -691,5 +691,6 @@ "default_buy_provider": "Varsayılan Satın Alma Sağlayıcısı", "ask_each_time": "Her seferinde sor", "buy_provider_unavailable": "Sağlayıcı şu anda kullanılamıyor.", + "do_not_have_enough_gas_asset": "Mevcut blockchain ağ koşullarıyla işlem yapmak için yeterli ${currency} paranız yok. Farklı bir varlık gönderiyor olsanız bile blockchain ağ ücretlerini ödemek için daha fazla ${currency} miktarına ihtiyacınız var.", "totp_auth_url": "TOTP YETKİ URL'si" } diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index c9943dd3a..7b739e201 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -693,5 +693,6 @@ "default_buy_provider": "Постачальник покупки за замовчуванням", "ask_each_time": "Запитайте кожен раз", "buy_provider_unavailable": "В даний час постачальник недоступний.", + "do_not_have_enough_gas_asset": "У вас недостатньо ${currency}, щоб здійснити трансакцію з поточними умовами мережі блокчейн. Вам потрібно більше ${currency}, щоб сплатити комісію мережі блокчейн, навіть якщо ви надсилаєте інший актив.", "totp_auth_url": "TOTP AUTH URL" } diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 47c96d9fb..e53784923 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -685,5 +685,6 @@ "default_buy_provider": "پہلے سے طے شدہ خریدنے والا", "ask_each_time": "ہر بار پوچھیں", "buy_provider_unavailable": "فراہم کنندہ فی الحال دستیاب نہیں ہے۔", + "do_not_have_enough_gas_asset": "آپ کے پاس موجودہ بلاکچین نیٹ ورک کی شرائط کے ساتھ لین دین کرنے کے لیے کافی ${currency} نہیں ہے۔ آپ کو بلاکچین نیٹ ورک کی فیس ادا کرنے کے لیے مزید ${currency} کی ضرورت ہے، چاہے آپ کوئی مختلف اثاثہ بھیج رہے ہوں۔", "totp_auth_url": "TOTP AUTH URL" } diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index ec84589da..0532ae2eb 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -687,5 +687,6 @@ "default_buy_provider": "Aiyipada Ra Olupese", "ask_each_time": "Beere lọwọ kọọkan", "buy_provider_unavailable": "Olupese lọwọlọwọ ko si.", + "do_not_have_enough_gas_asset": "O ko ni to ${currency} lati ṣe idunadura kan pẹlu awọn ipo nẹtiwọki blockchain lọwọlọwọ. O nilo diẹ sii ${currency} lati san awọn owo nẹtiwọọki blockchain, paapaa ti o ba nfi dukia miiran ranṣẹ.", "totp_auth_url": "TOTP AUTH URL" } diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index c606d4135..7c947847e 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -692,5 +692,6 @@ "default_buy_provider": "默认购买提供商", "ask_each_time": "每次问", "buy_provider_unavailable": "提供者目前不可用。", + "do_not_have_enough_gas_asset": "您没有足够的 ${currency} 来在当前的区块链网络条件下进行交易。即使您发送的是不同的资产,您也需要更多的 ${currency} 来支付区块链网络费用。", "totp_auth_url": "TOTP 授权 URL" } diff --git a/scripts/append_translation.sh b/scripts/append_translation.sh index 2dc373e0e..0cc33fc0f 100755 --- a/scripts/append_translation.sh +++ b/scripts/append_translation.sh @@ -7,7 +7,7 @@ # if you get an error `command not found` # give the correct permissions to this file using `chmod 777 append_translation.sh` -langs=("ar" "bg" "cs" "de" "en" "es" "fr" "ha" "hi" "hr" "id" "it" "ja" "ko" "my" "nl" "pl" "pt" "ru" "th" "tr" "uk" "ur" "yo" "zh") +langs=("ar" "bg" "cs" "de" "en" "es" "fr" "ha" "hi" "hr" "id" "it" "ja" "ko" "my" "nl" "pl" "pt" "ru" "th" "tl" "tr" "uk" "ur" "yo" "zh") name=$1 text=$2